From 33d2cbd538f17126bfbbb3b126bcb9f84d832c53 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 10 Nov 2014 18:36:38 +0000 Subject: [PATCH] TDM clock div tidied up --- module_usb_audio/audio.xc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module_usb_audio/audio.xc b/module_usb_audio/audio.xc index 5d393c83..21f4a69b 100755 --- a/module_usb_audio/audio.xc +++ b/module_usb_audio/audio.xc @@ -880,8 +880,13 @@ chanend ?c_config, chanend ?c) /* Calculate master clock to bit clock (or DSD clock) divide for current sample freq * e.g. 11.289600 / (176400 * 64) = 1 */ { +#if I2S_MODE_TDM + /* I2S has 32 bits per sample. *8 as 8 channels */ + unsigned numBits = 256; +#else /* I2S has 32 bits per sample. *2 as 2 channels */ unsigned numBits = 64; +#endif #if (DSD_CHANS_DAC > 0) if(dsdMode == DSD_MODE_DOP)