gqrx-sdr / gqrx

Software defined radio receiver powered by GNU Radio and Qt.
http://gqrx.dk
GNU General Public License v3.0
3.12k stars 546 forks source link

Support "no audio" build not requiring pulseaudio #50

Closed smunaut closed 11 years ago

smunaut commented 11 years ago

Sometime I'd like just to be able to see the spectrum and only save audio and I'd like to be able to build gqrx without pulseaudio being a requirement.

csete commented 11 years ago

See gqrx.pro how to disable pulseaudio. In that case it will require gr-audio component and use alsa (or whatever gnuradio is configured to use). Is that sufficient?

smunaut commented 11 years ago

Oh yes, indeed, how did I miss that ...

Why does it says it doesn't work on linux ?

csete commented 11 years ago

The problem is that gr-audio defaults to ALSA and people usually use hw:0 as devices which relies on well supported hardware mixer to allow concurrent access to the sound card. Otherwise it may report "device or resource busy" error when you start gqrx or if you stop and restart DSP processing.

You can try and see if it works. You can also try to use plughw instead of hw and such. If you find a configuration that works well please let me know and I'll add the info to the wiki.

vpelletier commented 11 years ago

As for hardware configuration supporting hardware mixing, "SoundBlaster Live![ Value]" (emu10k1-based card) works perfectly here. I love this card. It is getting harder to use because of PCI becoming hard to find on motherboards, but I still can't let it go after 10+ years of use.

dl1ksv commented 11 years ago

I wanted to use gqrx with the funcube dongle and without pulkseaudio , too. I met two problems: First, if i changed the receiver type , for instance from narrow fm to wide fm while the receiver was running, I got the message "device or resource busy". That could be fixed by deleting line 115-116 in receiver.cpp ( if(d_demod != RX_DEMOD_OFF) set_output_device(""); ) At that point the output device is already set and setting it again results in the "busy" message.

Up to now I found no situation where this assingment was missing.

The second problem may happen if more than one soundcard is available. Than the order of the cards may differ from boot to boot. Not every card may be addressed by hw:0:0 That sometimes led to a file not found message from alsa on my system. So i set up a default card im my .asoundrc file by

pcm.!default { type hw card SB } ctl.!default { type hw card SB }

and modified the creation of the receiver object in mainwindow.cpp by substituting line 61

rx = new receiver("", "default");

for

rx = new receiver("", "");

Now gqrx works reliable without piulsaudio.

smunaut commented 11 years ago

See issue http://gnuradio.org/redmine/issues/551

I made the change in GNURadio directly and it should hopefully soon be pushed and this makes the gr-audio sink work more reliably.

csete commented 11 years ago

Thanks for the pointer, I am keeping an eye of the issue. I hope to have this cleaned up together with the transition to the gr 3.7 API.

csete commented 11 years ago

The fix will be available in gnuradio 3.6.5.1

csete commented 11 years ago

So, I have now cleaned up the gr-audio support and I think it works as well as it can with the present gr-audio backend. Is it sufficient to have this option to use gr-audio instead of pulse or do we really want a completely audio-less option?

smunaut commented 11 years ago

Personally I'm happy with gr-audio.

csete commented 11 years ago

Ok, closing the issue then.