Is Chromecast Audio Bit-Perfect?

I had difficulties getting asleep during lockdown. In order not to waste time in vain, I decided to check if Chromecast Audio is bitperfect or not.

I used an Apple laptop and an external sound card “Audiotrack Maya U5” as a test stand. The soundcard is quite cheap, but it has a digital input, which we will need for this test.

Validating Correctness Of The Test

To check the correctness of the test, I connected the optical output of the sound card to its optical input. Audacity started playing a test track and recording it simultaneously. Then I followed these steps:

  1. Synchronized original and recording.
  2. Inverted the recording.
  3. Made a mix of both tracks.
  4. I got a straight line which means the tracks are identical.

That is, we do not lose data during playback by TOSLINK cable and recording it using the same soundcard. We have a bit-perfect reproduction.

The Test

  1. I started Tidal on the computer. I chose the optical output of the sound card as the output device. Selected exclusive mode and turned off volume controls. I chose HiFi quality, e.g. uncompressed stream.
  2. I turned on recording in Audasity and started playback in Tidal.
  3. The result is a recording of the original file. We will use it a reference when comparing to Chromecast’s playback.
  4. Turned on Chromecast Audio and connected its optical output to the optical input of the sound card.
  5. Selected Chromecast as the output device in the Tidal app.
  6. I turned on the recording in Audacity and start playback in Tidal.
  7. We get a recording of the digital stream, produced by Chromecast.
  8. Synchronized both entries: Synchronized tracks
  9. Inverted one of the tracks and made a mix: Comparing tracks

Oops! The third track is not empty, which means the recordings are different. We received a different signal from Chromecast than from the Tidal app playing directly into soundcard.

Conclusion: music gets distorted when being played via Chromecast Audio.

I don’t know what causes the problem. I see several possible reasons for the difference in files:

  1. Jitter. It may be that Chomecast’s clock wasn’t in complete sync with soundcard’s clock. TOSLINK protocol doesn’t provide the capabilities to synchronize clocks. As a result, the signal recipient tries to figure out to the source clock and this does not always work well.
  2. Tidal sends a different audio stream to Chromecast. In theory they should be the same since I played audio in “Hi-Fi” quality which means a lossless FLAC stream.
  3. There is a bug in the Chromecast code when playing FLAC.