ALSA device or resource busy

Hi folks,

I got it built and running, and now I have run into this problem:


ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
OERROR: [default]: Device or resource busy
OOOOOOOOOOOOOOOOOOOOOOTraceback (most recent call last):
File “/home/rsharpe/wireshark/top_block.py”, line 148, in
tb = top_block()
File “/home/rsharpe/wireshark/top_block.py”, line 80, in init
self.audio_sink_0 = audio.sink(48000, “”, True)
File
“/home/rsharpe/target/lib64/python2.7/site-packages/gnuradio/audio/audio_swig.py”,
line 122, in make
return _audio_swig.sink_make(*args, **kwargs)
RuntimeError: audio_alsa_sink
OOOOO

Does anyone know how to get around this?


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)

On 09/06/2014 06:40 PM, Richard Sharpe wrote:

 tb = top_block()

ALSA generally doesn’t share devices. Something else on your system (
your browser, perhaps) has your sound device open.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Sat, Sep 6, 2014 at 6:47 PM, Marcus D. Leech [email protected]
wrote:

OOOOOOOOOOOOOOOOOOOOOOTraceback (most recent call last):

Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

If you can, try installing pulseaudio. Then use the device name “pulse”
for
the audio device. Pulse sits on top of ALSA (generally) and helps with
distribution of the audio resources.

Tom

On 09/06/2014 07:10 PM, Richard Sharpe wrote:

On
The problem seems to have been that I was not in the audio group.

Now I get continuous overruns. Looks like I am running too much on
that laptop and will have to move to another machine.

Or your flow-graph isn’t properly constructed to send samples to the
audio subsystem at the right rate.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Sat, Sep 6, 2014 at 3:47 PM, Marcus D. Leech [email protected]
wrote:

OOOOOOOOOOOOOOOOOOOOOOTraceback (most recent call last):

Does anyone know how to get around this?

ALSA generally doesn’t share devices. Something else on your system ( your
browser, perhaps) has your sound device open.

The problem seems to have been that I was not in the audio group.

Now I get continuous overruns. Looks like I am running too much on
that laptop and will have to move to another machine.


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)

On 09/06/2014 07:24 PM, Richard Sharpe wrote:

Well, I have the sample rate set to 48k.

Just because you’ve asked the audio sink to set a rate of 48k, doesn’t
mean the rest of the flow-graph agrees with that decision. It also
doesn’t
necessarily mean that the audio hardware supports a 48k rate
(although, most do).

If you’re getting audio overrun (as opposed to under-run), it
generally means that you’re sending samples to the hardware faster than
they
can actually be processed by the hardware.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Sat, Sep 6, 2014 at 4:34 PM, Marcus D. Leech [email protected]
wrote:

that laptop and will have to move to another machine.
most do).

If you’re getting audio overrun (as opposed to under-run), it generally
means that you’re sending samples to the hardware faster than they
can actually be processed by the hardware.

I looked through the flow graph, which I had copied from Mike Ossman’s
first lesson on using the HackRF One, and indeed I had a problem. I
had the wrong value for the decimation field of the Rational
Resampler.

I had also changed the sample rate because I thought that the sample
rate was too high.

Once I fixed those, I got audio out.

Thanks for your help.


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)

On Sat, Sep 6, 2014 at 4:13 PM, Marcus D. Leech [email protected]
wrote:

On 09/06/2014 07:10 PM, Richard Sharpe wrote:

On
The problem seems to have been that I was not in the audio group.

Now I get continuous overruns. Looks like I am running too much on
that laptop and will have to move to another machine.

Or your flow-graph isn’t properly constructed to send samples to the audio
subsystem at the right rate.

Well, I have the sample rate set to 48k.


Regards,
Richard Sharpe
(何以解憂?唯有杜康。–曹操)