[alsa-devel] virtual sound driver
Liu, George
yueliu at lab126.com
Mon Jul 23 23:44:46 CEST 2012
I'm still lost looking at the code. I understand the part to register/remove driver and card.
One thing on my head is what exactly are the functions in snd_pcm_ops do, and what event will trigger them?
.open
.close
.ioctl (use snd_pcm_lib_ioctl implementation, nothing I need to do)
.hw_params
.hw_free
.prepare
.trigger
.pointer
I added printk in each of the function in aloop, and right after loading the module, dmesg reports whole bunch of pcm_ops.
* The sequence for each pcm seems to be: Open -> hw_params -> hw_free -> close
* What determines how many times open->hw_params->hw_free->close is going to be called? Number of snd_pcm or substreams?
*Why pcm_trigger_start is being called?
*If I want to capture playback audio, should I capture the substream associated with the trigger (playback)?
Thanks so much.
George
-----Original Message-----
From: alsa-devel-bounces at alsa-project.org [mailto:alsa-devel-bounces at alsa-project.org] On Behalf Of Takashi Iwai
Sent: Saturday, July 21, 2012 1:28 AM
To: Liu, George
Cc: alsa-devel at alsa-project.org
Subject: Re: [alsa-devel] virtual sound driver
At Fri, 20 Jul 2012 18:05:40 -0700,
Liu, George wrote:
>
> I'm trying to write a virtual sound driver to capture PCM data.
> How do I modify dummy.c to capture PCM into buffer?
>
> Does the PCM data ever sent to any of the pcm_op call backs? There's no read/write callbacks?
Did you take a look at aloop driver?
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel at alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
More information about the Alsa-devel
mailing list