[alsa-devel] How does ALSALIB commuciates with low level kernel API
Dear experts,
I am too new in ALSA, trying to read a little bit and understand. I want to underatnd how ALSA userspace API calls kernel space code ? for example when I call snd_pcm_open() which code is called in kernel sound code ? and how the link is made ? via IOCTL/write ?
Please clarify
Thanks a lot in advance.
Mehdi
Chemsi Mehdi wrote:
I want to underatnd how ALSA userspace API calls kernel space code ? for example when I call snd_pcm_open() which code is called in kernel sound code ?
The generic PCM code in alsa-lib/src/pcm/pcm.c calls some plugin. The "hw" plugin (in pcm_hw.c) handles communication with the kernel.
The kernel code is in sound/core/.
and how the link is made ? via IOCTL/write ?
Yes.
Regards, Clemens
On Wed, Jun 15, 2016 at 12:12:24AM +0100, Chemsi Mehdi wrote:
Dear experts,
I am too new in ALSA, trying to read a little bit and understand. I want to underatnd how ALSA userspace API calls kernel space code ? for example when I call snd_pcm_open() which code is called in kernel sound code ?
easist would be to start gdb on alsa-lib snd_pcm_open() and start tracing the steps.
and how the link is made ? via IOCTL/write ?
IOCTL, see sound/core/pcm_native.c on kernel side..
participants (3)
-
Chemsi Mehdi
-
Clemens Ladisch
-
Vinod Koul