Re: [alsa-devel] How do I run arecord on raw digital mic buffer?

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

 



Rob Nertney wrote:
>>> is the best method to build a sound card and a capture PCM?
>>
>> As compared to what?  Any other method will not allow your hardware to
>> be used for audio recording.
>
> As compared to my driver configuring the DMA to capture the data into
> a known buffer, and then directly accessing the buffer to wrap it in
> a WAV format. I should have rephrased my initial question as, "my goal
> is to simply wrap multichannel digital mic input in WAV format; is
> ALSA/arecord the most efficient way to do this?"

If you bypass ALSA, you have to write all the software yourself, and you
will not be able to use your hardware for anything else.

> I should make my buffer at least 2x the size of a period.

Yes.  (You don't need periods if you don't use interrupts to wait for
data being available.)

> I have a buffer ready, under which function does it get passed back to
> the ALSA framework?

Normally, ALSA knows about the buffer, and the driver just reports the
current position.

>   * dma completes/fires period-based IRQ
>   * <<question>> buffer is transferred in function X (?) to Y (?)

When a period is finished, you must call snd_pcm_period_elapsed().

ALSA will then call your .pointer callback to know where in the buffer
the hardware has finished writing.  (Please not that .pointer can also
be called at other times.)


Regards,
Clemens

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux