]>
Commit | Line | Data |
---|---|---|
faa88b27 GKH |
1 | From 4808d12d1dddb046ec86425e5f6766f02e950292 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Tue, 10 Jan 2012 15:16:02 +0100 | |
4 | Subject: ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 4808d12d1dddb046ec86425e5f6766f02e950292 upstream. | |
9 | ||
10 | Currently the driver checks only the out_mix_path[] for the primary | |
11 | output route for judging whether to create the loopback-mixing control | |
12 | or not. But, there are cases where aamix-routing is available only on | |
13 | headphone or speaker paths but not on the primary output path. So, the | |
14 | driver ignores such cases inappropriately. | |
15 | ||
16 | This patch fixes the check of the loopback-mixing control by testing | |
17 | all mix-routing paths. | |
18 | ||
19 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
21 | ||
22 | --- | |
23 | sound/pci/hda/patch_via.c | 5 ++++- | |
24 | 1 file changed, 4 insertions(+), 1 deletion(-) | |
25 | ||
26 | --- a/sound/pci/hda/patch_via.c | |
27 | +++ b/sound/pci/hda/patch_via.c | |
28 | @@ -2187,7 +2187,10 @@ static int via_auto_create_loopback_swit | |
29 | { | |
30 | struct via_spec *spec = codec->spec; | |
31 | ||
32 | - if (!spec->aa_mix_nid || !spec->out_mix_path.depth) | |
33 | + if (!spec->aa_mix_nid) | |
34 | + return 0; /* no loopback switching available */ | |
35 | + if (!(spec->out_mix_path.depth || spec->hp_mix_path.depth || | |
36 | + spec->speaker_path.depth)) | |
37 | return 0; /* no loopback switching available */ | |
38 | if (!via_clone_control(spec, &via_aamix_ctl_enum)) | |
39 | return -ENOMEM; |