Hi,

On Aug 2 2017 03:18, linux newbie wrote:
I am trying to open a handle to dmix device and it fails with (Device or resource busy) error. On further debugging I found that it fails because it cannot open the slave HW device. This is the first instance of dmix but the slave open fails because it is already busy. I am trying to understand what kind of race condition could cause this situation but I cannot think of any.

Any thoughts how I could proceed? Maybe retry open is a good solution?

Any advice would be much appreciated.

When alsa-lib applications open the 'hw' PCM node, it executes open(2)
system call to a special file of corresponding ALSA PCM character device
(/dev/snd/pcmC[0-9]+D[0-9]+{c,p}). If it gets -EBUSY (Device or
resources busy), it means that the PCM character device is used by the
other processes.

It's better to investigate such a process in this case. For example, you
can use lsof(8) to the PCM character device. In recent standard Linux
desktop environment, it might be PulseAudio, I guess.


Regards

Takashi Sakamoto

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to