diff options
author | Julian Scheel <julian@jusst.de> | 2017-11-16 17:35:17 +0100 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-06-29 20:08:00 -0400 |
commit | 5ac359df8c9f555699dadea1b4963d469e1d6678 (patch) | |
tree | 6d107b0b45a1e0cf93389edca28cc34f0556f5d8 /sound/usb | |
parent | f5c6ecaa5cdf222c5674ef8ef64b36c445742029 (diff) |
ALSA: usb-audio: uac1: Invalidate ctl on interrupt
[ Upstream commit b2500b584cfd228d67e1e43daf27c8af865b499e ]
When an interrupt occurs, the value of at least one of the belonging
controls should have changed. To make sure they get re-read from device
on the next read, invalidate the cache. This was correctly implemented
for uac2 already, but missing for uac1.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 9bbe84ce7d07..a2a9712bd6fa 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2330,9 +2330,14 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid) { struct usb_mixer_elem_list *list; - for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) + for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) { + struct usb_mixer_elem_info *info = + (struct usb_mixer_elem_info *)list; + /* invalidate cache, so the value is read from the device */ + info->cached = 0; snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &list->kctl->id); + } } static void snd_usb_mixer_dump_cval(struct snd_info_buffer *buffer, |