# Gr-audio selecting jack automatically over ALSA?

**URL:** <https://www.ruby-forum.com/t/gr-audio-selecting-jack-automatically-over-alsa/210404>\
**Category:** GNU Radio\
**Created:** [August 7, 2011, 2:04pm UTC](https://www.ruby-forum.com/t/gr-audio-selecting-jack-automatically-over-alsa/210404 "2011-08-07T14:04:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 7, 2011, 2:04pm UTC](https://www.ruby-forum.com/t/gr-audio-selecting-jack-automatically-over-alsa/210404/1 "2011-08-07T14:04:42Z")

</div>

Hi Folks,

Finally got around to compiling the latest git version of gnuradio,  
(well from August 4th), so I can try out my new FunCube dongle.

Got it all compiled and configured to my satisfaction. Was surprised  
to see it try and start jackd when I fired up Alex’s FCD sample  
application.

I was about to blame Alex for not handling the case where jack is  
present correctly, but double checked by just using an audio source,  
and sure enough, it attempted again to fire up jack…

So I dug around, and found the audio\_module = option in the config  
file, and changed it from auto, to alsa. Same thing happened…

Triple checked with an strace of the companion that it did actually  
read the file I thought it did, and yes, it did.

Anyone know of another way for me to (temporarily) force it to use  
pure ALSA rather than jack (I actually don’t want jack permanently  
disabled, as I do use it when doing audio stuff)

Or have I missed something obvious ?

Best Regards

Iain

---

<div class="post-metadata">

**Author:** ![Iain\_YoungS\_G7III](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Iain\_YoungS\_G7III](https://www.ruby-forum.com/u/Iain_YoungS_G7III)\
**Post date:** [August 7, 2011, 3:07pm UTC](https://www.ruby-forum.com/t/gr-audio-selecting-jack-automatically-over-alsa/210404/2 "2011-08-07T15:07:01Z")

</div>

On Sun, Aug 7, 2011 at 2:03 PM, Iain Young, G7III [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> present correctly, but double checked by just using an audio source,  
> and sure enough, it attempted again to fire up jack…
> 
> So I dug around, and found the audio\_module = option in the config  
> file, and changed it from auto, to alsa. Same thing happened…
> 
> Triple checked with an strace of the companion that it did actually  
> read the file I thought it did, and yes, it did.

Hi Iain,

There is a known issue with the preferences mechanisms, but that is  
only applicable for C++ applications:  
[http://gnuradio.org/redmine/issues/421](http://gnuradio.org/redmine/issues/421)

So if you can not select alsa when using python or gnuradio-companion,  
then you do not have alsa support installed. This would also be  
consistent with my experience that alsa takes precedence over jack.

I think the only way to find out whether you have alsa support is to  
look in the config.log. I have this:  
GR\_AUDIO\_ALSA\_SUPPORT\_FALSE=‘#’  
GR\_AUDIO\_ALSA\_SUPPORT\_TRUE=‘’  
GR\_AUDIO\_JACK\_SUPPORT\_FALSE=‘#’  
GR\_AUDIO\_JACK\_SUPPORT\_TRUE=‘’  
GR\_AUDIO\_OSS\_SUPPORT\_FALSE=‘#’  
GR\_AUDIO\_OSS\_SUPPORT\_TRUE=‘’  
GR\_AUDIO\_OSX\_SUPPORT\_FALSE=‘’  
GR\_AUDIO\_OSX\_SUPPORT\_TRUE=‘#’  
GR\_AUDIO\_PORTAUDIO\_SUPPORT\_FALSE=‘#’  
GR\_AUDIO\_PORTAUDIO\_SUPPORT\_TRUE=‘’  
GR\_AUDIO\_WINDOWS\_SUPPORT\_FALSE=‘’  
GR\_AUDIO\_WINDOWS\_SUPPORT\_TRUE=‘#’

which I assume means that I have jack, alsa and oss support. I don’t  
know if there is a better way to check that. You can of course also  
check if you have the files:  
gr-audio/lib/audio\_alsa\_source.lo  
gr-audio/lib/audio\_alsa\_sink.lo

There used to be a listing of which audio backends are going to be  
built at the end of the configure step. It would be nice to get that  
back simply because audio on linux is such a horrible mess.

> Anyone know of another way for me to (temporarily) force it to use  
> pure ALSA rather than jack (I actually don’t want jack permanently  
> disabled, as I do use it when doing audio stuff)

Yes, but try first to see if you actually have alsa support installed

Alex
