[RFC PATCH 25/25] virtio-snd: Replaced AUD_log with tracepoints

2022-02-11 Thread Shreyansh Chouhan
Replaced the use of AUD_log via macros in virtio sound with tracepoints. Signed-off-by: Shreyansh Chouhan --- hw/audio/trace-events | 14 +++ hw/audio/virtio-snd.c | 55 +-- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/hw/audio

[RFC PATCH 24/25] virtio-snd: Add event vq and a handler stub

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 80a34e1207..81a478d039 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -1080,6 +1080,18 @@ static

[RFC PATCH 21/25] virtio-snd: Replaced goto with if else

2022-02-11 Thread Shreyansh Chouhan
Removed goto from the ctrl vq handler and added an if else branch for error handling. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index

[RFC PATCH 17/25] virtio-snd: Add default configs to realize fn

2022-02-11 Thread Shreyansh Chouhan
Added default configurations for streams and jacks in the realize function. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 40 1 file changed, 40 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index b7c4dc691d

[RFC PATCH 19/25] virtio-snd: Add start/stop handler

2022-02-11 Thread Shreyansh Chouhan
Added handlers for VIRTIO_SND_PCM_START and VIRTIO_SND_PCM_STOP. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index b74c9e4a1f

[RFC PATCH 14/25] virtio-snd: Add VIRTIO_SND_R_PCM_INFO handler

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 88 ++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index aec3e86db2..a53a6be168 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 12/25] virtio-snd: Add VIRTIO_SND_R_JACK_INFO handler

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 81 +-- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index a87922f91b..c2af26f3cb 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 18/25] virtio-snd: Add callback for SWVoiceOut

2022-02-11 Thread Shreyansh Chouhan
Added the callback for writing audio using AUD_write. The callback uses two helper functions for reading the buffers from the streams and handling the buffers that were written. initialized the SWVoiceOut using this callback. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 254

[RFC PATCH 23/25] virtio-snd: Add xfer handler

2022-02-11 Thread Shreyansh Chouhan
The handler demultiplexes the buffers recieved in the tx/rx virtqueue. It uses a helper function for adding these buffers, (along with the entire virtqueue element,) to their respective streams. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 71

[RFC PATCH 11/25] virtio-snd: Add control virtqueue handler

2022-02-11 Thread Shreyansh Chouhan
The handler prints the requests that came in the ctrl virtqueue. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 40829fa329..a87922f91b

[RFC PATCH 13/25] virtio-snd: Add stub for VIRTIO_SND_R_JACK_REMAP handler

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index c2af26f3cb..aec3e86db2 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c

[RFC PATCH 22/25] virtio-snd: Add code to device unrealize function

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index cb83db0e89..7dd89c444b 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -1093,8

[RFC PATCH 09/25] virtio-snd: Add code for the realize function

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index afa38adee7..b51f6c7523 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -89,8

[RFC PATCH 10/25] virtio-snd: Add macros for logging

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index b51f6c7523..40829fa329 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -39,6 +39,10 @@ #define

[RFC PATCH 20/25] virtio-snd: Add VIRTIO_SND_R_PCM_RELEASE handler

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 82 ++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 1b3e1f75f4..7b80a92737 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 16/25] virtio-snd: Add VIRTIO_SND_R_PCM_PREPARE handler

2022-02-11 Thread Shreyansh Chouhan
The handler doesn't intialize the SWVoiceOut streams for now. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 203 +- 1 file changed, 202 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c

[RFC PATCH 06/25] virtio-snd: Add PCI wrapper code for VirtIOSound

2022-02-11 Thread Shreyansh Chouhan
Added the virito-snd.c file which contains a wrapper for combining the device with the VirtIOPCIProxy. Signed-off-by: Shreyansh Chouhan --- hw/virtio/meson.build | 1 + hw/virtio/virtio-snd-pci.c | 72 ++ 2 files changed, 73 insertions(+) create mode

[RFC PATCH 08/25] virtio-snd: Add code for get config function

2022-02-11 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index ae438aa7ec..afa38adee7 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -41,6 +41,15 @@ static void

[RFC PATCH 05/25] virtio-snd: Add device implementation structures

2022-02-11 Thread Shreyansh Chouhan
Added jacks, pcm streams and the VirtIOSound structure for actual device implementation. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 66 ++ 1 file changed, 66 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio

[RFC PATCH 15/25] virtio-snd: Add VIRITO_SND_R_PCM_SET_PARAMS handle

2022-02-11 Thread Shreyansh Chouhan
Added handler for the VIRTIO_SND_R_PCM_SET_PARAMS control request. The handler was split up into two functions in so that the code could be reused in the realize function. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 116 +- 1 file changed

