Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200036 > unrolled thread

[PATCH 3.12 019/123] ALSA: usb-audio: Save mixer status only once at suspend

Started byJiri Slaby <jslaby@suse.cz>
First post2015-08-04 17:20 +0200
Last post2015-08-04 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 019/123] ALSA: usb-audio: Save mixer status only once at suspend Jiri Slaby <jslaby@suse.cz> - 2015-08-04 17:20 +0200

#1200036 — [PATCH 3.12 019/123] ALSA: usb-audio: Save mixer status only once at suspend

FromJiri Slaby <jslaby@suse.cz>
Date2015-08-04 17:20 +0200
Subject[PATCH 3.12 019/123] ALSA: usb-audio: Save mixer status only once at suspend
Message-ID<pTMav-5Ud-53@gated-at.bofh.it>
From: Takashi Iwai <tiwai@suse.de>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 1c53e7253ed8769a00afa0f06777d731dbe1ba6f 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: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 sound/usb/card.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 3ab9fc47da09..ca55e033cf9d 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -705,8 +705,9 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
 			chip->autosuspended = 1;
 	}
 
-	list_for_each_entry(mixer, &chip->mixer_list, list)
-		snd_usb_mixer_suspend(mixer);
+	if (chip->num_suspended_intf == 1)
+		list_for_each_entry(mixer, &chip->mixer_list, list)
+			snd_usb_mixer_suspend(mixer);
 
 	return 0;
 }
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web