Audio Setup

I am about to change a little.
When you select an audio device, the jack parameters will be changed accordingly to.

This means, that we could provide more than one USB device entry.

Everybody who has an USB card working, pls share the parameters with us.

And everybody who doesn’t see volume sliders on that page, we need the output of the shell command:

amixer

1 Like

Behringer UCA222:
/usr/bin/jackd -P70 -t2000 -dalsa -dhw:CODEC -r48000 -p256 -n3 -s -S -Xraw

Hi i have this card

http://linuxmao.org/M-Audio+M-Track

but i never try if is working and also if it need some special configurations

I added this option.

1 Like

Do you see the volume slider?
I need the output of amixer otherwise

Dunno, after the last update to just goes into a boot loop, journalctl -u jack2.service shows:

Jan 22 00:03:01 zynthian jackd[2538]: jackdmp 1.9.10
Jan 22 00:03:01 zynthian jackd[2538]: Copyright 2001-2005 Paul Davis and others.
Jan 22 00:03:01 zynthian jackd[2538]: Copyright 2004-2014 Grame.
Jan 22 00:03:01 zynthian jackd[2538]: jackdmp comes with ABSOLUTELY NO WARRANTY
Jan 22 00:03:01 zynthian jackd[2538]: This is free software, and you are welcome to redistribute it
Jan 22 00:03:01 zynthian jackd[2538]: under certain conditions; see the file COPYING for details
Jan 22 00:03:01 zynthian jackd[2538]: JACK server starting in realtime mode with priority 70
Jan 22 00:03:01 zynthian jackd[2538]: self-connect-mode is "Don't restrict self connect requests"
Jan 22 00:03:02 zynthian jackd[2538]: audio_reservation_init
Jan 22 00:03:02 zynthian jackd[2538]: dbus_bus_request_name() failed. (1)
Jan 22 00:03:02 zynthian jackd[2538]: Failed to acquire device name : Audio1 error : Connection ":1.67" is not allowed to own the service "org.freedesktop
Jan 22 00:03:02 zynthian jackd[2538]: Audio device hw:CODEC cannot be acquired...
Jan 22 00:03:02 zynthian jackd[2538]: Cannot initialize driver
Jan 22 00:03:02 zynthian jackd[2538]: JackServer::Open failed with -1
Jan 22 00:03:02 zynthian jackd[2538]: Failed to open server
Jan 22 00:03:02 zynthian systemd[1]: jack2.service: main process exited, code=exited, status=255/n/a
Jan 22 00:03:02 zynthian systemd[1]: Unit jack2.service entered failed state.

looks like something to do with jackdbus?

Try to enter the jack value you had before.

It says, that it couldn’t find CODEC. That’s what you posted earlier. Maybe there is some typo somewhere

Dienstag, 22 Januar 2019, 01:20vorm. +01:00 von Rip Rockjaw via Zynthian Discourse discourse@zynthian.org:

The issue was with dbus, I had to change the file /etc/dbus-1/system-local.conf to

<policy user="root">
     <allow own="org.freedesktop.ReserveDevice1.Audio1"/>
</policy>

Because even though it was the only card it insists on being card1 not card0.

Also the mixer doesn’t appear in the webconf, I presume that’s more to do with the fact you have to launch alsamixer -c1 to view it.

Edit to note: It worked before so it must have been card0 at some point.

2 Likes

I have to configure the volume slider for each card individually.
That’s why I need the input from anybody who doesn’t see the slider.

root@zynthian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

root@zynthian:~# amixer -c1
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 128
  Mono:
  Front Left: Playback 110 [86%] [-18.00dB] [on]
  Front Right: Playback 109 [85%] [-19.00dB] [on]


As discussed in this topic, I have a Steinberg UR22 mkII working. I’m using the default usb audio settings, except that I changed “hw:0” into “hw:1” (-P 70 -t 2000 -s -d alsa -d hw:1 -r 44100 -p 256 -n 2 -X raw) and that I had to make the same adjustment to /etc/dbus-1/system-local.conf as mentioned by Baggypants above.

I see no volume sliders, only a slider for “Clock Source 41 Validity” (no idea what it is for)

This is the output of amixer:

Simple mixer control ‘Clock Source 41 Validity’,0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]

I added the card.
The Clock Source 41 validity as well although I think, that this is not the volume.
I don’t think, that you can change it with amixer

