Commit 70818315 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jiri Slaby

ALSA: usb-audio: Save mixer status only once at suspend

commit 1c53e725 upstream.

The suspend callback of usb-audio driver may be called multiple times
per suspend when multiple USB interfaces are bound to a single sound
card instance.  In such a case, it's superfluous to save the mixer
values multiple times.  This patch fixes it by checking the counter.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent c26da265
...@@ -705,6 +705,7 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message) ...@@ -705,6 +705,7 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
chip->autosuspended = 1; chip->autosuspended = 1;
} }
if (chip->num_suspended_intf == 1)
list_for_each_entry(mixer, &chip->mixer_list, list) list_for_each_entry(mixer, &chip->mixer_list, list)
snd_usb_mixer_suspend(mixer); snd_usb_mixer_suspend(mixer);
......
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