How do I get JACK to output 5.1? Or 4.0?

Hi,

I have a Creative SB Live! card that supports 5.1 surround. When I play AC3 or DTS surround enabled movies in VLC, or when I play a 6 channel WAV file, I hear the full surround.

But I cannot seem to start a surround project in Ardour. When importing a 6 channel .wav to separate channels, I can see the ‘3d’ pan tool with the blue and orange dots, but it all sounds kind of mono to me. Actually not even stereo, although two outputs are mapped.

That’s the problem. I get playback_1 and playback_2. And when in JACK I set output channels to 4 or 6 (or anything above 2), JACK quits with the message:

ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: cannot set channel count to 6 for playback
ALSA: cannot configure playback channel

How do I get those other channels in Ardour/Jack? Other software supports it. So there is no problem with the hardware or drivers.

@ Paul:

I fixed the network (sort of) and have the output.

sander@RedServ:~$ cat /proc/asound/cards
0 [ICH5 ]: ICH4 - Intel ICH5
Intel ICH5 with AD1985 at irq 17
1 [Live ]: EMU10K1 - SB Live! Value [CT4832]
SB Live! Value [CT4832] (rev.8, serial:0x80271102) at 0xdf80, irq 22
sander@RedServ:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Live [SB Live! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
Subdevices: 32/32
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
(…)
Subdevice #31: subdevice #31
card 1: Live [SB Live! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
(…)
Subdevice #7: subdevice #7
card 1: Live [SB Live! Value [CT4832]], device 3: emu10k1 [Multichannel Playback]
Subdevices: 1/1
Subdevice #0: subdevice #0
sander@RedServ:~$

Note that the Intel device is supposed to be gone (onboard audio chip), but lately sometimes my motherboard boots with default BIOS settings for reasons I have yet to find out (no it’s not the battery) thus shifting the SB LIVE! from bus 0 to 1. (I think my PSU takes a sabbatical now and then and it disturbs things.)

I own a similar soundcard (SB X-Fi Surround 5.1) and when I set 6 channels (and 24 bits), everything works fine.

I cannot say what is wrong in your configuration, but I can ensure that 6 channels with a Creative 5.1 card and Jack is possible.
On the opposite, with this soundcard Jack does not start with any channels number other than 6 or 2 (as the 4 in 4.0).

Interesting… I don’t really know what else to try. :stuck_out_tongue:

I’m not really knowledgable about Jack, I used to use it just as it autostarted with Ardour. But that was before I wanted to do something 6 channel.

I can hear my computer does 5.1. I know (from you) that it should work with Jack and Ardour. And yet it doesn’t. And I don’t know where I went wrong. My head doesn’t like that. :stuck_out_tongue:

I will try some other random stuff. If anyone got tips, please let me know. If I accidentally fix it, I’ll let you know!

Try fooling around with the input/output devices in qjackctl.

Maybe something like hw:0,2 and hw:0,3

Or select the ones that say “Multichannel”

You might probably have to also check your mixer (Alsa Mixer) To make sure all the channels are unmuted both in recording and playback tabs…

@redsandro: post the output of these two commands:

cat /proc/asound/cards
aplay -l

Ardour doesn’t support “5.1” but it can certainly support 5 (or any number of) channel output.

@ joegiampaoli:

I was hoping to get back sooner, but I have problems with my network I need to solve first. (I use Synergy+ network kvm, but my computers suddenly cannot see eachother anymore.)

But I remember there was an arrow and when you click it, it lists the numbers with a name. I just selected the ones that said “Sound Blaster Live”, because there was only one option for that. I think that was the only one that worked (but stereo only).

The channels are also unmuted, I can play surround movies. But if the mixer controls channels on a per-application basis (like Windows 7) then I will have to check again, after my network is fixed.

@ Paul:

Thanks, I’ll get back on that when networking is restored. I can’t even ssh into that computer.

For the record:

cat /proc/asound/cards

1 [Live ]: EMU10K1 - SB Live! Value [CT4870]
SB Live! Value [CT4870] (rev.8, serial:0x80281102) at 0xb880, irq 21

qjackctl setup:

Interface: Default
Audio: Duplex
Input device: hw:1,0 (ADC Capture/Standard PCM Playback)
Output device: hw:1,3 (Multichannel Playback)
Input channels: Default
Output channels: Default

I have 2 system:captures and 16 system:playbacks in qjackctl connections.

Hi Redsandro,

Try with the settings I suggested. Card can be 0 or 1, but “device” should be 0 for Input and 3 for output. I put Interface “default” but it is not selectable at all when you define the input and output devices. Also, take into account that the SB Live! only works at 48000 Hz, so don’t tell jack to work with another SR, to avoid confusion.
In case you can’t fix that BIOS problem, you can give fixed numbers to the cards in the alsa configuration file, so that the SB live! is always number 0 (or 1). See for example, 64studio FAQ user nº 13.

IHTH, Pablo

no need of fixed index, use the name of the card (the one between squared brackets in the output of /proc/asound/cards), e.g.

jackd -R -d alsa -d hw:Live -r 48000 -p blabla …

Sorry to say that it took me this long to finally have time free to continue the quest for 5.1.

Anyway, I tried Pablo’s setup, and it seems to work!
I would guess I tried those settings before, but arguable I did something different because now the server will start.

Things that may or may not have to do with it:

  • Close Ardour before restarting Jack
  • (Related or not, I tried some stuff and the variation after I closed Ardour worked).
  • Set channels to [default], not 2 4 or 6
  • 03:57:50.923 /usr/bin/jackd -dalsa -r48000 -p1024 -n2 -D -Chw:0,0 -Phw:0,3
    03:57:50.939 JACK was started with PID=3938.
    no message buffer overruns
    jackd 0.116.1
    Copyright 2001-2005 Paul Davis and others.
    jackd 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
    JACK compiled with System V SHM support.
    loading driver ..
    apparent rate = 48000
    creating alsa driver ... hw:0,3|hw:0,0|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:0
    configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
    ALSA: final selected sample format for capture: 16bit little-endian
    ALSA: use 2 periods for capture
    ALSA: final selected sample format for playback: 16bit little-endian
    ALSA: use 2 periods for playback
    03:57:52.988 Server configuration saved to "/home/sander/.jackdrc".
    03:57:52.989 Statistics reset.
    03:57:52.991 Client activated.
    03:57:52.995 JACK connection change.
    03:57:53.003 JACK connection graph change.
    

    Now I have also 16 outputs. Whaat? :stuck_out_tongue:
    This is a big improvement. Although all audio from my previous project comes from the front right corner, I’ll have something to start with.

    At the moment I have 2/2 quadrophonic analog sound connected so I cannot test the center speaker or the woofer, but here’s the current weird routing I’ve found out:

    Front-left: Ch. 1, 5, 9
    Front-right: Ch. 2, 6, 10
    Rear-left: Ch. 3
    Rear-right: Ch. 4
    Unused: Ch. 7, 8, 11 to 16

    Uhhh… so how are you supposed to route this? Is there an easy way to auto-detect this, like some players know where to play what (if you play a surround track)? Because the card… it has 6 outs, not 16. And players have a way of knowing what goes where.

    Thanks for thinking with me!