finding out the driver module in use for a given PCM
Can anyone suggest a way for the user or a script to discover which kernel module is in use for a given card? (As in, card N == the card detailed at /proc/asound/cardN.)
I naively thought I could do it trivially (at least for the most usual cases where the user has only one of each sort of card) by looking for the snd-card-N line from /etc/modules.conf. But that doesn't work even for my simple test machine, which has an Intel AC97 codec: if I specify snd-card-0 to be snd-intel8x0 without options, I get both /proc/asound/card0 and /proc/asound/card1 from the same driver (seems one of them is the modem). Is there any way to tell that they're both run by the same driver?
If I also have an Audiophile 2496 as snd-card-1, it will correspond to /proc/asound/card2 (as the 8x0 has card0 and card1). But no snd-card-2 in modules.conf at all. How can I discover that /proc/asound/card2 is in fact an ice1712-driven card?
(The aim is just to write a simple script that starts a mixer app for a given soundcard, starting envy24control if the card is driven by snd-ice1712, hdspmixer if it's driven by snd-hdspsomething, etc.)
Chris
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
Quoted 13 lines · Chris Cannam
Can anyone suggest a way for the user or a script to discover which kernel module is in use for a given card? (As in, card N == the card detailed at
/proc/asound/cardN.)I naively thought I could do it trivially (at least for the most usual cases where the user has only one of each sort of card) by looking for the snd-card-N line from
/etc/modules.conf. But that doesn't work even for my simple test machine, which has an Intel AC97 codec: if I specify snd-card-0 to be snd-intel8x0 without options, I get both/proc/asound/card0and/proc/asound/card1from the same driver (seems one of them is the modem). Is there any way to tell that they're both run by the same driver?
Quoted 8 lines
If I also have an Audiophile 2496 as snd-card-1, it will correspond to
/proc/asound/card2(as the 8x0 has card0 and card1). But no snd-card-2 in modules.conf at all. How can I discover that/proc/asound/card2is in fact an ice1712-driven card?(The aim is just to write a simple script that starts a mixer app for a given soundcard, starting envy24control if the card is driven by snd-ice1712, hdspmixer if it's driven by snd-hdspsomething, etc.)
Hmm, what about /proc/asound/modules ?
martin
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
Quoted 1 line · Martin Langer
Hmm, what about
/proc/asound/modules?
Duh. Thanks!
Chris
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php