Skip to content

Commit

Permalink
ALSA: hda - VIA: Fix notify_aa_path_ctls() invalid issue.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lydia Wang authored and Takashi Iwai committed Apr 28, 2011
1 parent 54a96da commit 525566c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,14 +1292,18 @@ static void notify_aa_path_ctls(struct hda_codec *codec)
{
int i;
struct snd_ctl_elem_id id;
const char *labels[] = {"Mic", "Front Mic", "Line"};
const char *labels[] = {"Mic", "Front Mic", "Line", "Rear Mic"};
struct snd_kcontrol *ctl;

memset(&id, 0, sizeof(id));
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
for (i = 0; i < ARRAY_SIZE(labels); i++) {
sprintf(id.name, "%s Playback Volume", labels[i]);
snd_ctl_notify(codec->bus->card, SNDRV_CTL_EVENT_MASK_VALUE,
&id);
ctl = snd_hda_find_mixer_ctl(codec, id.name);
if (ctl)
snd_ctl_notify(codec->bus->card,
SNDRV_CTL_EVENT_MASK_VALUE,
&ctl->id);
}
}

Expand Down

0 comments on commit 525566c

Please sign in to comment.