[alsa-devel] Getting notification of sound card load
Hi,
I'd like to get a notification when a new sound card becomes available in my system. What's the best way to do that?
For example, when I 'cat /proc/asound/cards' I usually see one sound card available. But if I plug in USB speakers to my system and then run 'cat /proc/asound/cards', I see that the USB sound card is ready for the device I just plugged in.
What's the best way via C API to get a notification that a new card has been loaded? Is there a better way that looking for changes on /proc/asound/cards?
Thanks, Mina
On 09/08/2015 07:09 PM, Mina Almasry wrote:
Hi,
I'd like to get a notification when a new sound card becomes available in my system.
You may have a look at udev, especially the monitoring interface of libudev.
I don't know if this is outdated, but maybe have a look here: http://www.signal11.us/oss/udev/
Best Regards, Markus
Thanks,
Is there an alternative however? The reason I'm asking:
- I don't want to add libudev as a dependency. - The kernel we're using has some CONFIGs turned off and I might have to turn them on to mean libudev requirements and I would rather not do that (if it's even possible).
Thanks,
Mina
On Tue, Sep 8, 2015 at 10:28 AM, Markus Seeber < markus.seeber@spectralbird.de> wrote:
On 09/08/2015 07:09 PM, Mina Almasry wrote:
Hi,
I'd like to get a notification when a new sound card becomes available in my system.
You may have a look at udev, especially the monitoring interface of libudev.
I don't know if this is outdated, but maybe have a look here: http://www.signal11.us/oss/udev/
Best Regards, Markus
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Markus Seeber
-
Mina Almasry