Commit 7c5881d1 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: audio: queue wLength-sized requests

On Audio class, the wLength field of the Setup
packet, contains the data payload size of the
following Data phase. Instead of harcoding values,
use wLength.

This also fixes a bug where Gadget driver had to
receive 3 bytes, but it was queueing a ZLP.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ef7f584c
...@@ -460,7 +460,7 @@ static int audio_set_endpoint_req(struct usb_function *f, ...@@ -460,7 +460,7 @@ static int audio_set_endpoint_req(struct usb_function *f,
switch (ctrl->bRequest) { switch (ctrl->bRequest) {
case UAC_SET_CUR: case UAC_SET_CUR:
value = 0; value = len;
break; break;
case UAC_SET_MIN: case UAC_SET_MIN:
...@@ -499,7 +499,7 @@ static int audio_get_endpoint_req(struct usb_function *f, ...@@ -499,7 +499,7 @@ static int audio_get_endpoint_req(struct usb_function *f,
case UAC_GET_MIN: case UAC_GET_MIN:
case UAC_GET_MAX: case UAC_GET_MAX:
case UAC_GET_RES: case UAC_GET_RES:
value = 3; value = len;
break; break;
case UAC_GET_MEM: case UAC_GET_MEM:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment