summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2017-06-28 08:59:16 +0800
committerTakashi Iwai <tiwai@suse.de>2017-06-28 07:09:19 +0200
commita8f20fd25bdce81a8e41767c39f456d346b63427 (patch)
tree2e90fa8be4832f7ddbea4c247b0a9e8916a1a48e /sound/pci/hda/hda_generic.c
parentc7ecb9068e6772c43941ce609f08bc53f36e1dce (diff)
downloadlinux-a8f20fd25bdce81a8e41767c39f456d346b63427.tar.gz
linux-a8f20fd25bdce81a8e41767c39f456d346b63427.tar.bz2
linux-a8f20fd25bdce81a8e41767c39f456d346b63427.zip
ALSA: hda - set input_path bitmap to zero after moving it to new place
Recently we met a problem, the codec has valid adcs and input pins, and they can form valid input paths, but the driver does not build valid controls for them like "Mic boost", "Capture Volume" and "Capture Switch". Through debugging, I found the driver needs to shrink the invalid adcs and input paths for this machine, so it will move the whole column bitmap value to the previous column, after moving it, the driver forgets to set the original column bitmap value to zero, as a result, the driver will invalidate the path whose index value is the original colume bitmap value. After executing this function, all valid input paths are invalidated by a mistake, there are no any valid input paths, so the driver won't build controls for them. Fixes: 3a65bcdc577a ("ALSA: hda - Fix inconsistent input_paths after ADC reduction") Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 2842c82363c0..71545b56b4c8 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3174,6 +3174,7 @@ static int check_dyn_adc_switch(struct hda_codec *codec)
spec->input_paths[i][nums]);
spec->input_paths[i][nums] =
spec->input_paths[i][n];
+ spec->input_paths[i][n] = 0;
}
}
nums++;