TonyTromp / tidal-connect-docker

This is the dockerized version of Tidal Connect Raspberry binairies. Can be seemlessly used in HifiberryOS or any other RPi based operating system running Docker.
162 stars 28 forks source link

Sample rate indication on Passthrough #18

Open charliesjc opened 2 years ago

charliesjc commented 2 years ago

Hey Tony, Thanks for this great docker port. I will be tinkering with it until I can't anymore.

I have been playing with the MQA_CODEC and MQA_PASSTHROUGH environment variables because I'm using an Ifi Zen DAC V2. If I leave the MQA_PASSTHROUGH as false then my DAC lights up purple which indicates "Original Sample Rate". And ./show_speaker_controller shows the sample rate of the file correctly. I tested a 352800 Hz song to make sure I saw something different. If I set it to true then the DAC Lights show green for MQA stream and blue for MQA Studio stream but then the sample rate in speaker controller shows either 44100 or 48000 depending on the multiple of the file rate. I don't know if that is simply because it is being "passed through" to the DAC and ALSA can no longer tell what the rate actually is, or if somehow it's being downsampled on the way out. Any ideas? I'm inclined to think it's the latter.

charliesjc commented 2 years ago

I've found out some more about this. I can see when using Tidal Connect with passthrough I get the Blue Light (MQA-Studio) and the hw_params and stream info show 44100 BUT the bit depth is 24_LE. Turning passthrough off gives me a purple light (first stage unfold happening on the Pi and being sent to the DAC which is only rendering) and the sample rate shows with hw_params and stream info as 352800 with bit depth 24_LE. As a comparison I tried using the Roon bridge as well and the only difference with that is that the bit depth goes up to the next level which is 32_LE.

After a reading a bit it seems this may actually be the desired behaviour.