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
Cc: tiwai@suse.de, broonie@kernel.org, maz@kernel.org,
james.morse@arm.com, julien.thierry.kdev@gmail.com,
suzuki.poulose@arm.com
Subject: Re: [virtio-dev] [PATCH v2] snd: Add virtio sound device specification
Date: Tue, 19 Nov 2019 15:14:12 +0000 [thread overview]
Message-ID: <cf778ac23a8a059dec4b3ef24c09eaf7714d37bf.camel@linux.intel.com> (raw)
In-Reply-To: <893007b8-a104-6b4b-8221-57c70210869a@opensynergy.com>
On Thu, 2019-11-14 at 14:23 +0100, Anton Yakovlev wrote:
> > > >
> > > > +\subsection{Device Operation}\label{sec:Device Types / Sound
> > > > Device / Device Operation}
> > > > +
> > > > +All control messages are placed into the controlq virtqueue
> > > > and
> > > > use the following
> > > > +layout structure and definitions:
> > > > +
> > > > +\begin{lstlisting}
> > > > +enum {
> > > > + /* PCM control request types */
> > > > + VIRTIO_SND_R_PCM_CHMAP_INFO = 0,
> > > > + VIRTIO_SND_R_PCM_SET_FORMAT,
> > > > + VIRTIO_SND_R_PCM_PREPARE,
> > > > + VIRTIO_SND_R_PCM_START,
> > > > + VIRTIO_SND_R_PCM_STOP,
> > > > + VIRTIO_SND_R_PCM_PAUSE,
> > > > + VIRTIO_SND_R_PCM_UNPAUSE,
> >
> > Where do I tear down the PCM when I'm finished with it ? i.e. to
> > free
> > resources.
>
> Current workflow:
> - a PCM stream is preparing with the set_format/prepare/start
> requests
> - if necessary, resources are freed/released with the stop request
>
> If needed, the stream can be temporary paused (the pause/unpause
> requests).
Temp pause/unpause is fine, since we can keep audio power ON to avoid
audio atifacts and we resume from the same position.
However, there are times when we need to stop audio for longer periods
and restart (where we do want to power down) or when we want to recover
a stream by stopping and then restarting it (without having to resend
all the params and realloc buffers etc).
I would recommend you have something like VIRTIO_SND_R_PCM_FREE to free
all resource and not overload STOP.
Liam
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2019-11-19 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 15:06 [virtio-dev] [PATCH v2] snd: Add virtio sound device specification Mikhail Golubev
2019-11-06 9:28 ` Mikhail Golubev
2019-11-11 15:28 ` Liam Girdwood
2019-11-14 13:23 ` Anton Yakovlev
2019-11-19 15:14 ` Liam Girdwood [this message]
2019-11-12 13:20 ` Jean-Philippe Brucker
2019-11-14 14:45 ` Anton Yakovlev
2019-11-20 11:09 ` Gerd Hoffmann
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=cf778ac23a8a059dec4b3ef24c09eaf7714d37bf.camel@linux.intel.com \
--to=liam.r.girdwood@linux.intel.com \
--cc=anton.yakovlev@opensynergy.com \
--cc=broonie@kernel.org \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=maz@kernel.org \
--cc=mikhail.golubev@opensynergy.com \
--cc=suzuki.poulose@arm.com \
--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