Project review high end amplifier

XCore Project reviews, ideas, videos and proposals.
__BriKs__
Active Member
Posts: 48
Joined: Tue Nov 27, 2018 9:45 pm

Project review high end amplifier

Post by __BriKs__ »

Hello,
I'm working on a high end audio stereo amplifier and I'm on the DAC and digital input stage, then I think I'm in the right place to have a shematic review.
Few words about the project: today homemade for the prototype stage I'm planning to go on kickstarter with, so I'm designing with cost and manufacturing optimisation.
I'm electric engineer with skill in electronic design, industrialisation but very few in firmware dev.
The amp is controlled by a main mcu (stm32) wich control volume (pga4311), power management, temperature and source selection. I target an XMOS device to catch the USB UAC2.0/1.0, spdif coax, spdif optical and maybe bluetooth.
For the first prototype I plan using one of smallest and easy to do Xmos device: XUF208 in a TQFP64.
The XUF208 will be controlled by main mcu that way: the main MCU will control nRESET of XUF208 (to get it in standby when amp is in standby) but also/maybe for source selection.
It is not USB powered but I wire VBUS signal as I read there is some difficult without doing that.

I plan to use XUF208 for only one digital input at once:
when user selec USB entry, main mcu ask XUF208 to be a USB streamer UAC2.0/1.0 only.
when user ask for digital coaxial input main mcu aks XUF208 to stop USB streaming and go for spdif to i2s conversion with bit perfect (then I use schematic provided by XMOS with a signal to reclock spdif with a cs2100).
when user ask for other spdif input (optical or bluetooth) the main mcu simply switch the spdif stream with mux device in order to only use a precious 1bit port of XUF208.

As i use a PCM1792A (i2c control) the bitstream is limited to 192khz/24b stereo.

First question: it is possible to create a firmware which can stop runing process (for example usb streaming) to switch dynamically to spdif=>i2s conversion with bit recloking ?
If it's not possible do you think it's possible when user switch source to reset the XUF208 and with a digital read on a port (signal SEL_SOURCE set by main mcu which also control reset) launch usb streamer or spdif to i2s, so no dynamically?

Here the shemetic, I didn't add a POR controller, I think will add one. I use I2C with a 4b port, so I understand I can't read cs2100 or pcm1792a register, only write, but there is another limitation which interrogate me: clock streching is not availlable is it a problem for fast i2c? This question lead to a other one: can I use P4C port for one I2C signal and P4D port for the other bit (only one signal by port, ie: P4C0 is SCL nothing on other P4C and P4D0 is SDA nothing on other P4D) such that way I get a fully functionnal I2C ?

Can you review my XUF208 implementation and port mapping ? Many thanks for any helps :)
You do not have the required permissions to view the files attached to this post.
__BriKs__
Active Member
Posts: 48
Joined: Tue Nov 27, 2018 9:45 pm

Post by __BriKs__ »

Looks like this topic is not very interesting, indeed it's a super simple implementation of Xmos audio streamer :)
So, will build and see myself, hoping at least one way will work for me about the mechanism of stopping process dynamically (or not) to fit either usb or spdif streaming in a 8 cores device.
Final device is a A class audio power (only few watts) amp, in few words the concept is based on X amp from N Pass (each channel is composed of two amps which works in phase shift).
User avatar
fabriceo
XCore Addict
Posts: 222
Joined: Mon Jan 08, 2018 4:14 pm

Post by fabriceo »

Hi an welcome,
your topic is interesting, no matter with that, but it is more complex than you expect and also you will not find on this forum as much support as you may expect due to rare knowledgeable resources, and few XMOS staff representative...sadly.

your intend is to use the XMOS standard USB Application framework to implement both USB and SPDIF reception with help of the CS2100 PLL and some trick to mux the 1bit port. fair enough.
thats gonna be a challenge especially because of the different clock domains.
1st ) do yo have a local crystal close to your DAC, probably yes.
2nd) how will you manage the fact that spdif will bring its own mclk ? an ASRC somewhere ?
3rd) how will you manage the potential disconnect between the USB host rate (say 44k1) side of your dac and the spdif rate say 96k...

