projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e463932
)
USB: gadget: f_audio_source: Fix error handling and increase packet size
author
Mike Lockwood
<lockwood@google.com>
Thu, 2 Aug 2012 18:22:05 +0000
(11:22 -0700)
committer
Mike Lockwood
<lockwood@google.com>
Thu, 2 Aug 2012 22:23:27 +0000
(15:23 -0700)
Fixes watchdog reset on USB disconnect
Larger packet size fixes performance in fullspeed mode
Signed-off-by: Mike Lockwood <lockwood@google.com>
drivers/usb/gadget/f_audio_source.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_audio_source.c
b/drivers/usb/gadget/f_audio_source.c
index 23a75117124f1b2cd9c503a0951eda0d35b1746c..ba8e007c7969ca8f0228358c474564f4392ff7a4 100644
(file)
--- a/
drivers/usb/gadget/f_audio_source.c
+++ b/
drivers/usb/gadget/f_audio_source.c
@@
-22,11
+22,9
@@
#include <sound/pcm.h>
#define SAMPLE_RATE 44100
-/* Each frame is two 16 bit integers (one per channel) */
-#define BYTES_PER_FRAME 4
#define FRAMES_PER_MSEC (SAMPLE_RATE / 1000)
-#define IN_EP_MAX_PACKET_SIZE
256
+#define IN_EP_MAX_PACKET_SIZE
384
/* Number of requests to allocate */
#define IN_EP_REQ_COUNT 4
@@
-414,7
+412,7
@@
static void audio_data_complete(struct usb_ep *ep, struct usb_request *req)
audio_req_put(audio, req);
- if (!audio->buffer_start)
+ if (!audio->buffer_start
|| req->status
)
return;
audio->period_offset += req->actual;