Re: [linux-usb] Is UAC1 (USB Audio Class 1.0) broken?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 20, 2014 at 05:29:57PM +0800, Xuebing Wang wrote:
> 
> >>In order to get UAC1 working with my Ubuntu 12.04 LTS host, I have to make a
> >>few changes to driver/usb/gadget/f_uac1.c
> >what changes ? care to send a patch ? Why do you need such change ? Are
> >you fixing a bug ?
> 
> Felipe,
> 
> Thanks. I have to apply below patch to fix the "-22" issue.
> 
> 
> 
> 
> From: Xuebing Wang <xbing6@xxxxxxxxx>
> Date: Wed, 20 Aug 2014 12:36:54 +0800
> Subject: [PATCH 1/2] UAC1: enable USB gadget Audio Class revision 1.0
> 
> Fix below error message issue:
> g_audio gadget: ep1out queue req: err = -22
> 
> This issue was observed on Freescale i.MX6SL EVK, kernel version 3.10.17
> 
> Signed-off-by: Xuebing Wang <xbing6@xxxxxxxxx>
> ---
>  arch/arm/configs/imx_v7_defconfig | 2 ++
>  drivers/usb/gadget/f_uac1.c       | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/configs/imx_v7_defconfig
> b/arch/arm/configs/imx_v7_defconfig
> index b8d6ceb..30020d3 100644
> --- a/arch/arm/configs/imx_v7_defconfig
> +++ b/arch/arm/configs/imx_v7_defconfig
> @@ -249,6 +249,8 @@ CONFIG_USB_PHY=y
>  CONFIG_NOP_USB_XCEIV=y
>  CONFIG_USB_MXS_PHY=y
>  CONFIG_USB_GADGET=y
> +CONFIG_GADGET_UAC1=y
> +CONFIG_USB_AUDIO=m
>  CONFIG_USB_ZERO=m
>  CONFIG_USB_ETH=m
>  CONFIG_USB_MASS_STORAGE=m
> diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c
> index fa8ea4e..055961a 100644
> --- a/drivers/usb/gadget/f_uac1.c
> +++ b/drivers/usb/gadget/f_uac1.c
> @@ -544,6 +544,7 @@ static int f_audio_set_alt(struct usb_function
> *f, unsigned intf, unsigned alt)
>  {
>      struct f_audio        *audio = func_to_audio(f);
>      struct usb_composite_dev *cdev = f->config->cdev;
> +    struct usb_gadget *gadget = cdev->gadget;
>      struct usb_ep *out_ep = audio->out_ep;
>      struct usb_request *req;
>      int i = 0, err = 0;
> @@ -552,6 +553,7 @@ static int f_audio_set_alt(struct usb_function
> *f, unsigned intf, unsigned alt)
> 
>      if (intf == 1) {
>          if (alt == 1) {
> +            config_ep_by_speed(gadget, f, out_ep);
>              usb_ep_enable(out_ep);
>              out_ep->driver_data = audio;
>              audio->copy_buf = f_audio_buffer_alloc(audio_buf_size);
> -- 
> 2.0.1

Hi Xuebing,

You may need to create patch based on the lastest kernel or usb-tree, besides,
it needs to split the patch, one for driver change, and another for platform change.
The USB ML only accepts the usb driver change.

-- 
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux