[alsa-devel] Help with dummy.c (where/how to write?)

Smilen Dimitrov sd at imi.aau.dk
Mon Jul 5 22:46:46 CEST 2010

Hi all,

I am trying to work on dummy.c:


as an exercise, and I'd like to modify it so it behaves as an 
'oscillator'; that is, when I choose 'dummy' as an input in say 
Audacity, and press Record - I'd like to be able to write something to 
the audio (pcm) buffer of the driver directly from the driver itself 
(say a single sample), and be able to observe those samples recorded in 

So far, by adding some debug statements, the only thing I can figure, is 
that when 'Record' in Audacity is pressed, 'dummy_hrtimer_callback' is 
called continuously - but I cannot tell what functions to use to modify 
/ write to output buffers (not even sure what the output buffers there 
are, I guess dpcm->substream->private_data).

Could anyone point to me if there is a similar example existing already, 
or if not. provide me with some pointers on how to do this?

Thanks in advance,

More information about the Alsa-devel mailing list