ALSA: add virtio sound driver
Subsystems (3)
Anton Yakovlev
maintainerv5 cover ALSA: add virtio sound driver
This series implements a driver part of the virtio sound device specification v8 [1].
The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device.
As a device part was used OpenSynergy proprietary implementation.
v5 changes:
- Fixed another bunch of sparse warnings
(replaced virtio_cread() -> virtio_cread_le()), no functional changes.
(Sorry, I didn't know how to run sparse locally, now everything should be fixed)
[1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html
Anton Yakovlev (9):
uapi: virtio_ids: add a sound device type ID from OASIS spec
ALSA: virtio: add virtio sound driver
ALSA: virtio: handling control messages
ALSA: virtio: build PCM devices and substream hardware descriptors
ALSA: virtio: handling control and I/O messages for the PCM device
ALSA: virtio: PCM substream operators
ALSA: virtio: introduce jack support
ALSA: virtio: introduce PCM channel map support
ALSA: virtio: introduce device suspend/resume support
MAINTAINERS | 9 + include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++ sound/Kconfig | 2 + sound/Makefile | 3 +- sound/virtio/Kconfig | 10 + sound/virtio/Makefile | 13 + sound/virtio/virtio_card.c | 462 +++++++++++++++++++++++++++++ sound/virtio/virtio_card.h | 113 ++++++++ sound/virtio/virtio_chmap.c | 219 ++++++++++++++ sound/virtio/virtio_ctl_msg.c | 310 ++++++++++++++++++++ sound/virtio/virtio_ctl_msg.h | 78 +++++ sound/virtio/virtio_jack.c | 233 +++++++++++++++ sound/virtio/virtio_pcm.c | 498 ++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 120 ++++++++ sound/virtio/virtio_pcm_msg.c | 392 +++++++++++++++++++++++++ sound/virtio/virtio_pcm_ops.c | 491 +++++++++++++++++++++++++++++++ 17 files changed, 3287 insertions(+), 1 deletion(-) create mode 100644 include/uapi/linux/virtio_snd.h create mode 100644 sound/virtio/Kconfig create mode 100644 sound/virtio/Makefile create mode 100644 sound/virtio/virtio_card.c create mode 100644 sound/virtio/virtio_card.h create mode 100644 sound/virtio/virtio_chmap.c create mode 100644 sound/virtio/virtio_ctl_msg.c create mode 100644 sound/virtio/virtio_ctl_msg.h create mode 100644 sound/virtio/virtio_jack.c create mode 100644 sound/virtio/virtio_pcm.c create mode 100644 sound/virtio/virtio_pcm.h create mode 100644 sound/virtio/virtio_pcm_msg.c create mode 100644 sound/virtio/virtio_pcm_ops.c
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerPATCH v5 1/9 uapi: virtio_ids: add a sound device type ID from OASIS spec
The OASIS virtio spec defines a sound device type ID that is not present in the header yet.
--- include/uapi/linux/virtio_ids.h | 1 + 1 file changed, 1 insertion(+)
include/uapi/linux/virtio_ids.h +1 -0
@@ -51,6 +51,7 @@#define VIRTIO_ID_PSTORE 22/* virtio pstore device */ #define VIRTIO_ID_IOMMU 23/* virtio IOMMU */ #define VIRTIO_ID_MEM 24/* virtio mem */ +#define VIRTIO_ID_SOUND 25/* virtio sound */ #define VIRTIO_ID_FS 26/* virtio filesystem */ #define VIRTIO_ID_PMEM 27/* virtio pmem */ #define VIRTIO_ID_MAC80211_HWSIM 29/* virtio mac80211-hwsim */
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerPATCH v5 2/9 ALSA: virtio: add virtio sound driver
In reply to Anton YakovlevIntroduce skeleton of the virtio sound driver. The driver implements the virtio sound device specification, which has become part of the virtio standard.
Initial initialization of the device, virtqueues and creation of an empty ALSA sound device. Also, handling DEVICE_NEEDS_RESET device status.
--- MAINTAINERS | 9 + include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++++++++++++ sound/Kconfig | 2 + sound/Makefile | 3 +- sound/virtio/Kconfig | 10 + sound/virtio/Makefile | 7 + sound/virtio/virtio_card.c | 340 ++++++++++++++++++++++++++++++++ sound/virtio/virtio_card.h | 67 +++++++ 8 files changed, 771 insertions(+), 1 deletion(-) create mode 100644 include/uapi/linux/virtio_snd.h create mode 100644 sound/virtio/Kconfig create mode 100644 sound/virtio/Makefile create mode 100644 sound/virtio/virtio_card.c create mode 100644 sound/virtio/virtio_card.h
MAINTAINERS +9 -0
@@ -18945,6 +18945,15 @@ W: https://virtio-mem.gitlab.io/ F: drivers/virtio/virtio_mem.c F: include/uapi/linux/virtio_mem.h +VIRTIO SOUND DRIVER +M: Anton Yakovlev <[email protected]> +M: "Michael S. Tsirkin" <[email protected]> +L: [email protected] +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: include/uapi/linux/virtio_snd.h +F: sound/virtio/* + VIRTUAL BOX GUEST DEVICE DRIVER M: Hans de Goede <[email protected]> M: Arnd Bergmann <[email protected]>
include/uapi/linux/virtio_snd.h new file +334 -0
334 lines not on this page · raw message
sound/Kconfig +2 -0
@@ -99,6 +99,8 @@ source "sound/synth/Kconfig" source "sound/xen/Kconfig" +source "sound/virtio/Kconfig" + endif # SND endif # !UML
sound/Makefile +2 -1
@@ -5,7 +5,8 @@ obj-$(CONFIG_SOUND) += soundcore.o obj-$(CONFIG_DMASOUND) += oss/dmasound/ obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ sh/ synth/ usb/ \ - firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/ hda/ x86/ xen/ + firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/ hda/ x86/ xen/ \ + virtio/ obj-$(CONFIG_SND_AOA) += aoa/ # This one must be compilable even if sound is configured out
sound/virtio/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Sound card driver for virtio + +config SND_VIRTIO + tristate "Virtio sound driver" + depends on VIRTIO + select SND_PCM + select SND_JACK + help + This is the virtual sound driver for virtio. Say Y or M.
sound/virtio/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o + +virtio_snd-objs := \ + virtio_card.o +
sound/virtio/virtio_card.c new file +340 -0
340 lines not on this page · raw message
sound/virtio/virtio_card.h new file +67 -0
67 lines not on this page · raw message
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 2/9] ALSA: virtio: add virtio sound driver
sound/virtio/virtio_card.c line 87
Quoted 7 lines · Anton Yakovlev
sound/virtio/virtio_card.c new file +7
-0+static int virtsnd_find_vqs (struct virtio_snd *snd) +{ +struct virtio_device *vdev = snd->vdev; +vq_callback_t *callbacks[VIRTIO_SND_VQ_MAX ] = { + [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb + }; +const char *names[VIRTIO_SND_VQ_MAX ] = {
Shouldn't be static?
Also it's often const char * const names[] = { ... } unless you overwrite something.
Quoted 13 lines
sound/virtio/virtio_card.c new file +13
-0+/** +* virtsnd_reset_fn() - Kernel worker's function to reset the device. +* @work: Reset device work. +* +* Context: Process context. +*/ +static void virtsnd_reset_fn (struct work_struct *work) +{ +struct virtio_snd *snd = + container_of(work, struct virtio_snd, reset_work); +struct virtio_device *vdev = snd->vdev; +struct device *dev = &vdev->dev; +int rc;
sound/virtio/virtio_card.c line 161
Quoted 10 lines
sound/virtio/virtio_card.c new file +10
-0+ +dev_info (dev,"sound device needs reset\n" ); + +/* +* It seems that the only way to properly reset the device is to remove +* and re-create the ALSA sound card device. +*/ + rc =device_reprobe (dev); +if (rc) +dev_err (dev,"failed to reprobe sound device: %d\n" , rc);
Now I'm wondering whether it's safe to do that from this place. Basically device_reprobe() unbinds the device that releases the full resources once including the devm_* stuff. And this work itself is in a part of devm allocated resource, so it'll be released there. That said, we might hit use-after-free... This needs to be verified.
thanks,
Takashi
Re: [PATCH v5 2/9] ALSA: virtio: add virtio sound driver
Quoted 12 lines · Takashi Iwai
sound/virtio/virtio_card.c line 87
Quoted 7 lines · Anton Yakovlev
sound/virtio/virtio_card.c new file +7
-0+static int virtsnd_find_vqs (struct virtio_snd *snd) +{ +struct virtio_device *vdev = snd->vdev; +vq_callback_t *callbacks[VIRTIO_SND_VQ_MAX ] = { + [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb + }; +const char *names[VIRTIO_SND_VQ_MAX ] = {Shouldn't be static?
Also callbacks[] should be static (and maybe const), I suppose.
Takashi
Anton Yakovlev
maintainerRe: [PATCH v5 2/9] ALSA: virtio: add virtio sound driver
In reply to Takashi IwaiQuoted 11 lines · Takashi Iwai
sound/virtio/virtio_card.c line 87
Quoted 7 lines · Anton Yakovlev
sound/virtio/virtio_card.c new file +7
-0+static int virtsnd_find_vqs (struct virtio_snd *snd) +{ +struct virtio_device *vdev = snd->vdev; +vq_callback_t *callbacks[VIRTIO_SND_VQ_MAX ] = { + [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb + }; +const char *names[VIRTIO_SND_VQ_MAX ] = {Shouldn't be static?
Well, yes. Although in this particular case, I do not think it is that critical. :)
Quoted 2 lines
Also it's often const char * const names[] = { ... } unless you overwrite something.
I tried to use the same type names as in the function prototype. Otherwise the compiler or static analyzer may complain.
Quoted 21 lines
Quoted 21 lines
sound/virtio/virtio_card.c new file +21
-0+/** +* virtsnd_reset_fn() - Kernel worker's function to reset the device. +* @work: Reset device work. +* +* Context: Process context. +*/ +static void virtsnd_reset_fn (struct work_struct *work) +{ +struct virtio_snd *snd = + container_of(work, struct virtio_snd, reset_work); +struct virtio_device *vdev = snd->vdev; +struct device *dev = &vdev->dev; +int rc; + +dev_info (dev,"sound device needs reset\n" ); + +/* +* It seems that the only way to properly reset the device is to remove +* and re-create the ALSA sound card device. +*/ + rc =device_reprobe (dev);
Quoted 8 lines
sound/virtio/virtio_card.c line 161
Quoted 2 lines
sound/virtio/virtio_card.c new file +2
-0+if (rc) +dev_err (dev,"failed to reprobe sound device: %d\n" , rc);Now I'm wondering whether it's safe to do that from this place. Basically
device_reprobe()unbinds the device that releases the full resources once including the devm_* stuff. And this work itself is in a part of devm allocated resource, so it'll be released there. That said, we might hit use-after-free... This needs to be verified.
It's safe. Suicide kernel workers are funny but possible things. Since the kernel itself (AFAIU) assumes such a situation and does not access the worker structure after the callback function call.
Quoted 4 lines
thanks,
Takashi
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 2/9] ALSA: virtio: add virtio sound driver
Quoted 10 lines · Anton Yakovlev
Quoted 6 lines
Now I'm wondering whether it's safe to do that from this place. Basically
device_reprobe()unbinds the device that releases the full resources once including the devm_* stuff. And this work itself is in a part of devm allocated resource, so it'll be released there. That said, we might hit use-after-free... This needs to be verified.It's safe. Suicide kernel workers are funny but possible things. Since the kernel itself (AFAIU) assumes such a situation and does not access the worker structure after the callback function call.
Indeed, process_one_work() in workqueue.c assures no access to the work object after the callback. Then this must be fine. Good to know!
thanks,
Takashi
Anton Yakovlev
maintainerPATCH v5 3/9 ALSA: virtio: handling control messages
In reply to Anton YakovlevThe control queue can be used by different parts of the driver to send commands to the device. Control messages can be either synchronous or asynchronous. The lifetime of a message is controlled by a reference count.
Introduce a module parameter to set the message completion timeout:
msg_timeout_ms [=1000]
--- sound/virtio/Makefile | 3 +- sound/virtio/virtio_card.c | 13 ++ sound/virtio/virtio_card.h | 7 + sound/virtio/virtio_ctl_msg.c | 310 ++++++++++++++++++++++++++++++++++ sound/virtio/virtio_ctl_msg.h | 78 +++++++++ 5 files changed, 410 insertions(+), 1 deletion(-) create mode 100644 sound/virtio/virtio_ctl_msg.c create mode 100644 sound/virtio/virtio_ctl_msg.h
sound/virtio/Makefile +2 -1
@@ -3,5 +3,6 @@ obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o virtio_snd-objs := \ - virtio_card.o + virtio_card.o \ + virtio_ctl_msg.o
sound/virtio/virtio_card.c +13 -0
@@ -11,6 +11,10 @@#include "virtio_card.h" +int msg_timeout_ms =MSEC_PER_SEC ; +module_param (msg_timeout_ms, int,0644 ); +MODULE_PARM_DESC (msg_timeout_ms,"Message completion timeout in milliseconds" ); +static void virtsnd_remove (struct virtio_device *vdev);/**
@@ -82,6 +86,7 @@ static int virtsnd_find_vqs(struct virtio_snd *snd) {struct virtio_device *vdev = snd->vdev;vq_callback_t *callbacks[VIRTIO_SND_VQ_MAX ] = { + [VIRTIO_SND_VQ_CONTROL ] = virtsnd_ctl_notify_cb, [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb };const char *names[VIRTIO_SND_VQ_MAX ] = {
@@ -218,6 +223,11 @@ static int virtsnd_validate(struct virtio_device *vdev)return -EINVAL ; } +if (!msg_timeout_ms) { +dev_err (&vdev->dev,"msg_timeout_ms value cannot be zero\n" ); +return -EINVAL ; + } +return 0 ; }
@@ -240,6 +250,7 @@ static int virtsnd_probe(struct virtio_device *vdev) snd->vdev = vdev;INIT_WORK (&snd->reset_work, virtsnd_reset_fn); +INIT_LIST_HEAD (&snd->ctl_msgs); vdev->priv = snd;
@@ -278,6 +289,8 @@ static void virtsnd_remove(struct virtio_device *vdev)/* Stop all the virtqueues. */ vdev->config->reset (vdev); +virtsnd_ctl_msg_cancel_all (snd); +if (snd->card)snd_card_free (snd->card);
sound/virtio/virtio_card.h +7 -0
@@ -11,6 +11,8 @@#include <sound/core.h> #include <uapi/linux/virtio_snd.h> +#include "virtio_ctl_msg.h" +#define VIRTIO_SND_CARD_DRIVER "virtio-snd"#define VIRTIO_SND_CARD_NAME "VirtIO SoundCard"
@@ -30,6 +32,7 @@ struct virtio_snd_queue {* @queues: Virtqueue wrappers. * @reset_work: Reset device work. * @card: ALSA sound card. +* @ctl_msgs: Pending control request list. * @event_msgs: Device events. */ struct virtio_snd {
@@ -37,9 +40,13 @@ struct virtio_snd {struct virtio_snd_queue queues[VIRTIO_SND_VQ_MAX ];struct work_struct reset_work;struct snd_card *card; +struct list_head ctl_msgs;struct virtio_snd_event *event_msgs; }; +/* Message completion timeout in milliseconds (module parameter). */ +extern int msg_timeout_ms; +static inline struct virtio_snd_queue *virtsnd_control_queue (struct virtio_snd *snd) {
sound/virtio/virtio_ctl_msg.c new file +310 -0
310 lines not on this page · raw message
sound/virtio/virtio_ctl_msg.h new file +78 -0
78 lines not on this page · raw message
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerPATCH v5 4/9 ALSA: virtio: build PCM devices and substream hardware descriptors
In reply to Anton YakovlevLike the HDA specification, the virtio sound device specification links PCM substreams, jacks and PCM channel maps into functional groups. For each discovered group, a PCM device is created, the number of which coincides with the group number.
Introduce the module parameters for setting the hardware buffer parameters:
pcm_buffer_ms [=160]
pcm_periods_min [=2]
pcm_periods_max [=16]
pcm_period_ms_min [=10]
pcm_period_ms_max [=80]
--- sound/virtio/Makefile | 3 +- sound/virtio/virtio_card.c | 14 ++ sound/virtio/virtio_card.h | 10 + sound/virtio/virtio_pcm.c | 463 +++++++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 70 ++++++ 5 files changed, 559 insertions(+), 1 deletion(-) create mode 100644 sound/virtio/virtio_pcm.c create mode 100644 sound/virtio/virtio_pcm.h
sound/virtio/Makefile +2 -1
@@ -4,5 +4,6 @@ obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o virtio_snd-objs := \ virtio_card.o \ - virtio_ctl_msg.o + virtio_ctl_msg.o \ + virtio_pcm.o
sound/virtio/virtio_card.c +14 -0
@@ -200,6 +200,16 @@ static int virtsnd_build_devs(struct virtio_snd *snd)VIRTIO_SND_CARD_NAME " at %s/%s" , dev_name(dev->parent), dev_name(dev)); + rc =virtsnd_pcm_parse_cfg (snd); +if (rc) +return rc; + +if (snd->nsubstreams) { + rc =virtsnd_pcm_build_devs (snd); +if (rc) +return rc; + } +return snd_card_register (snd->card); }
@@ -228,6 +238,9 @@ static int virtsnd_validate(struct virtio_device *vdev)return -EINVAL ; } +if (virtsnd_pcm_validate (vdev)) +return -EINVAL ; +return 0 ; }
@@ -251,6 +264,7 @@ static int virtsnd_probe(struct virtio_device *vdev) snd->vdev = vdev;INIT_WORK (&snd->reset_work, virtsnd_reset_fn);INIT_LIST_HEAD (&snd->ctl_msgs); +INIT_LIST_HEAD (&snd->pcm_list); vdev->priv = snd;
sound/virtio/virtio_card.h +10 -0
@@ -12,9 +12,13 @@#include <uapi/linux/virtio_snd.h> #include "virtio_ctl_msg.h" +#include "virtio_pcm.h" #define VIRTIO_SND_CARD_DRIVER "virtio-snd"#define VIRTIO_SND_CARD_NAME "VirtIO SoundCard" +#define VIRTIO_SND_PCM_NAME "VirtIO PCM" + +struct virtio_pcm_substream ;/** * struct virtio_snd_queue - Virtqueue wrapper structure.
@@ -34,6 +38,9 @@ struct virtio_snd_queue {* @card: ALSA sound card. * @ctl_msgs: Pending control request list. * @event_msgs: Device events. +* @pcm_list: VirtIO PCM device list. +* @substreams: VirtIO PCM substreams. +* @nsubstreams: Number of PCM substreams. */ struct virtio_snd {struct virtio_device *vdev;
@@ -42,6 +49,9 @@ struct virtio_snd {struct snd_card *card;struct list_head ctl_msgs;struct virtio_snd_event *event_msgs; +struct list_head pcm_list; +struct virtio_pcm_substream *substreams; +u32 nsubstreams; };/* Message completion timeout in milliseconds (module parameter). */
sound/virtio/virtio_pcm.c new file +463 -0
463 lines not on this page · raw message
sound/virtio/virtio_pcm.h new file +70 -0
70 lines not on this page · raw message
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerPATCH v5 5/9 ALSA: virtio: handling control and I/O messages for the PCM device
In reply to Anton YakovlevThe driver implements a message-based transport for I/O substream operations. Before the start of the substream, the hardware buffer is sliced into I/O messages, the number of which is equal to the current number of periods. The size of each message is equal to the current size of one period.
I/O messages are organized in an ordered queue. The completion of the I/O message indicates an elapsed period (the only exception is the end of the stream for the capture substream). Upon completion, the message is automatically re-added to the end of the queue.
--- sound/virtio/Makefile | 3 +- sound/virtio/virtio_card.c | 18 +- sound/virtio/virtio_card.h | 9 + sound/virtio/virtio_pcm.c | 32 +++ sound/virtio/virtio_pcm.h | 42 ++++ sound/virtio/virtio_pcm_msg.c | 392 ++++++++++++++++++++++++++++++++++ 6 files changed, 493 insertions(+), 3 deletions(-) create mode 100644 sound/virtio/virtio_pcm_msg.c
sound/virtio/Makefile +2 -1
@@ -5,5 +5,6 @@ obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o virtio_snd-objs := \ virtio_card.o \ virtio_ctl_msg.o \ - virtio_pcm.o + virtio_pcm.o \ + virtio_pcm_msg.o
sound/virtio/virtio_card.c +16 -2
@@ -65,8 +65,16 @@ static void virtsnd_event_notify_cb(struct virtqueue *vqueue)spin_lock_irqsave (&queue->lock, flags);do {virtqueue_disable_cb (vqueue); -while ((event =virtqueue_get_buf (vqueue, &length))) +while ((event =virtqueue_get_buf (vqueue, &length))) { +switch (le32_to_cpu (event->hdr.code)) { +case VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED : +case VIRTIO_SND_EVT_PCM_XRUN : +virtsnd_pcm_event (snd, event); +break ; + } +virtsnd_event_send (vqueue, event, true,GFP_ATOMIC ); + }if (unlikely (virtqueue_is_broken (vqueue)))break ; }while (!virtqueue_enable_cb (vqueue));
@@ -87,7 +95,9 @@ static int virtsnd_find_vqs(struct virtio_snd *snd)struct virtio_device *vdev = snd->vdev;vq_callback_t *callbacks[VIRTIO_SND_VQ_MAX ] = { [VIRTIO_SND_VQ_CONTROL ] = virtsnd_ctl_notify_cb, - [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb + [VIRTIO_SND_VQ_EVENT ] = virtsnd_event_notify_cb, + [VIRTIO_SND_VQ_TX ] = virtsnd_pcm_tx_notify_cb, + [VIRTIO_SND_VQ_RX ] = virtsnd_pcm_rx_notify_cb };const char *names[VIRTIO_SND_VQ_MAX ] = { [VIRTIO_SND_VQ_CONTROL ] ="virtsnd-ctl" ,
@@ -299,6 +309,7 @@ static int virtsnd_probe(struct virtio_device *vdev)static void virtsnd_remove (struct virtio_device *vdev) {struct virtio_snd *snd = vdev->priv; +unsigned int i;/* Stop all the virtqueues. */ vdev->config->reset (vdev);
@@ -310,6 +321,9 @@ static void virtsnd_remove(struct virtio_device *vdev) vdev->config->del_vqs (vdev); +for (i =0 ; snd->substreams && i < snd->nsubstreams; ++i) +virtsnd_pcm_msg_free (&snd->substreams[i]); +kfree (snd->event_msgs); }
sound/virtio/virtio_card.h +9 -0
@@ -81,4 +81,13 @@ virtsnd_rx_queue(struct virtio_snd *snd) return &snd->queues[VIRTIO_SND_VQ_RX]; } +static inline struct virtio_snd_queue * +virtsnd_pcm_queue (struct virtio_pcm_substream *vss) +{ +if (vss->direction ==SNDRV_PCM_STREAM_PLAYBACK ) +return virtsnd_tx_queue (vss->snd); +else +return virtsnd_rx_queue (vss->snd); +} +#endif /* VIRTIO_SND_CARD_H */
sound/virtio/virtio_pcm.c +32 -0
@@ -337,6 +337,8 @@ int virtsnd_pcm_parse_cfg(struct virtio_snd *snd) vss->snd = snd; vss->sid = i; +init_waitqueue_head (&vss->msg_empty); +spin_lock_init (&vss->lock); rc =virtsnd_pcm_build_hw (vss, &info[i]);if (rc)
@@ -461,3 +463,33 @@ int virtsnd_pcm_build_devs(struct virtio_snd *snd)return 0 ; } + +/** +* virtsnd_pcm_event() - Handle the PCM device event notification. +* @snd: VirtIO sound device. +* @event: VirtIO sound event. +* +* Context: Interrupt context. +*/ +void virtsnd_pcm_event (struct virtio_snd *snd,struct virtio_snd_event *event) +{ +struct virtio_pcm_substream *vss; +u32 sid =le32_to_cpu (event->data); + +if (sid >= snd->nsubstreams) +return ; + + vss = &snd->substreams[sid]; + +switch (le32_to_cpu (event->hdr.code)) { +case VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED : +/* TODO: deal with shmem elapsed period */ +break ; +case VIRTIO_SND_EVT_PCM_XRUN : +spin_lock (&vss->lock); +if (vss->xfer_enabled) + vss->xfer_xrun = true; +spin_unlock (&vss->lock); +break ; + } +}
sound/virtio/virtio_pcm.h +42 -0
62 lines not on this page · raw message
sound/virtio/virtio_pcm_msg.c new file +392 -0
392 lines not on this page · raw message
Signature · 7 lines
2.30.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH v5 5/9] ALSA: virtio: handling control and I/O messages for the PCM device
Quoted 10 lines · Anton Yakovlev
sound/virtio/virtio_pcm.c +9
-0+void virtsnd_pcm_event (struct virtio_snd *snd,struct virtio_snd_event *event) +{ +struct virtio_pcm_substream *vss; +u32 sid =le32_to_cpu (event->data); + +if (sid >= snd->nsubstreams) +return ; + + vss = &snd->substreams[sid];
sound/virtio/virtio_pcm.c int virtsnd_pcm_build_devs(struct virtio_snd *snd) · line 492
Quoted 10 lines
sound/virtio/virtio_pcm.c +10
-0+ +switch (le32_to_cpu (event->hdr.code)) { +case VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED : +/* TODO: deal with shmem elapsed period */ +break ; +case VIRTIO_SND_EVT_PCM_XRUN : +spin_lock (&vss->lock); +if (vss->xfer_enabled) + vss->xfer_xrun = true; +spin_unlock (&vss->lock);
You can stop the stream at xrun, too.
But it often messes up with the locking, so it's no mandatory implementation. You seem to pass the xrun state at the pointer callback, and this should be enough for normal uses.
thanks,
Takashi
Anton Yakovlev
maintainerPATCH v5 6/9 ALSA: virtio: PCM substream operators
In reply to Anton YakovlevIntroduce the operators required for the operation of substreams.
--- sound/virtio/Makefile | 3 +- sound/virtio/virtio_pcm.c | 2 + sound/virtio/virtio_pcm.h | 4 + sound/virtio/virtio_pcm_ops.c | 469 ++++++++++++++++++++++++++++++++++ 4 files changed, 477 insertions(+), 1 deletion(-) create mode 100644 sound/virtio/virtio_pcm_ops.c
sound/virtio/Makefile +2 -1
@@ -6,5 +6,6 @@ virtio_snd-objs := \ virtio_card.o \ virtio_ctl_msg.o \ virtio_pcm.o \ - virtio_pcm_msg.o + virtio_pcm_msg.o \ + virtio_pcm_ops.o
sound/virtio/virtio_pcm.c +2 -0
@@ -454,6 +454,8 @@ int virtsnd_pcm_build_devs(struct virtio_snd *snd)for (kss = ks->substream; kss; kss = kss->next) vs->substreams[kss->number]->substream = kss; + +snd_pcm_set_ops (vpcm->pcm, i, &virtsnd_pcm_ops); } snd_pcm_set_managed_buffer_all(vpcm->pcm,
sound/virtio/virtio_pcm.h +4 -0
@@ -35,6 +35,7 @@ struct virtio_pcm_msg;* @msg_last_enqueued: Index of the last I/O message added to the virtqueue. * @msg_count: Number of pending I/O messages in the virtqueue. * @msg_empty: Notify when msg_count is zero. +* @msg_flushing: True if the I/O queue is in flushing state. */ struct virtio_pcm_substream {struct virtio_snd *snd;
@@ -56,6 +57,7 @@ struct virtio_pcm_substream {int msg_last_enqueued;unsigned int msg_count;wait_queue_head_t msg_empty; +bool msg_flushing; };/**
@@ -82,6 +84,8 @@ struct virtio_pcm {struct virtio_pcm_stream streams[SNDRV_PCM_STREAM_LAST +1 ]; }; +extern const struct snd_pcm_ops virtsnd_pcm_ops; +int virtsnd_pcm_validate (struct virtio_device *vdev);int virtsnd_pcm_parse_cfg (struct virtio_snd *snd);
sound/virtio/virtio_pcm_ops.c new file +469 -0
469 lines not on this page · raw message
Signature · 7 lines
2.30.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
sound/virtio/virtio_pcm_ops.c line 84
Quoted 9 lines · Anton Yakovlev
sound/virtio/virtio_pcm_ops.c new file +9
-0+static int virtsnd_pcm_open (struct snd_pcm_substream *substream) +{ +struct virtio_pcm *vpcm =snd_pcm_substream_chip (substream); +struct virtio_pcm_substream *vss =NULL ; + +if (vpcm) { +switch (substream->stream) { +case SNDRV_PCM_STREAM_PLAYBACK : +case SNDRV_PCM_STREAM_CAPTURE : {
The switch() here looks superfluous. The substream->stream must be a good value in the callback. If any, you can put WARN_ON() there, but I don't think it worth.
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *hw_params) +{
....
sound/virtio/virtio_pcm_ops.c line 221
Quoted 1 line
sound/virtio/virtio_pcm_ops.c new file +1
-0+return virtsnd_pcm_msg_alloc (vss, periods, period_bytes);
We have the allocation, but...
sound/virtio/virtio_pcm_ops.c line 233
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_free (struct snd_pcm_substream *substream) +{ +return 0 ;
... no release at hw_free()?
I know that the free is present in the allocator, but it's only for re-allocation case, I suppose.
thanks,
Takashi
Anton Yakovlev
maintainerRe: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 15 lines · Takashi Iwai
sound/virtio/virtio_pcm_ops.c line 84
Quoted 9 lines · Anton Yakovlev
sound/virtio/virtio_pcm_ops.c new file +9
-0+static int virtsnd_pcm_open (struct snd_pcm_substream *substream) +{ +struct virtio_pcm *vpcm =snd_pcm_substream_chip (substream); +struct virtio_pcm_substream *vss =NULL ; + +if (vpcm) { +switch (substream->stream) { +case SNDRV_PCM_STREAM_PLAYBACK : +case SNDRV_PCM_STREAM_CAPTURE : {The
switch()here looks superfluous. Thesubstream->streammust be a good value in the callback. If any, you can putWARN_ON()there, but I don't think it worth.
At least it doesn't do any harm. If something really went wrong, we can check it right in the open callback, which is called the very first.
Quoted 8 lines
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *hw_params) +{....
Quoted 1 line
+ return
virtsnd_pcm_msg_alloc(vss, periods, period_bytes);We have the allocation, but...
Quoted 7 lines
sound/virtio/virtio_pcm_ops.c line 233
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_free (struct snd_pcm_substream *substream) +{ +return 0 ;... no release at
hw_free()?
I know that the free is present in the allocator, but it's only for re-allocation case, I suppose.
When the substream stops, sync_ptr waits until the device has completed all pending messages. This wait can be interrupted either by a signal or due to a timeout. In this case, the device can still access messages even after calling hw_free(). It can also issue an interrupt, and the interrupt handler will also try to access message structures. Therefore, freeing of already allocated messages occurs either in hw_params() or in dev->release(), since there it is 100% safe.
Quoted 4 lines
thanks,
Takashi
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 18 lines · Anton Yakovlev
Quoted 15 lines · Takashi Iwai
sound/virtio/virtio_pcm_ops.c line 84
Quoted 9 lines · Anton Yakovlev
sound/virtio/virtio_pcm_ops.c new file +9
-0+static int virtsnd_pcm_open (struct snd_pcm_substream *substream) +{ +struct virtio_pcm *vpcm =snd_pcm_substream_chip (substream); +struct virtio_pcm_substream *vss =NULL ; + +if (vpcm) { +switch (substream->stream) { +case SNDRV_PCM_STREAM_PLAYBACK : +case SNDRV_PCM_STREAM_CAPTURE : {The
switch()here looks superfluous. Thesubstream->streammust be a good value in the callback. If any, you can putWARN_ON()there, but I don't think it worth.
Quoted 1 line
At least it doesn't do any harm.
It does -- it makes the readability worse, and that's a very important point.
Quoted 16 lines
Quoted 8 lines
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *hw_params) +{....
Quoted 1 line
+ return
virtsnd_pcm_msg_alloc(vss, periods, period_bytes);We have the allocation, but...
Quoted 7 lines
sound/virtio/virtio_pcm_ops.c line 233
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_free (struct snd_pcm_substream *substream) +{ +return 0 ;... no release at
hw_free()?
I know that the free is present in the allocator, but it's only for re-allocation case, I suppose.
Quoted 7 lines
When the substream stops,
sync_ptrwaits until the device has completed all pending messages. This wait can be interrupted either by a signal or due to a timeout. In this case, the device can still access messages even after callinghw_free(). It can also issue an interrupt, and the interrupt handler will also try to access message structures. Therefore, freeing of already allocated messages occurs either inhw_params()or indev->release(), since there it is 100% safe.
OK, then it's worth to document it about this object lifecycle. The buffer management of this driver is fairly unique, so otherwise it confuses readers.
thanks,
Takashi
Michael S. Tsirkin
maintainerRe: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 49 lines · Takashi Iwai
Quoted 18 lines · Anton Yakovlev
Quoted 15 lines · Takashi Iwai
sound/virtio/virtio_pcm_ops.c line 84
Quoted 9 lines · Anton Yakovlev
sound/virtio/virtio_pcm_ops.c new file +9
-0+static int virtsnd_pcm_open (struct snd_pcm_substream *substream) +{ +struct virtio_pcm *vpcm =snd_pcm_substream_chip (substream); +struct virtio_pcm_substream *vss =NULL ; + +if (vpcm) { +switch (substream->stream) { +case SNDRV_PCM_STREAM_PLAYBACK : +case SNDRV_PCM_STREAM_CAPTURE : {The
switch()here looks superfluous. Thesubstream->streammust be a good value in the callback. If any, you can putWARN_ON()there, but I don't think it worth.Quoted 1 line
At least it doesn't do any harm.
It does -- it makes the readability worse, and that's a very important point.
Quoted 16 lines
Quoted 8 lines
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *hw_params) +{....
Quoted 1 line
+ return
virtsnd_pcm_msg_alloc(vss, periods, period_bytes);We have the allocation, but...
Quoted 7 lines
sound/virtio/virtio_pcm_ops.c line 233
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_free (struct snd_pcm_substream *substream) +{ +return 0 ;... no release at
hw_free()?
I know that the free is present in the allocator, but it's only for re-allocation case, I suppose.Quoted 7 lines
When the substream stops,
sync_ptrwaits until the device has completed all pending messages. This wait can be interrupted either by a signal or due to a timeout. In this case, the device can still access messages even after callinghw_free(). It can also issue an interrupt, and the interrupt handler will also try to access message structures. Therefore, freeing of already allocated messages occurs either inhw_params()or indev->release(), since there it is 100% safe.
Quoted 8 lines
OK, then it's worth to document it about this object lifecycle. The buffer management of this driver is fairly unique, so otherwise it confuses readers.
thanks,
Takashi
Takashi given I was in my tree for a while and I planned to merge it this merge window. I can still drop it but there are unrelated patches behind these in the tree so that's a rebase which will invalidate my testing, I'm just concerned about meeting the merge window.
Would it be ok to merge this as is and then address readability stuff by patches on top?
If yes please send acks!
If you want to merge it yourself instead, also please say so.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 56 lines · Michael S. Tsirkin
Quoted 54 lines · Takashi Iwai
Quoted 18 lines · Anton Yakovlev
Quoted 15 lines · Takashi Iwai
sound/virtio/virtio_pcm_ops.c line 84
Quoted 9 lines · Anton Yakovlev
sound/virtio/virtio_pcm_ops.c new file +9
-0+static int virtsnd_pcm_open (struct snd_pcm_substream *substream) +{ +struct virtio_pcm *vpcm =snd_pcm_substream_chip (substream); +struct virtio_pcm_substream *vss =NULL ; + +if (vpcm) { +switch (substream->stream) { +case SNDRV_PCM_STREAM_PLAYBACK : +case SNDRV_PCM_STREAM_CAPTURE : {The
switch()here looks superfluous. Thesubstream->streammust be a good value in the callback. If any, you can putWARN_ON()there, but I don't think it worth.Quoted 1 line
At least it doesn't do any harm.
It does -- it makes the readability worse, and that's a very important point.
Quoted 16 lines
Quoted 8 lines
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *hw_params) +{....
Quoted 1 line
+ return
virtsnd_pcm_msg_alloc(vss, periods, period_bytes);We have the allocation, but...
Quoted 7 lines
sound/virtio/virtio_pcm_ops.c line 233
Quoted 3 lines
sound/virtio/virtio_pcm_ops.c new file +3
-0+static int virtsnd_pcm_hw_free (struct snd_pcm_substream *substream) +{ +return 0 ;... no release at
hw_free()?
I know that the free is present in the allocator, but it's only for re-allocation case, I suppose.Quoted 7 lines
When the substream stops,
sync_ptrwaits until the device has completed all pending messages. This wait can be interrupted either by a signal or due to a timeout. In this case, the device can still access messages even after callinghw_free(). It can also issue an interrupt, and the interrupt handler will also try to access message structures. Therefore, freeing of already allocated messages occurs either inhw_params()or indev->release(), since there it is 100% safe.OK, then it's worth to document it about this object lifecycle. The buffer management of this driver is fairly unique, so otherwise it confuses readers.
Quoted 6 lines
Quoted 3 lines
thanks,
Takashi
Takashi given I was in my tree for a while and I planned to merge it this merge window.
Hmm, that's too quick, I'm afraid. I see still a few rough edges in the code. e.g. the reset work should be canceled at the driver removal, but it's missing right now. And that'll become tricky because the reset work itself unbinds the device, hence it'll get stuck if calling cancel_work_sync() at remove callback.
Quoted 9 lines
I can still drop it but there are
unrelated patches behind these in the tree so that's a rebase which will invalidate my testing, I'm just concerned about meeting the merge window.Would it be ok to merge this as is and then address readability stuff by patches on top?
If yes please send acks!
If you want to merge it yourself instead, also please say so.
I don't mind who take the patches, although it looks more fitting to merge through sound git tree if judging from the changes put in sound/* directory.
thanks,
Takashi
Anton Yakovlev
maintainerRe: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
On 25.02.2021 21:30, Takashi Iwai wrote:> On Thu, 25 Feb 2021 20:02:50 +0100,
Quoted 5 lines
Quoted 4 lines · Michael S. Tsirkin
Quoted 2 lines · Takashi Iwai
On Thu, 25 Feb 2021 13:14:37 +0100,
Anton Yakovlev wrote:
[snip]
Quoted 8 lines
Quoted 2 lines
Takashi given I was in my tree for a while and I planned to merge it this merge window.
Hmm, that's too quick, I'm afraid. I see still a few rough edges in the code. e.g. the reset work should be canceled at the driver removal, but it's missing right now. And that'll become tricky because the reset work itself unbinds the device, hence it'll get stuck if calling
cancel_work_sync()at remove callback.
Yes, you made a good point here! In this case, we need some external mutex for synchronization. This is just a rough idea, but maybe something like this might work:
struct reset_work {
struct mutex mutex;
struct work_struct work;
struct virtio_snd *snd;
bool resetting;
};static struct reset_work reset_works[SNDRV_CARDS];
init()
// init mutexes and workers
virtsnd_probe()
snd_card_new(snd->card)
reset_works[snd->card->number].snd = snd;virtsnd_remove()
mutex_lock(reset_works[snd->card->number].mutex)
reset_works[snd->card->number].snd = NULL;
resetting = reset_works[snd->card->number].resetting;
mutex_unlock(reset_works[snd->card->number].mutex)
if (!resetting)
// cancel worker reset_works[snd->card->number].work
// remove devicevirtsnd_reset_fn(work)
mutex_lock(work->mutex)
if (!work->snd)
// do nothing and take an exit path
work->resetting = true;
mutex_unlock(work->mutex)
device_reprobe()
work->resetting = false;interrupt_handler()
schedule_work(reset_works[snd->card->number].work);
What do you think?
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 67 lines · Anton Yakovlev
On 25.02.2021 21:30, Takashi Iwai wrote:> On Thu, 25 Feb 2021 20:02:50 +0100,
Quoted 5 lines
Quoted 4 lines · Michael S. Tsirkin
Quoted 2 lines · Takashi Iwai
On Thu, 25 Feb 2021 13:14:37 +0100,
Anton Yakovlev wrote:[snip]
Quoted 8 lines
Quoted 2 lines
Takashi given I was in my tree for a while and I planned to merge it this merge window.
Hmm, that's too quick, I'm afraid. I see still a few rough edges in the code. e.g. the reset work should be canceled at the driver removal, but it's missing right now. And that'll become tricky because the reset work itself unbinds the device, hence it'll get stuck if calling
cancel_work_sync()at remove callback.Yes, you made a good point here! In this case, we need some external mutex for synchronization. This is just a rough idea, but maybe something like this might work:
struct reset_work { struct mutex mutex; struct work_struct work; struct virtio_snd *snd; bool resetting; };static struct
reset_workreset_works[SNDRV_CARDS];
init()// init mutexes and workers
virtsnd_probe()snd_card_new(snd->card) reset_works[snd->card->number].snd = snd;
virtsnd_remove()mutex_lock(reset_works[snd->card->number].mutex) reset_works[snd->card->number].snd = NULL; resetting = reset_works[snd->card->number].resetting; mutex_unlock(reset_works[snd->card->number].mutex) if (!resetting) // cancel worker reset_works[snd->card->number].work // remove device
virtsnd_reset_fn(work)mutex_lock(work->mutex) if (!work->snd) // do nothing and take an exit path work->resetting = true; mutex_unlock(work->mutex) device_reprobe() work->resetting = false;
Quoted 5 lines
interrupt_handler()schedule_work(reset_works[snd->card->number].work);What do you think?
I think it's still somehow racy. Suppose that the reset_work is already running right before entering virtsnd_remove(): it sets reset_works[].resetting flag, virtsnd_remove() skips canceling, and both reset work and virtsnd_remove() perform at the very same time. (I don't know whether this may happen, but I assume it's possible.)
In that case, maybe a better check is to check current_work(), and perform cancel_work_sync() unless it's &reset_works[].work itself. Then the recursive cancel call can be avoided.
After that point, the reset must be completed, and we can (again) process the rest release procedure. (But also snd object itself might have been changed again, so it needs to be re-evaluated.)
One remaining concern is that the card number of the sound instance may change after reprobe. That is, we may want to another persistent object instead of accessing via an array index of sound card number. So, we might need reset_works[] associated with virtio_snd object instead.
In anyway, this is damn complex. I sincerely hope that we can avoid this kind of things. Wouldn't it be better to shift the reset stuff up to the virtio core layer? Or drop the feature in the first version. Shooting itself (and revival) is a dangerous magic spell, after all.
thanks,
Takashi
Anton Yakovlev
maintainerRe: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 95 lines · Takashi Iwai
Quoted 67 lines · Anton Yakovlev
On 25.02.2021 21:30, Takashi Iwai wrote:> On Thu, 25 Feb 2021 20:02:50 +0100,
Quoted 5 lines
Quoted 4 lines · Michael S. Tsirkin
Quoted 2 lines · Takashi Iwai
On Thu, 25 Feb 2021 13:14:37 +0100,
Anton Yakovlev wrote:[snip]
Quoted 8 lines
Quoted 2 lines
Takashi given I was in my tree for a while and I planned to merge it this merge window.
Hmm, that's too quick, I'm afraid. I see still a few rough edges in the code. e.g. the reset work should be canceled at the driver removal, but it's missing right now. And that'll become tricky because the reset work itself unbinds the device, hence it'll get stuck if calling
cancel_work_sync()at remove callback.Yes, you made a good point here! In this case, we need some external mutex for synchronization. This is just a rough idea, but maybe something like this might work:
struct reset_work { struct mutex mutex; struct work_struct work; struct virtio_snd *snd; bool resetting; };static struct
reset_workreset_works[SNDRV_CARDS];
init()// init mutexes and workers
virtsnd_probe()snd_card_new(snd->card) reset_works[snd->card->number].snd = snd;
virtsnd_remove()mutex_lock(reset_works[snd->card->number].mutex) reset_works[snd->card->number].snd = NULL; resetting = reset_works[snd->card->number].resetting; mutex_unlock(reset_works[snd->card->number].mutex) if (!resetting) // cancel worker reset_works[snd->card->number].work // remove device
virtsnd_reset_fn(work)mutex_lock(work->mutex) if (!work->snd) // do nothing and take an exit path work->resetting = true; mutex_unlock(work->mutex) device_reprobe() work->resetting = false;Quoted 5 lines
interrupt_handler()schedule_work(reset_works[snd->card->number].work);What do you think?
I think it's still somehow racy. Suppose that the
reset_workis already running right before enteringvirtsnd_remove(): it sets reset_works[].resetting flag,virtsnd_remove()skips canceling, and both reset work andvirtsnd_remove()perform at the very same time. (I don't know whether this may happen, but I assume it's possible.)In that case, maybe a better check is to check
current_work(), and performcancel_work_sync()unless it's &reset_works[].work itself. Then the recursive cancel call can be avoided.After that point, the reset must be completed, and we can (again) process the rest release procedure. (But also snd object itself might have been changed again, so it needs to be re-evaluated.)
One remaining concern is that the card number of the sound instance may change after reprobe. That is, we may want to another persistent object instead of accessing via an array index of sound card number. So, we might need reset_works[] associated with
virtio_sndobject instead.
Quoted 5 lines
In anyway, this is damn complex. I sincerely hope that we can avoid this kind of things. Wouldn't it be better to shift the reset stuff up to the virtio core layer? Or drop the feature in the first version. Shooting itself (and revival) is a dangerous magic spell, after all.
Yes, I also got an impression, that without some assistance somewhere from the bus it will hardly be possible to find a suitable solution. Ok, then I will postpone this feature at the moment.
Quoted 5 lines
thanks,
Takashi
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerRe: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
In reply to Takashi IwaiOn 25.02.2021 21:30, Takashi Iwai wrote:> On Thu, 25 Feb 2021 20:02:50 +0100,
Quoted 2 lines
Quoted 1 line · Michael S. Tsirkin
[snip]
Quoted 5 lines
Quoted 1 line
If you want to merge it yourself instead, also please say so.
I don't mind who take the patches, although it looks more fitting to merge through sound git tree if judging from the changes put in
sound/*directory.
Then should I update the MAINTAINERS and add Takashi instead of Michael, or should I put both of you there?
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PATCH v5 6/9] ALSA: virtio: PCM substream operators
Quoted 8 lines · Anton Yakovlev
On 25.02.2021 21:30, Takashi Iwai wrote:> On Thu, 25 Feb 2021 20:02:50 +0100,
Quoted 2 lines
Quoted 1 line · Michael S. Tsirkin
[snip]
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
If you want to merge it yourself instead, also please say so.
I don't mind who take the patches, although it looks more fitting to merge through sound git tree if judging from the changes put in
sound/*directory.Then should I update the
MAINTAINERSand add Takashi instead of Michael, or should I put both of you there?
No need for that, I'm already named as the generic sound/* stuff maintainer. And, it's rather more about how the merge gets pushed up to upstream. In general, the stuff belonging to a subsystem goes via the subsystem tree, e.g. Mark has been maintaining ASoC stuff in his tree while it gets merged sound.git tree to Linus. Similarly, it's fine if Michael wants to keep a sub-subsystem tree for virtio_snd, too. But keeping a dedicated git repo for a single driver isn't often worthwhile.
Of course, it's no strict rule, and I don't mind if anybody has a strong reason to process in other ways, too. Just let me know.
thanks,
Takashi
Anton Yakovlev
maintainerPATCH v5 7/9 ALSA: virtio: introduce jack support
In reply to Anton YakovlevEnumerate all available jacks and create ALSA controls.
At the moment jacks have a simple implementation and can only be used to receive notifications about a plugged in/out device.
--- sound/virtio/Makefile | 1 + sound/virtio/virtio_card.c | 14 +++ sound/virtio/virtio_card.h | 12 ++ sound/virtio/virtio_jack.c | 233 +++++++++++++++++++++++++++++++++++++ 4 files changed, 260 insertions(+) create mode 100644 sound/virtio/virtio_jack.c
sound/virtio/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o virtio_snd-objs := \ virtio_card.o \ virtio_ctl_msg.o \ + virtio_jack.o \ virtio_pcm.o \ virtio_pcm_msg.o \ virtio_pcm_ops.o
sound/virtio/virtio_card.c +14 -0
@@ -67,6 +67,10 @@ static void virtsnd_event_notify_cb(struct virtqueue *vqueue)virtqueue_disable_cb (vqueue);while ((event =virtqueue_get_buf (vqueue, &length))) {switch (le32_to_cpu (event->hdr.code)) { +case VIRTIO_SND_EVT_JACK_CONNECTED : +case VIRTIO_SND_EVT_JACK_DISCONNECTED : +virtsnd_jack_event (snd, event); +break ;case VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED :case VIRTIO_SND_EVT_PCM_XRUN :virtsnd_pcm_event (snd, event);
@@ -210,10 +214,20 @@ static int virtsnd_build_devs(struct virtio_snd *snd)VIRTIO_SND_CARD_NAME " at %s/%s" , dev_name(dev->parent), dev_name(dev)); + rc =virtsnd_jack_parse_cfg (snd); +if (rc) +return rc; + rc =virtsnd_pcm_parse_cfg (snd);if (rc)return rc; +if (snd->njacks) { + rc =virtsnd_jack_build_devs (snd); +if (rc) +return rc; + } +if (snd->nsubstreams) { rc =virtsnd_pcm_build_devs (snd);if (rc)
sound/virtio/virtio_card.h +12 -0
@@ -18,6 +18,7 @@#define VIRTIO_SND_CARD_NAME "VirtIO SoundCard"#define VIRTIO_SND_PCM_NAME "VirtIO PCM" +struct virtio_jack ;struct virtio_pcm_substream ;/**
@@ -39,6 +40,8 @@ struct virtio_snd_queue {* @ctl_msgs: Pending control request list. * @event_msgs: Device events. * @pcm_list: VirtIO PCM device list. +* @jacks: VirtIO jacks. +* @njacks: Number of jacks. * @substreams: VirtIO PCM substreams. * @nsubstreams: Number of PCM substreams. */
@@ -50,6 +53,8 @@ struct virtio_snd {struct list_head ctl_msgs;struct virtio_snd_event *event_msgs;struct list_head pcm_list; +struct virtio_jack *jacks; +u32 njacks;struct virtio_pcm_substream *substreams;u32 nsubstreams; };
@@ -90,4 +95,11 @@ virtsnd_pcm_queue(struct virtio_pcm_substream *vss) return virtsnd_rx_queue(vss->snd); } +int virtsnd_jack_parse_cfg (struct virtio_snd *snd); + +int virtsnd_jack_build_devs (struct virtio_snd *snd); + +void virtsnd_jack_event (struct virtio_snd *snd, +struct virtio_snd_event *event); +#endif /* VIRTIO_SND_CARD_H */
sound/virtio/virtio_jack.c new file +233 -0
233 lines not on this page · raw message
Signature · 7 lines
2.30.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Anton Yakovlev
maintainerPATCH v5 8/9 ALSA: virtio: introduce PCM channel map support
In reply to Anton YakovlevEnumerate all available PCM channel maps and create ALSA controls.
--- sound/virtio/Makefile | 1 + sound/virtio/virtio_card.c | 10 ++ sound/virtio/virtio_card.h | 8 ++ sound/virtio/virtio_chmap.c | 219 ++++++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 4 + 5 files changed, 242 insertions(+) create mode 100644 sound/virtio/virtio_chmap.c
sound/virtio/Makefile +1 -0
@@ -4,6 +4,7 @@ obj-$(CONFIG_SND_VIRTIO) += virtio_snd.o virtio_snd-objs := \ virtio_card.o \ + virtio_chmap.o \ virtio_ctl_msg.o \ virtio_jack.o \ virtio_pcm.o \
sound/virtio/virtio_card.c +10 -0
@@ -222,6 +222,10 @@ static int virtsnd_build_devs(struct virtio_snd *snd)if (rc)return rc; + rc =virtsnd_chmap_parse_cfg (snd); +if (rc) +return rc; +if (snd->njacks) { rc =virtsnd_jack_build_devs (snd);if (rc)
@@ -234,6 +238,12 @@ static int virtsnd_build_devs(struct virtio_snd *snd)return rc; } +if (snd->nchmaps) { + rc =virtsnd_chmap_build_devs (snd); +if (rc) +return rc; + } +return snd_card_register (snd->card); }
sound/virtio/virtio_card.h +8 -0
@@ -44,6 +44,8 @@ struct virtio_snd_queue {* @njacks: Number of jacks. * @substreams: VirtIO PCM substreams. * @nsubstreams: Number of PCM substreams. +* @chmaps: VirtIO channel maps. +* @nchmaps: Number of channel maps. */ struct virtio_snd {struct virtio_device *vdev;
@@ -57,6 +59,8 @@ struct virtio_snd {u32 njacks;struct virtio_pcm_substream *substreams;u32 nsubstreams; +struct virtio_snd_chmap_info *chmaps; +u32 nchmaps; };/* Message completion timeout in milliseconds (module parameter). */
@@ -102,4 +106,8 @@ int virtsnd_jack_build_devs(struct virtio_snd *snd);void virtsnd_jack_event (struct virtio_snd *snd,struct virtio_snd_event *event); +int virtsnd_chmap_parse_cfg (struct virtio_snd *snd); + +int virtsnd_chmap_build_devs (struct virtio_snd *snd); +#endif /* VIRTIO_SND_CARD_H */
sound/virtio/virtio_chmap.c new file +219 -0
219 lines not on this page · raw message
sound/virtio/virtio_pcm.h +4 -0
@@ -64,10 +64,14 @@ struct virtio_pcm_substream {* struct virtio_pcm_stream - VirtIO PCM stream. * @substreams: VirtIO substreams belonging to the stream. * @nsubstreams: Number of substreams. +* @chmaps: Kernel channel maps belonging to the stream. +* @nchmaps: Number of channel maps. */ struct virtio_pcm_stream {struct virtio_pcm_substream **substreams;u32 nsubstreams; +struct snd_pcm_chmap_elem *chmaps; +u32 nchmaps; };/**
Signature · 7 lines
2.30.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Anton Yakovlev
maintainerPATCH v5 9/9 ALSA: virtio: introduce device suspend/resume support
In reply to Anton YakovlevAll running PCM substreams are stopped on device suspend and restarted on device resume.
--- sound/virtio/virtio_card.c | 57 +++++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.c | 1 + sound/virtio/virtio_pcm_ops.c | 44 ++++++++++++++++++++------- 3 files changed, 91 insertions(+), 11 deletions(-)
sound/virtio/virtio_card.c +57 -0
@@ -373,6 +373,59 @@ static void virtsnd_config_changed(struct virtio_device *vdev) "sound device configuration was changed\n"); } +#ifdef CONFIG_PM_SLEEP +/** +* virtsnd_freeze() - Suspend device. +* @vdev: VirtIO parent device. +* +* Context: Any context. +* Return: 0 on success, -errno on failure. +*/ +static int virtsnd_freeze (struct virtio_device *vdev) +{ +struct virtio_snd *snd = vdev->priv; + +/* Stop all the virtqueues. */ + vdev->config->reset (vdev); + vdev->config->del_vqs (vdev); + +virtsnd_ctl_msg_cancel_all (snd); + +kfree (snd->event_msgs); + +/* +* If the virtsnd_restore() fails before re-allocating events, then we +* get a dangling pointer here. +*/ + snd->event_msgs =NULL ; + +return 0 ; +} + +/** +* virtsnd_restore() - Resume device. +* @vdev: VirtIO parent device. +* +* Context: Any context. +* Return: 0 on success, -errno on failure. +*/ +static int virtsnd_restore (struct virtio_device *vdev) +{ +struct virtio_snd *snd = vdev->priv; +int rc; + + rc =virtsnd_find_vqs (snd); +if (rc) +return rc; + +virtio_device_ready (vdev); + +virtsnd_enable_event_vq (snd); + +return 0 ; +} +#endif /* CONFIG_PM_SLEEP */ +static const struct virtio_device_id id_table[] = { {VIRTIO_ID_SOUND ,VIRTIO_DEV_ANY_ID }, {0 },
@@ -386,6 +439,10 @@ static struct virtio_driver virtsnd_driver = { .probe = virtsnd_probe, .remove = virtsnd_remove, .config_changed = virtsnd_config_changed, +#ifdef CONFIG_PM_SLEEP + .freeze = virtsnd_freeze, + .restore = virtsnd_restore, +#endif };static int __init init (void )
sound/virtio/virtio_pcm.c +1 -0
@@ -109,6 +109,7 @@ static int virtsnd_pcm_build_hw(struct virtio_pcm_substream *vss,SNDRV_PCM_INFO_BATCH |SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_INTERLEAVED | +SNDRV_PCM_INFO_RESUME |SNDRV_PCM_INFO_PAUSE ;if (!info->channels_min || info->channels_min > info->channels_max) {
sound/virtio/virtio_pcm_ops.c +33 -11
70 lines not on this page · raw message
Signature · 7 lines
2.30.0 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Michael S. Tsirkin
maintainerQuoted 7 lines · Anton Yakovlev
This series implements a driver part of the virtio sound device specification v8 [1].
The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device.
Quoted 8 lines
As a device part was used OpenSynergy proprietary implementation.
v5 changes:
- Fixed another bunch of sparse warnings
(replacedvirtio_cread()->virtio_cread_le()), no functional changes.
(Sorry, I didn't know how to run sparse locally, now everything should be fixed)[1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html
In the future please number patches from 1, not from 2. thanks!
Quoted 35 lines
Anton Yakovlev (9):
uapi:virtio_ids: add a sound device type ID from OASIS spec
ALSA: virtio: add virtio sound driver
ALSA: virtio: handling control messages
ALSA: virtio: build PCM devices and substream hardware descriptors
ALSA: virtio: handling control and I/O messages for the PCM device
ALSA: virtio: PCM substream operators
ALSA: virtio: introduce jack support
ALSA: virtio: introduce PCM channel map support
ALSA: virtio: introduce device suspend/resume supportMAINTAINERS | 9 + include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++ sound/Kconfig | 2 + sound/Makefile | 3 +- sound/virtio/Kconfig | 10 + sound/virtio/Makefile | 13 + sound/virtio/virtio_card.c | 462 +++++++++++++++++++++++++++++ sound/virtio/virtio_card.h | 113 ++++++++ sound/virtio/virtio_chmap.c | 219 ++++++++++++++ sound/virtio/virtio_ctl_msg.c | 310 ++++++++++++++++++++ sound/virtio/virtio_ctl_msg.h | 78 +++++ sound/virtio/virtio_jack.c | 233 +++++++++++++++ sound/virtio/virtio_pcm.c | 498 ++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 120 ++++++++ sound/virtio/virtio_pcm_msg.c | 392 +++++++++++++++++++++++++ sound/virtio/virtio_pcm_ops.c | 491 +++++++++++++++++++++++++++++++ 17 files changed, 3287 insertions(+), 1 deletion(-) create mode 100644 include/uapi/linux/virtio_snd.h create mode 100644 sound/virtio/Kconfig create mode 100644 sound/virtio/Makefile create mode 100644 sound/virtio/virtio_card.c create mode 100644 sound/virtio/virtio_card.h
Quoted 12 lines
create mode 100644 sound/virtio/virtio_chmap.c create mode 100644 sound/virtio/virtio_ctl_msg.c create mode 100644 sound/virtio/virtio_ctl_msg.h create mode 100644 sound/virtio/virtio_jack.c create mode 100644 sound/virtio/virtio_pcm.c create mode 100644 sound/virtio/virtio_pcm.h create mode 100644 sound/virtio/virtio_pcm_msg.c create mode 100644 sound/virtio/virtio_pcm_ops.cSignature · 1 line
2.30.0
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Anton Yakovlev
maintainerQuoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Anton Yakovlev
This series implements a driver part of the virtio sound device specification v8 [1].
The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device.
As a device part was used OpenSynergy proprietary implementation.
v5 changes:
- Fixed another bunch of sparse warnings(replaced virtio_cread() -> virtio_cread_le()), no functional changes.(Sorry, I didn't know how to run sparse locally, now everything should be fixed)
Quoted 5 lines
In the future please number patches from 1, not from 2. thanks!
But they are numbered automatically by git. Patch #1 is for virtio_ids.h
Quoted 54 lines
Quoted 44 lines
Anton Yakovlev (9):
uapi:virtio_ids: add a sound device type ID from OASIS spec
ALSA: virtio: add virtio sound driver
ALSA: virtio: handling control messages
ALSA: virtio: build PCM devices and substream hardware descriptors
ALSA: virtio: handling control and I/O messages for the PCM device
ALSA: virtio: PCM substream operators
ALSA: virtio: introduce jack support
ALSA: virtio: introduce PCM channel map support
ALSA: virtio: introduce device suspend/resume supportMAINTAINERS | 9 + include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++ sound/Kconfig | 2 + sound/Makefile | 3 +- sound/virtio/Kconfig | 10 + sound/virtio/Makefile | 13 + sound/virtio/virtio_card.c | 462 +++++++++++++++++++++++++++++ sound/virtio/virtio_card.h | 113 ++++++++ sound/virtio/virtio_chmap.c | 219 ++++++++++++++ sound/virtio/virtio_ctl_msg.c | 310 ++++++++++++++++++++ sound/virtio/virtio_ctl_msg.h | 78 +++++ sound/virtio/virtio_jack.c | 233 +++++++++++++++ sound/virtio/virtio_pcm.c | 498 ++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 120 ++++++++ sound/virtio/virtio_pcm_msg.c | 392 +++++++++++++++++++++++++ sound/virtio/virtio_pcm_ops.c | 491 +++++++++++++++++++++++++++++++ 17 files changed, 3287 insertions(+), 1 deletion(-)create mode 100644
include/uapi/linux/virtio_snd.hcreate mode 100644sound/virtio/Kconfigcreate mode 100644sound/virtio/Makefilecreate mode 100644sound/virtio/virtio_card.ccreate mode 100644sound/virtio/virtio_card.hcreate mode 100644sound/virtio/virtio_chmap.ccreate mode 100644sound/virtio/virtio_ctl_msg.ccreate mode 100644sound/virtio/virtio_ctl_msg.hcreate mode 100644sound/virtio/virtio_jack.ccreate mode 100644sound/virtio/virtio_pcm.ccreate mode 100644sound/virtio/virtio_pcm.hcreate mode 100644sound/virtio/virtio_pcm_msg.ccreate mode 100644sound/virtio/virtio_pcm_ops.cQuoted 3 lines
--
2.30.0---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Signature · 10 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Michael S. Tsirkin
maintainerQuoted 16 lines · Anton Yakovlev
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Anton Yakovlev
This series implements a driver part of the virtio sound device specification v8 [1].
The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device.
As a device part was used OpenSynergy proprietary implementation.
v5 changes:
- Fixed another bunch of sparse warnings(replaced virtio_cread() -> virtio_cread_le()), no functional changes.(Sorry, I didn't know how to run sparse locally, now everything should be fixed)
Quoted 7 lines
Quoted 5 lines
In the future please number patches from 1, not from 2. thanks!
But they are numbered automatically by git. Patch #1 is for
virtio_ids.h
Weird somehow I was missing patch #1. Applied now, thanks!
Quoted 50 lines
Quoted 50 lines
Quoted 48 lines
Anton Yakovlev (9):
uapi:virtio_ids: add a sound device type ID from OASIS spec
ALSA: virtio: add virtio sound driver
ALSA: virtio: handling control messages
ALSA: virtio: build PCM devices and substream hardware descriptors
ALSA: virtio: handling control and I/O messages for the PCM device
ALSA: virtio: PCM substream operators
ALSA: virtio: introduce jack support
ALSA: virtio: introduce PCM channel map support
ALSA: virtio: introduce device suspend/resume supportMAINTAINERS | 9 + include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_snd.h | 334 +++++++++++++++++++++ sound/Kconfig | 2 + sound/Makefile | 3 +- sound/virtio/Kconfig | 10 + sound/virtio/Makefile | 13 + sound/virtio/virtio_card.c | 462 +++++++++++++++++++++++++++++ sound/virtio/virtio_card.h | 113 ++++++++ sound/virtio/virtio_chmap.c | 219 ++++++++++++++ sound/virtio/virtio_ctl_msg.c | 310 ++++++++++++++++++++ sound/virtio/virtio_ctl_msg.h | 78 +++++ sound/virtio/virtio_jack.c | 233 +++++++++++++++ sound/virtio/virtio_pcm.c | 498 ++++++++++++++++++++++++++++++++ sound/virtio/virtio_pcm.h | 120 ++++++++ sound/virtio/virtio_pcm_msg.c | 392 +++++++++++++++++++++++++ sound/virtio/virtio_pcm_ops.c | 491 +++++++++++++++++++++++++++++++ 17 files changed, 3287 insertions(+), 1 deletion(-)create mode 100644
include/uapi/linux/virtio_snd.hcreate mode 100644sound/virtio/Kconfigcreate mode 100644sound/virtio/Makefilecreate mode 100644sound/virtio/virtio_card.ccreate mode 100644sound/virtio/virtio_card.hcreate mode 100644sound/virtio/virtio_chmap.ccreate mode 100644sound/virtio/virtio_ctl_msg.ccreate mode 100644sound/virtio/virtio_ctl_msg.hcreate mode 100644sound/virtio/virtio_jack.ccreate mode 100644sound/virtio/virtio_pcm.ccreate mode 100644sound/virtio/virtio_pcm.hcreate mode 100644sound/virtio/virtio_pcm_msg.ccreate mode 100644sound/virtio/virtio_pcm_ops.c--
2.30.0
Quoted 12 lines
Quoted 5 lines
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]Signature · 5 lines
Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]