this 3rd one is very tricky to handle and the standard framework is not made for supporting this therefore 99% of the products on the market are using a specific spdif receiver like AK4118 or CS8416 or WM8804 and they switch the I2S data flow between XMOS and SPDIF receiver to the DAC...

I can tell you that you can overcome all these problems BUT the understanding (reverse engineering) of the xmos app is required and lots of sensitive code is to be rewritten.
__BriKs__
Active Member
Posts: 48
Joined: Tue Nov 27, 2018 9:45 pm

Post by __BriKs__ »

Hi fabriceo,

Damned, I just imagine my request was super standard and easy to do.
To answer the questions:
1 I clock the DAC with a signal comming from a mux which switch between PL611 when in USB mode or CS2100 in SPDIF receiver mode, on the schematic signals are MCLK_XCORE and AUDIO_CLK (this last one is for the DAC in other sheet not show here)
2 I plan to use same software than the xCORE 200 multi channel audio platform, so the spdif clock is reclocked with the help of cs2100 with an asr inside xuf208 indeed
3 I dont well understand the question, maybe I wasn't clear enough.. I plan to have USB or SPDIF input but not the two together. This is why I ask if it's possible to have a pooling bit (in my schema SEL_SOURCE) and when the bit change the runing process on XUF208 stop and other process start.
It's very simple in fact; for exemple XUF208 is streaming audio data to DAC from USB UAC2.0 the clock source is PL611, then SEL_SOURCE is set to 1 by the main mcu wich is not XUF208, XUF208 see a bit flip on his port XOD11 and stop USB process (with certainly a lot of desinit/reinit) and start in SPDIF receiver mode with CS2100.

Anyway the xCORE 200 multichannel platform can do what I want, but I rather prefer adapt the code to my application and use a simple XUF208 instead of a XE216 device if it's possible off course.
__BriKs__
Active Member
Posts: 48
Joined: Tue Nov 27, 2018 9:45 pm

Post by __BriKs__ »

Hello,

I finally receive my PCB and start real debug :)
The amps works :) but the Xmos not :(
JTAG part of Xmos is seen via an XTAG 3 (I see the text O[0] with xrun -l) but can't debug (Xcore 0 not enabled)
After 2 days of investigation I finally found a bug in my schematic, I joins together PLLAVDD and PLL_AGND, the silly mistake :/ It's viewable on my previous post with the schematic part.

Anyway, will made some accurate pcb rework task with a knife.

I've a question: it's normal that a multimeter in continuity mode sound when probing GND and power pin (the VDD one) of XMOS XUF208 ?

And some shoot of this home made project, first time for me trying hot air soldering with solder paste and stencil, work very good :)
P_20200430_161422.jpg
P_20200502_002349.jpg
P_20200505_193033.jpg
Hopefully the hard parts, the analogs amps, works very well ! Now wana go to digital world with XMOS
You do not have the required permissions to view the files attached to this post.
__BriKs__
Active Member
Posts: 48
Joined: Tue Nov 27, 2018 9:45 pm

Post by __BriKs__ »

Hello, finally I get a functional XUF208 on my custom board!
I solder/desolder 3 times the xmos (I suspect the two first component defective because PLL voltage pins where tied together) the third XUF208 was almost working but (see the cire o[0] with xrun -l but can't debug target failled.
My design embed a reset supervisor a NCP308, with a pin to control delay between power good and reset, by default I solder a 100nF capacitor which is for a 300ms delay even in the case I ask NCP308 to release the reset via a MasterReset pin (connected to XTAG). Then I just remove the cap, in this case the delay is lowered to 20ms and BANG this works ! My hello word works :)

xTime composer studio warning me with this message:
Warning: XN11135 Attribute SystemFrequency is ignored when Oscillator is not specified.
C:/Users/User/AppData/Local/Temp/.xgdb14556-253E3RU4/platform.xn:30 Warning: XN11206 Oscillator is not specified for USB node.

I didn't know how to deal with it, if somebody can help ?

Now will try the application note about porting the audio project (USB streamer) on a custom XUF208 design, and certainly will need help to deal with that :)