Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19e02a54 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: audio: Free requests only after callback"

parents d8da30ec 29974620
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ CONFIG_USB_CONFIGFS_F_DIAG=m
CONFIG_USB_CONFIGFS_F_CCID=m
CONFIG_USB_CONFIGFS_F_CDEV=m
CONFIG_USB_CONFIGFS_F_GSI=m
CONFIG_USB_CONFIGFS_F_UAC2=m
CONFIG_USB_STORAGE=m
CONFIG_TYPEC_UCSI=m
CONFIG_UCSI_QTI_GLINK=m
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ config USB_CONFIGFS_F_UAC1_LEGACY
	  to be present on the device.

config USB_CONFIGFS_F_UAC2
	bool "Audio Class 2.0"
	tristate "Audio Class 2.0"
	depends on USB_CONFIGFS
	depends on SND
	select USB_LIBCOMPOSITE
+4 −4
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ static struct usb_endpoint_descriptor fs_epout_desc = {
	.bDescriptorType = USB_DT_ENDPOINT,

	.bEndpointAddress = USB_DIR_OUT,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_SYNC,
	.wMaxPacketSize = cpu_to_le16(1023),
	.bInterval = 1,
};
@@ -285,7 +285,7 @@ static struct usb_endpoint_descriptor hs_epout_desc = {
	.bLength = USB_DT_ENDPOINT_SIZE,
	.bDescriptorType = USB_DT_ENDPOINT,

	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_SYNC,
	.wMaxPacketSize = cpu_to_le16(1024),
	.bInterval = 4,
};
@@ -360,7 +360,7 @@ static struct usb_endpoint_descriptor fs_epin_desc = {
	.bDescriptorType = USB_DT_ENDPOINT,

	.bEndpointAddress = USB_DIR_IN,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_SYNC,
	.wMaxPacketSize = cpu_to_le16(1023),
	.bInterval = 1,
};
@@ -369,7 +369,7 @@ static struct usb_endpoint_descriptor hs_epin_desc = {
	.bLength = USB_DT_ENDPOINT_SIZE,
	.bDescriptorType = USB_DT_ENDPOINT,

	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_SYNC,
	.wMaxPacketSize = cpu_to_le16(1024),
	.bInterval = 4,
};
+6 −2
Original line number Diff line number Diff line
@@ -89,7 +89,12 @@ static void u_audio_iso_complete(struct usb_ep *ep, struct usb_request *req)
	struct snd_uac_chip *uac = prm->uac;

	/* i/f shutting down */
	if (!prm->ep_enabled || req->status == -ESHUTDOWN)
	if (!prm->ep_enabled) {
		usb_ep_free_request(ep, req);
		return;
	}

	if (req->status == -ESHUTDOWN)
		return;

	/*
@@ -352,7 +357,6 @@ static inline void free_ep(struct uac_rtd_params *prm, struct usb_ep *ep)
	for (i = 0; i < params->req_number; i++) {
		if (prm->ureq[i].req) {
			usb_ep_dequeue(ep, prm->ureq[i].req);
			usb_ep_free_request(ep, prm->ureq[i].req);
			prm->ureq[i].req = NULL;
		}
	}