On Mon, Feb 24, 2014 at 11:34:47PM +0100, Jörn Nettingsmeier wrote:
> What am I missing? Is there some .asoundrc magic that might come to
Jack's ALSA backend (and zita-alsa-pcmi) opens a device in MMAP
mode, and for hw: devices this is normally possible only using
*all* available channels.
The problem I guess is due to the way the HW related params
1. Allocate a hw_params struct
2. Fill in the params using set_*** functions
3. Submit the hw_params struct.
In step 2, the set_*** functions are aware of the acceptable
ranges/values and will report error if anything is not possible.
The backend code sets the sample rate before anything related
to channel counts is set or tested. So if the ALSA code still
reports that 8 channels are available after the sample rate
is set to 48 kHz, that looks to me like a bug in the driver.
The HW itself is not set up before step 3, so it is probably
still set to 44.1 kHz while the hw_params is filled in, and it
reports 8 channels.
If the API only allows setting all HW parameters in one step,
as is the case, then the driver should be aware of the channel
count vs. sample rate restrictions *without* relying on the HW,
but it probably isn't.
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