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
- 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.
- Sampling frequencies for playback and capture streams should be same.
- 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?