[RFC PATCH 03/25] virtio-snd: Add PCM control structures

2022-02-11 Thread Shreyansh Chouhan
Added structures for handle PCM control requests to the heaer file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 123 + 1 file changed, 123 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio-snd.h index

[RFC PATCH 01/25] virtio-snd: Add virtio sound header file

2022-02-11 Thread Shreyansh Chouhan
Added device configuration and common definitions to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 97 ++ 1 file changed, 97 insertions(+) create mode 100644 include/hw/virtio/virtio-snd.h diff --git a/include/hw/virtio

[RFC PATCH 07/25] virtio-snd: Add properties for class init

2022-02-11 Thread Shreyansh Chouhan
Added properties and function stubs for virtio sound device class init. Signed-off-by: Shreyansh Chouhan --- hw/audio/Kconfig | 5 ++ hw/audio/meson.build | 1 + hw/audio/virtio-snd.c | 126 ++ 3 files changed, 132 insertions(+) create mode

[RFC PATCH 04/25] virtio-snd: Add chmap control structures

2022-02-11 Thread Shreyansh Chouhan
Added structures for handling channel map control requests to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 57 ++ 1 file changed, 57 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio

[RFC PATCH 02/25] virtio-snd: Add jack control structures

2022-02-11 Thread Shreyansh Chouhan
Added structures for handling jack control requests to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 40 ++ 1 file changed, 40 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio-snd.h

[RFC PATCH v2 00/25] Virtio Sound card Implementation

2022-02-11 Thread Shreyansh Chouhan
welcome :) Shreyansh Chouhan (25): virtio-snd: Add virtio sound header file virtio-snd: Add jack control structures virtio-snd: Add PCM control structures virtio-snd: Add chmap control structures virtio-snd: Add device implementation structures virtio-snd: Add PCI wrapper code for

Re: Fwd: VirtioSound device emulation implementation

2022-02-08 Thread Shreyansh Chouhan
On Mon, 7 Feb 2022 at 09:36, Shreyansh Chouhan wrote: > > On Thu, 20 Jan 2022 at 16:09, Laurent Vivier wrote: > > > > > > Hi, > > > > I'm trying to test your RFC series but I have a core dump (using alsa-utils > > speaker-test), do you > >

Re: Fwd: VirtioSound device emulation implementation

2022-02-06 Thread Shreyansh Chouhan
On Thu, 20 Jan 2022 at 16:09, Laurent Vivier wrote: > > Le 29/12/2021 à 06:52, Shreyansh Chouhan a écrit : > > Hi, > > > > I am sorry for the absence of activity on this. A couple of people very > > close to me died, and I also > > got busy > > with

Re: Fwd: VirtioSound device emulation implementation

2021-12-28 Thread Shreyansh Chouhan
Hi, I am sorry for the absence of activity on this. A couple of people very close to me died, and I also got busy with the linux kernel mentorship program for a while. It was a weird year. But I am back on this now. I have the basic functionality of the sound card working. I tested it on an ubunt

Re: [RFC PATCH 10/27] virtio-snd: Add code for the realize function

2021-07-21 Thread Shreyansh Chouhan
this. Hope you understand. (I've cc'd the mailing list and Gerd so that they too can know about this.) Thanks, Shreyansh Chouhan > Regards Deepa > > On Thu, 29 Apr 2021, 17:58 Shreyansh Chouhan, < > chouhan.shreyansh2...@gmail.com> wrote: > >> Signed-off-by: Shre

Re: [RFC PATCH 07/27] virtio-snd: Add properties for class init

2021-05-04 Thread Shreyansh Chouhan
On Wed, 5 May 2021 at 02:00, Laurent Vivier wrote: > Hi Shreyansh, > > First of all, thank you for your work, I was expecting a virtio sound > device for some time... > > You're welcome :) > Le 04/05/2021 à 21:35, Shreyansh Chouhan a écrit : > > On Tue, 4 May 202

Re: [RFC PATCH 07/27] virtio-snd: Add properties for class init

2021-05-04 Thread Shreyansh Chouhan
On Tue, 4 May 2021 at 19:02, Laurent Vivier wrote: > There is nothing specific to PCI in that code, why do you prevent the use > of virtio-snd as a MMIO > device? > > I am sorry I do not understand your question completely. If by preventing the use of virtio-snd, you mean why did I add the PCI de

[RFC PATCH 27/27] virtio-snd: Add rx vq and stub handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 2d7b7ce39a..6a1d3e824c 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -997,6 +997,18 @@ static

