diff options
| author | Piotr Gliźniewicz <p.glizniewicz@gmail.com> | 2026-10-16 09:31:32 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-16 18:46:07 +0200 |
| commit | 25ea03135739225481d82c9d18a5090f3891ba45 (patch) | |
| tree | f7b78fcac32b06019975eb1c616ef070f0273e41 /tools/lib/python/kdoc/python_version.py | |
| parent | a050fabb16a5529a83e9d461b99056ae48761f5b (diff) | |
ALSA: 6fire: add S/PDIF output
The DMX 6Fire USB has a coaxial S/PDIF output, which the driver keeps
disabled. Enable it as playback channels 7 and 8 of the existing PCM
device, the layout chosen in the RFC thread linked below. The
protocol was taken from a usbmon capture of the vendor's Windows
driver and checked against a disassembly of that driver.
The packets of altsetting 3 (176.4 and 192 kHz) have room for the six
analog channels only, so the output is available up to 96 kHz.
hw_params rules allow more than 6 channels only up to 96 kHz, and
prepare rejects more than 6 channels while the other stream runs at
176.4 or 192 kHz. A client that takes channels_max therefore gets 8
channels at up to 96 kHz instead of 6 channels at up to 192 kHz (the
Pro Audio profile of PipeWire 1.6.9 opened the device with 8
channels); a client that asks for 6 channels still gets 192 kHz. A
UCM profile can describe the channels and offer a 6-channel
configuration with 192 kHz. The channel map marks channels 7 and 8
UNKNOWN; a program that ignores the map and assumes the 7.1 order
sends the side pair to the S/PDIF output.
The card has one rate and one frame layout for both directions, set by
the first prepare and kept until the last close, and the register bit
that enables the transmitter is the bit that widens the playback frame
from 6 to 8 slots. The driver therefore sets the bit at every rate up to
96 kHz, whichever direction starts first, so that a playback opened
later can use 8 channels; the transmitter sends what is in
slots 6 and 7, zeros while no playback runs. With "IEC958 Playback
Switch" off (it is on by default), the driver sends zeros in the pair
and omits the block start flag, and the receiver used for testing loses
lock. Two versions in which the switch also cleared the bit were tried
with PipeWire and a UCM profile and dropped. With the bit tied to the
switch, the channel count depended on the switch and a change had to be
refused while a stream ran, which broke profile changes. With the bit
set by the switch or by an 8-channel playback, the frame width depended
on which stream started first, and an 8-channel playback was refused
while a capture ran with the switch off. With the bit tied to the rate,
as in the vendor driver, the coaxial output carries a signal whenever
the card streams at up to 96 kHz; a receiver that selects its input when
it detects a signal was not tested. "Digital Thru Playback Route" has
priority: with it on, the output carries the coaxial input.
The channel status is consumer, 24 bit, with the sample rate and the
channel numbers. "IEC958 Playback Default" sets the non-audio,
copyright and emphasis bits, the category code and the generation bit;
"IEC958 Playback Con Mask" lists these bits. With the non-audio bit
set (AC3, DTS), the validity bit of every subframe is set as well, as
the vendor driver does. A change of "IEC958 Playback Default" or of
the switch takes effect at the next 192-frame block.
Tested on a DMX 6Fire USB at 44.1, 48 and 96 kHz with a second
interface locked to the output: a tagged ramp on channels 7/8 arrived
without a missing, repeated or changed sample for 4.7 s at each rate,
and at 48 kHz a -20 dBFS tone arrived at -20.0 dBFS while a tone on
channel 3 played on Line Out 3. With the switch off from the start,
the second interface did not lock during an 8-channel, a 6-channel or
a capture-only stream.
Link: https://lore.kernel.org/linux-sound/30dcedc7-3b56-4396-af3d-6c2701ef1cb7@perex.cz/
Assisted-by: LLM
Signed-off-by: Piotr Gliźniewicz <p.glizniewicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20261016073132.109288-4-p.glizniewicz@gmail.com
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
