[alsa-devel] alsa driver api
Hi
Does anyone have some code examples that show how to send pcm samples directly to an alsa driver. I'm (still) having trouble building/using alsa-lib and I want to make sure that my driver works correctly. If I understand correctly it is possible to send sound samples using the alsa driver api only (no alsa-lib).
All I want to do for now is send a fixed sine wave to the driver. I saw some code snippets that seemed to do just that in a recent email on this list but it would help a lot if I could have a look at the complete application.
Thanks,
Michel
Michel Benoit wrote:
Hi
Does anyone have some code examples that show how to send pcm samples directly to an alsa driver. I'm (still) having trouble building/using alsa-lib and I want to make sure that my driver works correctly. If I understand correctly it is possible to send sound samples using the alsa driver api only (no alsa-lib).
All I want to do for now is send a fixed sine wave to the driver. I saw some code snippets that seemed to do just that in a recent email on this list but it would help a lot if I could have a look at the complete application.
Thanks,
Michel
There is an alsa tool already available to do the task. It is called "speaker-test" speaker-test -c2 -Dplug:front -twav (voices) speaker-test -c2 -Dplug:front -tsine (sine wave) speaker-test -c2 -Dplug:front -tpink (pink noise)
You can then use any device name you wish to test.
James
participants (2)
-
James Courtier-Dutton
-
Michel Benoit