After the last update the UR22 mkII is recognised as hw:0, so now the jackd options should be “-P 70 -t 2000 -s -d alsa -d hw:1 -r 44100 -p 256 -n 2 -X raw”

Are you sure, that it’s not hw:0?

Sorry, you’re right, it is now “-P 70 -t 2000 -s -d alsa -d hw:0 -r 44100 -p 256 -n 2 -X raw”

@jofemodo, we need something to get those manual changes automated.
Maybe an additional field, that contains the name of a script file in /custom?

Edirol UA1-EX:

-P 70 -t 2000 -dalsa -dhw:UA1EX -r44100 -p1024 -n2 -S -Xraw

OBS1: Jack only got past the error described in https://www.raspberrypi.org/forums/viewtopic.php?t=57025 by using the method also shown there;
OBS2: Another person here on Audio Setup.WE NEED YOUR INPUT also has this problem and the solutions are in some level related;
OBS3: amixer and https://alsa.opensrc.org/Edirol_UA-1EX shows that no volume control is implemented, even if it is softvol;
OBS4: Sorry for the confusion, only now i figured out how to get it working :sweat_smile: .

1 Like

Hi 2 all,
my settings for the HiFiberry dac+ adc…

Update your kernel to kernel7-hb
Setup Guide here: Kernel Update

Insert all the stuff needed for the dac+adc card to the
/home/pi/zynthian-webconf/lib/audio_config_handler.py file…
audio_config_handler.py (9.9 KB)

Insert

dtoverlay=hifiberry-dacplusadc
kernel=kernel7-hb.img

to the new HiFiberry dac+ adc Audiocard Entry…

thanks for watching: Dirk

Github says: Markus Heidt adding HifiBerry DAC+ ADC support

Pressing update… loading … ready…

IT WORKS! :heart_eyes:

:kissing_heart: Dirk

2 Likes

The latest USB connected device…


A blue yeti USB microphone (with headphone output)
Standard USB device but hw:1 and alteration to /etc/dbus-1/system-local.conf

I get audio in the phones from the zynth… Not so sure about input yet …

-P 70 -t 2000 -s -d alsa -d hw:1 -r 48000 -p 256 -n 2 -X raw

root@zynthian-nord:~# amixer
amixer: Mixer attach default error: No such file or directory
root@zynthian-nord:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Microphone [Yeti Stereo Microphone], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
root@zynthian-nord:~#

Just for my benefit…

-P, --realtime-priority int
When running --realtime, set the scheduler priority to int.

-t, --timeout int

Set client timeout limit in milliseconds. 
 The default is 500 msec. 
In realtime mode the client timeout must be smaller than
the watchdog timeout (5000 msec). 

-s, --softmode

Ignore xruns reported by the ALSA driver.
This makes JACK less likely to disconnect 
unresponsive ports when running without --realtime. 

-d, --device name

The ALSA pcm device name to use. If none is specified,
JACK will use "hw:0", 
the first hardware card defined in /etc/modules.conf. 

-r, --rate int
Specify the sample rate. The default is 48000.
(not to be confused with --no-realtime (…?)

-p, --port-max n
Set the maximum number of ports the JACK
server can manage. The default value is 256.

-n, --nperiods int

Specify the number of periods of playback latency.
In seconds, this corresponds to 
        --nperiods times 
        --period divided by
        --rate.
The default is 2, the minimum allowable.
 For most devices,there is no need for any 
 other value with the --realtime option.  
 Without realtime privileges 
 or with boards providing 
 unreliable interrupts (like ymfpci),
 a larger value may yield fewer xruns.
This can also help if the system is not tuned for 
 reliable realtime scheduling.

For most ALSA devices, the hardware buffer
has exactly --period times --nperiods frames.
Some devices demand a larger buffer.
If so, JACK will use the smallest possible buffer 
containing at least --nperiods,
but the playback latency does not increase.

For USB audio devices it is recommended
  to use -n 3. 
Firewire devices supported by FFADO
are configured with -n 3 by default.

-X, --midi [seq|raw]

Specify which ALSA MIDI system to provide access to.
Using raw will provide a set of JACK MIDI ports
that correspond to each raw ALSA device on the machine.
Using seq will provide a set of JACK MIDI ports 
that correspond to each ALSA "sequencer" client 
(which includes each hardware MIDI port on the machine).
raw provides slightly better performance but does not permit
JACK MIDI communication with software written
to use the ALSA "sequencer" API.