On 3/12/25 3:59 AM, Jan Stary wrote:
On Mar 11 18:07:25,g...@oat.com wrote:
On 3/11/25 4:38 PM, Jan Stary wrote:
On Mar 11 14:41:32,g...@oat.com wrote:
Attaching:
uaudio0 at uhub3 port 3 configuration 1 interface 1
"Schiit Audio Schiit Modi 3+" rev 2.00/1.00 addr 5
uaudio0: class v2, high-speed, async, channels: 2 play, 0 rec, 1 ctls
audio1 at uaudio0
uaudio1 at uhub3 port 4 configuration 1 interface 1
"Burr-Brown from TI USB Audio CODEC" rev 1.10/1.00 addr 6
uaudio1: class v1, full-speed, sync, channels: 2 play, 2 rec, 3 ctls
audio2 at uaudio1
uhidev3 at uhub3 port 4 configuration 1 interface 3
"Burr-Brown from TI USB Audio CODEC" rev 1.10/1.00 addr 6
uhidev3: iclass 3/0
ucc0 at uhidev3: 3 usages, 3 keys, enum
wskbd2 at ucc0 mux 1
wskbd2: connecting to wsdisplay0
Run sndiod -f -F -F with those devices, and with -ddd,
inside a script(1) and post the full log
of playing an audio file on each devicea
Same results as before. The most interesting lines Burr-Brown
sioctl(mix|ini): created 0/output0.level=255 at 2 -> hw:0/0: added
0/output1.level=255 at 3 -> hw:0/1: added 0/output0.mute=0 at 4 ->
hw:0/32: added 0/output1.mute=0 at 5 -> hw:0/33: added
0/server.device=0:1 at 6 -> hw:0/128 (uaudio0): added victim:
sioctl(mix|ini): created 1/server.device=0:1 at 2 -> hw:1/128 (uaudio1):
added snd1 pst=cfg: software master level control enabled
1/output.level=127 at 3 -> dev_master:1: added ---------- script output
--------
eight:gwes:gwes:1580$ sndiod -ddd -f rsnd/1 -F rsnd/2 &
[2] 14145
eight:gwes:gwes:1581$ snd0 pst=cfg.default: rec=0:1 play=0:1 vol=8388608 dup
snd0 pst=cfg.0: rec=0:1 play=0:1 vol=8388608 dup
snd1 pst=cfg.1: rec=0:1 play=0:1 vol=8388608 dup
helper(helper|ini): created
worker(worker|ini): created
listen(/tmp/sndio/sock0|ini): created
eight:gwes:gwes:1581$ # background so all output is on the same terminal
eight:gwes:gwes:1582$ # burr-brown is rsnd/1, snd/0
eight:gwes:gwes:1583$ # victim is rsnd/2, snd/1
eight:gwes:gwes:1584$ # cables are on victim
eight:gwes:gwes:1586$ eight:gwes:gwes:1586$ aucat -f snd/1 -i b.wav
sock(sock|ini): created
helper: recv: cmd = 0, num = 1, mode = 3, fd = -1
helper: send: cmd = 3, num = 0, mode = 0, fd = -1
helper: recv: cmd = 0, num = 1, mode = 1, fd = -1
helper: send: cmd = 3, num = 0, mode = 0, fd = 3
helper: recv: cmd = 2, num = 1, mode = 768, fd = -1
helper: send: cmd = 3, num = 0, mode = 0, fd = 3
sock,rmsg,widl: AUTH message
sock,rmsg,widl: HELLO message
sock,rmsg,widl: hello from <aucat>, mode = 1, ver 7
app/aucat0.level=127 at 1 -> slot_level:aucat0: added
snd1 pst=cfg: device requested
worker: send: cmd = 0, num = 1, mode = 3, fd = -1
worker: recv: cmd = 3, num = 0, mode = 0, fd = -1
worker: send: cmd = 0, num = 1, mode = 1, fd = -1
worker: recv: cmd = 3, num = 0, mode = 0, fd = 6
warning, device opened in play-only mode
worker: send: cmd = 2, num = 1, mode = 768, fd = -1
worker: recv: cmd = 3, num = 0, mode = 0, fd = 7
sio(dev|ini): created
sioctl(mix|ini): created
1/server.device=0:1 at 2 -> hw:1/128 (uaudio1): added
snd1 pst=cfg: software master level control enabled
1/output.level=127 at 3 -> dev_master:1: added
dec: s16le, 2 channels
enc: s16le, 2 channels
snd1 pst=cfg: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
aucat0 vol=127,pst=ini: using 1, mode = 1
aucat0 vol=127,pst=ini,rmsg,widl: SETPAR messagel=127,pst=ini,rmsg,widl:
playback channels 0:1 -> 0:1
aucat0 vol=127,pst=ini,rmsg,widl: 44100Hz sample rate, 441 frame blocks
aucat0 vol=127,pst=ini,rmsg,widl: 8820 frame buffer
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR message
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR message
aucat0 vol=127,pst=ini,rmsg,widl: START message
aucat0 vol=127,pst=ini: playing s24le4lsb -> s16le
aucat0 vol=127,pst=ini: allocated 8820/15876 fr buffers
aucat0 vol=127,pst=sta: 44100Hz, s24le4lsb, play 0:1, 20 blocks of 441
frames
aucat0 vol=127,pst=sta,rmsg,widl: building SETVOL message, vol = 127
cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0
resamp: 147/160
snd1 pst=ini: device started
snd1 pst=run: started
aucat0 vol=127,pst=rdy: attached at -7056 + 0/441
aucat0 vol=127,pst=rdy: set weight: 8388608/8388608
sio(dev|ini): processed in 5943us
aucat0 vol=127,pst=run,rmsg,widl: STOP message
aucat0 vol=127,pst=run: stopping
aucat0 vol=127,pst=ini,rmsg,widl: stopped
aucat0 vol=127,pst=ini: drained
aucat0 vol=127,pst=ini,rmsg,widl: building STOP message
aucat0 vol=127,pst=ini,rmsg,widl: BYE message
aucat0 vol=127,pst=ini,rmsg,widl: closing
snd0 pst=ini: device started
snd0 pst=run: started
aucasnd1 pst=run: device released
sock(sock|zom): destroyed
eight:gwes:gwes:1587$ snd1 pst=run: device stopped
snd1 pst=run: stopped, load avg = 239856 / 60179854
snd1 pst=cfg: closed
sio(dev|zom): destroyed
sioctl(mix|zom): destroyed
snd1 pst=cfg: closing
1/output.level=127 at 3 -> dev_master:1: removed
eight:gwes:gwes:1587$ # no sound from snd1
eight:gwes:gwes:1588$ # move cables to burr-brown
eight:gwes:gwes:1589$ # sound from snd0
eight:gwes:gwes:1589$ aucat -f snd/0 -i b.wav
sock(sock|ini): created
sock,rmsg,widl: AUTH message
helper: recv: cmd = 0, num = 0, mode = 3, fd = -1
helper: send: cmd = 3, num = 0, mode = 0, fd = 3
helper: recv: cmd = 2, num = 0, mode = 768, fd = -1
helper: send: cmd = 3, num = 0, mode = 0, fd = 3
sock,rmsg,widl: HELLO message
sock,rmsg,widl: hello from <aucat>, mode = 1, ver 7
snd0 pst=cfg: device requested
worker: send: cmd = 0, num = 0, mode = 3, fd = -1
worker: recv: cmd = 3, num = 0, mode = 0, fd = 6
worker: send: cmd = 2, num = 0, mode = 768, fd = -1
worker: recv: cmd = 3, num = 0, mode = 0, fd = 7
sio(dev|ini): created
sioctl(mix|ini): created
0/output0.level=255 at 2 -> hw:0/0: added
0/output1.level=255 at 3 -> hw:0/1: added
0/output0.mute=0 at 4 -> hw:0/32: added
0/output1.mute=0 at 5 -> hw:0/33: added
0/server.device=0:1 at 6 -> hw:0/128 (uaudio0): added
dec: s16le, 2 channels
enc: s16le, 2 channels
snd0 pst=cfg: 48000Hz, s16le, play 0:1, rec 0:1, 16 blocks of 480 frames
aucat0 vol=127,pst=ini: using 0, mode = 1
sock(sock|ini): processed in 8535us
aucat0 vol=127,pst=ini,rmsg,widl: playback channels 0:1 -> 0:1
aucat0 vol=127,pst=ini,rmsg,widl: 44100Hz sample rate, 441 frame blocks
aucat0 vol=127,pst=ini,rmsg,widl: 8820 frame buffer
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR message
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR messag
aucat0 vol=127,pst=ini,rmsg,widl: START message
aucat0 vol=127,pst=ini: playing s24le4lsb -> s16le
aucat0 vol=127,pst=ini: allocated 8820/15876 fr buffers
aucat0 vol=127,pst=sta: 44100Hz, s24le4lsb, play 0:1, 20 blocks of 441
frames
aucat0 vol=127,pst=sta,rmsg,widl: building SETVOL message, vol = 127
cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0
resamp: 147/160
snd0 pst=ini: device started
snd0 pst=run: started
aucat0 vol=127,pst=ini,rmsg,widl: SETPAR message
t0 vol=127,pst=rdy: attached at -7056 + 0/441
aucat0 vol=127,pst=ini,rmsg,widl: playback channels 0:1 -> 0:1
aucat0 vol=127,pst=ini,rmsg,widl: 44100Hz sample rate, 441 frame blocks
aucat0 vol=127,pst=ini,rmsg,widl: 8820 frame buffer
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR message
aucat0 vol=127,pst=ini,rmsg,widl: GETPAR message
aucat0 vol=127,pst=ini,rmsg,widl: START message
aucat0 vol=127,pst=ini: playing s24le4lsb -> s16le
aucat0 vol=127,pst=ini: allocated 8820/15876 fr buffers
aucat0 vol=127,pst=sta: 44100Hz, s24le4lsb, play 0:1, 20 blocks of 441
frames
aucat0 vol=127,pst=sta,rmsg,widl: building SETVOL message, vol = 127
cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0
resamp: 147/160
snd0 pst=ini: device started
snd0 pst=run: started
Zaucat0 vol=127,pst=rdy: set weight: 8388608/8388608
snd0 pst=run: rec hw xrun, rused = 480/7680
snd0 pst=run: play hw xrun, pused = 7200/7680
sio(dev|ini): processed in 11749us
aucat0 vol=127,pst=run,rmsg,widl: STOP message
aucat0 vol=127,pst=run: stopping
aucat0 vol=127,pst=ini,rmsg,widl: stopped
aucat0 vol=127,pst=ini: drained
aucat0 vol=127,pst=ini,rmsg,widl: building STOP message
aucat0 vol=127,pst=ini,rmsg,widl: BYE message
aucat0 vol=127,pst=ini,rmsg,widl: closing
snd0 pst=run: device released
sock(sock|zom): destroyed
eight:gwes:gwes:1590$ snd0 pst=run: device stopped
snd0 pst=run: stopped, load avg = 284827 / 59911367
snd0 pst=cfg: software master level control enabled
0/output.level=127 at 2 -> dev_master:0: added
snd0 pst=cfg: closed
sio(dev|zom): destroyed
sioctl(mix|zom): destroyed
snd0 pst=cfg: closing
0/output.level=127 at 2 -> dev_master:0: removed
sio(dev|zom): processed in 6820us
--------
distortion: I created a wav file with a standard IM distortion test
waveform @-1 dB
Ran an FFT showing worst case spurious signals about -95 @ 24 bits, -85
@ 16 bits.
After resampling from 48K to 44.1K the FFT showed spurious signals at
least -60.
Downsampling from 24 to 16 bits also created spurious signals.
The critical part is in dsp.c in both aucat and sndiod.
I couldn't find any dithering or noise shaping code so those results are
expected.
Without that any operation which discards bits potentially introduces IM
distortion.
Filtering after the operation cannot remove the bad data because it is
in band and
correlated. D+NS turns that into uncorrelated noise spread over the
entire spectrum.
Properly done very little information is lost.
I haven't looked at this for several years.
I've just not used either aucat or sndiod.
I do have a fix (probably need to recreate it) but won't be able to
create the proper diffs
for some weeks. Creating tests suitable to publish takes a long time (as
usual, much longer
than doing the fix).