diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2011-04-28 04:03:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-28 05:35:18 -0400 |
commit | 525566cb60e167ca1cd770f3d0738735ec3503bb (patch) | |
tree | 160e3aefb337485dd6baccd808b34255cf05eea4 /sound | |
parent | 54a96dadaa2bbe81006c66447517b57534d80e7f (diff) |
ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
In notify_aa_path_ctls(), adds 'rear mic' item and confirms the A-A
path control existing before notifying card that the A-A path volume
is muted if smart5.1 is enabled.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 1371b57c11e8..0997031c48d2 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1292,14 +1292,18 @@ static void notify_aa_path_ctls(struct hda_codec *codec) | |||
1292 | { | 1292 | { |
1293 | int i; | 1293 | int i; |
1294 | struct snd_ctl_elem_id id; | 1294 | struct snd_ctl_elem_id id; |
1295 | const char *labels[] = {"Mic", "Front Mic", "Line"}; | 1295 | const char *labels[] = {"Mic", "Front Mic", "Line", "Rear Mic"}; |
1296 | struct snd_kcontrol *ctl; | ||
1296 | 1297 | ||
1297 | memset(&id, 0, sizeof(id)); | 1298 | memset(&id, 0, sizeof(id)); |
1298 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 1299 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
1299 | for (i = 0; i < ARRAY_SIZE(labels); i++) { | 1300 | for (i = 0; i < ARRAY_SIZE(labels); i++) { |
1300 | sprintf(id.name, "%s Playback Volume", labels[i]); | 1301 | sprintf(id.name, "%s Playback Volume", labels[i]); |
1301 | snd_ctl_notify(codec->bus->card, SNDRV_CTL_EVENT_MASK_VALUE, | 1302 | ctl = snd_hda_find_mixer_ctl(codec, id.name); |
1302 | &id); | 1303 | if (ctl) |
1304 | snd_ctl_notify(codec->bus->card, | ||
1305 | SNDRV_CTL_EVENT_MASK_VALUE, | ||
1306 | &ctl->id); | ||
1303 | } | 1307 | } |
1304 | } | 1308 | } |
1305 | 1309 | ||