Porting XMOS USB 2.0 audio ref to custom hardware
Posted: Mon Jun 22, 2020 8:52 pm
Hello,
I'm prototyping an power amplifier with integrated DAC with XMOS XUF208-256-TQ64.
My custom pcba works, I can flash XUF208 and USB is working also (hid mouse exemple works).
Now I use AN00129 to port the USB 2.0 audio reference software to my design.
The port I did, following AN00129, builds and XCORE USB 2.0 as a sound card is detected by windows when I start the custom pcba.
But no sound :)
I designed the harware following the xCORE-200 multichannel audio platform shematic with a XUF208 instead of XE216 and with a TI PCM1792A Dac instead of CS4384. The clocking sheme is similar to audio platform (with PL611 as main oscillator and a CS2100 for spdif without asrc).
My wishes are:
simple stereo DAC with only PCM support, up to 24b/192khz
-a USB input (UAC 2.0)
-a spdif input
-a way to tell XUF208 stream USB or stream SPDIF input
For now I focus on USB. You can see shematics attached.
DAC PCM1792A start by default with 24 bits I2S format.
You can find my full project as attached files and also the pin mapping.
Then I investigate with the scope (I'm a hw guy) and founds following clocks:
MCLK_XCORE and AUDIO_CLK are 22.5792Mhz, looks great
DAC_LRCLK is 44.1Khz (?)
DAC_BCLK is 2.8Mhz (my scope isn't accurate enaugh to get exact value); looks great
DAC_DATA is always low level
My schematic differe from the audio ref platform especielly for I2C bus to configure DAC and CS2100.
Now I think I d'ont need to configure TI DAC but I've a question here:
how can I define ports for I2C regarding my project (based upon AN00129) ? In XN files I write the lines:
<Port Location="XS1_PORT_4C" Name="PORT_I2C"/>
<Port Location="XS1_PORT_4D" Name="PORT_I2C"/>
because I2C_SCL is XOD14 and I2C_SDA is XOD16 but I don't found where I can define these inside project, can you show me where these ports are defined ?
I have the same question for low speed GPIO like: DAC_RESET, PLL_SELECT and MCLK_FSEL, I see inside file in projet gpio_access.h some ports definitions but I didn't found where the port is defined ? I want to use P8C or P4E&P4F but I didn't understand where I write this is port P8C or P4E/P4F
And a last question: is the audio reference software platform designed for I2S 24b format dac or I need to reconfigure my DAC as 24B left or right justified ?
I'm looking inside projects, inside module, but really I didn't find such basic stuff for port and gpio definition, can anybody helps?
Best Regards,
Flo
I'm prototyping an power amplifier with integrated DAC with XMOS XUF208-256-TQ64.
My custom pcba works, I can flash XUF208 and USB is working also (hid mouse exemple works).
Now I use AN00129 to port the USB 2.0 audio reference software to my design.
The port I did, following AN00129, builds and XCORE USB 2.0 as a sound card is detected by windows when I start the custom pcba.
But no sound :)
I designed the harware following the xCORE-200 multichannel audio platform shematic with a XUF208 instead of XE216 and with a TI PCM1792A Dac instead of CS4384. The clocking sheme is similar to audio platform (with PL611 as main oscillator and a CS2100 for spdif without asrc).
My wishes are:
simple stereo DAC with only PCM support, up to 24b/192khz
-a USB input (UAC 2.0)
-a spdif input
-a way to tell XUF208 stream USB or stream SPDIF input
For now I focus on USB. You can see shematics attached.
DAC PCM1792A start by default with 24 bits I2S format.
You can find my full project as attached files and also the pin mapping.
Then I investigate with the scope (I'm a hw guy) and founds following clocks:
MCLK_XCORE and AUDIO_CLK are 22.5792Mhz, looks great
DAC_LRCLK is 44.1Khz (?)
DAC_BCLK is 2.8Mhz (my scope isn't accurate enaugh to get exact value); looks great
DAC_DATA is always low level
My schematic differe from the audio ref platform especielly for I2C bus to configure DAC and CS2100.
Now I think I d'ont need to configure TI DAC but I've a question here:
how can I define ports for I2C regarding my project (based upon AN00129) ? In XN files I write the lines:
<Port Location="XS1_PORT_4C" Name="PORT_I2C"/>
<Port Location="XS1_PORT_4D" Name="PORT_I2C"/>
because I2C_SCL is XOD14 and I2C_SDA is XOD16 but I don't found where I can define these inside project, can you show me where these ports are defined ?
I have the same question for low speed GPIO like: DAC_RESET, PLL_SELECT and MCLK_FSEL, I see inside file in projet gpio_access.h some ports definitions but I didn't found where the port is defined ? I want to use P8C or P4E&P4F but I didn't understand where I write this is port P8C or P4E/P4F
And a last question: is the audio reference software platform designed for I2S 24b format dac or I need to reconfigure my DAC as 24B left or right justified ?
I'm looking inside projects, inside module, but really I didn't find such basic stuff for port and gpio definition, can anybody helps?
Best Regards,
Flo