[alsa-devel] arecord: does hardware or software throw away unused

Rob Nertney rob at rob-otics.com
Fri Sep 2 08:55:37 CEST 2016


My hardware is putting a stream of MAX_CHANNELS into memory, and firing the
IRQs on my period boundary with respect to this full MAX_CHANNELS stream.

If I apply an arecord -c <MAX_CHANNELS-x> flag, essentially saying that I
only want to capture less than the maximum number of channels, will arecord
expect that the *hardware* will throw away the unused channel data, and the
data placed into memory is a contiguous stream of only pertinent channels?

Or will arecord see the MAX_CHANNELS in my driver, and use its *software*
to strip out the upper channels worth of data automatically for me?

For example, if I am capturing 2 channels of u8 data, and my dma regardless
puts the data into memory as
11111111222222221111111122222222_IRQ_11111111222222221111111122222222. If I
apply an "arecord -c 1 ...", and my DMA remains unchanged, will the
resulting wavfile have 1111111111111111_IRQ_1111111111111111?

Thanks,
Rob


More information about the Alsa-devel mailing list