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

GSoC '24: Final Report #4

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

GSoC '24: Final Report #4

wants to merge 28 commits into from

Conversation

diegoroux
Copy link
Owner

@diegoroux diegoroux commented Aug 23, 2024

This pull request, only serves as an archive to display the work done for the 2024 GSoC working with Haiku, under the project Audio VirtIO: Improving Haiku's virtualization as a guest OS.

To know more about this refer to my last blog post.

  • Commits 1a43f2e to 3a8f728 deal with VirtIO and hmulti_audio setups and requirements.
  • Commits 9cfb9ef to 73fd723 deal with fixes and improvements.

More specifically:

All commits will be squashed and a patch will be sent to Gerrit, asap.

diegoroux added 28 commits June 12, 2024 19:33
Fixed coding style to meet Haiku coding requirements for static
functions.

We're now able to probe for more information about the jacks, streams
and channel maps. For now, we'll focus on PCM streams.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Added LUT for converting between VirtIO channel maps
and Haiku's MultiAudio ones.

Actual mapping and functionality is WIP.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
All available PCM streams are added to internal structures.

We also now acknowledge the HDA nid.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Chmap are now paired by nid, there's still some work to do.
It's probably missing some final maps.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
After querying about the Channel Maps we now pair them with their
corresponding (by HDA nid) stream. Because of this, we now
do return a valid? channel map info to multi_audio.

There's work to do.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
- GET_ENABLED_CHANNELS is now ready to be replied to.
- No more hardcoding, only one input and one output stream
  are returned, but we now search for them; instead of
  relying that the device always gives them on the same
  order.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
- GET_ENABLED_CHANNELS, SET_ENABLED_CHANNELS, GET_GLOBAL_FORMAT,
  SET_GLOBAL_FORMAT are now supported.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
We now follow all the steps required to init the device.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
When MultiAudio sets the format for the input/output stream,
we send a configuration request to the device.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Buffer and period sizes are now calculated dynamically, according
to format size, channels and number frames.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Our driver now responds to the get_buffers ioctl call.
and is able to instruct the device to prepare for the
stream.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
All buffers sent to multi_audio started at the same
point, due to the pointer to moving along.

The driver is now able to prepare, start, stop
and release all the device's streams.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Control requests did not consider the reply buffer,
resulting in the queue always appearing to be full.

Fix several swapped I/O streams, where outputs and
inputs were mixed.

Fixed missing semaphores for the controlQueue.

If no chmaps are given for a stream, we now
default to a L/R channel mapping.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
BUFFER_EXCHANGE is handled correctly, we are now
able to correctly send our buffers to the device.

Work is still to be made.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
The buffer_exchange is still being worked on,
in the mean time, I thought I could just push the
style changes.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
We where directly modifying user-space memory, while
SMAP/SMEP protections were enabled. We now use some generic
directives to handle user-space memory correctly.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
This should fix #1, we also encountered another SMAP
violation in buffer_exchange, although the memory
fails IS_USER_ADDRESS, it causes a SMAP violation
and marks it as user-mapped.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Fixes #3, implements #2 and #1.

Implements suggestions from korli in mentioned issues.

Recording functionality was added, there's still
work to do, performace is not where it should be.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
We now wait inside of buffer_exchange for the next.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
global channel index was being used to access stream's
internal channel.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
real_time should be a bigtime_t variable.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
recording was unable to return, because we never
created the rx semaphore.

Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Disabiling recording and playback just for some
high bitrates. Mid-low bitrates will still work
and be able to do playback. Will fix soon.

Change-Id: I4ec291dd7eff3a70f0fa6cfa6a34d89055c3a568
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
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.

2 participants