Commit 8a749d99 authored by Hui Wang's avatar Hui Wang Committed by Sasha Levin

ALSA: hda - set input_path bitmap to zero after moving it to new place

[ Upstream commit a8f20fd2 ]

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: 3a65bcdc ("ALSA: hda - Fix inconsistent input_paths after ADC reduction")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 1d233b9e
...@@ -3188,6 +3188,7 @@ static int check_dyn_adc_switch(struct hda_codec *codec) ...@@ -3188,6 +3188,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][nums] = spec->input_paths[i][nums] =
spec->input_paths[i][n]; spec->input_paths[i][n];
spec->input_paths[i][n] = 0;
} }
} }
nums++; nums++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment