[lkml]   [2018]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound driver

On May 14 2018 15:27, Oleksandr Andrushchenko wrote:
> diff --git a/sound/xen/xen_snd_front_alsa.c
> new file mode 100644
> index 000000000000..5041f83e98d2
> --- /dev/null
> +++ b/sound/xen/xen_snd_front_alsa.c
> ...
> +/*
> + * FIXME: The mmaped data transfer is asynchronous and there is no
> + * ack signal from user-space when it is done. This is the
> + * reason it is not implemented in the PV driver as we do need
> + * to know when the buffer can be transferred to the backend.
> + */
> ...

In ALSA PCM interface v2.0.14 or later, SNDRV_PCM_INFO_SYNC_APPLPTR is
available. This flag express that userspace applications are expected to
call ioctl(2) with 'SNDRV_PCM_IOCTL_SYNC_PTR' even if they oprate to
memory mapped page frames for PCM samples. For detail, please refer to a
commit 42f945970af9 ('ALSA: pcm: Add the explicit appl_ptr sync

As a supplement, please refer to below commits:
* 4b671f577474 ('ALSA: pcm: Add an ioctl to specify the supported
protocol version')[2]
* b602aa8eb1a0 ('ALSA: pcm: Disable only control mmap for explicit
appl_ptr sync')[3]

Alsa-lib v1.1.5 or later supports this flag and existent applications
can run transparently.

For developers, a tracepoint may be useful:
* fccf53881e9b ('ALSA: pcm: add 'applptr' event of tracepoint')[4]

For your information.



Takashi Sakamoto

 \ /
  Last update: 2018-05-23 06:01    [W:0.117 / U:2.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site