Skip to contentSkip to conversation

Copy ALSA buffer to the buffer allocated in my driver.

DISCUSSION `/ET!-i1S!-i 2 participants 2 messages Jul 29, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi everyone.

I'm writing a virtual ALSA driver for a playback device, with the help of dummy driver available at the linux kernel source code.

I need to manually copy data from the ALSA buffer to my buffer.

I have no idea how to do this, since dummy driver has completely discarded handling of buffers.

So can anyone please provide a sample code to copy the audio data to the my buffer allocated in the driver.

Is it ok to use the hrtimer interrupts (which is used in dummy driver) or mutex / spinlocks for my driver.

Best regards,

cherry

#2 lore raw
Quoted 5 lines · `/ET!-i1S!-i wrote:

I'm writing a virtual ALSA driver for a playback device, with the help of dummy driver available at the linux kernel source code.
...
Is it ok to use the hrtimer interrupts (which is used in dummy driver) or mutex / spinlocks for my driver.

What is the actual destination of your virtual device? (I.e., can it be used as a timing source?)

Regards,
Clemens