[RFC PATCH 25/27] virtio-snd: Add tx vq and handler

2021-04-29 Thread Shreyansh Chouhan
The handler demultiplexes the buffers recieved in the tx virtqueue. It uses a helper function for adding these buffers, (along with the entire virtqueue element,) to their respective streams. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 62

[RFC PATCH 23/27] virtio-snd: Replaced goto with if else

2021-04-29 Thread Shreyansh Chouhan
Removed goto from the ctrl vq handler and added an if else branch for error handling. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index

[RFC PATCH 19/27] virtio-snd: Add callback for SWVoiceOut

2021-04-29 Thread Shreyansh Chouhan
Added the callback for writing audio using AUD_write. The callback uses two helper functions for reading the buffers from the streams and handling the buffers that were written. initialized the SWVoiceOut using this callback. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 171

[RFC PATCH 17/27] virtio-snd: Add VIRTIO_SND_R_PCM_PREPARE handler

2021-04-29 Thread Shreyansh Chouhan
The handler doesn't intialize the SWVoiceOut streams for now. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 198 +- 1 file changed, 197 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c

[RFC PATCH 14/27] virtio-snd: Add stub for VIRTIO_SND_R_JACK_REMAP handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index d50234f9a8..527eed6132 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c

[RFC PATCH 12/27] virtio-snd: Add control virtqueue handler

2021-04-29 Thread Shreyansh Chouhan
The handler prints the requests that came in the ctrl virtqueue. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 71 +++ 1 file changed, 71 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index a93674ea72..435870e3ba

[RFC PATCH 24/27] virtio-snd: Add code to device unrealize function

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 5f12375d95..e2e47e9467 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -1006,8 +1006,34

[RFC PATCH 16/27] virtio-snd: Add VIRITO_SND_R_PCM_SET_PARAMS handle

2021-04-29 Thread Shreyansh Chouhan
Added handler for the VIRTIO_SND_R_PCM_SET_PARAMS control request. The handler was split up into two functions in so that the code could be reused in the realize function. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 100 +- 1 file changed

[RFC PATCH 26/27] virtio-snd: Add event vq and a handler stub

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index be9ea05e3f..2d7b7ce39a 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -985,6 +985,18 @@ static

[RFC PATCH 10/27] virtio-snd: Add code for the realize function

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index edaeffd6b7..caad157705 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -97,8

[RFC PATCH 22/27] virtio-snd: Add VIRTIO_SND_R_PCM_RELEASE handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 66 ++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 8be3fb9bf5..56e07a41f8 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 21/27] virtio-snd: Add VIRTIO_SND_R_PCM_STOP handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 65104baba8..8be3fb9bf5 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio

[RFC PATCH 08/27] virtio-snd: Add code for get config function

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index ae438aa7ec..afa38adee7 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -41,6 +41,15 @@ static void

[RFC PATCH 18/27] virtio-snd: Add default configs to realize fn

2021-04-29 Thread Shreyansh Chouhan
Added default configurations for streams and jacks in the realize function. Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 40 1 file changed, 40 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index dba90cc4a7

[RFC PATCH 11/27] virtio-snd: Add macros for logging

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index caad157705..a93674ea72 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -39,6 +39,10 @@ #define

[RFC PATCH 20/27] virtio-snd: Add VIRITO_SND_R_PCM_START handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index e5042caf9c..65104baba8 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c

[RFC PATCH 07/27] virtio-snd: Add properties for class init

2021-04-29 Thread Shreyansh Chouhan
Added properties and function stubs for virtio sound device class init. Signed-off-by: Shreyansh Chouhan --- hw/audio/Kconfig | 5 ++ hw/audio/meson.build | 1 + hw/audio/virtio-snd.c | 126 ++ 3 files changed, 132 insertions(+) create mode

[RFC PATCH 03/27] virtio-snd: Add PCM control structures

2021-04-29 Thread Shreyansh Chouhan
Added structures for handle PCM control requests to the heaer file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 128 + 1 file changed, 128 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio-snd.h index

[RFC PATCH 09/27] virtio-snd: Add code for set config function

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index afa38adee7..edaeffd6b7 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -54,6 +54,14 @@ static void

[RFC PATCH 15/27] virtio-snd: Add VIRTIO_SND_R_PCM_INFO handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 88 ++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 527eed6132..bc99cd58d6 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 06/27] virtio-snd: Add PCI wrapper code for VirtIOSound

2021-04-29 Thread Shreyansh Chouhan
Added the virito-snd.c file which contains a wrapper for combining the device with the VirtIOPCIProxy. Signed-off-by: Shreyansh Chouhan --- hw/virtio/meson.build | 1 + hw/virtio/virtio-snd-pci.c | 72 ++ 2 files changed, 73 insertions(+) create mode

