From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: 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,
Anton Yakovlev <Anton.Yakovlev@opensynergy.com>
Subject: Re: [virtio-dev] [PATCH v2] snd: Add virtio sound device specification
Date: Mon, 11 Nov 2019 15:28:17 +0000 [thread overview]
Message-ID: <ea394f357d9daaab8a3f463d7988cf5e3bf5cb2e.camel@linux.intel.com> (raw)
In-Reply-To: <3a024891-4d92-0a6e-0f51-f29a7ae2b9c1@opensynergy.com>
On Wed, 2019-11-06 at 10:28 +0100, Mikhail Golubev wrote:
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/54
>
> Request for a vote.
Sorry, I think there are still too many opens. I would also recommend
that this proposal be sent to ALSA devel list (subscribers only) to get
a more thorough review since it will be difficult to fix once deployed.
Can you also provide more details on the use case testing carried out
here ?
>
> BR,
> Mikhail.
>
> On 11/5/19 4:06 PM, Mikhail Golubev wrote:
> > From: Anton Yakovlev <Anton.Yakovlev@opensynergy.com>
> >
snip
> >
> > +\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.
> > +
> > + /* generic status codes */
> > + VIRTIO_SND_S_OK = 0x8000,
> > + VIRTIO_SND_S_BAD_MSG,
> > + VIRTIO_SND_S_NOT_SUPP,
> > + VIRTIO_SND_S_IO_ERR
> > +};
> > +
> > +struct virtio_snd_ctl_msg {
> > + /* device-read-only data */
> > + le32 request_code;
> > + u8 request_payload[];
> > + /* device-writable data */
> > + le32 response_status;
> > + u8 response_payload[];
> > +};
> > +\end{lstlisting}
> > +
Using request_code for payload size is just asking for trouble.
> >
> > +
> > +\subsubsection{Device Operation: PCM I/O requests}
> > +
> > +All I/O requests are placed into the pcmq virtqueue. Each request
> > is in the
> > +following form:
> > +
> > +\begin{lstlisting}
> > +struct virtio_snd_pcm_xfer {
> > + le32 stream;
> > + u8 data[];
> > + le32 status;
> > + le32 actual_length;
> > +};
Using period/fragment/block size for PCM means we only copy the minimum
data necessary and dont have to pad.
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
next prev parent reply other threads:[~2019-11-11 15:28 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 [this message]
2019-11-14 13:23 ` Anton Yakovlev
2019-11-19 15:14 ` Liam Girdwood
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=ea394f357d9daaab8a3f463d7988cf5e3bf5cb2e.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