Skip to content

Commit 08a4b90

Browse files
committed
ALSA: hda: Fix a regression in Capture Switch mixer read
The recent commit to drop the HDA-specific mute-LED control, e65bf99 ("ALSA: HDA - remove the custom implementation for the audio LED trigger"), caused a regression on the mixer element read for "Capture Switch" when it's built from bind controls. The function create_bind_cap_vol_ctl() creates the snd_kcontrol_new object directly via snd_hda_gen_add_kctl() instead of add_control(). Although the commit above added a workaround for the SNDRV_CTL_ACCESS_READWRITE in add_control() as default, this code path fell out from the radar. As a result, now the driver gives -EPERM error because of the lack of the proper access bit at reading "Capture Switch" element value. Fix the regression by setting the access bit properly. Fixes: e65bf99 ("ALSA: HDA - remove the custom implementation for the audio LED trigger") BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1186634 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 4ad7935 commit 08a4b90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/pci/hda/hda_generic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3520,6 +3520,7 @@ static int cap_sw_put(struct snd_kcontrol *kcontrol,
35203520
static const struct snd_kcontrol_new cap_sw_temp = {
35213521
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
35223522
.name = "Capture Switch",
3523+
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
35233524
.info = cap_sw_info,
35243525
.get = cap_sw_get,
35253526
.put = cap_sw_put,

0 commit comments

Comments
 (0)