Re: arecord: does hardware or software throw away unused

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

 



Rob Nertney wrote:
> 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.

When the ALSA library automatically converts sample formats, it can also
adjust the number of channels.  (This does not happen if some program
decides to use the "hw" device to bypass all conversions.)

> 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.

The ALSA kernel framework assumes that the snd_pcm_hw constraints correctly
describe the capabilities of your hardware.  Any conversions happen in
userspace.

Your driver never sees what happens in userspace; the values to be set by
the .hw_params callback are guaranteed to fit into your driver's constraints.


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux