From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: 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: andr2000@gmail.com,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: [PATCH v3 0/6] ALSA: xen-front: Add Xen para-virtualized frontend driver
Date: Mon, 14 May 2018 09:27:36 +0300 [thread overview]
Message-ID: <20180514062742.25879-1-andr2000@gmail.com> (raw)
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Please note: this patch series depends on [3].
This patch series adds support for Xen [1] para-virtualized
sound frontend driver. It implements the protocol from
include/xen/interface/io/sndif.h with the following limitations:
- mute/unmute is not supported
- get/set volume is not supported
Volume control is not supported for the reason that most of the
use-cases (at the moment) are based on scenarious where
unprivileged OS (e.g. Android, AGL etc) use software mixers.
Both capture and playback are supported.
Corresponding backend, implemented as a user-space application, can be
found at [2].
Thank you,
Oleksandr
Changes since v2:
*****************
1. Kconfig: select SND_PCM instead of depends
2. Changed spinlock to mutex for protecting the rings since
all the interrupts are threaded. Make those per event channel,
not a single global one. This also addresses Juergen's comment
on calling xen_snd_front_alsa_handle_cur_pos.
3. Fixed page leak on error while allocating an event channel
4. Fixed comments to start from a capital letter
5. Performed XEN_PAGE_SIZE != PAGE_SIZE check after xen_domain
and xen_has_pv_devices checks
6. Changed driver specific structures names not to mislead with ALSA
structs
7. Added comments on ring counters and overflows
8. Added MAINTAINERS entry
Changes since v1:
*****************
1. Moved driver from sound/drivers to sound/xen
2. Coding style changes to better meet Linux Kernel
3. Added explicit back and front synchronization
In order to provide explicit synchronization between backend and
frontend the following changes are introduced in the protocol:
- add new ring buffer for sending asynchronous events from
backend to frontend to report number of bytes played by the
frontend (XENSND_EVT_CUR_POS)
- introduce trigger events for playback control: start/stop/pause/resume
- add "req-" prefix to event-channel and ring-ref to unify naming
of the Xen event channels for requests and events
4. Added explicit back and front parameter negotiation
In order to provide explicit stream parameter negotiation between
backend and frontend the following changes are introduced in the protocol:
add XENSND_OP_HW_PARAM_QUERY request to read/update
configuration space for the parameters given: request passes
desired parameter's intervals/masks and the response to this request
returns allowed min/max intervals/masks to be used.
[1] https://xenproject.org/
[2] https://github.com/xen-troops/snd_be
[3] https://lkml.org/lkml/2018/4/12/522
Oleksandr Andrushchenko (6):
ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver
ALSA: xen-front: Read sound driver configuration from Xen store
ALSA: xen-front: Implement Xen event channel handling
ALSA: xen-front: Implement handling of shared buffers
ALSA: xen-front: Implement ALSA virtual sound driver
MAINTAINERS: Add ALSA: xen-front: maintainer entry
MAINTAINERS | 7 +
sound/Kconfig | 2 +
sound/Makefile | 2 +-
sound/xen/Kconfig | 10 +
sound/xen/Makefile | 9 +
sound/xen/xen_snd_front.c | 397 +++++++++++++++
sound/xen/xen_snd_front.h | 54 ++
sound/xen/xen_snd_front_alsa.c | 821 ++++++++++++++++++++++++++++++
sound/xen/xen_snd_front_alsa.h | 23 +
sound/xen/xen_snd_front_cfg.c | 517 +++++++++++++++++++
sound/xen/xen_snd_front_cfg.h | 46 ++
sound/xen/xen_snd_front_evtchnl.c | 496 ++++++++++++++++++
sound/xen/xen_snd_front_evtchnl.h | 95 ++++
sound/xen/xen_snd_front_shbuf.c | 193 +++++++
sound/xen/xen_snd_front_shbuf.h | 36 ++
15 files changed, 2707 insertions(+), 1 deletion(-)
create mode 100644 sound/xen/Kconfig
create mode 100644 sound/xen/Makefile
create mode 100644 sound/xen/xen_snd_front.c
create mode 100644 sound/xen/xen_snd_front.h
create mode 100644 sound/xen/xen_snd_front_alsa.c
create mode 100644 sound/xen/xen_snd_front_alsa.h
create mode 100644 sound/xen/xen_snd_front_cfg.c
create mode 100644 sound/xen/xen_snd_front_cfg.h
create mode 100644 sound/xen/xen_snd_front_evtchnl.c
create mode 100644 sound/xen/xen_snd_front_evtchnl.h
create mode 100644 sound/xen/xen_snd_front_shbuf.c
create mode 100644 sound/xen/xen_snd_front_shbuf.h
--
2.17.0
next reply other threads:[~2018-05-14 6:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 6:27 Oleksandr Andrushchenko [this message]
2018-05-14 6:27 ` [PATCH v3 1/6] ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver Oleksandr Andrushchenko
2018-05-14 6:27 ` 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 ` 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 ` 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-14 20:28 ` Takashi Iwai
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-15 6:02 ` Oleksandr Andrushchenko
2018-05-17 6:26 ` Takashi Iwai
2018-05-17 6:33 ` Oleksandr Andrushchenko
2018-05-17 6:33 ` Oleksandr Andrushchenko
2018-05-17 6:33 ` Oleksandr Andrushchenko
2018-05-21 20:26 ` Takashi Iwai
2018-05-21 20:26 ` Takashi Iwai
2018-05-22 5:25 ` Oleksandr Andrushchenko
2018-05-22 5:25 ` Oleksandr Andrushchenko
2018-05-22 5:25 ` Oleksandr Andrushchenko
2018-05-17 6:26 ` Takashi Iwai
2018-05-15 6:01 ` Takashi Iwai
2018-05-15 5:46 ` Oleksandr Andrushchenko
2018-05-14 6:27 ` 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 4:00 ` Takashi Sakamoto
2018-05-23 6:14 ` Oleksandr Andrushchenko
2018-05-23 6:14 ` Oleksandr Andrushchenko
2018-05-14 6:27 ` Oleksandr Andrushchenko
2018-05-14 6:27 ` [PATCH v3 6/6] MAINTAINERS: Add ALSA: xen-front: maintainer entry Oleksandr Andrushchenko
2018-05-14 6:27 ` 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 15:52 ` Takashi Iwai
2018-05-14 16:08 ` Oleksandr Andrushchenko
2018-05-14 16:08 ` Oleksandr Andrushchenko
2018-05-14 6:27 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=20180514062742.25879-1-andr2000@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.