]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.1.10/alsa-hda-fix-the-detection-of-loopback-mixing-control-for-via-codecs.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.10 / alsa-hda-fix-the-detection-of-loopback-mixing-control-for-via-codecs.patch
CommitLineData
faa88b27
GKH
1From 4808d12d1dddb046ec86425e5f6766f02e950292 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Jan 2012 15:16:02 +0100
4Subject: ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
5
6From: Takashi Iwai <tiwai@suse.de>
7
8commit 4808d12d1dddb046ec86425e5f6766f02e950292 upstream.
9
10Currently the driver checks only the out_mix_path[] for the primary
11output route for judging whether to create the loopback-mixing control
12or not. But, there are cases where aamix-routing is available only on
13headphone or speaker paths but not on the primary output path. So, the
14driver ignores such cases inappropriately.
15
16This patch fixes the check of the loopback-mixing control by testing
17all mix-routing paths.
18
19Signed-off-by: Takashi Iwai <tiwai@suse.de>
20Signed-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;