Issue with using a compiled ac97 audio driver from the sample code
Issue with using a compiled ac97 audio driver from the sample code
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. A debug log is attached. I used WinDbg to make it.
The source code and the driver (which is Windows Server 2003 compatible) can be found in the archives that are also attached. 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.
The source code and the driver (which is Windows Server 2003 compatible) can be found in the archives that are also attached. 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
-
- ac97smpl_debug2_Win2K3.log
- (69.18 KiB) Downloaded 16 times
-
- ac97_src.zip
- (120.61 KiB) Downloaded 52 times
-
- ac97_driver.zip
- (51.04 KiB) Downloaded 154 times
-
- Site Moderator
- Posts: 39134
- 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
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.
Re: Issue with using a compiled ac97 audio driver from the sample code
The official AC97 driver does work.
-
- Site Moderator
- Posts: 20945
- 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
If the official driver works but your custom-compiled driver does not, then there's something wrong with the compiled driver. Or there could be a way that Virtualbox interfaces with the official driver that wouldn't work with a custom-compiled driver. Parsing the Virtualbox source code could possibly tell that, and that's way above my pay grade.
It would probably be better to take this question to a driver forum. For some strange reason, I don't know why, we tend to be rather Virtualbox-centric around these parts...
It would probably be better to take this question to a driver forum. For some strange reason, I don't know why, we tend to be rather Virtualbox-centric around these parts...
Re: Issue with using a compiled ac97 audio driver from the sample code
Well, its an issue with using it in VirtualBox. The source code of the emulated ICH AC97 sound card is attached.
- Attachments
-
- DevIchAc97.zip
- (33.07 KiB) Downloaded 73 times
-
- Site Moderator
- Posts: 20945
- 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
So you can use the compiled driver on a bare-metal Windows 2003 PC, with a physical AC97 sound card installed?
Re: Issue with using a compiled ac97 audio driver from the sample code
It should be able to. I just don't have the components mentioned in order to test it.
-
- Site Moderator
- Posts: 20945
- 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
I think we would need to solidify this to:Zero3K10 wrote:It should be able to.
before we call out Virtualbox as the cause of the problem. Let us know when you have made this solidification and we can see what else might be done.Zero3K10 wrote:It does.
Re: Issue with using a compiled ac97 audio driver from the sample code
What if it works in VMWare but not in VirtualBox?
EDIT: It doesn't work in VMWare. It states the following in the debug log:
AC97 Adapter: [StartDevice]
AC97 Adapter: [ValidateResources]
AC97 Adapter: Unknown configuration:
IO count: 1
IRQ count: 1
DMA count: 0
EDIT: It doesn't work in VMWare. It states the following in the debug log:
AC97 Adapter: [StartDevice]
AC97 Adapter: [ValidateResources]
AC97 Adapter: Unknown configuration:
IO count: 1
IRQ count: 1
DMA count: 0
Re: Issue with using a compiled ac97 audio driver from the sample code
I made a bug report on the tracker regarding it.
-
- Site Moderator
- Posts: 20945
- 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
That is illuminating, if it is working in VMware. Could be a difference in how Virtualbox interfaces with the official driver.
There's only a few gurus here (and I am NOT one of them ) that could go through the source code to highlight where the problem is. You could try the developers through the Bugtracker. But if the official driver works, I would not expect much movement on the issue you found, unless you contribute a code change. The devs have reported that they are overfull handling bugs and changes for the paying Oracle customers (prepare for sticker shock if you want to find out how to become a paying customer Oracle Store) so a serious case would have to be made to make a change to be compatible with a out-of-band compiled driver.
Not trying to discourage you, just to prepare you for where effort might have to be best put.
There's only a few gurus here (and I am NOT one of them ) that could go through the source code to highlight where the problem is. You could try the developers through the Bugtracker. But if the official driver works, I would not expect much movement on the issue you found, unless you contribute a code change. The devs have reported that they are overfull handling bugs and changes for the paying Oracle customers (prepare for sticker shock if you want to find out how to become a paying customer Oracle Store) so a serious case would have to be made to make a change to be compatible with a out-of-band compiled driver.
Not trying to discourage you, just to prepare you for where effort might have to be best put.
Re: Issue with using a compiled ac97 audio driver from the sample code
I edited the message. It doesn't work in VMWare. Also, a developer mentioned the following:
"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 edit the driver to include them so I can help find the cause of the issue.
"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 edit the driver to include them so I can help find the cause of the issue.
-
- Site Moderator
- Posts: 39134
- 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
I'm seeing a strange gap in logic in this discussion. The purpose of hardware simulations in VirtualBox is to satisfy the needs of supported guest OS, and more fundamentally to satisfy the needs of VirtualBox paying clients who need those guest OS to work.
The goal has never been to provide perfect simulations of every obscure feature of old bits of hardware, especially hardware from over two decades ago. If you write drivers using that assumption, the drivers will fail. This is not a VirtualBox bug, the bug is in your bad assumptions.
That said, VirtualBox is open source, so if you were to contribute patches to improve the accuracy of some part of the simulation (without introducing other issues) then I'm sure it would be gratefully received.
The goal has never been to provide perfect simulations of every obscure feature of old bits of hardware, especially hardware from over two decades ago. If you write drivers using that assumption, the drivers will fail. This is not a VirtualBox bug, the bug is in your bad assumptions.
That said, VirtualBox is open source, so if you were to contribute patches to improve the accuracy of some part of the simulation (without introducing other issues) then I'm sure it would be gratefully received.
Re: Issue with using a compiled ac97 audio driver from the sample code
I'm not the developer of it.mpack wrote:I'm seeing a strange gap in logic in this discussion. The purpose of hardware simulations in VirtualBox is to satisfy the needs of supported guest OS, and more fundamentally to satisfy the needs of VirtualBox paying clients who need those guest OS to work.
The goal has never been to provide perfect simulations of every feature of obscure bits of hardware, especially hardware from over two decades ago. If you write drivers using that assumption, the drivers will fail. This is not a VirtualBox bug, the bug is in your bad assumptions.
-
- Site Moderator
- Posts: 39134
- 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
I'm aware. I'm addressing you and the developer collectively.Zero3K10 wrote:I'm not the developer of it.