[alsa-devel] Determining the plugins being used?
Is there a way to determine the plugins being used? I notice that snd_pcm_dump produces information about the various plugins that are being used. In one of test case, aplay -v shows that it's using a rate conversion plugin, a slave for Direct Stream Mixing PCM, and finally, the actual hardware PCM card.
For my application, it would be nice to know if we're using the pulse audio plugin so that I can setup our code appropriately. (The period interrupts are not what we were expecting, so we need to use a different code path.) If we're using the dmix plugin, the period interrupts can match our expectations, so we want to use a low-latency path.
What is the appropriate way to determine the plugins used?
Ray
On Mon, Sep 12, 2011 at 1:31 PM, Clemens Ladisch clemens@ladisch.de wrote:
Raymond Toy wrote:
Is there a way to determine the plugins being used?
Not really. snd_pcm_type() gives you the topmost plugin's type.
Bummer. So the only hacky way is to look at the output of snd_pcm_dump, then?
I will look into other ways to determine what I need to know about the underlying audio interface.
Thanks,
Ray
Raymond Toy wrote:
On Mon, Sep 12, 2011 at 1:31 PM, Clemens Ladisch clemens@ladisch.de wrote:
Raymond Toy wrote:
Is there a way to determine the plugins being used?
Not really. snd_pcm_type() gives you the topmost plugin's type.
The pulse plugin typically is the topmost plugin. However, you won't be able to differentiate between 'plain' hw and dmix devices this way because both often have a plug plugin on top.
Bummer. So the only hacky way is to look at the output of snd_pcm_dump, then?
Well, there is the even more hacky way of sifting through /proc/asound/ files to see who is accessing the hw device, but let's pretend I didn't mention it ...
snd_pcm_dump() was designed for debugging only, but at the moment there is no better way.
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Raymond Toy