Page 1 of 1

Trying to get going with KXStudio - Jack question

Posted: Wed Feb 24, 2016 10:21 pm
by timsch
I'm new to KXstudio and linux recording in general, but have been using Linux distros for quite a while now. I have Linux Mint 17.1 as my main distro, but decided to do a new install of KXStudio on a new partition figuring that would be the wiser move. Installation went fine, AFAIK. Initially I had no sound, but got that straightened out with ALSA.

Running KXS.. now there is when I run into unchartered waters for me. I was trying to get the Jack connections, but was only getting errors.

I'm not even sure that I had the correct settings in Jack Settings / Driver.

I am using a Zoom H4n as the audio I/O device. It is recognized by my system.

Code: Select all

tim@tim-A75MG:/etc$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                                                                                       
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                                                                                                                       
Bus 008 Device 004: ID 1686:0045 ZOOM Corporation H4 Digital Recorder                                                                                                                
Bus 008 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub                                                                                                                           
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                                                                                                                       
Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                                                                                                                       
Bus 006 Device 002: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse                                                                                                    
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
When I have the H4n connected and start Jack, I get the following:

Code: Select all

Tue Feb 23 20:05:39 2016: Starting jack server...

Tue Feb 23 20:05:39 2016: JACK server starting in realtime mode with priority 85

Tue Feb 23 20:05:39 2016: self-connect-mode is "Don't restrict self connect requests"

Tue Feb 23 20:05:40 2016: ERROR: cannot register object path "/org/freedesktop/ReserveDevice1/Audio3": A handler is already registered for /org/freedesktop/ReserveDevice1/Audio3

Tue Feb 23 20:05:40 2016: ERROR: Failed to acquire device name : Audio3 error : A handler is already registered for /org/freedesktop/ReserveDevice1/Audio3

Tue Feb 23 20:05:40 2016: ERROR: Audio device hw:H4,0 cannot be acquired...

Tue Feb 23 20:05:40 2016: ERROR: Cannot initialize driver

Tue Feb 23 20:05:40 2016: ERROR: JackServer::Open failed with -1

Tue Feb 23 20:05:40 2016: ERROR: Failed to open server
Here is my system info:

Code: Select all

tim@tim-A75MG:~$ inxi -v7
System:    Host: tim-A75MG Kernel: 3.13.0-58-lowlatency x86_64 (64 bit, gcc: 4.8.2) 
           Desktop: KDE 4.13.3 (Qt 4.8.6) info: plasma-desktop dm: kdm Distro: Ubuntu 14.04 trusty
Machine:   Mobo: TAR model: A75MG Bios: American Megatrends version: 4.6.4 date: 04/11/2012
CPU:       Triple core AMD A6-3500 APU with Radeon HD Graphics (-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 12600.3 
           Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 2100.00 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] BeaverCreek [Radeon HD 6530D] bus-ID: 00:01.0 chip-ID: 1002:964a 
           X.Org: 1.15.1 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz 
           GLX Renderer: Gallium 0.4 on AMD SUMO GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio:     Card-1: Advanced Micro Devices [AMD] FCH Azalia Controller 
           driver: snd_hda_intel bus-ID: 00:14.2 chip-ID: 1022:780d 
           Card-2: Advanced Micro Devices [AMD/ATI] BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 
           driver: snd_hda_intel bus-ID: 00:01.1 chip-ID: 1002:1714 
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-58-lowlatency
I am using the onboard audio of the MoBo and have no other soundcard.

How do I need to configure Jack for my setup? I know that the H4n does not go into duplex mode. Thanks.

Re: Trying to get going with KXStudio - Jack question

Posted: Thu Feb 25, 2016 12:48 pm
by Pablo
Check the input devices

Code: Select all

arecord -l
and the output devices

Code: Select all

aplay -l
If the Zoom H4n doesn't have a duplex capable device (i.e., one that appears in both lists of capture and playback devices),
then you have to check "Duplex mode" in Cadence's Jack Settings, alsa driver configuration
so you can select separately the input and output devices.

It's a bit confusing and I think it should be the other way around: When you check the Duplex Mode button, the
input and output devices should be greyed out. This way, if you have a duplex device, you check duplex mode
and you only have to select it once in the interface/device field to get its capture and playback ports. But it's
exactly the opposite.

Cheers, Pablo

Re: Trying to get going with KXStudio - Jack question

Posted: Thu Feb 25, 2016 10:06 pm
by timsch
I'll make sure to set my configuration with that Duplex box setting in mind.

I thought that I had the ALSA sound issue fixed, but not so. I need to find how to configure ALSA so that my choices for soundcard are permanently set. I got sound by selecting the audio device from the audio menu's of VLC and Audacious, but those reset every time I shut down the system. I'll need to get that straight first, I'd imagine.

Re: Trying to get going with KXStudio - Jack question

Posted: Fri Feb 26, 2016 5:00 am
by glowrak guy
compare your /home/username/.jackdrc text file to this:

/usr/bin/jackd -P89 -t1000 -dalsa -r48000 -p128 -n3 -D -Chw:H4 -Phw:H4

In output from commands aplay -l and arecord -l

look for H4 items within brackets, and use them in the text above if yours are different.

Also, if that does not work, try rebooting with the Zoom not plugged in.
Then plug it in, and reconfigure qjackctl settings to match the above command

Cheers

Re: Trying to get going with KXStudio - Jack question

Posted: Fri Feb 26, 2016 8:30 pm
by Pablo
To solve the problem caused by the random card numbering each time you reboot the computer,
either you call the audio interface by its short name (the names between square brackets in the output of "cat /proc/asound/cards" that you can also see just after the colon in the output of "aplay -l"), as glowrak guy suggests,
and/or
you assign fixed numbers to the audio cards, as explained in
http://alsa.opensrc.org/MultipleCards

Cheers, Pablo

Re: Trying to get going with KXStudio - Jack question

Posted: Fri Mar 04, 2016 4:54 pm
by timsch
I've still have not straightened out the soundcard issue with ASLA. I read the recommended link, but it was a little over my head. I searched and found a post that had a link that repeated much of what the recommended link had in it, but seemed a little more accessible to me.

This is my card info with no additional lines added to /etc/modprobe.d/alsa.conf

Code: Select all

tim2@tim2-A75MG:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: 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: 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 2: Generic_1 [HD-Audio Generic], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
When I tried this line in alsa.conf

Code: Select all

options snd-hda-intel id=Generic_1,Generic index=0,1
I got the following, with the two Generic cards missing

Code: Select all

tim2@tim2-A75MG:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Loopback [Loopback], device 0: 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: 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
When I tried these lines in alsa.conf

Code: Select all

alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
options snd-hda-intel id=Generic_1 index=0
options snd-hda-intel id=Generic index=1
The results were still not what I was expecting. I didn't expect that one of the ID's would be renamed, and one missing

Code: Select all

tim2@tim2-A75MG:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic1 [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: 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: 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
I did not include options in my added lines, but saw examples where this was not done.

Most examples did not deal with more than two options as far as cards go. I have four options from aplay -l. Do I need to address each one? What is causing the cards to disappear in aplay -l ? What else might I be missing?

Thanks.

Re: Trying to get going with KXStudio - Jack question

Posted: Fri Mar 04, 2016 9:43 pm
by Pablo
This is involved, I can't help with the random numbering more than the link I gave.
Maybe you need a udev rule or something.

I strongly recommend you call the cards by its short name.
hw:Generic only has one HDMI device.
hw:Generic_1 has a playback device, probably duplex (check arecord -l).

So, use hw:Generic_1 as the interface in Cadence'.