Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-16 Thread Stefan Hajnoczi
On Wed, May 15, 2019 at 04:33:23PM +, Anton Yakovlev wrote: > > >> After careful consideration, I think polling mode should make it possible. > >> Like, using dedicated "data" queue per stream in polling mode > >> (multiplexing is not an option, since it reduces queue throughput in > >> pro

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-15 Thread Anton Yakovlev
>> After careful consideration, I think polling mode should make it possible. >> Like, using dedicated "data" queue per stream in polling mode (multiplexing >> is not an option, since it reduces queue throughput in proportion to the >> number of multiplexed streams). How to describe it in spec

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-15 Thread Stefan Hajnoczi
On Wed, May 15, 2019 at 06:30:45AM +, Anton Yakovlev wrote: > >> So, our proposal is to support classic way of communications by default > >> and introduce shared memory based approach as either non-standard > >> extension or part of future VIRTIO device types. And switch to this mode > >> w

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-15 Thread Anton Yakovlev
Hi all, I updated the header file according to the comments and overall flow of the discussion (see attachment). Also I replaced defines with enumerations and 1. Added new PCM request type for assigning particular virtual queue for particular substream. 2. Removed the rewind/forward request typ

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-14 Thread Anton Yakovlev
>> So, our proposal is to support classic way of communications by default and >> introduce shared memory based approach as either non-standard extension or >> part of future VIRTIO device types. And switch to this mode where it's >> possible or make sense. Like, all modern type-2 hypervisors us

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-14 Thread Anton Yakovlev
Each request begins with a 2-byte field that identifies a recipient function followed by a 2-byte field that identifies a function-specific request type. Each response begins with a 4-byte field that contains a status code. The values 0-31 are reserved for

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-14 Thread Stefan Hajnoczi
On Fri, May 10, 2019 at 05:13:26PM +, Anton Yakovlev wrote: > > Shared memory isn't a native concept to VIRTIO. The device and the > > driver don't assume shared memory access in the general case (i.e. > > virtqueue buffers could even be copied and virtio-blk, virtio-net, etc > > would still w

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-13 Thread Gerd Hoffmann
On Fri, May 10, 2019 at 02:15:00PM +, Anton Yakovlev wrote: > Hi Gerd! My name is Anton and I'm the original author of this draft. Thanks > for comments! > > >> Configuration space provides a maximum amount of available virtual queues. > >> The > >> nqueues value MUST be at least one. > >> >

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-12 Thread Matti Moell
Hi Marco, On 11.05.19 22:49, Marco Martinelli - 13Byte srl wrote: > Wow, it seems like you guys from opensinergy beat me on time. Nice job, > congratulations! Thanks a lot, I think out main problem was that we kept it under the covers for so long. > > Your work is way ahead of mine, so much that I

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-11 Thread Marco Martinelli - 13Byte srl
Wow, it seems like you guys from opensinergy beat me on time. Nice job, congratulations! Your work is way ahead of mine, so much that I'm thinking of stepping aside and letting you do the specifications, while experimenting on my code privately just for the fun of it. Just a couple of questio

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Anton Yakovlev
> Shared memory isn't a native concept to VIRTIO. The device and the > driver don't assume shared memory access in the general case (i.e. > virtqueue buffers could even be copied and virtio-blk, virtio-net, etc > would still work!). > > There is currently a spec extension on the mailing list to ad

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Stefan Hajnoczi
On Fri, May 10, 2019 at 02:15:00PM +, Anton Yakovlev wrote: > > Why do you think this is needed? > > When you implement an audio device, you usually start with what we call > "manual mode". It works, but only for simple use cases. There're two major > challenges here. > > 1) An application

RE: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Anton Yakovlev
Hi Gerd! My name is Anton and I'm the original author of this draft. Thanks for comments! >> Configuration space provides a maximum amount of available virtual queues. >> The >> nqueues value MUST be at least one. >> >> ``` >> struct virtio_snd_config >> { >> le32 nqueues; >> }; >> ``` > In

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Gerd Hoffmann
On Fri, May 10, 2019 at 11:45:24AM +0200, Mikhail Golubev wrote: > Hi all! > > Sorry for breaking in the middle of the virtio audio driver and device > development discussion. But we are developing a virtio sound card prototype > for > a while and we would like to share our specification draft an

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Stefan Hajnoczi
On Thu, May 09, 2019 at 02:27:10PM +0200, Gerd Hoffmann wrote: > > For the sake of the specification I think we need to focus on is how to > > transport these streams and how to share a configuration for each one. > > I think we need at least three virt queues. One control queue for > commands (q

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-10 Thread Mikhail Golubev
Hi all! Sorry for breaking in the middle of the virtio audio driver and device development discussion. But we are developing a virtio sound card prototype for a while and we would like to share our specification draft and public header file (attaching 'virtio_snd.h' and 'virtio-snd-spec-draft.md'

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-09 Thread Gerd Hoffmann
Hi, > > If you want allow your guest use all three sound cards, then you > > probably want create three sound cards in the guest too, each with > > different capabilities and linked to one of the host devices. > > I don't really agree here, I don't see why I have to tie a virtual soundcard > 1-

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-09 Thread Marco Martinelli - 13Byte srl
Hi Gerd, thank you for your feedback and sorry for the late reply. Hi, It's possible to enquiry the virtio-audio device about the host capabilities at this time but I'm not sure how to implement this in every audio backend of qemu (alsa, pulse, oss, coreaudio, dsound, ...) It is probably

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-05 Thread Gerd Hoffmann
Hi, > It's possible to enquiry the virtio-audio device about the host capabilities > at this time but I'm not sure how to implement this in every audio backend > of qemu (alsa, pulse, oss, coreaudio, dsound, ...) It is probably a good idea to coordinate this with Kővágó Zoltán (Cc'ed) who has a

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-03 Thread Marco Martinelli - 13Byte srl
Il 03/05/19 18:45, Stefan Hajnoczi ha scritto: On Thu, May 02, 2019 at 01:18:40PM +0200, Marco Martinelli - 13Byte srl wrote: Il 01/05/19 19:05, Stefan Hajnoczi ha scritto: On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl wrote: Il 29/04/19 15:47, Stefan Hajnoczi ha s

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-03 Thread Stefan Hajnoczi
On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl wrote: > Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: > > On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl > > wrote: > > > I'm not sure how this works, is that number already assigned and I should > >

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-03 Thread Marco Martinelli - 13Byte srl
Il 01/05/19 19:05, Stefan Hajnoczi ha scritto: On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl wrote: Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl wrote: I'm not sure how this works, is that numb

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-05-03 Thread Stefan Hajnoczi
On Thu, May 02, 2019 at 01:18:40PM +0200, Marco Martinelli - 13Byte srl wrote: > Il 01/05/19 19:05, Stefan Hajnoczi ha scritto: > > > On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl > > wrote: > > > Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: > > > > On Mon, Apr 29, 201

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-30 Thread Michael S. Tsirkin
On Tue, Apr 30, 2019 at 03:56:19PM +0200, Marco Martinelli - 13Byte srl wrote: > Il 30/04/19 14:55, Michael S. Tsirkin ha scritto: > > > On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl > > wrote: > > > Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: > > > > On Mon, Apr 29,

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-30 Thread Marco Martinelli - 13Byte srl
Il 30/04/19 14:55, Michael S. Tsirkin ha scritto: On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl wrote: Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl wrote: Hi everyone, my name is Marco, from I

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-30 Thread Michael S. Tsirkin
On Mon, Apr 29, 2019 at 07:39:17PM +0200, Marco Martinelli - 13Byte srl wrote: > > Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: > > On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl > > wrote: > > > Hi everyone, > > > > > > my name is Marco, from Italy. I'm a developer th

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-29 Thread Marco Martinelli - 13Byte srl
Il 29/04/19 15:47, Stefan Hajnoczi ha scritto: On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl wrote: Hi everyone, my name is Marco, from Italy. I'm a developer that recently got an interest in improving the current situation of audio in qemu/kvm. I've been working su

Re: [virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-29 Thread Stefan Hajnoczi
On Mon, Apr 29, 2019 at 12:22:41AM +0200, Marco Martinelli - 13Byte srl wrote: > Hi everyone, > > my name is Marco, from Italy. I'm a developer that recently got an interest > in improving the current situation of audio in qemu/kvm. > > I've been working successfully on multiple patches for Screa

[virtio-dev] Request for a new device number for a virtio-audio device.

2019-04-28 Thread Marco Martinelli - 13Byte srl
Hi everyone, my name is Marco, from Italy. I'm a developer that recently got an interest in improving the current situation of audio in qemu/kvm. I've been working successfully on multiple patches for Scream (https://github.com/duncanthrax/scream ), a