Skip to contentSkip to conversation

querying card properties

DISCUSSION Lee Revell 2 participants 2 messages Jan 8, 2005 – Jan 10, 2005

lore
Share & tools
lore

Lee Revell

author
#0 lore raw

In a recent LAU thread it came to light that some (all?) distros alsa setup scripts don't configure dmix when the card is known not to support hardware mixing. The end result is the user has to edit config files to get software mixing to work. On a modern distro this is a BUG.

Is there an API function to detect whether hardware mixing is supported? Also useful would be a way to detect codecs with no hardware volume control, so the softvol plugin can be set up.

I know there are hacks like comparing the number of streams to the number of substreams, but what's the right way?

Lee

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

#1 lore raw

At Sat, 08 Jan 2005 16:52:24 -0500,

Quoted 7 lines · Lee Revell

In a recent LAU thread it came to light that some (all?) distros alsa setup scripts don't configure dmix when the card is known not to support hardware mixing. The end result is the user has to edit config files to get software mixing to work. On a modern distro this is a BUG.

Is there an API function to detect whether hardware mixing is supported?

No specific API for such probes.

Quoted 2 lines

Also useful would be a way to detect codecs with no hardware volume control, so the softvol plugin can be set up.

This is already implemented on 1.0.8rc2. The "default" PCM is overwritten automagicall on some cards like ICH, NFORCE, or VIA. On such cards, the default PCM always routes via softvol plugin. The softvol plugin checks whether the specified control is a hardcoded one. If it's a h/w control, the plugin just bypasses. No performance drawback. OTOH, if it's a user-defined one, it applys the software volume attenuation.

So, we can simply add dmix to the definition of card's specific default PCM. Take a look at alsa-lib/src/conf/cards/ICH.conf, for example. I didn't do that at this time simply because dmix has still a bit problems, which I'm currently trying to debug/improve...

Quoted 2 lines

I know there are hacks like comparing the number of streams to the number of substreams, but what's the right way?

Yes, I think it's a way to check from an application.

Takashi

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt