<div dir="auto">You can disable pulseaudio by following below link..<div dir="auto"><br></div><div dir="auto"><a href="https://askubuntu.com/questions/8425/how-to-temporarily-disable-pulseaudio">https://askubuntu.com/questions/8425/how-to-temporarily-disable-pulseaudio</a><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">But need to find why its not working..</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 13, 2021, 21:59 Muni Sekhar <<a href="mailto:munisekharrms@gmail.com">munisekharrms@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Aug 11, 2021 at 6:48 PM Muni Sekhar <<a href="mailto:munisekharrms@gmail.com" target="_blank" rel="noreferrer">munisekharrms@gmail.com</a>> wrote:<br>
><br>
> On Wed, Aug 11, 2021 at 6:19 PM vishnu <<a href="mailto:vardhanraj4143@gmail.com" target="_blank" rel="noreferrer">vardhanraj4143@gmail.com</a>> wrote:<br>
> ><br>
> > can you paste output of<br>
> > arecord -l (list of capture devices).<br>
> $ arecord -l<br>
> **** List of CAPTURE Hardware Devices ****<br>
> card 0: USB [Plantronics .Audio 628 USB], device 0: USB Audio [USB Audio]<br>
> Subdevices: 1/1<br>
> Subdevice #0: subdevice #0<br>
><br>
><br>
> > Which device you are using and os.<br>
> > Does this instance is already open by default? like any video playing or something like that?<br>
> lsof does not catch it.<br>
><br>
> ><br>
> > Yes you can stop pulse audio and try..<br>
> ><br>
> > On Wed, Aug 11, 2021 at 6:17 PM Jaroslav Kysela <<a href="mailto:perex@perex.cz" target="_blank" rel="noreferrer">perex@perex.cz</a>> wrote:<br>
> >><br>
> >> On 11. 08. 21 14:36, Muni Sekhar wrote:<br>
> >> > Hi All,<br>
> >> ><br>
> >> > $ cat /proc/asound/cards<br>
> >> > 0 [USB ]: USB-Audio - Plantronics .Audio 628 USB<br>
> >> > Plantronics Plantronics .Audio 628 USB at<br>
> >> > usb-0000:00:14.0-2, full speed<br>
> >> ><br>
> >> > I am using a Plantronics USB Audio headset.<br>
> >> ><br>
> >> > $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav<br>
> >> > arecord: main:722: audio open error: Device or resource busy<br>
> >> ><br>
> >> ><br>
> >> > 'arecord' command always fails the first time after system boot in my<br>
> >> > system. But subsequent execution of the 'arecord' command runs fine.<br>
> >> ><br>
> >> ><br>
> >> > I've attached the strace log for the "audio open error: Device or<br>
> >> > resource busy" failure. Is there any fix available for this issue?<br>
> >><br>
> >> You may check which other task blocks the PCM device:<br>
> >><br>
> >> lsof /dev/snd/pcmC0D0c<br>
> It does not output any process.<br>
> $ lsof /dev/snd/pcmC0D0c<br>
><br>
> 1st run:<br>
> ----------<br>
> $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav<br>
> arecord: main:722: audio open error: Device or resource busy<br>
><br>
> 2nd run:<br>
> ----------<br>
> $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav<br>
> Recording WAVE 'x.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo<br>
> ^CAborted by signal Interrupt...<br>
><br>
><br>
> >><br>
> >> I guess that it will be pulseaudio (device enumeration).<br>
I see that pulseaudio is getting loaded on invoking the 1st run of<br>
'arecord' command. Here is the log:<br>
<br>
After system boot I verified that pulseaudio is not in the memory.<br>
<br>
test@test594:~$ uptime<br>
21:39:27 up 0 min, 1 user, load average: 0.70, 0.25, 0.09<br>
test@test594:~$ ls -ltr /dev/snd/controlC1<br>
crw-rw---- 1 root audio 116, 2 Aug 13 21:38 /dev/snd/controlC1<br>
test@test594:~$ ls -ltr /dev/snd/<br>
total 0<br>
crw-rw---- 1 root audio 116, 33 Aug 13 21:38 timer<br>
crw-rw---- 1 root audio 116, 1 Aug 13 21:38 seq<br>
crw-rw---- 1 root audio 116, 3 Aug 13 21:38 pcmC1D0p<br>
crw-rw---- 1 root audio 116, 4 Aug 13 21:38 pcmC1D0c<br>
crw-rw---- 1 root audio 116, 2 Aug 13 21:38 controlC1<br>
drwxr-xr-x 2 root root 60 Aug 13 21:38 by-path<br>
drwxr-xr-x 2 root root 60 Aug 13 21:38 by-id<br>
test@test594:~$ lsof /dev/snd/controlC1<br>
test@test594:~$ lsof /dev/snd/pcmC1D0c<br>
test@test594:~$<br>
<br>
<br>
1st run of 'arecord':<br>
-------------------------<br>
I triggered 'arecord' after 2 mins of the system boot. In the 1st run,<br>
it failed with "Device or resource busy" and I see that pulseaudio<br>
loaded in the memory.<br>
Why does pulseaudio get triggered on running the alsa-utils command?<br>
How is the failure message "Device or resource busy" from the kernel code?<br>
<br>
<br>
test@test594:~$ arecord --device hw:1,0 --channels 2 --format S16_LE<br>
--rate 44100Hz x.wav<br>
arecord: main:722: audio open error: Device or resource busy<br>
test@test594:~$<br>
test@test594:~$ lsof /dev/snd/pcmC1D0c<br>
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME<br>
pulseaudi 1550 test mem CHR 116,4 463 /dev/snd/pcmC1D0c<br>
pulseaudi 1550 test 27u CHR 116,4 0t0 463 /dev/snd/pcmC1D0c<br>
test@test594:~$ lsof /dev/snd/controlC1<br>
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME<br>
pulseaudi 1550 test 20u CHR 116,2 0t0 461 /dev/snd/controlC1<br>
pulseaudi 1550 test 26u CHR 116,2 0t0 461 /dev/snd/controlC1<br>
test@test594:~$ lsof /dev/snd/pcmC1D0p<br>
test@test594:~$<br>
test@test594:~$ uptime<br>
21:41:06 up 2 min, 1 user, load average: 0.20, 0.19, 0.08<br>
<br>
<br>
2nd run of 'arecord':<br>
-------------------------<br>
The subsequent run of arecord runs fine without any issues even though<br>
pulseaudio is still in memory.<br>
<br>
test@test594:~$ arecord --device hw:1,0 --channels 2 --format S16_LE<br>
--rate 44100Hz x.wav<br>
Recording WAVE 'x.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo<br>
^CAborted by signal Interrupt...<br>
test@test594:~$ uptime<br>
21:41:22 up 2 min, 1 user, load average: 0.14, 0.18, 0.08<br>
test@test594:~$<br>
<br>
What is the role of pulseaudio? Is there a way to disable it from running it?<br>
Disabling pulseaudio causes any issues while testing audio drivers?<br>
<br>
<br>
> >><br>
> >> Jaroslav<br>
> >><br>
> >> --<br>
> >> Jaroslav Kysela <<a href="mailto:perex@perex.cz" target="_blank" rel="noreferrer">perex@perex.cz</a>><br>
> >> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.<br>
><br>
><br>
><br>
> --<br>
> Thanks,<br>
> Sekhar<br>
<br>
<br>
<br>
-- <br>
Thanks,<br>
Sekhar<br>
</blockquote></div>