diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2023-04-05 23:12:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 13:04:39 +0300 |
commit | a30a72f09205194ec21f13327499c4ae35ce8433 (patch) | |
tree | e4e9be936e1b0c2d720fb99714df09be25926557 /sound/i2c | |
parent | d34a86eddc48c17fdc219242d6fdf15c85ef863f (diff) | |
download | linux-a30a72f09205194ec21f13327499c4ae35ce8433.tar.xz |
ALSA: i2c/cs8427: fix iec958 mixer control deactivation
commit e98e7a82bca2b6dce3e03719cff800ec913f9af7 upstream.
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 <oswald.buddenhagen@gmx.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230405201219.2197811-1-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/i2c')
-rw-r--r-- | sound/i2c/cs8427.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index 8afa2f888466..ef40501cf898 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c @@ -568,10 +568,13 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) if (snd_BUG_ON(!cs8427)) return -ENXIO; chip = cs8427->private_data; - if (active) + if (active) { memcpy(chip->playback.pcm_status, chip->playback.def_status, 24); - chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; + chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; + } else { + chip->playback.pcm_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; + } snd_ctl_notify(cs8427->bus->card, SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, &chip->playback.pcm_ctl->id); |