diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-09 16:28:02 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-09 16:46:03 +0200 |
commit | 10a20af7c944649dc6d1ffa06bc759f5f3a16cd9 (patch) | |
tree | 322ad916b8d909e3bdc3c51eb63ccecbdd1ae16a /sound/pci/hda/patch_cirrus.c | |
parent | 86e2959a10828dd2614e037fb2502bc833adca52 (diff) | |
download | op-kernel-dev-10a20af7c944649dc6d1ffa06bc759f5f3a16cd9.zip op-kernel-dev-10a20af7c944649dc6d1ffa06bc759f5f3a16cd9.tar.gz |
ALSA: hda - Improve the input source name labels
This patch improves the input-source label strings to be generated from
the pin information instead of fixed strings per AUTO_PIN_* type.
This gives more suitable labels, especially for mic and line-in pins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index adb5ec5..ae75283 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -673,6 +673,7 @@ static int cs_capture_source_info(struct snd_kcontrol *kcontrol, { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct cs_spec *spec = codec->spec; + struct auto_pin_cfg *cfg = &spec->autocfg; unsigned int idx; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; @@ -681,7 +682,8 @@ static int cs_capture_source_info(struct snd_kcontrol *kcontrol, if (uinfo->value.enumerated.item >= spec->num_inputs) uinfo->value.enumerated.item = spec->num_inputs - 1; idx = spec->input_idx[uinfo->value.enumerated.item]; - strcpy(uinfo->value.enumerated.name, auto_pin_cfg_labels[idx]); + strcpy(uinfo->value.enumerated.name, + hda_get_input_pin_label(codec, cfg->inputs[idx].pin, 1)); return 0; } |