Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: Anton Yakovlev <anton.yakovlev@opensynergy.com>,
	Mikhail Golubev <Mikhail.Golubev@opensynergy.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>
Cc: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>
Subject: Re: [virtio-dev] [PATCH] snd: Add virtio sound device specification
Date: Tue, 19 Nov 2019 15:49:24 +0000	[thread overview]
Message-ID: <cf8ca463c132c059ed3c1083af1f278d4568f600.camel@linux.intel.com> (raw)
In-Reply-To: <b2e8d449-93d6-3452-097b-9df9aa0785cb@opensynergy.com>

On Wed, 2019-11-13 at 10:05 +0100, Anton Yakovlev wrote:
> > > > > 
> > > > > Since xrun conditions are higher level conceptions, we
> > > > > decided to
> > > > > delegate
> > > > > such issues to guest application itself. It helps to make
> > > > > overall
> > > > > design
> > > > > simpler. And it seems there's not so much we can do if xrun
> > > > > condition
> > > > > is
> > > > > happened on the device side.
> > > > 
> > > > We can inform the guest. The guest userspace can then take any
> > > > remedial
> > > > action if needed.
> > > 
> > > Then, we need the third queue for notifications.
> > 
> > Why, this should go in the queue that's used for stream position ?
> 
> Then, the I/O queue will multiplex already three things: read
> requests, write 
> requests and notifications. The question is how rational is it.

If there is no multiplexing, then we probably need 4 queues per virtual
PCM:

1) Playback data
2) Playback notifications
3) Capture data
4) Capture notifications

additionally, if we include a controls (like volume, mixer etc) we can
also include:

5) control W data
6) control R data

Latency is important for 1 - 4 (where multiplexing may not be
desirable), but 5 & 6 can be easily multiplexed for multiple controls.

> 
> 
> > > 
> > > 
> > > > > 
> > > > > 
> > > > > > 2) Zero copy of audio data and stream positions. Essential
> > > > > > for
> > > > > > any
> > > > > > low
> > > > > > latency audio use cases (if supported by HW, hypervisor, VM
> > > > > > framework).
> > > > > 
> > > > > What do you mean by zero-copy? Shared memory between device
> > > > > and
> > > > > driver sides?
> > > > 
> > > > Yes, but I see this is now a separate thread as it used by
> > > > others
> > > > too.
> > > 
> > > Shared memory based approach was proposed in the very first
> > > version
> > > of the
> > > spec (and we are rooting for this). Then there was discussion and
> > > it
> > > was
> > > postponed for some future virtio device. One of the reason - it's
> > > not
> > > suitable
> > > for arch with non-coherent memory between host and guest.
> > 
> > I'm rooting for this too. I do think we need to be a bit more
> > flexible
> > so we can deal with non coherent architectures via a SW virtio copy
> > and
> > support coherent architectures via zero copy.
> > 
> > We should be good as long as we can leave some configuration
> > space/types in the stream config to allow mapping of operating
> > modes
> > (zero copy, periodic, mmap etc). The device driver should also send
> > it's capabilities during init so that guests will know what use
> > cases
> > and modes are supported.
> 
> Yes, we can use device feature bits for this.

Can we also include some reserved words to ease spec updates ? e.g.
guest is using older version of spec than device driver but we still
want working audio.

Thanks

Liam 


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2019-11-19 15:49 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 14:43 [virtio-dev] [PATCH] snd: Add virtio sound device specification Mikhail Golubev
2019-10-28 16:05 ` Liam Girdwood
2019-10-29  9:42   ` Anton Yakovlev
2019-10-29 10:14     ` Anton Yakovlev
     [not found]       ` <20191029121810.GB5253@sirena.co.uk>
2019-10-29 13:16         ` Anton Yakovlev
     [not found]           ` <20191030121137.GC6693@sirena.co.uk>
2019-11-01 13:37             ` Anton Yakovlev
     [not found]               ` <20191111193903.GE4264@sirena.co.uk>
2019-11-13 12:01                 ` Anton Yakovlev
     [not found]                   ` <20191114212940.GC4664@sirena.co.uk>
2019-11-19  9:26                     ` Anton Yakovlev
2019-11-11 15:20     ` Liam Girdwood
2019-11-12 11:09       ` Jean-Philippe Brucker
2019-11-12 14:20         ` Liam Girdwood
2019-11-12 16:05           ` Jean-Philippe Brucker
2019-11-12 18:02             ` Liam Girdwood
2019-11-12 18:47               ` Matti Moell
2019-11-19 15:23                 ` Liam Girdwood
2019-11-13  9:44               ` Anton Yakovlev
2019-11-19 16:09                 ` Liam Girdwood
2019-11-20 14:24                   ` Anton Yakovlev
2019-11-21  9:04                     ` Gerd Hoffmann
2019-11-21 12:57                       ` Anton Yakovlev
2019-11-22  7:19                         ` Gerd Hoffmann
2019-11-22 13:46                           ` Anton Yakovlev
2019-11-25  9:31                             ` Gerd Hoffmann
2019-12-02 13:06                               ` Anton Yakovlev
2019-12-03  9:00                                 ` Gerd Hoffmann
2019-12-04 11:15                                   ` Anton Yakovlev
2019-12-04 12:52                                     ` Gerd Hoffmann
2019-12-05 12:06                                       ` Anton Yakovlev
2019-12-06  8:31                                         ` Gerd Hoffmann
     [not found]                         ` <20191122123521.GB6849@sirena.org.uk>
2019-11-22 14:06                           ` Anton Yakovlev
     [not found]                             ` <D68AC0D0-851B-4F87-BE0E-F49527B83E24@redhat.com>
2019-11-28 11:42                               ` Gerd Hoffmann
2019-12-02 13:28                               ` Anton Yakovlev
     [not found]                               ` <20191128121920.GB4210@sirena.org.uk>
2019-12-02 13:30                                 ` Anton Yakovlev
     [not found]                                   ` <20191202135519.GF1998@sirena.org.uk>
2019-12-04  8:04                                     ` Anton Yakovlev
2019-11-25 16:50                     ` Liam Girdwood
2019-11-13  7:54           ` Anton Yakovlev
2019-11-12 12:45       ` Anton Yakovlev
2019-11-12 15:16         ` Liam Girdwood
2019-11-13  9:05           ` Anton Yakovlev
2019-11-19 15:49             ` Liam Girdwood [this message]
2019-11-20  9:32               ` Gerd Hoffmann
     [not found]   ` <20191028192952.GI5015@sirena.co.uk>
2019-10-29 10:46     ` Anton Yakovlev

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=cf8ca463c132c059ed3c1083af1f278d4568f600.camel@linux.intel.com \
    --to=liam.r.girdwood@linux.intel.com \
    --cc=Mikhail.Golubev@opensynergy.com \
    --cc=anton.yakovlev@opensynergy.com \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    --cc=virtio-dev@lists.oasis-open.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