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

Rob Nertney rob at rob-otics.com
Mon Sep 19 04:48:10 CEST 2016


Hi Clemens,

I'm building the hardware, so I can technically do whatever I want. I
didn't want to add more to the hardware if ALSA can handle this.

The hardware is spec-ed to *always* have 16 channels worth of data being
written into DDR. I think this comes full-circle to my original question of
whether arecord can filter out channels. It sounds like arecord can handle
multiple channels, but its under the assumption that the hardware itself
changes (in the pcm_open function) to only copy in the requested channels
worth of data; i.e. arecord assumes that the data in dma_area is exactly as
requested by arecord.

If it's -c10 channels worth of data requested, my hardware needs to change
to capture only 10 channels, and throw away the last 6 before it writes it
to DDR. Does that sound right?

Thanks,
Rob

On Fri, Sep 16, 2016 at 12:26 AM, Clemens Ladisch <clemens at ladisch.de>
wrote:

> Rob Nertney wrote:
> > If I define my hw_params like this, is it correct for multiple channels?
> >
> > channels_min = 1
> > channels_max = 16
>
> I don't know what the actual constraints of your hardware are.
>
> > buffer_bytes_max = 32768
> > period_bytes_min = 32768/16
> > period_bytes_max = 32768/16
> > periods_min = 16
> > periods_max = 16
> >
> > Everything is really associated around a 2048 Byte IRQ.
>
> Is that an actual constraint of your hardware?
>
> Anyway, this will not work with, e.g., 15 channels; 60-byte frames do
> not fit into 32768 bytes.
>
>
> Regards,
> Clemens
>


More information about the Alsa-devel mailing list