[RFC PATCH 02/27] virtio-snd: Add jack control structures

2021-04-29 Thread Shreyansh Chouhan
Added structures for handling jack control requests to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 40 ++ 1 file changed, 40 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio-snd.h

[RFC PATCH 04/27] virtio-snd: Add chmap control structures

2021-04-29 Thread Shreyansh Chouhan
Added structures for handling channel map control requests to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 64 ++ 1 file changed, 64 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio/virtio

[RFC PATCH 13/27] virtio-snd: Add VIRTIO_SND_R_JACK_INFO handler

2021-04-29 Thread Shreyansh Chouhan
Signed-off-by: Shreyansh Chouhan --- hw/audio/virtio-snd.c | 81 +-- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 435870e3ba..d50234f9a8 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio

[RFC PATCH 05/27] virtio-snd: Add device implementation structures

2021-04-29 Thread Shreyansh Chouhan
Added jacks, pcm streams and the VirtIOSound structure for actual device implementation. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 64 ++ 1 file changed, 64 insertions(+) diff --git a/include/hw/virtio/virtio-snd.h b/include/hw/virtio

[RFC PATCH 01/27] virtio-snd: Add virtio sound header file

2021-04-29 Thread Shreyansh Chouhan
Added device configuration and common definitions to the header file. Signed-off-by: Shreyansh Chouhan --- include/hw/virtio/virtio-snd.h | 97 ++ 1 file changed, 97 insertions(+) create mode 100644 include/hw/virtio/virtio-snd.h diff --git a/include/hw/virtio

[RFC PATCH 00/27] Virtio sound card implementation

2021-04-29 Thread Shreyansh Chouhan
losing the stream. Shreyansh Chouhan (27): virtio-snd: Add virtio sound header file virtio-snd: Add jack control structures virtio-snd: Add PCM control structures virtio-snd: Add chmap control structures virtio-snd: Add device implementation structures virtio-snd: Add PCI wrapper code for V

Re: Fwd: VirtioSound device emulation implementation

