[alsa-devel] Some idea about usb audio gadget driver.
Hi ALSA and USB folks,
I plan to develop a usb audio gadget driver on Blackfin platform (can be shared for other embedded system).
- A new usb gadget driver which recognized by Linux/Windows PC as an USB audio card. - There is an ALSA sound card on the same embedded device. - The usb gadget driver receives audio data from host and send them to ALSA sound card to playback - The usb gadget driver send the audio data recorded by ALSA sound card to host as recording. - The usb gadget driver response to some audio card control command such as volume/mute control
Questions,
- Is there any similar things on this planet? - How about gmidi usb midi gadget driver? - How can I open/playback/record/close a ALSA sound card in kernel space not using alsalib in user space?
Thanks a lot -Bryan
On Tue, Sep 23, 2008 at 05:50:33PM +0800, ext Bryan Wu wrote:
Hi ALSA and USB folks,
I plan to develop a usb audio gadget driver on Blackfin platform (can be shared for other embedded system).
- A new usb gadget driver which recognized by Linux/Windows PC as an
USB audio card.
- There is an ALSA sound card on the same embedded device.
- The usb gadget driver receives audio data from host and send them
to ALSA sound card to playback
- The usb gadget driver send the audio data recorded by ALSA sound
card to host as recording.
- The usb gadget driver response to some audio card control command
such as volume/mute control
Questions,
- Is there any similar things on this planet?
- How about gmidi usb midi gadget driver?
- How can I open/playback/record/close a ALSA sound card in kernel
space not using alsalib in user space?
Start by converting gmidi to composite framework. Separate the alsa generic code from usb generic code and the function driver (in that case MIDI). Then, all you have to do is add a new function driver with proper audio streaming.
Later on someone might be interested in adding mic support ;-)
Felipe Balbi a écrit :
On Tue, Sep 23, 2008 at 05:50:33PM +0800, ext Bryan Wu wrote:
Hi ALSA and USB folks,
- Is there any similar things on this planet?
- How about gmidi usb midi gadget driver?
- How can I open/playback/record/close a ALSA sound card in kernel
space not using alsalib in user space?
Start by converting gmidi to composite framework. Separate the alsa generic code from usb generic code and the function driver (in that case MIDI). Then, all you have to do is add a new function driver with proper audio streaming.
I am not sure there is lot's of common alsa code. IIRC Midi and Pcm API are different in alsa.
But I think we shouldn't try to drive a sound card from kernel, we should create an alsa sound card like gmidi, and let's userspace do what it wants (redirect from/to another sound card, stream files, ...).
Mattieu
Bryan Wu wrote:
- A new usb gadget driver which recognized by Linux/Windows PC as an
USB audio card.
- There is an ALSA sound card on the same embedded device.
- The usb gadget driver receives audio data from host and send them
to ALSA sound card to playback ...
- Is there any similar things on this planet?
- How about gmidi usb midi gadget driver?
gmidi does not access other sound cards; it makes the USB MIDI interface available to userspace.
- How can I open/playback/record/close a ALSA sound card in kernel
space not using alsalib in user space?
If you really want to do this in the kernel, have a look at the OSS emulation (sound/core/oss/).
Regards, Clemens
participants (4)
-
Bryan Wu
-
Clemens Ladisch
-
Felipe Balbi
-
Matthieu CASTET