- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the "Quartus 10sp1 Web Edition" and the "NIOS II 10 Software Build Tools for Eclipse" to building a program that tests the Audio CODEC on DE2 Board.
I downloaded the "UP avalon audio core" from University IP core ( "ftp://ftp.altera.com/up/pub/University_Program_IP_Cores/90/...") to include into my SPOC. And, this is my software: #include "altera_up_avalon_audio.h"int main(void)
{
alt_up_audio_dev * audio_dev;
/* used for audio record/playback */
unsigned int l_buf;
unsigned int r_buf;
// open the audio port
audio_dev = alt_up_audio_open_dev ("/dev/audio");
if ( audio_dev == null)
alt_printf ("error: could not open audio device \n");
else
alt_printf ("opened audio device \n");
/* read and echo audio data */
while(1)
{
int fifospace = alt_up_audio_read_fifo_avail (audio_dev, alt_up_audio_right);
if ( fifospace > 0 ) // check if data is available
{
// read audio buffer
alt_up_audio_read_fifo (audio_dev, &(r_buf), 1, alt_up_audio_right);
alt_up_audio_read_fifo (audio_dev, &(l_buf), 1, alt_up_audio_left);
// write audio buffer
alt_up_audio_write_fifo (audio_dev, &(r_buf), 1, alt_up_audio_right);
alt_up_audio_write_fifo (audio_dev, &(l_buf), 1, alt_up_audio_left);
}
}
}
It's no working, everything is quite.Then, i tesed value of fifospace, always is zero !!!.
It is NO FIFO SPACE ???. Anybody can help me plz !. Thanks !.
- Tags:
- Include
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you do that in VHDL???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i am suffering with same problem in nios
any one help me.:-P- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update your library to 10.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i also have the same problem, can somebody advise me?
how we can upgrade the library?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page