I'm using an external soundcard (Aureon 7.1 USB). On that soundcard, I receive audio on a digital SPDIF input, and I'd like to reroute that audio to 5.1 PCM output on that same card.
I'm trying to use JACK with Alsa as a backend to achieve this, but I'm a bit lost.
I can play a 6-channels WAV file using aplay without issue, and each channel is correct.
~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
[...]
card 1: USB [Aureon 7.1 USB], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #
My PCM output is on card 1 and works fine.
~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: USB [Aureon 7.1 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
And I see the card as a capture device too.
This is reported in the USB mixer info:
Unit: 16
Control: name="IEC958 In Capture Switch", index=0
Info: id=16, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
And I believe it is my digital input. I'm a bit afraid of the channels=1 though.
So then I start a jack deamon:
~$ jackd -n jack-server --no-realtime -d alsa -d hw:1 --duplex
jackdmp 1.9.17
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2021 Filipe Coelho.
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
JACK server starting in non-realtime mode
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:1|hw:1|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: 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
I use --no-realtime as my OS doesn't seem to support it, hw:1 as the hardware device and duplex for input/output.
Now I can list the ports:
~ $ jack_lsp -s jack-server -tAc
system:capture_1
alsa_pcm:hw:1:out1
32 bit float mono audio
system:capture_2
alsa_pcm:hw:1:out2
32 bit float mono audio
system:playback_1
alsa_pcm:hw:1:in1
32 bit float mono audio
system:playback_2
alsa_pcm:hw:1:in2
32 bit float mono audio
system:playback_3
alsa_pcm:hw:1:in3
32 bit float mono audio
system:playback_4
alsa_pcm:hw:1:in4
32 bit float mono audio
system:playback_5
alsa_pcm:hw:1:in5
32 bit float mono audio
system:playback_6
alsa_pcm:hw:1:in6
32 bit float mono audio
system:playback_7
alsa_pcm:hw:1:in7
32 bit float mono audio
system:playback_8
alsa_pcm:hw:1:in8
32 bit float mono audio
And here I am stuck. What's the next step ? It looks like jack list each individual PCM channel independently, but I only have two input capture ports (one of which may be the line input which I don't use).
What are the next steps to connect the digital input to the PCM output ?