All of lore.kernel.org
 help / color / mirror / Atom feed
* Getting notification of sound card load
@ 2015-09-08 17:09 Mina Almasry
  2015-09-08 17:28 ` Markus Seeber
  0 siblings, 1 reply; 3+ messages in thread
From: Mina Almasry @ 2015-09-08 17:09 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Getting notification of sound card load
  2015-09-08 17:09 Getting notification of sound card load Mina Almasry
@ 2015-09-08 17:28 ` Markus Seeber
  2015-09-09  0:28   ` Mina Almasry
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Seeber @ 2015-09-08 17:28 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Getting notification of sound card load
  2015-09-08 17:28 ` Markus Seeber
@ 2015-09-09  0:28   ` Mina Almasry
  0 siblings, 0 replies; 3+ messages in thread
From: Mina Almasry @ 2015-09-09  0:28 UTC (permalink / raw)
  To: Markus Seeber; +Cc: alsa-devel

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-09  0:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-08 17:09 Getting notification of sound card load Mina Almasry
2015-09-08 17:28 ` Markus Seeber
2015-09-09  0:28   ` Mina Almasry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.