Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for virtIO sound #37

Merged
merged 50 commits into from
May 9, 2024
Merged

Support for virtIO sound #37

merged 50 commits into from
May 9, 2024

Conversation

alexandermbrown
Copy link
Contributor

@alexandermbrown alexandermbrown commented Jan 17, 2024

This PR adds a virtIO sound device, along with an example Linux userlevel sound driver.

Copy link
Collaborator

@Ivan-Velickovic Ivan-Velickovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have written some minor things down to change but the major thing seems to be that this will need to rebase once Eric's block PR is merged. It's a bit hard to review with all of his changes in this PR as well (my fault, should've been quicker about merging things).

The SOUND.md documentation is good, but we will need to put the relevant bits in the right place. Some of it belongs in the README for the virtio example, some of it belongs in the manual.

I see that the virtio-snd example still exists and is not merged with the virtio example? Are you waiting for Eric's PR to go through first?

I think we discussed offline about how legally we can't include some of the example sound files due to copyright? We should fix that as well.

The design and implementation of the user-level side and virtIO device we can discuss together offline since it's easier.

tools/linux/snd/asound_qemu_arm_virt.conf Outdated Show resolved Hide resolved
tools/linux/uio_drivers/snd/queue.c Outdated Show resolved Hide resolved
examples/virtio-snd/.clang-format Outdated Show resolved Hide resolved
examples/virtio-snd/snd_driver_vmm.c Outdated Show resolved Hide resolved
.gitmodules Outdated Show resolved Hide resolved
@Ivan-Velickovic Ivan-Velickovic marked this pull request as ready for review May 6, 2024 07:49
@alexandermbrown alexandermbrown linked an issue May 7, 2024 that may be closed by this pull request
@erichchan999 erichchan999 mentioned this pull request May 8, 2024
11 tasks
docs/SOUND.md Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/util/buffer.h Outdated Show resolved Hide resolved
src/virtio/virtio.h Outdated Show resolved Hide resolved
src/virtio/sound.c Outdated Show resolved Hide resolved
@Ivan-Velickovic
Copy link
Collaborator

Make a GitHub issue for any future work, I will start commenting what I think should go into the issue as future work.

Also, if possible any @alexbr should also go in there and be removed from the code.

examples/virtio-snd/sddf Outdated Show resolved Hide resolved
examples/virtio-snd/snd_driver_vmm.c Show resolved Hide resolved
@Ivan-Velickovic
Copy link
Collaborator

Can you check examples/virtio-snd/README.md which I've re-done and tell me if it makes sense.

@Ivan-Velickovic
Copy link
Collaborator

Minor point, all good if not possible though, do you have SVGs for the diagrams instead of PNGs?

@alexandermbrown
Copy link
Contributor Author

Can you check examples/virtio-snd/README.md which I've re-done and tell me if it makes sense.

Looks good

@alexandermbrown
Copy link
Contributor Author

Minor point, all good if not possible though, do you have SVGs for the diagrams instead of PNGs?

Done in 01068d6

@alexandermbrown
Copy link
Contributor Author

Make a GitHub issue for any future work, I will start commenting what I think should go into the issue as future work.

Done #63

Also, if possible any @alexbr should also go in there and be removed from the code.

Done ba288af

Not necessary for this example

Signed-off-by: Ivan Velickovic <[email protected]>
#pragma once

// Qemu faults if you try load or store with a strict memorder on aarch64.
#ifdef BOARD_qemu_arm_virt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making a note here so I don't forget that we should return to do this. I'll chuck it in a GitHub issue soon.

@@ -240,7 +249,7 @@ int virtio_console_handle_rx(struct virtio_device *dev)
rx_queue->last_idx++;

// 3. Inject IRQ to guest
// @ivanv: is setting interrupt status necesary?
// @ivanv: is setting interrupt status necessary?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

Copy link
Collaborator

@Ivan-Velickovic Ivan-Velickovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work!

@Ivan-Velickovic Ivan-Velickovic merged commit 16b1c3d into main May 9, 2024
5 checks passed
@Ivan-Velickovic Ivan-Velickovic deleted the virtio_snd branch May 9, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving virtIO <-> sDDF interface
2 participants