2021-04-19 Thread Shreyansh Chouhan
On Mon, 19 Apr 2021 at 18:00, Shreyansh Chouhan < chouhan.shreyansh2...@gmail.com> wrote: > > On Fri, 16 Apr 2021 at 17:02, Gerd Hoffmann wrote: > >> Hi, >> >> > I learned that the callback passed in AUD_open_out, (lets call it the >> write >>

Re: Fwd: VirtioSound device emulation implementation

2021-04-19 Thread Shreyansh Chouhan
On Fri, 16 Apr 2021 at 17:02, Gerd Hoffmann wrote: > Hi, > > > I learned that the callback passed in AUD_open_out, (lets call it the > write > > audio callback,) is supposed to mix and write the > > buffers to HWVoiceOut. I have written that, the basic algorithm being: > > > > 1. Pop element f

Re: Fwd: VirtioSound device emulation implementation

2021-04-04 Thread Shreyansh Chouhan
Hey everyone! I wrote code for PCM streams, which I'd like to discuss here. But since it isn't really complete yet, I thought I'd ask if I can copy paste the functions that I want to ask about and clear things that way. For now I will just write my queries here and try to explain them as best as I

Re: Fwd: VirtioSound device emulation implementation

2021-02-10 Thread Shreyansh Chouhan
On Thu, 28 Jan 2021 at 23:04, Shreyansh Chouhan < chouhan.shreyansh2...@gmail.com> wrote: > I think I will give it a quick look :P > This certainly wasn't quick I admit. > Thanks a lot! > -- > Shreyansh > > Hey! I hope you people are doing fine. :) So colleges r

Re: Fwd: VirtioSound device emulation implementation

2021-01-28 Thread Shreyansh Chouhan
On Thu, 28 Jan 2021 at 22:00, Gerd Hoffmann wrote: > On Thu, Jan 28, 2021 at 09:20:31PM +0530, Shreyansh Chouhan wrote: > > (Gerd, I wasn't able to get gmail to quote your email, so I have just > copy > > pasted the relavant parts.) > > > > > Yes. net_conf

Re: Fwd: VirtioSound device emulation implementation

2021-01-28 Thread Shreyansh Chouhan
(Gerd, I wasn't able to get gmail to quote your email, so I have just copy pasted the relavant parts.) > Yes. net_conf is common config (backend, mac address, maybe more) for > network devices. For sound devices that would audiodev (link the device > to a backend which then handles alsa/pulse/ja

Re: Fwd: VirtioSound device emulation implementation

2021-01-28 Thread Shreyansh Chouhan
On Thu, 28 Jan 2021 at 16:54, Alex Bennée wrote: > > Shreyansh Chouhan writes: > > > Thanks a lot Alex! > > > >> All QEMU devices have two parts, a frontend (which the guest sees) and a > >> backend (which is how the data gets to somewhere in the host). S

Re: Fwd: VirtioSound device emulation implementation

2021-01-27 Thread Shreyansh Chouhan
Thanks a lot Alex! > All QEMU devices have two parts, a frontend (which the guest sees) and a > backend (which is how the data gets to somewhere in the host). Some of > the command line options in QEMU elide the details for convenience (-nic > and -drive are examples). The -netdev device is all ab

Re: Fwd: VirtioSound device emulation implementation

2021-01-24 Thread Shreyansh Chouhan
Just a follow up. Still working on device initialization. I am trying to understand the relation between virtio-net and net device in qemu in hopes of recreating something similar with the audio device. Once I have the device initialization part ready I will send in a couple of patches for review.

Re: Fwd: VirtioSound device emulation implementation

2021-01-20 Thread Shreyansh Chouhan
I wasn't really able to clearly understand how I will use QEMU VIrtqueues exactly. So, I decided that I will start implementing the part that I already understand. I think once I have something implemented I'll have a better chance at understanding this. I am currently writing the boilerplate code

Re: Fwd: VirtioSound device emulation implementation

2021-01-18 Thread Shreyansh Chouhan
th a clearer and complete plan. Apologies for any statements that weren't very clear or mistakes in the language that I used. - Shreyansh Chouhan

Re: Fwd: VirtioSound device emulation implementation

2021-01-17 Thread Shreyansh Chouhan
> > If you want to see an example of a branch new vhost-user daemon being >> built up from scratch see my recent virtio-rpmb series. The first few >> patches of in-QEMU code will be the same boilerplate either way I think: >> >> https://patchew.org/QEMU/20200925125147.26943-1-alex.ben...@linaro.o

Re: Fwd: VirtioSound device emulation implementation

2021-01-15 Thread Shreyansh Chouhan
On Thu, 14 Jan 2021 at 23:17, Alex Bennée wrote: > > Shreyansh Chouhan writes: > > > Just an update: > > > > I've studied the virtio specification along with the source code and I > now > > understand what the device implementation is > > going to

Re: Fwd: VirtioSound device emulation implementation

2021-01-14 Thread Shreyansh Chouhan
Just an update: I've studied the virtio specification along with the source code and I now understand what the device implementation is going to look like. Also I understand the source code a lot better. I am now reading about the qemu vhost-user protocol. Although I haven't read about the vhost-

Fwd: VirtioSound device emulation implementation

2021-01-10 Thread Shreyansh Chouhan
-- Forwarded message - From: Shreyansh Chouhan Date: Mon, 11 Jan 2021 at 11:59 Subject: Re: VirtioSound device emulation implementation To: Gerd Hoffmann On Sun, 10 Jan 2021 at 13:55, Shreyansh Chouhan < chouhan.shreyansh2...@gmail.com> wrote: > Hi, > > I ha

Re: VirtioSound device emulation implementation

2021-01-10 Thread Shreyansh Chouhan
Hi, I have been reading about the virtio and vhost specifications, however I have a few doubts. I tried looking for them but I still do not understand them clearly enough. From what I understand, there are two protocols: The virtio protocol: The one that specifies how we can have common emulation

Re: VirtioSound device emulation implementation

2021-01-07 Thread Shreyansh Chouhan
On Thu, 7 Jan 2021 at 22:49, Alex Bennée wrote: > > Shreyansh Chouhan writes: > > > On Wed, 6 Jan 2021 at 17:12, Alex Bennée wrote: > > > >> > >> Shreyansh Chouhan writes: > >> > >> > Hey everyone! > >> > > >> &g

Re: VirtioSound device emulation implementation

2021-01-07 Thread Shreyansh Chouhan
On Wed, 6 Jan 2021 at 17:12, Alex Bennée wrote: > > Shreyansh Chouhan writes: > > > Hey everyone! > > > > I want to work on implementing the emulation for the VritioSound device. > I > > contacted the mentor for the project, (Greg), who said it's fine

VirtioSound device emulation implementation

2021-01-06 Thread Shreyansh Chouhan
Hey everyone! I want to work on implementing the emulation for the VritioSound device. I contacted the mentor for the project, (Greg), who said it's fine and that I should declare it on the mailing list in order to find out if someone else is already working on this project. That is what this mail