Issue with using a compiled ac97 audio driver from the sample code

Discussions about using Windows guests in VirtualBox.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

mpack wrote:
Zero3K10 wrote:I'm not the developer of it.
I'm aware. I'm addressing you and the developer collectively.
Okay.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by scottgus1 »

I may also add one thing that might help in your presenting a bug or issue to a program's developers: Try to have all your ducks in a row first as much as possible. This is not to rag on or insult you, but to help you be able to present a more substantiated case the next time you feel that you have found a bug.

If you look back over this topic you may see some essential points where defining problems with your assertion were discovered.

First, the idea is presented that a compiled driver does not work in a Virtualbox VM. After Mpack queries if the official driver works, you point out it does. Mentioning that the official driver works should have been part of the initial post.

Further discussion reveals that you have not tested either the official driver or the compiled driver on appropriate bare metal.

A 'what-if' is publicly presented suggesting the compiled driver works on VMware, then after discussion has continued, you test and find out it does not work on VMware.

Looking through all these I see that so far there is no evidence that there is anything wrong in Virtualbox, and barring further evidence, the usability of the compiled driver is suspect. Further testing, especially on bare metal, would help counteract or confirm this conclusion. More testing needs to be done before further assertions can be supported.

This appears to be the Bugtracker ticket you posted: https://www.virtualbox.org/ticket/19600. I cross-posted this forum topic so the developers can read the background.
Last edited by scottgus1 on 20. May 2020, 19:58, edited 1 time in total.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

Well, someone else will have to find a computer with an AC97 chip in their motherboard. Or tell me where to buy a AC97 sound card (if its possible to do that).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by scottgus1 »

I see you posted this on theBugtracker ticket:
Zero3K10 wrote:VMWare doesn't have the ability to emulaate an AC97 sound card.
I remind you again, in accord with my post above, to be careful how you present your ideas. People do and will take you at your word.

This:
Zero3K10 wrote:What if it works in VMWare but not in VirtualBox?
...
EDIT: It doesn't work in VMWare.
means "I tried my driver on a VMware VM with an AC97 sound card and it did not work."

It does not mean: "VMware doesn't have an AC97 sound card."

Try to think carefully, "How others will interpret my words?" It will help you in the future.

<off-topic discussion: off>
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

A user of VirtualBox was able to use it in an earlier version. Here's his message:

https://www.freelists.org/post/wdmaudio ... le-code,19
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by mpack »

mpack wrote:Unless you can show that the Windows native AC'97 driver also doesn't work, I can't see anyone taking much interest in this.
Your latest post has not changed my original response.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by scottgus1 »

Just out of curiosity, Zero3K10, do you have a reason why this compiled driver needs to work? Is there some special capability that it has that the official driver does not have?
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

scottgus1 wrote:Just out of curiosity, Zero3K10, do you have a reason why this compiled driver needs to work? Is there some special capability that it has that the official driver does not have?
1. It can be set to output more debug information that can help in fixing any bugs in it and related components.
2. When it works, it can be included with ReactOS so people won't have to manually download and install the driver that is currently available via ReactOS Application Manager.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by scottgus1 »

Sounds like a good goal, to get a built-in driver for ReactOS so no downloads are necessary. Here's what you might expect and how I would proceed:

As mentioned above, the Virtualbox developers will probably not have time to fix anything regarding this driver issue. So it's up to folks like yourself to complete the fix.

Most of the forum posters, like myself, are just other Virtualbox users, so the most of us probably (and I definitely) won't have the expertise to dig into this to fix it for you.

I would start with confirming that the compiled driver works with a physical PC. For development purposes, if I could not get Server 2003, I would get hold of XP, along with a PC that has an AC97 sound card. XP is Server 2003 without the 'server' and with more eye-candy, so it probably would respond the same to the physical AC97 card.

After the compiled driver works on physical hardware, then start debugging Virtualbox's implementation. Also try earlier versions of Virtualbox, to see if the sound card simulation has been changed.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

Or I can see if the guy who got it compiled with ReactOS Build Environment can get this issue fixed with my help (I would provide logs containing the register value debug prints until he can pinpoint the code responsible).
Last edited by mpack on 27. May 2020, 09:58, edited 1 time in total.
Reason: Delete verbatim quote of previous post.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

"if you want to focus efforts with your partner, first fix it on windows. according my findings, the problem is between the circular buffer in stream.cpp, and the chip interface in adapter.cpp" is what one guy in a chat room told me.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

Its now working in a Windows Server 2003 VM thanks to a guy in a chat server. It still doesn't work properly in Windows 7 and ReactOS though. The fixed source code is available at https://github.com/Zero3K/AC97.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

It now works properly in ReactOS. The issue now is that the audio is garbled in 6.0.22 but is not garbled in 4.3.40 when the driver is used under ReactOS. When using it under Windows Server 2003, the audio isn't garbled but hangs in 6.0.22 while in 4.3.40, it is slightly garbled randomly with no hangs. Should I make a bug report regarding it?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by scottgus1 »

You already have made a ticket above. The dev's response:
comment: 6
Changed 3 weeks ago by fbatschu
Status changed from new to closed
Resolution set to invalid
scottgus1 wrote:the Virtualbox developers will probably not have time to fix anything regarding this driver issue. So it's up to folks like yourself to complete the fix.
Zero3K10
Posts: 41
Joined: 18. May 2020, 22:06

Re: Issue with using a compiled ac97 audio driver from the sample code

Post by Zero3K10 »

This is a different issue.
Post Reply