Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use ALSA JACK PCM plugin on Debian 10 and on raspbian #15

Closed
UgoPoddine opened this issue Dec 8, 2020 · 6 comments
Closed

Comments

@UgoPoddine
Copy link

Hello everyone,

a) I have installed libasound2-plugins from repository on a Debian Buster machine (4.19.0-12-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux) and on a raspberry PI3 (5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux) up-to-date (none of these running pulseaudio of course)
b) I have modified my .asoundrc configuration file according to https://jackaudio.org/faq/routing_alsa.html
c) I can see jack and rowjack virtual devices in aplay -L
d) starting qjackctl I'm unable to see the expected new capture_x devices. Of course jack runs correctly with physical devices (eg. PC mic or USB mic)
e) jack is at jackd 0.125.0rc1 version
f) Alsa is at Version k4.19.0-12-rt-amd64 on the AMD64 machine, at Version k5.4.79-v7+ on the RaspberriPI machine
e) any attempt of playing test files over jack device (aplay -D pcm.jack ) generates the error :

ALSA lib pcm_plug.c:1286:(_snd_pcm_plug_open) Unknown field playback_ports
aplay: main:828: audio open error: Invalid argument

Can you help ?

Thank-you
Best regards
Ugo Poddine

@aditpape
Copy link
Contributor

aditpape commented Dec 8, 2020

Looks like you added the entry 'playback_ports' in pcm node of type 'plug' instead of the node for pcm of type 'jack'.
Can you post your JACK related asound.conf /.asound.rc entries?

@perexg
Copy link
Member

perexg commented May 25, 2021

Stalled bug.

@perexg perexg closed this as completed May 25, 2021
@brulzki
Copy link

brulzki commented Sep 27, 2021

I came across the same error today.

The config files are /etc/alsa/conf.d/50-jack.conf, which is the default from https://github.com/alsa-project/alsa-plugins/blob/master/jack/50-jack.conf.

~/.asoundrc is copied from from https://jackaudio.org/faq/routing_alsa.html
pcm.rawjack {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}

pcm.jack {
type plug
slave { pcm "rawjack" }
hint {
description "JACK Audio Connection Kit"
}
}

Notice that both ~/.asoundrc and 50-jack.conf are creating pcm.jack, but of different types. It seems like the ~/.asoundrc config is overridng the default config and changing pcm.jack type from 'jack' to 'plug', but then it still retains the playback_ports definition from the ~/.asoundrc.

Changing the name in ~/.asoundrc from 'pcm.jack' to 'pcm.jack2' works for the output device pcm.jack2, but playing to the pcm.jack device give a different error.

aplay: set_params:1343: Sample format non available
Available formats:

  • FLOAT_LE

I guess that's why the example from the jack faq page sets up pcm.jack to slave to the pcm.rawjack, so "ALSA will do whatever is needed to convert between audio data formats".

The jack faq is somewhat unhelpful right now, but is there anything that could be done to make the default pcm.jack device more usable by default, eg copying the rawjack device from the faq page?

@perexg
Copy link
Member

perexg commented Sep 27, 2021

pcm.jack {

Use pcm.!jack in your .asoundrc here to fully overwrite the system wide configuration. Otherwise, the parsed config tree is a mix of configs which may show those weird issues.

@brulzki
Copy link

brulzki commented Sep 27, 2021

Thanks. I've now got the following in ~/.asoundrc and it works to resolve the sample format error that I had with the config defined in 50-jack.conf

pcm.!jack {
type plug
slave.pcm {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}
hint {
description "JACK Audio Connection Kit"
}
}

@brulzki
Copy link

brulzki commented Sep 27, 2021

Also, I should add that 'aplay -D plug:jack' works without requiring anything defined in ~/.asoundrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants