arecord --dump-hw-params > /dev/null
The command 'arecord --dump-hw-params -f S32_LE > /dev/null' outputs the following:
Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 8000 Hz, Mono
HW Params of device "default":
--------------------
ACCESS: MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE MU_LAW A_LAW IMA_ADPCM S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE
SUBFORMAT: STD
SAMPLE_BITS: [4 64]
FRAME_BITS: [4 640000]
CHANNELS: [1 10000]
RATE: [4000 4294967295)
PERIOD_TIME: (21333 21334)
PERIOD_SIZE: (85 91628833)
PERIOD_BYTES: (42 4294967295)
PERIODS: (0 17247242)
BUFFER_TIME: [1 4294967295]
BUFFER_SIZE: [170 1466015503]
BUFFER_BYTES: [85 4294967295]
TICK_TIME: ALL
--------------------
So, that seams to be working fine.
Think about it - if the SPDIF stream has a different samplerate, it's bitrate must change. Therefore the captured bitrate should also change, even if the change did not cause closing the stream. How is it possible the bitrate did not change, where do the missing/redundant data come from?
When I enter the following command:
arecord -D hw:TosLink -c 2 -r 44100 -f S32_LE - dump-hw-params | pv > /dev/null
The terminal outputs the following:
Recording WAVE '-' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo
13.1MiB 0:00:39 [ 344KiB/s] [
The total size and time parameters constantly increase, but the 344KiB/s rate stays at that 344KiB/s value, even when I change the WiiM's SPDIF Output Resolution from 44.1 kHz to 96 kHz or 192 kHz. My guess is that ALSA is not detecting the change, but I am not familiar with how ALSA handles such things.
Does your SPDIF transmitter really change the SPDIF stream rate, or does it perhaps keep constant rate and resample the track instead?
If I have CamillaDSP running, and I change WiiM's SPDIF Output Resolution, WiiM definitely is changing the stream rate - the music becomes garbled until I set the stream rate back to the original stream rate that was set when the CamillaDSP service started.
If I set WiiM SPDIF output to 192 kHz, it works fine so long as Tidal is streaming the song at that rate. If a next song comes on that is recorded at a lower resolution, then Tidal appears to be streaming it at a lower rate, and the song comes out garbled. If I set the WiiM to 44.1 kHz, it will automatically resample anything streamed higher than that down to 44.1 kHz.
Anyway, don't stress about it. Like I said, 24-bit, 44.1 kHz is working fine, and I can bypass the MCHSTREAMER input if I upgrade to the WiiM Ultra down the road.