Jack and Alsa don't cooperate on my laptop running avlinux
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Jack and Alsa don't cooperate on my laptop running avlinux
Hello,
I recently installed avlinux on my laptop. Unfortunately I can't get my machine to output any sound going through jack. I'm using audacity and hydrogen to test my setup. Connecting them directly to alsa works using the device 'hw:1,0'. But if I select 'hw:1,0' in jack and jack in audacity/hydrogen there is no sound.
My machine has 2 sound interfaces (intel hda and sone nvidia hdmi adapter) but I disabled the nvidia one because it's also using the intel snd_hda_intel module (see modprobe.d below).
Sorry to bother you with my problems but this cost me already 15+h and I don't seem to make any progress. The documentation on alsa and jack is very slim.
@ondoho, thanks for the reply. All these posts concern other problems though.
I tried all of the devices (especially hw:1,0) inside jack. There isn't a single noise leaving the speakers. The last post is somewhat more informative but unfortunately the '.asoundrc' isn't really commented. I can't even figure out if the problem is on the side of alsa or jack. Given the fact that streaming directly to alsa from applications works strongly suggests that jack is the problem but there is little logging that I could use to debug the situation. I don't even know if jack receives the stream if I set hydrogen/audacity to use jack. Sorry, for the whining.
well you've been given the address of the avlinux forums now; maybe you found something else? try searching for "dual soundcard" or "multiple audio devices" or some such?
also, writing "i tried all devices" isn't enough.
you have to show us: which commands, what output and so on.
also, each change to a config file, you usually have to reload the application in question. i think there's an "alsa-reload" command. similar for jack, i guess.
if you're unsure, reboot (i know they say that about windows, but it holds true for linux just as well).
alsa (and maybe also jack) comes with some tools you can use for troubleshooting, e.g. speaker-test.
and please use code tags for code (see my signature).
I know that stuff has to be reinitialized after a change has been made to a configuration. Qjackctl actually warns you when you change something. My tests used mainly qjackctl but also jackd and jackdbus individually. This is unlikely to be an issue of multiple sound cards because the nvidia hdmi sound card is disabled on start-up (see entry in /etc/modprobe.d/sound.conf).
avlinux creates an alsa loopback device which might confuse jack. Initially jack points to this device but streaming directly to it doesn't give any sound. If I remember correctly using 'alsaloop' allowed me to connect the loopback device to my actual output device 'alsaloop -P hw:1,0'.
My listing `cat /proc/asound/cards` shows all the devices (without the disabled nvidia hdmi). I tried all of these devices using qjackctl and jackd directly.
What I find really strange is that connecting hydrogen,audacity to alsa directly works but connecting jack to it does not work.
I don't know if streaming from hydrogen/audacity to jack fails or jack streaming to 'hw:1,0'. qjackctl shows that hydrogen/audacity are connected that's why I assume that jack is failing to stream to 'hw:1,0'.
Searching the avlinux forum was one of the first things I've done but my issue doesn't seem to be known.
Instead of trying to output sound directly to alsa from jack I am now pointing jack at the dummy backend. Using alsa_out I create a jack client that outputs the audio to alsa's device 'hw:1,0':
alsa_out -j some_name -d hw:1,0
In qjackctl I can connect my application to the appropriate jack client (some_name).
This might not be ideal but it works (i.e. I can use zynaddsubfx for which alsa did also not work).
Last edited by Hant Geuter; 05-13-2016 at 12:48 AM.
what surprises me is that this doesn't work ootb with avlinux.
did you disable the second soundcard after you installed avlinux? did you disable it in bios?
did you add the alsa loopback device yourself? probably not.
ps:
to me this looks like a solution, not a workaround.
You could run into issues if alsa wasn't compiled with sequencer support. And if audacity wasn't compiled with portaudio. Although not likely to be the case in avlinux. You will likely need to make connections manually with qjackctl or jack_connect. Although many apps have flags you can pass to make those connections automagically (but not a default behavior in most).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.