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

Commit e240020f authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: gadget: midi: Increase IN endpoint buffer allocation



Some UDCs may require allocation of extra bytes for
TX buffer due to hardware requirement. Add necessary
changes for the same.

Change-Id: I48692e4da0ec3155c8763322e961f445d127b154
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent bb29ea15
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -537,13 +537,14 @@ static void f_midi_transmit_byte(struct usb_request *req,
static void f_midi_transmit(struct f_midi *midi, struct usb_request *req)
{
	struct usb_ep *ep = midi->in_ep;
	size_t extra_buf_alloc = midi->gadget->extra_buf_alloc;
	int i;

	if (!ep)
		return;

	if (!req)
		req = midi_alloc_ep_req(ep, midi->buflen);
		req = midi_alloc_ep_req(ep, midi->buflen + extra_buf_alloc);

	if (!req) {
		ERROR(midi, "gmidi_transmit: midi_alloc_ep_request failed\n");