All of lore.kernel.org
 help / color / mirror / Atom feed
* Help with multichannel High Speed USB audio device
@ 2009-07-24  0:54 Laurent .
  2009-07-24  9:12 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent . @ 2009-07-24  0:54 UTC (permalink / raw)
  To: alsa-devel








Dear list,

I made an embedded device that has a CODEC with 6 inputs connected to an ARM9
micro-controller that has an integrated high-speed USB controller.
Now, I need to write the USB code on that micro-controller so that i can capture those
channels in real-time at 24bits / 48 KHz with low latency (ie. sub 10ms), on a computer.

I only need my device to work with Linux, and if possible, I would like to avoid writing a device
driver on the Linux-side.

Is there already such a USB audio driver available that I could nearly use "as is" and to which
i would conform ?

Would you have some general guideline on how to write the high-speed USB device code ?

Would you have any comment on the following :

For simplicity, my device is going to be the "clock master" of the system since it is already has
the exact clock that drives the CODEC.
I will maintain a circular buffer of samples (well, frames of samples) coming from the CODEC.
Each time a new frame arrives, i put the samples in the buffer and increase a counter so
i know how many frames of samples I have in the buffer, ready to be sent.
Each USB micro-frame (125ms/8000Hz), I send all the bytes corresponding to the frames that
I have in the circular buffer.
In average, 6*3*48000/8000 = 108, but I presume that could jitter slightly, which should not
be a problem at all.

Thanks in advance,
Laurent

_________________________________________________________________
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with multichannel High Speed USB audio device
  2009-07-24  0:54 Help with multichannel High Speed USB audio device Laurent .
@ 2009-07-24  9:12 ` Clemens Ladisch
  2009-07-24 22:32   ` Laurent .
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2009-07-24  9:12 UTC (permalink / raw)
  To: Laurent .; +Cc: alsa-devel

Laurent . wrote:
> I made an embedded device that has a CODEC with 6 inputs connected to an ARM9
> micro-controller that has an integrated high-speed USB controller.
> Now, I need to write the USB code on that micro-controller so that i can capture those
> channels in real-time at 24bits / 48 KHz with low latency (ie. sub 10ms), on a computer.
> 
> I only need my device to work with Linux, and if possible, I would like to avoid writing a device
> driver on the Linux-side.
> 
> Is there already such a USB audio driver available that I could nearly use "as is" and to which
> i would conform ?

Yes, snd-usb-audio.

> Would you have some general guideline on how to write the high-speed USB device code ?

Just conform to the USB (2.0) and USB Audio (1.0) specifications.

> For simplicity, my device is going to be the "clock master" of the system since it is already has
> the exact clock that drives the CODEC.

So you'd use an asynchronous endpoint.


Best regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help with multichannel High Speed USB audio device
  2009-07-24  9:12 ` Clemens Ladisch
@ 2009-07-24 22:32   ` Laurent .
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent . @ 2009-07-24 22:32 UTC (permalink / raw)
  To: clemens; +Cc: alsa-devel




----------------------------------------
> Date: Fri, 24 Jul 2009 11:12:48 +0200
> From: clemens@ladisch.de
> To: sid6582@msn.com
> CC: alsa-devel@alsa-project.org
> Subject: Re: [alsa-devel] Help with multichannel High Speed USB audio device
>
> Laurent . wrote:
>> I made an embedded device that has a CODEC with 6 inputs connected to an ARM9
>> micro-controller that has an integrated high-speed USB controller.
>> Now, I need to write the USB code on that micro-controller so that i can capture those
>> channels in real-time at 24bits / 48 KHz with low latency (ie. sub 10ms), on a computer.
>>
>> I only need my device to work with Linux, and if possible, I would like to avoid writing a device
>> driver on the Linux-side.
>>
>> Is there already such a USB audio driver available that I could nearly use "as is" and to which
>> i would conform ?
>
> Yes, snd-usb-audio.
>
>> Would you have some general guideline on how to write the high-speed USB device code ?
>
> Just conform to the USB (2.0) and USB Audio (1.0) specifications.
>
>> For simplicity, my device is going to be the "clock master" of the system since it is already has
>> the exact clock that drives the CODEC.
>
> So you'd use an asynchronous endpoint.
>
>
> Best regards,
> Clemens

_________________________________________________________________
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-24 22:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24  0:54 Help with multichannel High Speed USB audio device Laurent .
2009-07-24  9:12 ` Clemens Ladisch
2009-07-24 22:32   ` Laurent .

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.