LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-24-2010, 03:04 PM   #1
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Rep: Reputation: 39
jackd as the default sound device


hello everyone!
I've been fiddling around lately the jack-audio-toolkit. Ideally, I would like to use a jack rack of some effects to improve the audio from an otherwise crappy laptop audio.
I 've installed jack, qjackctl, ardour, audacity and their relevant dependencies.
I also managed to get realtime priviledges to jackd through set_rlimits (and the low latency desktop kernel setting - but no rt kernel) even though at my old laptop this equates to 42ms lag. But that's OK - i'm not planning to capture music on this pc.

The point I'm trying to make here is that applications seem to be racing to use the default sound output device (provided by alsa in my case), so when I am running jackd i have no sound for firefox. Likewise, if jackd is running and i'm running audacious directly with the alsa output plugin , i'll get an (expected) error that snd_pcm_device is busy.

Since the audacious-plugins don't have the jack output plugin included by default, I had to get the sources separately and compile and install them. now I can use audacious through jackd but i'll still have problems with all the other applications (mplayer, xine, firefox etc.).

So is it possible that I can fool all applications into using jackd as their default output device?
alternatively are there jack output plugins for pretty much all applications?

Thank you all for your help
and Merry Christmas!
nass
 
Old 12-24-2010, 03:12 PM   #2
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Merry Christmas to you too;

If it will be possible to use jack as the default output device, I don't know. However, there are a few pointers I may be able to give.

Given your description, I have the feeling you use KDE3, or some compatability stuff that makes you use artsd. As far as I know it's the only application that will lock your soundcard for it's sole own use, programs that want to produce sound have to go through artsd.

Disabling aRts might already help you on your way; as alsa should be very capable of handling multiple applications producing sound at the same time.
 
Old 12-24-2010, 07:10 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
You could install the ugly horrible pulseaudio with the following .asoundrc:
Code:
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}
Firefox (and all jack-unaware) apps should output to pulse, which can output to JACK. artsd may work as well. If you're just trying to improve audio, though, there are ALSA plugins that, if they can do what you want, would be a *much* neater and CPU-savvy solution. I would try that first and perma-JACK as a distant second option.

If you must use JACK, though, see here which may or may not help you use Flash and similar without adding artsd/pulseaudio.

Last edited by T3slider; 12-24-2010 at 07:12 PM.
 
Old 12-25-2010, 08:48 AM   #4
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
Hello and thank you for your replies.

Ramurd, i'm on KDE4 (slackware-current). so no artsd server. I read that phonon is the sound server of KDE4 but i see no phonon application running, or any such package installed. I setup jackd to use alsa as the output device and as such it must be jackd that's locking alsa completely to itself.

T3slider I looked around for alsa-plugins and their functionality. If I understood correctly, you can set some permanent plugins and corresponding values in ~/.asoundrc file but thats about it. you can't be tweaking knobs real time. So alsa plugins is out of the questions.

It appears what I want is ultimately done by introducing a loopback device (a virtual soundcard) in alsa.
Then you can make the virtual soundcard the default one, and bridge it to your real soundcard through jack. So all applications can continue outputting sound to alsa as before without altering their settings.

I found the relevant howto in alsa unofficial wiki.
http://alsa.opensrc.org/index.php/Ja...to-Jack_bridge

I'll have ago at it and post back the results!
 
Old 12-26-2010, 12:57 PM   #5
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slackware, debian, ubuntu
Posts: 666

Original Poster
Rep: Reputation: 39
ok the guide works like a charm. I installed jack-rack and been using a set of effects for all applications that output sound to the default device (that is alsa), unaware that the sound actually reaches the jackd server.

2 things to note:

1) prefer the snapshot version of the alsa-driver (NOT the one in the alsa main page) with the kernel 2.6.36. I read somewhere that up to kernel 2.6.33 the main page version of the driver compiled fine - sorry I didn't keep the link. And I am unsure whats the deal with the intermediate versions of the kernel.
read this thread for info and a download link: http://www.linuxquestions.org/questi...6-36-a-829221/

2) from kernel 2.6.37 the virtual soundcard (loopback) device that is necessary for the above setup will become an option in the mainline kernel, so the separate re-compilation of the alsa-driver will become unecessary!

thats it folks!
 
  


Reply

Tags
audacious, default sound device, jack



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Sound Device as Default Skazi Linux - Hardware 1 07-15-2010 09:33 AM
Changing Default Audio Device - I have 2 sound cards Virtuality Linux - General 2 12-15-2007 10:28 PM
jackd -R -d alsa -d hw:1 - second sound card sycamorex Linux - Hardware 0 05-02-2007 02:14 PM
Video Vanishing in Mandriva! Default sound device question also. PhuzzyDay Linux - Hardware 1 03-06-2006 10:57 PM
Default Sound Device KHAAAN Linux - Hardware 3 07-27-2004 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration