* virtual sound driver
@ 2012-07-21 1:05 Liu, George
2012-07-21 8:28 ` Takashi Iwai
2012-07-21 13:28 ` Daniel Mack
0 siblings, 2 replies; 5+ messages in thread
From: Liu, George @ 2012-07-21 1:05 UTC (permalink / raw)
To: alsa-devel@alsa-project.org
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?
Thanks so much.
George
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: virtual sound driver
2012-07-21 1:05 virtual sound driver Liu, George
@ 2012-07-21 8:28 ` Takashi Iwai
2012-07-23 21:44 ` Liu, George
2012-07-24 0:15 ` Liu, George
2012-07-21 13:28 ` Daniel Mack
1 sibling, 2 replies; 5+ messages in thread
From: Takashi Iwai @ 2012-07-21 8:28 UTC (permalink / raw)
To: Liu, George; +Cc: alsa-devel@alsa-project.org
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: virtual sound driver
2012-07-21 8:28 ` Takashi Iwai
@ 2012-07-23 21:44 ` Liu, George
2012-07-24 0:15 ` Liu, George
1 sibling, 0 replies; 5+ messages in thread
From: Liu, George @ 2012-07-23 21:44 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@alsa-project.org
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@alsa-project.org [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Takashi Iwai
Sent: Saturday, July 21, 2012 1:28 AM
To: Liu, George
Cc: alsa-devel@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@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: virtual sound driver
2012-07-21 8:28 ` Takashi Iwai
2012-07-23 21:44 ` Liu, George
@ 2012-07-24 0:15 ` Liu, George
1 sibling, 0 replies; 5+ messages in thread
From: Liu, George @ 2012-07-24 0:15 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@alsa-project.org
I installed aloop driver, and selected it as the default Audio input and output device.
Then, I played a pcm file while also started recording (using the sound recorder in Ubuntu 11.04). I'm expected to record what I'm playing, but there's no sound in the captured wav file.
Did I do anything wrong?
I want to use aloop or dummy driver as the starting point to write my own driver.
Thanks for helping me out.
George
-----Original Message-----
From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Takashi Iwai
Sent: Saturday, July 21, 2012 1:28 AM
To: Liu, George
Cc: alsa-devel@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@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: virtual sound driver
2012-07-21 1:05 virtual sound driver Liu, George
2012-07-21 8:28 ` Takashi Iwai
@ 2012-07-21 13:28 ` Daniel Mack
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Mack @ 2012-07-21 13:28 UTC (permalink / raw)
To: alsa-devel
On 21.07.2012 03:05, 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 consider using some higher layer like PulseAudio to achive that?
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-24 0:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 1:05 virtual sound driver Liu, George
2012-07-21 8:28 ` Takashi Iwai
2012-07-23 21:44 ` Liu, George
2012-07-24 0:15 ` Liu, George
2012-07-21 13:28 ` Daniel Mack
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.