Internships/ProjectIdeas/VirtioSound: Difference between revisions

From QEMU
No edit summary
Line 3: Line 3:
'''Summary:''' Implement device emulation for the new virtio-sound device.
'''Summary:''' Implement device emulation for the new virtio-sound device.


A specification for a virtio sound device is being worked on. The specs are pretty close to be finalized and a Linux guest driver should be available soon.
The VIRTIO specification defines a sound device and Linux has a guest driver for it, but QEMU does not emulate the virtio-sound device yet.


Project goal is a virtio sound device implementation for QEMU. The device will use QEMU's audio subsystem to play back and capture audio samples.
The goal is to implement virtio-sound in QEMU with mono and stereo playback and capture. There is unfinished code for virtio-sound playback support that you can use as a starting point. It will be necessary to clean up the code and add capture support.
 
As stretch goals you can implement additional functionality covered by the specification, including support for multi-channel devices (e.g. surround sound playback), channel maps, etc.
 
To familiarize yourself with the project idea (see links below):
1. Review the VIRTIO sound device specification.
2. Review the audio/audio.h QEMU audio subsystem API.
3. Review the unfinished patches.
 
This project will expose you to device emulation, VIRTIO, and you'll learn how audio devices work at the hardware interface level.


'''Links:'''
'''Links:'''
* Device specification: https://www.kraxel.org/virtio/virtio-v1.1-cs01-sound-v7.html#x1-49500014
* Device specification: https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-52900014
* Linux guest driver: https://github.com/OpenSynergy/linux/commits/virtio-snd-draft
* Linux guest driver: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/virtio
* QEMU audio subsystem: https://git.qemu.org/?p=qemu.git;a=tree;f=audio
* QEMU audio subsystem: https://git.qemu.org/?p=qemu.git;a=tree;f=audio
* QEMU audio devices: https://git.qemu.org/?p=qemu.git;a=tree;f=hw/audio
* QEMU audio devices: https://git.qemu.org/?p=qemu.git;a=tree;f=hw/audio
Line 16: Line 25:
* Skill level: intermediate/advanced
* Skill level: intermediate/advanced
* Language: C
* Language: C
* Mentor: Gerd Hoffmann <kraxel@redhat.com>, Anton Yakovlev <anton.yakovlev@opensynergy.com>
* Mentor: Stefan Hajnoczi <stefanha@redhat.com>
* Suggested by: Gerd Hoffmann <kraxel@redhat.com>
* Suggested by: Gerd Hoffmann <kraxel@redhat.com>

Revision as of 15:33, 31 January 2023

VirtioSound

Summary: Implement device emulation for the new virtio-sound device.

The VIRTIO specification defines a sound device and Linux has a guest driver for it, but QEMU does not emulate the virtio-sound device yet.

The goal is to implement virtio-sound in QEMU with mono and stereo playback and capture. There is unfinished code for virtio-sound playback support that you can use as a starting point. It will be necessary to clean up the code and add capture support.

As stretch goals you can implement additional functionality covered by the specification, including support for multi-channel devices (e.g. surround sound playback), channel maps, etc.

To familiarize yourself with the project idea (see links below): 1. Review the VIRTIO sound device specification. 2. Review the audio/audio.h QEMU audio subsystem API. 3. Review the unfinished patches.

This project will expose you to device emulation, VIRTIO, and you'll learn how audio devices work at the hardware interface level.

Links:

Details:

  • Skill level: intermediate/advanced
  • Language: C
  • Mentor: Stefan Hajnoczi <stefanha@redhat.com>
  • Suggested by: Gerd Hoffmann <kraxel@redhat.com>