summaryrefslogtreecommitdiff
path: root/sound/usb/usbaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-06-05 09:41:17 +0300
committerTakashi Iwai <tiwai@suse.de>2020-06-08 20:34:49 +0300
commit88d8822d30cc6f668d44a1a7466bed5a1f85f607 (patch)
tree68b6dfdd4c466744d68391e578a37e734a4ef94b /sound/usb/usbaudio.h
parent573fcbfd319ccef26caa3700320242accea7fd5c (diff)
downloadlinux-88d8822d30cc6f668d44a1a7466bed5a1f85f607.tar.xz
ALSA: usb-audio: Manage auto-pm of all bundled interfaces
Currently USB-audio driver manages the auto-pm of the primary interface although a card may consist of multiple interfaces. This may leave the secondary and other interfaces left running unnecessarily after the auto-suspend. This patch allows the driver managing the auto-pm of all bundled interfaces per card. The chip->pm_intf field is extended as chip->intf[] to contain the array of assigned interfaces, and the runtime-PM is performed to all those interfaces. Tested-by: Macpaul Lin <macpaul.lin@mediatek.com> Link: https://lore.kernel.org/r/20200605064117.28504-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r--sound/usb/usbaudio.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index e0ebfb25fbd5..b91c4c0807ec 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -19,11 +19,13 @@
struct media_device;
struct media_intf_devnode;
+#define MAX_CARD_INTERFACES 16
+
struct snd_usb_audio {
int index;
struct usb_device *dev;
struct snd_card *card;
- struct usb_interface *pm_intf;
+ struct usb_interface *intf[MAX_CARD_INTERFACES];
u32 usb_id;
struct mutex mutex;
unsigned int system_suspend;