Skip to content

Commit

Permalink
usb: gadget: audio: actually support both speeds
Browse files Browse the repository at this point in the history
While testing g_audio with HighSpeed UDC on a
FS Hub, we had no configurations to present to
the host. That's because both speeds where
mutually exclusive.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Sep 9, 2011
1 parent 6532c7f commit ef7f584
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/usb/gadget/f_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,17 +681,18 @@ f_audio_bind(struct usb_configuration *c, struct usb_function *f)

status = -ENOMEM;

/* supcard all relevant hardware speeds... we expect that when
/* copy descriptors, and track endpoint copies */
f->descriptors = usb_copy_descriptors(f_audio_desc);

/*
* support all relevant hardware speeds... we expect that when
* hardware is dual speed, all bulk-capable endpoints work at
* both speeds
*/

/* copy descriptors, and track endpoint copies */
if (gadget_is_dualspeed(c->cdev->gadget)) {
c->highspeed = true;
f->hs_descriptors = usb_copy_descriptors(f_audio_desc);
} else
f->descriptors = usb_copy_descriptors(f_audio_desc);
}

return 0;

Expand Down

0 comments on commit ef7f584

Please sign in to comment.