Re: [PATCH 096/143] USB: gadget: add USB Audio Gadget driver

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

 



On Mon, Jun 15, 2009 at 10:23:31PM -0700, Greg Kroah-Hartman wrote:
> From: Bryan Wu <cooloney@xxxxxxxxxx>
> 
> Funtions added:
>  - setup all the USB audio class device descriptors
>  - handle class specific setup request
>  - receive data from USB host by ISO transfer
>  - play audio data by ALSA sound card
>  - open and setup playback PCM interface
>  - set default playback PCM parameters
>  - provide playback functions for USB audio driver
>  - provide PCM parameters set/get functions
> 
> Test on:
>  - Host: Ubuntu 8.10, kernel 2.6.27
>  - Gadget: EZKIT-BF548 with ASoC AD1980 codec
> 
> Todo:
>  - add real Mute control code
>  - add real Volume control code
>  - maybe find another way to replace dynamic buffer handling
>    with static buffer allocation
>  - test on Windows system
I've tested it and alas, it doesn't work.
> ---
>  drivers/usb/gadget/Kconfig   |   14 +
>  drivers/usb/gadget/Makefile  |    2 +
>  drivers/usb/gadget/audio.c   |  302 ++++++++++++++++++
>  drivers/usb/gadget/f_audio.c |  707 ++++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/gadget/u_audio.c |  319 +++++++++++++++++++
>  drivers/usb/gadget/u_audio.h |   56 ++++
>  6 files changed, 1400 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/usb/gadget/audio.c
>  create mode 100644 drivers/usb/gadget/f_audio.c
>  create mode 100644 drivers/usb/gadget/u_audio.c
>  create mode 100644 drivers/usb/gadget/u_audio.h
I've found several problems with this patch.
As first, it never frees ALSA devices.
When that is fixed, it never able to recover operation
on second load. Tested on MUSB on OMAP3530EVM.
It is very useful gadget, so I'd really like to see it fixed.
.wTotalLength in ac_header_descriptor descriptor should contain sum of sizes
of interface and unit descriptors, per Audio Device Class specification
1.0 (also worth mentioning in documentation, because spec. 2.0 exists
too). In this patch this field contains only USB_DT_AC_HEADER_LENGH
which is totally wrong. This all magically works in Linux, though,
but making Linux-only solution here is wrong, IMHO.
Just my $0.05.

I can invest my time on helping with this driver,
I can test on various ARM hardware.

All the best and thanks a lot for this,
S.

--
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