Hi, we use DM8168, RDK4.0, AIC3101.
snd_pcm_writei() can block the playback thread? How can I handle it?
Thanks very much.
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.
Hi, we use DM8168, RDK4.0, AIC3101.
snd_pcm_writei() can block the playback thread? How can I handle it?
Thanks very much.
You can use alsa - non blocking mode. Refer to some alsa sample app for usage.
Is there any API which can check the alsa driver or AIC status?
And what the circumstance snd_pcm_prepare will not return and block the thread.
1. Does snd_pcm_writei() blocks forever? Run aplay to see if your playback works fine; if so then it could be you app problem. If it never returns, then there could be something at driver level. Does this happen in standard dvr rdk demo app?
2. If there is no permanent hang issue with snd_pcm_writei() & you want to NOT use blocking mode in your playback thread, refer these
- dvrapp (UDWorks GUI App) has a sample implementation of non block mode.
- dvr console demo has an MMAP based implementation (which is not enabled by default) which has a kind of non blocking implementation.
- refer to alsa examples which talk about async handlers