Re: [alsa-devel] Cannot combine audio devices with more than 64 channels

John Rigg informed me about the port-max-option of Jack. So I tried running the following commands: jackd --port-max 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p1024 -d alsa -C madifx_record_all -P madifx_playback_all
I also tried ommiting either the option of -C or of -P. But I keep getting the same error: jackd: ../linux/alsa/JackAlsaDriver.cpp:122: virtual int Jack::JackAlsaDriver::Attach(): Assertion `fCaptureChannels < 256' failed.
So does that mean jackd doesn't recognize the parameter -p 1024?
2017-01-31 20:31 GMT+01:00 John Rigg aldev2@jrigg.co.uk:
On Tue, Jan 31, 2017 at 06:18:48PM +0100, Jörg Müller wrote:
I applied the patch to my system and it fixed the error!
However, I get the following error which seems to be caused by a code not being able to handle more than 256 channels:
wfs@wfs16:~$ jackd -R -d alsa -C madifx_record_all -P madifx_playback_all jackdmp 1.9.10 Copyright 2001-2005 Paul Davis and others. Copyright 2004-2014 Grame. jackdmp comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details no message buffer overruns no message buffer overruns no message buffer overruns JACK server starting in realtime mode with priority 10 self-connect-mode is "Don't restrict self connect requests" audio_reservation_init Acquire audio card Audio0 creating alsa driver ... madifx_playback_all|madifx_record_all|1024|2|48000|0|0|nomon|swmeter|-|32bit configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods ALSA: final selected sample format for capture: 32bit float little-endian ALSA: use 8 periods for capture ALSA: final selected sample format for playback: 32bit float little-endian ALSA: use 8 periods for playback jackd: ../linux/alsa/JackAlsaDriver.cpp:122: virtual int Jack::JackAlsaDriver::Attach(): Assertion `fCaptureChannels < 256' failed. Aborted (core dumped)
What could be the problem here?
jackd only allows 256 ports maximum by default. Try using -p option to increase it, eg. to 512:
jackd -R -p512 -d alsa....etc
BTW you don't need to specify -R on recent jackd versions as it's realtime by default (use -r if you don't want realtime).
John

On Wed, Feb 08, 2017 at 03:12:37PM +0100, Jörg Müller wrote:
John Rigg informed me about the port-max-option of Jack. So I tried running the following commands: jackd --port-max 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p1024 -d alsa -C madifx_record_all -P madifx_playback_all
I also tried ommiting either the option of -C or of -P. But I keep getting the same error: jackd: ../linux/alsa/JackAlsaDriver.cpp:122: virtual int Jack::JackAlsaDriver::Attach(): Assertion `fCaptureChannels < 256' failed.
So does that mean jackd doesn't recognize the parameter -p 1024?
I just tried jackd -p1024 here and there's no error message. I don't have the hardware to easily test that many ports. I'm using pcm_multi with three ice1712 cards and that accepts the jackd -p1024 option. I tried adding jack clients until the default 256 ports was exceeded, and there's no problem (tried up to 324 ports so far).
In jack2/common/JackGlobals.h it has the following: #ifndefine PORT_NUM_MAX #define PORT_NUM_MAX 4096 #endif
It looks like there's a restriction on driver capture and/or playback channels somewhere, but you might have to grep through the alsa and jack2 source code to find it.
John

On Wed, Feb 08, 2017 at 03:12:37PM +0100, Jörg Müller wrote:
John Rigg informed me about the port-max-option of Jack. So I tried running the following commands: jackd --port-max 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p 1024 -d alsa -C madifx_record_all -P madifx_playback_all jackd -p1024 -d alsa -C madifx_record_all -P madifx_playback_all
I also tried ommiting either the option of -C or of -P. But I keep getting the same error: jackd: ../linux/alsa/JackAlsaDriver.cpp:122: virtual int Jack::JackAlsaDriver::Attach(): Assertion `fCaptureChannels < 256' failed.
So does that mean jackd doesn't recognize the parameter -p 1024?
I just tried jackd -p1024 here and there's no error message. I don't have the hardware to easily test that many ports. I'm using pcm_multi with three ice1712 cards and that accepts the jackd -p1024 option. I tried adding jack clients until the default 256 ports was exceeded, and there's no problem (tried up to 324 ports so far).
In jack2/common/JackGlobals.h it has the following: #ifndefine PORT_NUM_MAX #define PORT_NUM_MAX 4096 #endif
It looks like there's a restriction on driver capture and/or playback channels somewhere, but you might have to grep through the alsa and jack2 source code to find it.
John

On Wed, Feb 08, 2017 at 04:20:12PM +0000, John Rigg wrote:
In jack2/common/JackGlobals.h it has the following: #ifndefine PORT_NUM_MAX #define PORT_NUM_MAX 4096 #endif
Sorry, that should be JackConstants.h
John

In common/JackConstants.h, there is the line: #define DRIVER_PORT_NUM 256 (https://github.com/jackaudio/jack2/blob/master/common/JackConstants.h#L53)
in linux/alsa/JackAlsaDriver.cpp, there are the lines throwing the error: assert(fCaptureChannels < DRIVER_PORT_NUM); assert(fPlaybackChannels < DRIVER_PORT_NUM); (https://github.com/jackaudio/jack2/blob/master/linux/alsa/JackAlsaDriver.cpp...)
They both compare against DRIVER_PORT_NUM, which always caps them at 256 since its a constant. So the problem may be there?
2017-02-08 17:31 GMT+01:00 John Rigg aldev2@jrigg.co.uk:
On Wed, Feb 08, 2017 at 04:20:12PM +0000, John Rigg wrote:
In jack2/common/JackGlobals.h it has the following: #ifndefine PORT_NUM_MAX #define PORT_NUM_MAX 4096 #endif
Sorry, that should be JackConstants.h
John
2017-02-08 17:31 GMT+01:00 John Rigg aldev2@jrigg.co.uk:
On Wed, Feb 08, 2017 at 04:20:12PM +0000, John Rigg wrote:
In jack2/common/JackGlobals.h it has the following: #ifndefine PORT_NUM_MAX #define PORT_NUM_MAX 4096 #endif
Sorry, that should be JackConstants.h
John
participants (3)
-
John Rigg
-
John Rigg
-
Jörg Müller