xmos / sw_usb_audio

XMOS USB Audio reference design
Other
32 stars 16 forks source link

Fail to set ADAT clock source on MacOS at sample rates >48000 #255

Open danielpieczko opened 1 month ago

danielpieczko commented 1 month ago

On MacOS, seen with xk_316_mc, 2AMi16o16xxxaax

  1. xrun the DUT
  2. set the stream format to the appropriate number of input and output channels for ADAT at sample rate >48000
  3. start playing the ADAT input stream from the audio analyzer harness
  4. use volcontrol to select the ADAT clock source
  5. sometimes volcontrol fails with this error
    Found 2 clock sources
    Clock 0 = 690487296; XMOS Internal Clock
    Clock 1 = 724041728; XMOS ADAT Clock
    Current clock ID: 690487296
    Error 'ADAT' clock is not valid yet
danielpieczko commented 1 month ago

It turns out volcontrol is not checking the validity of the clock. It selects the ADAT clock source, sleeps for 1s and then gets the current clock source to check that the selection was applied. Also the implementation is different on Windows and MacOS, so that would explain why this hasn't been seen on Windows.