-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snd_pcm_readi() takes to much time. #270
Comments
From the first glance, the timing depends on the hardware parameters and also on the driver position update granularity. Which driver are you using? Could you show dump of parameters using |
Please find HW params and SW params which is dumped using snd_pcm_hw_params_dump and snd_pcm_sw_params_dump HW params: SW params: |
The period_size determines the wake-up latency for the blocking I/O mode. For rate 48000Hz and period size 6000 frames is the wake-up time EDIT: You did not write anything about used hardware / audio driver to check the ring buffer pointer granularity. |
How can I find the ring buffer pointer updates in the driver ? |
I am using HW ambarella cv25 and audio is ak4951. |
@perexg any update on this. Please help me to resolve this issue. |
Could you test your code with the standard PC hardware ? It appears that the audio driver has some issues for this special SoC platform. |
I am using alsa open source library for my project to read and write audio data.
For that I am using snd_pcm_readi function to read audio data. I am able to read audio data.
But issue is that sometimes it will take so much time to read data.(200-230 msec).
Normally this function executed in 1-3 ms that is normal case, but after every 2-4 frames it is taking 200-300 msec.
So this is affecting my whole application process.
I have also try to set this call as nonblock with the help of snd_pcm_nonblock function. With that I have observed some improvements but still after 2-3 frames it is taking 100msec time to get a data.
The text was updated successfully, but these errors were encountered: