Skip to content

Commit e98e7a8

Browse files
ossilatortiwai
authored andcommitted
ALSA: i2c/cs8427: fix iec958 mixer control deactivation
snd_cs8427_iec958_active() would always delete SNDRV_CTL_ELEM_ACCESS_INACTIVE, even though the function has an argument `active`. Signed-off-by: Oswald Buddenhagen <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent f785f5e commit e98e7a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sound/i2c/cs8427.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,13 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
561561
if (snd_BUG_ON(!cs8427))
562562
return -ENXIO;
563563
chip = cs8427->private_data;
564-
if (active)
564+
if (active) {
565565
memcpy(chip->playback.pcm_status,
566566
chip->playback.def_status, 24);
567-
chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
567+
chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
568+
} else {
569+
chip->playback.pcm_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
570+
}
568571
snd_ctl_notify(cs8427->bus->card,
569572
SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO,
570573
&chip->playback.pcm_ctl->id);

0 commit comments

Comments
 (0)