[GSoC 2024] Virtio Sound: Final Report | Haiku Project

During this GSoC period, I focused on developing the virtio sound driver for Haiku, aiming to enhance its performance as a guest OS in virtualized environments. This journey began with some challenges, for example, initially, I missed a small detail in the driver module path, which prevented the driver from loading.


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/diegoroux/2024-08-22_gsoc_2024_final_report
20 Likes

Thanks a lot for your contribution! Hope you can stick around a bit longer to do follow ups here. :100:

2 Likes

Thanks for your contribution to Haiku and for the detailed report that was very interesting to read.

1 Like

Thanks! Beside improving user experience in VM, as a good part of upcoming sound drivers will probably use hmulti_audio, Iā€™d say that your guide itself is priceless.

2 Likes

You create documentation based on your findings, could you explain what is missing in the documentation and unclear points?

Hi, @marcoapc.

While working on this driver, I can truly say to you, that a lot of time went into understanding hmulti_audio.

If you try to search of any documentation of multi_audio, youā€™ll likely come across (although even trying to find this back took me a little while) this mail thread: ā€œ[ā€¦] Iā€™m afraid no spec documentation is available, reading the sources might help. [ā€¦]ā€ and a link to an old newsletter.

The ā€œcompleteā€ documentation for the driver API is included in three files: multi_audio.h, multi_audio.gb, and multi_audio.txt . To get these files, write to trinity [at] be [dot] com

Only multi_audio.h remains, the others are sadly lost to time.

While the newsletter gives a bit of information about BUFFER_EXCHANGE, it only serves at that. Everything else, shall be inferred from previous drivers and multi_audio code.

Some structs, contain members of which I thought to be important and even defining for what other members should be read, are completely ignored. (See flags in BUFFER_EXCHANGE, playback_latency, record_latency, etc.)

While reading multi_audio.h helped a lot, if you only keep that, youā€™d never know that B_MULTI_GET_ENABLED_CHANNELS and B_MULTI_SET_ENABLED_CHANNELS are actually required to be implemented; multi_audio.h only warns about B_MULTI_SET_GLOBAL_FORMAT as required to be implemented.

Many little cases like the above exist.

But I think I went a bit long. I hope I cleared it up!

2 Likes

I do happen to have that file right here. What I do not have anymore, is a working copy of GoBe Productive to open it and convert it to something else.

Hereā€™s the zipped multi_audio.gb. (not sure how long it last onlineā€¦ used the first site that worked for me).

Edit: seems the above auto-deletes after the first download :slight_smile:

Hereā€™s a different one that should last for 6 days at least.

1 Like

Why not use 0x0.st?

It has my IP range blocked for some reason.

https://0x0.st/XtoI.gb.zip/multi-audio.gb.zip

2 Likes

Great job, thank you.

You have clarified a lot, thank you very much for your work and time dedicated.

Ahoy @leavengood ,

Is there a chance you know this trinity from Be Inc. ?

Iā€™m asking because he possibly could provide the third file :ā€“> ``multi_audio.txt`

Only this 1 file is missing from the mentioned 3 files now - if you followed the conversation above.

Thanks in advance
if you can make Diegoā€™s work easier to better understand / able to re-create/complete documentation about ā€˜multi_audioā€™ driver and the driver itself.

Kind regards`

I found multi_audio.txt file, look @diegoroux :

4 Likes

Seriously, what are the chances this would work? They wrote this file 25 years ago. Do you hold on to documentation for things you worked on in a past job a quarter of a century ago? I certainly donā€™t (well, I have not been in this job for 25 years, but even if you asked me about things I did 10 years ago, that all stayed at the company when I left)

Well, fortunately it is not needed anymore.

I understand your reasonig too - I may not composed my sentence well.
I should have write to ask about file availability ā€¦

Mea culpa !..

multi_audio.gb converted to pdf
https://file.io/nxQwynIhjUb2

The transfer you requested has been deleted.

https://drive.google.com/file/d/1erb53cAopbZfLw0fODcl2pCLEbHAD3zR/view?usp=sharing

3 Likes