This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

alsa failed in DM8148.

I compiled my application to rest the alsa audio in DM8148. I am puzzled.

Steps:

 1: cross compile the alsa-lib-1.0.22. this lib is downloaded from alsa-project website.

2: write test application to run with alsa-lib compiled by me. 

The following is my test application:

playback(filename)
{
snd_pcm_open();
...play filename...
snd_pcm_close();
}

int main()
{
while(1)
{
pthread_create(playback);
wait playback thread end...
}
}

The test application sometimes hang when call snd_pcm_writei, or get "EIO" error when calling snd_pcm_writei. Can you tell give me some help about this?
Also ,I found that alsa-lib-1.0.23 and higher version couldn't run correctly in this platform.

I get the following information from http://processors.wiki.ti.com/index.php/DM816x_C6A816x_AM389x_PSP_04.00.00.10_Feature_Performance_Guide#ALSA_SoC_Audio_Driver

Constraints

  1. By default, codec is configured in master mode and McASP is used as slave. Testing of the audio sub-system is done in this configuration only. 
  2. Sampling frequencies for playback and capture streams should be same.
  3. The audio driver does not allow opening the same stream (playback/capture) multiple times. Does this mean that I can't open the same stream multi times in one process?