WiPhonic - MP3 Audio Streaming over Wi-Fi

XCore Project reviews, ideas, videos and proposals.
Post Reply
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

WiPhonic - MP3 Audio Streaming over Wi-Fi

Post 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.


User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post 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.
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post 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.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post by leon_heller »

I guessed that you had used an earlier version of the tools. 10.4 seems to have broken a few applications.
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post 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.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post by leon_heller »

I'm still getting the same problem.
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Just to check - you're compiling Release configuration at O2 optimisation level?
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post 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.
Post Reply