mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
FROMLIST: usb: gadget: f_uac1: Fix endpoint reading
The endpoint is stored in the lower byte of wIndex, according to USB Audio 1.0 specification, section 5.2.1.1. Link: https://lore.kernel.org/patchwork/patch/805284/ Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com> Change-Id: I16634151e98cfb0f7107e96463a20b8fa8d7072f
This commit is contained in:
@@ -337,7 +337,7 @@ static int audio_set_endpoint_req(struct usb_function *f,
|
||||
{
|
||||
struct usb_composite_dev *cdev = f->config->cdev;
|
||||
int value = -EOPNOTSUPP;
|
||||
u16 ep = le16_to_cpu(ctrl->wIndex);
|
||||
u8 ep = le16_to_cpu(ctrl->wIndex) & 0xff;
|
||||
u16 len = le16_to_cpu(ctrl->wLength);
|
||||
u16 w_value = le16_to_cpu(ctrl->wValue);
|
||||
|
||||
@@ -373,7 +373,7 @@ static int audio_get_endpoint_req(struct usb_function *f,
|
||||
{
|
||||
struct usb_composite_dev *cdev = f->config->cdev;
|
||||
int value = -EOPNOTSUPP;
|
||||
u8 ep = ((le16_to_cpu(ctrl->wIndex) >> 8) & 0xFF);
|
||||
u8 ep = le16_to_cpu(ctrl->wIndex) & 0xff;
|
||||
u16 len = le16_to_cpu(ctrl->wLength);
|
||||
u16 w_value = le16_to_cpu(ctrl->wValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user