Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-04-2009, 07:06 AM   #1
LQ Newbie
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Playing of MP3 file on freescale imx31-pdk board..

Hi all,
i m trying to play MP3 file on freescale im31-pdk board. If i use function call, Mp3 file is playing prorerly and if try to play by creating thread, i m getting the error like pool failed and write falied after the execution of snd_pcm_wait( ); and snd_pcm_writei() function.
please find sudo code below

This is for Thread...
pthread_create(thread_ID , NULL, PlayMp3, 0 );

This is for function call

PlayMp3 (0);

PlayMp3(int i);
snd_pcm_wait (AMInst[InstID].playback_handle, -1)) < 0) {

fprintf (stderr, "poll failed (%s)\n", strerror (errno));




if ((err = snd_pcm_writei (handle,OutBuf, 4096)) < 0) {

fprintf (stderr, "write failed (%s)\n", snd_strerror (err));



What i m suspecting is that decoded data is not comming at right time for DMA while using thread. If use function call MP3 file is playing perfectly. Can anybody tel why this error is comming if i use thread and please give the solution for this.


Last edited by ganeshpetkar; 06-08-2009 at 01:58 AM. Reason: mailto removed


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hello,, having trouble playing mp3 file in redhat 9 dneshsegar Linux - Newbie 5 07-25-2008 06:01 AM
UART driver porting from 2.4.20 to 2.6.10 for freescale imx21ADS21 board. AshishVyas Linux - Newbie 1 05-15-2008 06:30 AM
Xfree86 for IMX31/ARM11 m.harshavardhan Linux - Software 1 08-22-2006 05:09 AM
synchronized lyrics for current playing mp3 file? rlee923 General 1 04-20-2006 12:07 PM
6-channel C-Media 9739 on-board audio chip: only 2 channels playing zidour Linux - Hardware 9 05-23-2004 08:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration