ALSA: usb-audio: us144mkii: Add deep sleep command
Add a deep sleep vendor command to be sent during suspend, allowing the device to enter a lower power state. Signed-off-by: Šerif Rami <ramiserifpersia@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250814172222.9448-7-ramiserifpersia@gmail.com
This commit is contained in:
@@ -322,6 +322,13 @@ static int tascam_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
usb_kill_anchored_urbs(&tascam->midi_in_anchor);
|
||||
usb_kill_anchored_urbs(&tascam->midi_out_anchor);
|
||||
|
||||
dev_info(&intf->dev, "sending deep sleep command\n");
|
||||
int err = usb_control_msg(tascam->dev, usb_sndctrlpipe(tascam->dev, 0),
|
||||
VENDOR_REQ_DEEP_SLEEP, RT_H2D_VENDOR_DEV,
|
||||
0x0000, 0x0000, NULL, 0, USB_CTRL_TIMEOUT_MS);
|
||||
if (err < 0)
|
||||
dev_err(&intf->dev, "deep sleep command failed: %d\n", err);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ enum uac_control_selector {
|
||||
|
||||
enum tascam_vendor_request {
|
||||
VENDOR_REQ_REGISTER_WRITE = 0x41,
|
||||
VENDOR_REQ_DEEP_SLEEP = 0x44,
|
||||
VENDOR_REQ_MODE_CONTROL = 0x49,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user