Oleksandr Andrushchenko wrote:Yes, I know that, thank you
Front sound driver has no real interrupts, soA 'real' sound card use the interrupt to synchronize the stream position
playback/capture period passed interrupt needs to be emulated:
this is done via timer. Add required timer operations,
this is based on sound/drivers/dummy.c.
between the hardware and the driver. The hardware triggers an interrupt
immediately after a period has been completely read (for playback) from
the ring buffer by the DMA unit; this tells the driver that it is now
again allowed to write to that part of the buffer.
The dummy driver has no hardware that accesses the buffer, so the periodExactly
interrupts are not synchronized to anything.
This is not a suitable
implementation when the samples are actually used.
If you issue interrupts based on the system timer, the position reportedMakes sense, but in my case the buffer from the frontend
by the .pointer callback and the position where the hardware (backend)
actually accesses the buffer will diverge, which will eventually corrupt
data.
You have to implement period interrupts (and the .pointer callback)Do you think I can implement this in a slightly different way,
based on when the samples are actually moved from/to the backend.
Regards,Thank you,
Clemens