Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705337
| From | Clemens Ladisch <clemens@ladisch.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation |
| Date | 2017-08-07 12:40 +0200 |
| Message-ID | <ubNC2-714-13@gated-at.bofh.it> (permalink) |
| References | <ubKXw-5k4-13@gated-at.bofh.it> <ubKXx-5k4-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Oleksandr Andrushchenko wrote: > Front sound driver has no real interrupts, so > 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. A 'real' sound card use the interrupt to synchronize the stream position 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 period 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 reported 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) based on when the samples are actually moved from/to the backend. Regards, Clemens
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 01/11] ALSA: vsnd: Implement driver's probe/remove Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 06/11] ALSA: vsnd: Introduce ALSA virtual sound driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 10/11] ALSA: vsnd: Implement communication with backend Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 05/11] ALSA: vsnd: Implement handling of shared buffers Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 09/11] ALSA: vsnd: Implement ALSA PCM operations Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 02/11] ALSA: vsnd: Implement Xen bus state handling Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 07/11] ALSA: vsnd: Initialize virtul sound card Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
[PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 09:50 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 12:40 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 13:40 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 15:20 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 15:40 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Clemens Ladisch <clemens@ladisch.de> - 2017-08-07 16:00 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 17:20 +0200
Re: [alsa-devel] [PATCH 08/11] ALSA: vsnd: Add timer for period interrupt emulation Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-08 08:10 +0200
Re: [PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend driver Takashi Sakamoto <o-takashi@sakamocchi.jp> - 2017-08-07 13:40 +0200
Re: [PATCH 00/11] ALSA: vsnd: Add Xen para-virtualized frontend driver Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-08-07 13:40 +0200
csiph-web