VirtualBox

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#19600 closed defect (invalid)

Issue with using an AC97 driver compiled from sample code

Reported by: Zero3K10 Owned by:
Component: audio Version: VirtualBox 6.0.22
Keywords: audio, ac97, source, driver Cc:
Guest type: Windows Host type: Windows

Description

I am having an issue regarding it. The issue is that its not playing any audio (or instead plays a short static noise) in a Windows Server 2003 VM ran using VirtualBox with the type of sound card being emulated set to AC97. The debug logs are attached. I used WinDbg to make them.

The source code and the driver (which is Windows Server 2003 compatible) can be found in the archives that are also attached located at https://u.teknik.io/LSzJD.zip. There is a forum post at https://community.osr.com/discussion/229163/doubt-in-sample-code-for-wavert-audio-driver-in-ac97-audio-device-in-win-ddk that might help with fixing it. The desired behavior I want is that audio (such as the Windows Starup Jingle) should be playing in a Windows 7/Windows Server 2003 VM when using the driver that I linked to.

To replicate the issue, do the following:

  1. Make a Windows 7 (32-bit) VM using VirtualBox with the audio device set to ICH97.
  2. Run the VM.
  3. Download the attached driver and extract it somewhere while in the VM.
  4. Open Device Manager and update the AC97 sound card with the driver that you extracted somewhere.
  5. Reboot the VM.
  6. Try to play any of the audio files located in C:\Windows\Media.

Attachments (7)

ac97smpl_debug_Win2K3.log (100.2 KB ) - added by Zero3K10 4 years ago.
ac97smpl_debug2_Win2K3.log (69.2 KB ) - added by Zero3K10 4 years ago.
ac97_driver.zip (51.0 KB ) - added by Zero3K10 4 years ago.
AC97 Sample Driver
ac97smpl_freeze_win2k3.log (11.9 KB ) - added by Zero3K10 4 years ago.
ac97smpl_CIV_error_win2k3.log (36.5 KB ) - added by Zero3K10 4 years ago.
ac97_src.zip (115.5 KB ) - added by Zero3K10 4 years ago.
AC97 Sample Driver Source Code
ac97_win2k3_crash.log (6.1 KB ) - added by Zero3K10 4 years ago.

Download all attachments as: .zip

Change History (14)

by Zero3K10, 4 years ago

Attachment: ac97smpl_debug_Win2K3.log added

by Zero3K10, 4 years ago

Attachment: ac97smpl_debug2_Win2K3.log added

by Zero3K10, 4 years ago

Attachment: ac97_driver.zip added

AC97 Sample Driver

by Zero3K10, 4 years ago

Attachment: ac97smpl_freeze_win2k3.log added

by Zero3K10, 4 years ago

comment:1 by Zero3K10, 4 years ago

Another developer has sent me a message via email:

"I see the reactions and responses to your requests over there was pretty similar to my reactions here.

Here are the facts,  The AC97 sample is known to work on AC97 hardware.  If it doesn't work with VirtualBox's fake device, then the fake device doesn't work like the hardware.  The sample is post-Vista, so it expects the new Audio Engine.  WS2003 is pre-Audio Engine.   I diffed the AC97 sample between the 8.1 WDK and the Server 2003 DDK, and the only difference is that the 8.1 version tries for a WaveRT connection before trying WavePCI, whereas WaveRT is not available prior to Vista.

DMA problems are among the hardest to debug.  As suggested, you'll need to add some debug prints ("breadcrumbs") to show you what the register values are.  If the current pointer is truly outside of the circular buffer, then you just need to back up until you find out why."

Maybe someone could add those debug prints to the source and attach it. If someone does, I will test and respond back.

Last edited 4 years ago by Zero3K10 (previous) (diff)

comment:2 by scottgus1, 4 years ago

This issue has been discussed in the forum: https://forums.virtualbox.org/viewtopic.php?f=2&t=98250

It appears that the compiled driver has not been tested yet on a real computer, and the compiled driver apparently does not work in VMware either.

in reply to:  2 comment:3 by Zero3K10, 4 years ago

Replying to scottgus1:

This issue has been discussed in the forum: https://forums.virtualbox.org/viewtopic.php?f=2&t=98250

It appears that the compiled driver has not been tested yet on a real computer, and the compiled driver apparently does not work in VMware either.

VMWare doesn't have the ability to emulate an AC97 sound card.

Last edited 4 years ago by Zero3K10 (previous) (diff)

comment:4 by Zero3K10, 4 years ago

"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.

by Zero3K10, 4 years ago

Attachment: ac97_src.zip added

AC97 Sample Driver Source Code

by Zero3K10, 4 years ago

Attachment: ac97_win2k3_crash.log added

comment:5 by Zero3K10, 4 years ago

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.

comment:6 by Frank Batschulat (Oracle), 4 years ago

Resolution: invalid
Status: newclosed

comment:7 by Zero3K10, 3 years ago

I managed to find someone that got it working under Windows 7, Windows 2003 and ReactOS. Its source code is at https://github.com/TheDeadFish/reactos/tree/ac97_import_new2/drivers/wdm/audio/drivers/ac97.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use