-
Notifications
You must be signed in to change notification settings - Fork 47
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
Implement VirtIO sound device #53
base: master
Are you sure you want to change the base?
Conversation
4a8a6fc
to
0902227
Compare
Please provide testing procedures once the change is ready. |
0902227
to
ebba2c7
Compare
2b1009d
to
be7ad90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run clang-format
before submitting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consult https://github.com/cntools/cnfa/blob/master/.github/workflows/build-cnfa.yml and mention the build dependency in top-level README.md
.
a67216b
to
1fc471c
Compare
862cb51
to
da29ce5
Compare
862eecf
to
6017721
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
What features or functionalities are missing that prevent aplay from playing wave files? |
For my understanding and observation, two things are missing:
|
c9f93c4
to
7ee8f5c
Compare
8284af3
to
c2bb233
Compare
347e761
to
34f8503
Compare
dc4c861
to
164a0ad
Compare
c28a3c5
to
f0f9978
Compare
8e6b6a1
to
083dc24
Compare
Enable ALSA driver and System V IPC in Linux Kernel. For ALSA, the debug is enabled and will be removed once this commit is ready. Add description of descriptor chaining, yet need refactoring the description as well as code (exists uncertainty of the query struct). Succeed to initialize virtio-snd. Handle requests in control queue, and print the address and length of each virtq element to check the validness of self-implement queue. For macOS, an experimental core audio library check is implemented. Create critical section when receiving frames. Need to investigate whether we should dispatch an event to event queue to notify the completion of receiving frames so that the device can move to pcm_start state.
2830a0f
to
5251ec6
Compare
@@ -799,6 +790,8 @@ static int virtio_snd_tx_desc_handler(virtio_snd_state_t *vsnd, | |||
/* End of critical seciont. */ | |||
pthread_mutex_unlock(&virtio_snd_mutex); | |||
|
|||
sleep(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why sleep(1)
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for debugging usage, and I will remove the sleep(1)
once I find the root cause of infinite loop of receiving frames from driver.
Implement VirtIO sound device supporting these operations (the item with checked box checked means it is implemented right now):
VIRTIO_SND_R_JACK_INFO
VIRTIO_SND_R_PCM_INFO
VIRTIO_SND_R_CHMAP_INFO
VIRTIO_SND_R_PCM_SET_PARAMS
VIRTIO_SND_R_PCM_PREPARE
VIRTIO_SND_R_PCM_RELEASE
VIRTIO_SND_R_PCM_START
VIRTIO_SND_R_PCM_STOP
Test Cases
The test cases are subjected to be altered.
boot up test
test procedures
make check
to runsemu
.dmesg
).expected results
check driver configuration
test procedures
aplay -l
in emulator.expected results
play sound
test procedures
speaker-test
in emulator.expected results
speaker-test
is executing.