LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-08-2016, 02:56 PM   #1
Hant Geuter
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
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.


Here are some useful configuration details:

$ lspci | grep udio
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev ff)


$ cat /etc/modprobe.d/sound.conf
options snd_hda_intel enable=1,0


$ cat /proc/asound/cards
0 [Loopback ]: Loopback - Loopback
Loopback 1
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7700000 irq 31


$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 6/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: PCH [HDA Intel PCH], device 0: ALC269 Analog [ALC269 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0


## part from .config/rncbc.org/QjackCtl.conf:
[Settings]
Server=/usr/bin/jackd
ServerName=
Realtime=true
SoftMode=false
Monitor=false
Shorts=false
NoMemLock=false
UnlockMem=false
HWMon=false
HWMeter=false
IgnoreHW=false
Priority=5
Frames=1024
SampleRate=44100
Periods=3
WordLength=16
Wait=21333
Chan=0
Driver=alsa
Interface=hw:Loopback
Audio=0
Dither=0
Timeout=2000
InDevice=
OutDevice=hw:Loopback
InChannels=0
OutChannels=0
InLatency=0
OutLatency=0
StartDelay=2
Verbose=false
PortMax=256
MidiDriver=none
ServerSuffix=


$ cat .jackdrc
/usr/bin/jackd -t2000 -dalsa -dhw:CODEC -r44100 -p1024 -n3
 
Old 05-10-2016, 01:03 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
some interesting search results from the avlinux forums:
http://bandshed.net/forum/index.php?topic=3629.0
http://bandshed.net/forum/index.php?topic=3632.0
http://bandshed.net/forum/index.php?topic=1208.0
 
Old 05-10-2016, 10:22 PM   #3
Hant Geuter
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Still lost

@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.
 
Old 05-11-2016, 01:55 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Hant Geuter View Post
All these posts concern other problems though.
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).

Last edited by ondoho; 05-11-2016 at 01:58 AM.
 
Old 05-11-2016, 08:33 AM   #5
Hant Geuter
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-13-2016, 12:45 AM   #6
Hant Geuter
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
I found a workaround.

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.
 
Old 05-13-2016, 01:53 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 05-13-2016, 05:31 AM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
You're over thinking it IMO.

FILE: .asoundrc
defaults.pcm.card 1

$ jackd -d alsa -d hw:1 -D -c 2 -r 48000 -m -s -S

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).
 
Old 05-13-2016, 02:43 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Shadow_7 View Post
You will likely need to make connections manually with qjackctl or jack_connect.
isn't that the point of jackaudio?
 
  


Reply



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
Alsa Headphone jack Lsatenstein Linux - Software 12 07-06-2015 08:19 PM
QEMU with ALSA->JACK pcCoder Linux - Software 1 01-31-2015 10:04 AM
Help: Mystified with ALSA+Jack..(almost there).. Barnix Linux - Hardware 3 06-02-2007 06:07 AM
jack and alsa problem zepphead5 Linux - Software 2 04-07-2006 11:39 AM
alsa/jack/ardour foo_bar_foo Linux - Software 1 10-20-2004 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 AM.

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