[alsa-devel] Help with ALSA application development
Hello:
I am still trying to write my own basic application that captures and plays audio. I am working in an embedded linux environment and have the drivers working well. I can use arecord/aplay without any problem. However, I have been trying to follow some web examples for simple capture and playback without any success. Does anyone know of some sample code for S8 formatted, 8k rate capture and playback. I think my problem is two-fold.
First is getting the hw-params set correctly. I have a function call that sets the interface up. I am trying to use the same params that aplay -v returns to me, but perhaps I have them wrong somehow.
Secondly is buffering the samples. I am not sure I have that correct. Does anyone have some pointers on that?
I have attached my code. If anyone has some time and insight into this, I would greatly appreciate it. Thanks.
Paul
participants (2)
-
Clemens Ladisch
-
Paul Kavan