* Re: [Alsa-user] How do I run arecord on raw digital mic buffer?
[not found] ` <CALAeOVMVMi2qnx5CqtmVTUy2KK3GQFGDLJJUBzSb3U-K-pD_2A@mail.gmail.com>
@ 2016-05-04 8:21 ` Clemens Ladisch
0 siblings, 0 replies; only message in thread
From: Clemens Ladisch @ 2016-05-04 8:21 UTC (permalink / raw)
To: Rob Nertney; +Cc: alsa-user, alsa-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-04 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CALAeOVPtQE3mHFPMP-48ADUJByp_b6vAo3vP8K53_edE=Hnakg@mail.gmail.com>
[not found] ` <57286670.2060309@googlemail.com>
[not found] ` <CALAeOVMVMi2qnx5CqtmVTUy2KK3GQFGDLJJUBzSb3U-K-pD_2A@mail.gmail.com>
2016-05-04 8:21 ` [Alsa-user] How do I run arecord on raw digital mic buffer? Clemens Ladisch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).