On Tue, Feb 25, 2014 at 08:39:14AM -0500, Paul Davis wrote:
AFAIK, when using the MMAP access mode, you always get the full channel
count. Which makes sense, since what gets mapped into user space may
very well be an actual HW buffer having a fixed layout (which may be
interleaved, complex-interleaved, etc.)
For a USB device it will be some kernel memory that gets mapped of course,
so in theory a selection of channels could be done while defining that
buffer. But it doesn't seem to work that way.
For the case at hand, would it be possible to set the device to 48 kHz sample
rate using amixer ? If yes, that could solve the problem - once set to 48 kHz
ALSA may be able to find out the correct channel count, and allow you to set
it in hw_params.
The snd_hdspm module behaves even more strangly: even while the API functions
that write the hw_params struct are aware of the sample rate/channel count
restrictions and allow you to initialise the hw_params as required, actually
using those hw_params to set the HW will still fail if a compatible sample
rate is not previously set using e.g. amixer.
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
Linux-audio-dev mailing list