Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12618 Discussions

using the built in(DE2) Audio DAC and FIFO

Altera_Forum
Honored Contributor II
2,199 Views

im currently developing a wireless embedded audio player client on my DE2 board with Nios2 that streams raw audio data provided by a server. Ive compiled multiple uClinux images and have gotten everything to work (Ethernet Client) except for the Audio Codec/FIFO. I noticed in the kernel config there was  

 

[device drivers]->[sound]->[Advanced Linux Sound Arch] and [Open Sound System] 

 

and have tried multiple combinations using the vplay and play user apps without success. 

 

i am wondering whether it be necessary to code my own driver for the wm8731 chip or if i can simply send things to the base address of the Audio_0 part in nios_system.h and use a wait statement. Any Advice with this would be extremely helpful as the deadline is fast approaching.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
432 Views

There is a wm8731 driver in linux-2.6.21-rc4 . 

I will check it and let you know.
0 Kudos
Altera_Forum
Honored Contributor II
432 Views

thanks, ill look into it also

0 Kudos
Altera_Forum
Honored Contributor II
432 Views

i hope my assumption that the wm8731 chip is the one on the DE2, as it was the one listed in the documentation that came with the board. 

 

well i found the wm8731 driver in the in 2.6.21-rc4 kernel  

it included: 

 

wm8731.c 

wm8731.h 

 

i noticed that there were functions such as wm8731_init() that register the device with the kernel, i guess whats left to ask is how do i use these files and if any additional porting is needed.  

 

 

and once registered how will i be able to place the audio data on the FIFO for processing and playing?
0 Kudos
Altera_Forum
Honored Contributor II
432 Views

sorry about the number of replies and questions, im doing alot of exploring into why the audio device isnt being detected on the DE2 in uclinux.  

 

im making an assumption that the [Device Drivers]->[I2C Support] should be enabled also as thats where the chip is running off of, along with the [I2C Device Interface] and maybe the [I2C Hardware Bus Support]->[OpenCores I2C COntroller]. even after all of this, im unsure that any driver is loaded for the specific chip on the DE2. When the ALSA is enabled it says no soundcard found during boot.
0 Kudos
Altera_Forum
Honored Contributor II
432 Views

We will need to write some platform drivers. 

See, Documentation/sound/alsa/soc for details. 

I am looking at them. But I don't have much time, the progress is slow.
0 Kudos
Altera_Forum
Honored Contributor II
432 Views

I'm working on the similar project: grab mp3 files from shoutcast, decode on the nios2 board, then play out...I installed uClinux on the nois2 board, get the internet to work, but finally stucked by the audio playing. I googled the nios2 & uClinux & audio , seems we are the only guys working on such kind of stuff so far...and the same as you guys, the deadline of my group is approaching...

0 Kudos
Reply