[alsa-devel] right way to enumerate pcm devices
Takashi Iwai
tiwai at suse.de
Wed Feb 13 15:33:23 CET 2019
On Wed, 13 Feb 2019 15:13:28 +0100,
sylvain.bertrand at gmail.com wrote:
>
> On Wed, Feb 13, 2019 at 07:25:13AM +0100, Takashi Iwai wrote:
> > It's only the matter of alsa-lib card config. Just due to heuristic
> > reason, the secondary device is assigned as iec958 as default. There
> > are explicit whitelist setup in alsa-lib/src/conf/cards/USB-Audio.conf
> > for the card that behave differently. You'd need to adjust
> > accordingly.
>
> Tell me if I did understand you right:
>
> I cannot trust the hint system to select proper pcm devices for, let's say the
> mic of my USB cam.
It can be seen rather as a bug in alsa-lib card config. The card
config should be fixed to match with this badly behaving device.
> I would have to ignore "mostly" the configuration system (the major exception
> would be the default pcm device) and build myself the pcm devices from the info
> I can get from the hardware device (hardware mixing, input and/or output,
> number of channels/etc).
Or report the bug to get it fixed.
> I would have to cherry pick configuration defined pcm devices for specific
> modes, like surroundX, only if the "basic user" explicitely requests such modes.
... if you want to fix it by yourself, right.
> The advanced user should override the default pcm device if he/she wants to
> do/fix tricky sound thingies.
The advanced user should report the bug report, not ignore and work
around it, too :)
Takashi
>
> ----
>
> To summarize:
> - show always the pcm default
> - build custom pcm devices based on hardware info, and show them
> - for "special" modes, likes surroundX, show the related configuration
> defined pcm devices only if the "basic" user want to fool around with
> them.
>
> --
> Sylvain
>
More information about the Alsa-devel
mailing list