qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: VirtioSound device emulation implementation


From: Shreyansh Chouhan
Subject: Re: Fwd: VirtioSound device emulation implementation
Date: Tue, 19 Jan 2021 00:23:34 +0530

I will make it an in-QEMU pci device. After it is done and the device is working, I can
write a vhost-user daemon and move the device out of QEMU should it be needed.
This way I'd already have the virtio-pci device tested out by the time I get to the vhost-user
daemon. Also I'll be a lot more familiar to sound and virtio devices by then hopefully. I hope
this is fine?

As for the implementation plan, I will start out by writing the structure for the device, `VirtIOSnd`
or `VirtIOSound`. Since QEMU already has a base `VirtIODevice` with common implementation
along with the `VirtQueue`s, this shouldn't be very difficult. Following this I will start implementing
the methods mentioned in the `VirtIODeviceClass`. This would include creating a separate
`virtio-sound-pci.c` file with the `realize`, `unrealize` and various init functions.

After that, I will start writing the `get`, `set` and validate functions mentioned in the `VirtioDeviceClass`.
QEMU already has an implementation for `start_ioeventfd` and `stop_ioeventfd`.
This should get us done with the configuration plane. I am thinking of writing
a few tests at this point. I will have to read about the qtest framework first though.
This should take at most around a month. I am hoping to get it done earlier than that
time (~3 weeks) if things go well. From this most of the time goes to tests. I am taking
a bit of a margin to err on the side of caution.

This now brings us to the dataplane and processing of the data. I think once the data plane
is successfully implemented, processing shouldn't take a lot of time. Once the control
queue, event queue, tx queue and rx queues are implemented, I can start implementing
the Jack and PCM control requests. I can write tests after completing each of these
phases. As of right now, I am not awake enough to give
a clear plan on the data plane implementation. I will clear the plan out tomorrow. The
dataplane along with the processing should at most take a little over a month to implement I'd
guess.

I will make sure I write a follow up mail tomorrow with a clearer and complete plan. Apologies for
any statements that weren't very clear or mistakes in the language that I used.

- Shreyansh Chouhan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]