xref: /linux/sound/usb/power.h (revision 1910bd470a0acea01b88722be61f0dfa29089730)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __USBAUDIO_POWER_H
3 #define __USBAUDIO_POWER_H
4 
5 struct snd_usb_power_domain {
6 	int pd_id;              /* UAC3 Power Domain ID */
7 	int pd_d1d0_rec;        /* D1 to D0 recovery time */
8 	int pd_d2d0_rec;        /* D2 to D0 recovery time */
9 	struct usb_host_interface *ctrl_iface; /* Control interface */
10 };
11 
12 enum {
13 	UAC3_PD_STATE_D0,
14 	UAC3_PD_STATE_D1,
15 	UAC3_PD_STATE_D2,
16 };
17 
18 int snd_usb_power_domain_set(struct snd_usb_audio *chip,
19 			     struct snd_usb_power_domain *pd,
20 			     unsigned char state);
21 struct snd_usb_power_domain *
22 snd_usb_find_power_domain(struct usb_host_interface *ctrl_iface,
23 			  unsigned char id);
24 
25 int snd_usb_autoresume(struct snd_usb_audio *chip);
26 void snd_usb_autosuspend(struct snd_usb_audio *chip);
27 
28 #endif /* __USBAUDIO_POWER_H */
29