alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, jgross@suse.com,
	boris.ostrovsky@oracle.com, konrad.wilk@oracle.com,
	perex@perex.cz, tiwai@suse.com
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: Re: [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound driver
Date: Wed, 23 May 2018 09:14:33 +0300	[thread overview]
Message-ID: <de973ded-8dba-24c3-b0a3-7b8ff30dab5f@gmail.com> (raw)
In-Reply-To: <510b107c-c136-7748-0cfa-9de849887c61@sakamocchi.jp>

On 05/23/2018 07:00 AM, Takashi Sakamoto wrote:
> Hi,
>
> On May 14 2018 15:27, Oleksandr Andrushchenko wrote:
> > diff --git a/sound/xen/xen_snd_front_alsa.c 
> b/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
> support')[1].
>
> 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.
>
> [1] 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42f945970af9
> [2] 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b671f577474
> [3] 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b602aa8eb1a0
> [4] 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fccf53881e9b
>
Oh, this is very useful, thank you so much for such a detailed
description. I'll take a close look at the above and see if
Xen sound driver can benefit from this.
>
> Regards
>
> Takashi Sakamoto
Thank you very much,
Oleksandr

  reply	other threads:[~2018-05-23  6:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  6:27 [PATCH v3 0/6] ALSA: xen-front: Add Xen para-virtualized frontend driver Oleksandr Andrushchenko
2018-05-14  6:27 ` [PATCH v3 1/6] ALSA: xen-front: Introduce Xen para-virtualized sound " Oleksandr Andrushchenko
2018-05-14  6:27 ` [PATCH v3 2/6] ALSA: xen-front: Read sound driver configuration from Xen store Oleksandr Andrushchenko
2018-05-14  6:27 ` [PATCH v3 3/6] ALSA: xen-front: Implement Xen event channel handling Oleksandr Andrushchenko
2018-05-14  6:27 ` [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers Oleksandr Andrushchenko
2018-05-14 20:28   ` Takashi Iwai
2018-05-15  5:46     ` Oleksandr Andrushchenko
2018-05-15  6:01       ` Takashi Iwai
2018-05-15  6:02         ` Oleksandr Andrushchenko
2018-05-17  6:26           ` Takashi Iwai
2018-05-17  6:33             ` Oleksandr Andrushchenko
2018-05-21 20:26             ` Takashi Iwai
2018-05-22  5:25               ` Oleksandr Andrushchenko
2018-05-14  6:27 ` [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound driver Oleksandr Andrushchenko
2018-05-23  4:00   ` Takashi Sakamoto
2018-05-23  6:14     ` Oleksandr Andrushchenko [this message]
2018-05-14  6:27 ` [PATCH v3 6/6] MAINTAINERS: Add ALSA: xen-front: maintainer entry Oleksandr Andrushchenko
2018-05-14 15:52 ` [alsa-devel] [PATCH v3 0/6] ALSA: xen-front: Add Xen para-virtualized frontend driver Takashi Iwai
2018-05-14 16:08   ` Oleksandr Andrushchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de973ded-8dba-24c3-b0a3-7b8ff30dab5f@gmail.com \
    --to=andr2000@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).