Page 1 of 1

WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Wed Aug 18, 2010 1:26 pm
by Andy
Hello all,

I've just released the source code to this project. Some highlights:
  • MP3 decoding on a single core
  • High quality PWM DAC (based on XMOS ClassD reference code)
  • SPI Wi-Fi driver for ZeroG (Microchip) Wi-Fi module
  • uIP networking stack
'WiPhonic' was a group project as part of the third year Computer Science & Electronics course at University of Bristol. See http://www.cs.bris.ac.uk/ for more information about the university and course.

The aim of the project was to design a product capable of streaming lossy audio from a PC over Wi-Fi to an XMOS-based device that can be connected to an existing powered speaker for maximum flexibility. The product specification was driven by cost, hence the decision to utilise a PWM audio DAC. MP3 decoding is done in real time on the chip.

A Java application running on the PC uses a unique method of parsing the MP3 file into packets. This reduces the buffer overhead on the XMOS and is more resilient to the audio effects of packet loss.

A final product could be implemented on an L2 with a small added BOM. An external DAC could be added for higher quality audio.
http://xcore.com/projects/wiphonic-wi-f ... -streaming

Comments/ ideas/ improvements appreciated.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Wed Aug 18, 2010 3:34 pm
by leon_heller
I just downloaded it; it's a nice piece of work. However, I had a stack problem when I tried building it with the current tools (10.4.1):

Constraint check for node 0, core 3:
Stack available: <00000000, used: 00000e5c . FAILED
Threads available: 8, used: 1 . OKAY
Timers available: 10, used: 0 . OKAY
Chanends available: 32, used: 4 . OKAY
Error: Constraints check FAILED for node 0, core 3.
xmake: *** [Wiphoria.xe] Error 1

Also, the IDE is showing some syntax errors that I don't understand. They don't affect the compilation.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Wed Aug 18, 2010 4:46 pm
by Andy
leon_heller wrote:I just downloaded it; it's a nice piece of work. However, I had a stack problem when I tried building it with the current tools (10.4.1):

Constraint check for node 0, core 3:
Stack available: <00000000, used: 00000e5c . FAILED
Threads available: 8, used: 1 . OKAY
Timers available: 10, used: 0 . OKAY
Chanends available: 32, used: 4 . OKAY
Error: Constraints check FAILED for node 0, core 3.
xmake: *** [Wiphoria.xe] Error 1

Also, the IDE is showing some syntax errors that I don't understand. They don't affect the compilation.
Thanks for spotting this. It looks like the 10.4 tools are doing something funky with the optimisations - it compiles OK with 9.9.2 which is what I developed it on.

I'm looking into a solution and will post an update when I find something.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Wed Aug 18, 2010 6:08 pm
by leon_heller
I guessed that you had used an earlier version of the tools. 10.4 seems to have broken a few applications.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Thu Aug 19, 2010 11:02 am
by Andy
I've uploaded a new revision of the code which seems to fix the problem with 10.4. The 10.4 C compiler uses more agressive inlining which was pushing the memory usage above the limit... I simply added compiler attributes to tell it never to inline the relevant functions.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Thu Aug 19, 2010 3:59 pm
by leon_heller
I'm still getting the same problem.

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Thu Aug 19, 2010 4:03 pm
by Andy
Just to check - you're compiling Release configuration at O2 optimisation level?

Re: WiPhonic - MP3 Audio Streaming over Wi-Fi

Posted: Thu Aug 19, 2010 4:06 pm
by leon_heller
Sorry, the XDE seems to have got the two versions confused. I deleted the old one, Cleaned the project, and it built OK.