[alsa-devel] Help with ALSA application development

Paul Kavan pkavan at gmail.com
Wed Jul 11 23:55:49 CEST 2007


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: grh_audio0.c
Type: text/x-csrc
Size: 6287 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20070711/d4571929/attachment.c 

More information about the Alsa-devel mailing list