Jump to content

[VMware] Ensoniq AudioPCI driver for Leopard v1.0.1


  • Please log in to reply
64 replies to this topic

#1
Zenith432

Zenith432

    InsanelyMac Sage

  • Developers
  • 460 posts
  • Gender:Male
I've reconstructed sources for Maxxuss' legendary ES137x audio driver. It can be used for sound support when running OS X Leopard as a VMware guest.

I had 2 goals in reconstructing the driver
  • Fix the choppy sound I was getting with Maxxuss' driver and an old build of AppleAC97Audio.
  • Make sources available for this driver so it can be rebuilt for future OS X updates.

Three packages are attached below
  • AppleAC97Audio.kext.tar.gz contains a full current rebuild of AppleAC97Audio. The new ES137x driver is called EnsoniqAudioPCI.kext and can be found under Plugins. If you want to try this driver with your existing build of AppleAC97Audio, you can pluck it from there and install it as a plugin.
  • AppleAC97Audio-5.tar.gz contains updated sources for building AppleAC97Audio including an xCode 3.1 project file.
  • EnsoniqAudioPCI_Src.tar.gz contains the sources for the ES137x driver.

As for the choppy sound issue - The newly rebuilt driver (including AppleAC97Audio) is giving me much smoother sound than the driver I had installed. I can't quite figure out why, since in theory the driver is functionally the same. Apple's audio architecture is designed on having the low-level driver implement a DMA ring buffer and deliver interrupt notifications whenever the ring buffer wraps around. The high-level audio layers use a complex timing scheme to estimate the drain rate of the buffer and keep it filled in order to provide continuous audio. In a virtual machine, this timing scheme can get derailed due to inaccuracies in the guest's emulated timing and interrupt delivery mechanisms.
If you play audio in the guest, you should keep the VM window as the foreground window in order to give the VM threads highest priority.
The sound is still not quite as good as playing directly on the host, but this may be due in part to HD audio sound effects available in the host driver.

Edit [8/20/2009]: Uploaded version 1.0.1 - see post #8.
Edit [8/20/2009]: I added an installer (EnsoniqAudioPCI.mpkg.tar.gz). There are two installation options - either install the full AppleAC97Audio.kext, or EnsoniqAudioPCI.kext as a plugin to an existing AppleAC97Audio.kext.

Credits:
  • Primarily a reconstruction of MaxxussAC97AudioES137x.kext.
  • Maxxuss' driver is a hybrid of existing Apple AC97 drivers for other chipsets and the es137x driver in the FreeBSD source tree. I took much of the source code from these sources directly instead of decompiling.
  • The FreeBSD driver is based on an older Linux driver.

Edit: (11/8/2009) Attachments removed. See this page for the most recent version.

Previous Download Counts:
  • AppleAC97Audio.kext.tar.gz 194
  • AppleAC97Audio-5.tar.gz 126
  • EnsoniqAudioPCI_Src.tar.gz 80
  • EnsoniqAudioPCI.mkpg.tar.gz 306


#2
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK
Excellent! Would you mind if I include on the boot image used in VMware in this thread http://www.insanelym...howtopic=172474 Also the SVGA driver?

Also sound can be tweaked by adding these settings to the VMX file:

sound.highPriority = "TRUE"
pciSoundDAC1InterruptsPerSec = 0
pciSoundDAC2InterruptsPerSec = 0

#3
Zenith432

Zenith432

    InsanelyMac Sage

  • Developers
  • 460 posts
  • Gender:Male

Excellent! Would you mind if I include on the boot image used in VMware in this thread Also the SVGA driver?

Yes, sure, use any of the drivers I posted anyway you like.

Also sound can be tweaked by adding these settings to the VMX file:

sound.highPriority = "TRUE"
pciSoundDAC1InterruptsPerSec = 0
pciSoundDAC2InterruptsPerSec = 0

Thanks, I'll try and see if they help. The posted driver (as well as Maxxuss' driver) only uses DAC2. AppleAC97Audio doesn't support more than one output engine per AC97 codec too well, and I'm not sure the two DACs can be set up to simulate 4-channel audio.

#4
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

Yes, sure, use any of the drivers I posted anyway you like.

Thanks, I'll try and see if they help. The posted driver (as well as Maxxuss' driver) only uses DAC2. AppleAC97Audio doesn't support more than one output engine per AC97 codec too well, and I'm not sure the two DACs can be set up to simulate 4-channel audio.


Yes there are a fair few settings for hacking the sound. I tried your driver with a QT movie. The following 2 settings seemed to improve the experience:

pciSound.priorityBoost = "TRUE"
pciSound.DAC2InterruptsPerSec = "16"

#5
kodos96

kodos96

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
I'm getting an error when I try to download these: "Sorry, some required files are missing, if you intended to view a topic, it's possible that it's been moved or deleted. Please go back and try again."

Are they still available somewhere?

Donk, is this driver already included in your vmware-darwin package, or is that the old maxxus version?

#6
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

I'm getting an error when I try to download these: "Sorry, some required files are missing, if you intended to view a topic, it's possible that it's been moved or deleted. Please go back and try again."

Are they still available somewhere?

Donk, is this driver already included in your vmware-darwin package, or is that the old maxxus version?


Old Maxxuss version. I will include this one in the next update.

#7
kodos96

kodos96

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
I eventually did get this to download, and tried it out last night....

FWIW, I didn't see any improvement over the maxxuss driver. I tried a pretty much infinite variety of values for pciSoundDAC2InterruptsPerSec, but none helped - low values result in intelligible, but extremely stuttery audio - higher values resulted in heavily distored (to the point of uninteligiblity) output.

Are there any other variable I could try tweaking?

Out of curiosity, when you guys say you were able to get acceptable quality sound out of this driver, how are you definining "acceptable"? Are you getting occasional stuttering, just not as frequently as before? Or none at all?

Just wondering whether I'm an outlier.....

#8
Zenith432

Zenith432

    InsanelyMac Sage

  • Developers
  • 460 posts
  • Gender:Male
After much trial & error, I've figured out the reason for the choppy audio, and came up with a solution which appears to work. I've uploaded the new version and attached to the original post.

  • Bumped version number for EnsoniqAudioPCI.kext from 1.0.0 to 1.0.1.
  • Remove the old kext and install this one in its place.
  • Remove any setting of "pciSound.DAC2InterruptsPerSec" from your vmx file.

I've also modified AppleAC97Audio.kext so that it can drive the chip at a 44.1KHz sample rate. Previously it was limited to driving the chip at 48KHz. This isn't critical, since both sample rates appear to work just fine. You can still use EnsoniqAudioPCI.kext with an existing AppleAC97Audio.kext.

#9
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

After much trial & error, I've figured out the reason for the choppy audio, and came up with a solution which appears to work. I've uploaded the new version and attached to the original post.

  • Bumped version number for EnsoniqAudioPCI.kext from 1.0.0 to 1.0.1.
  • Remove the old kext and install this one in its place.
  • Remove any setting of "pciSound.DAC2InterruptsPerSec" from your vmx file.

I've also modified AppleAC97Audio.kext so that it can drive the chip at a 44.1KHz sample rate. Previously it was limited to driving the chip at 48KHz. This isn't critical, since both sample rates appear to work just fine. You can still use EnsoniqAudioPCI.kext with an existing AppleAC97Audio.kext.


Excellent news! Unfortunately won't be able to try until next week.

#10
TheGreatDeceiver

TheGreatDeceiver

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 862 posts
  • Location:Soederhof/Germany

After much trial & error, I've figured out the reason for the choppy audio, and came up with a solution which appears to work. I've uploaded the new version and attached to the original post.

  • Bumped version number for EnsoniqAudioPCI.kext from 1.0.0 to 1.0.1.
  • Remove the old kext and install this one in its place.
  • Remove any setting of "pciSound.DAC2InterruptsPerSec" from your vmx file.

I've also modified AppleAC97Audio.kext so that it can drive the chip at a 44.1KHz sample rate. Previously it was limited to driving the chip at 48KHz. This isn't critical, since both sample rates appear to work just fine. You can still use EnsoniqAudioPCI.kext with an existing AppleAC97Audio.kext.


installed on 10.5.8 and works beautifully. Incredible work Zenith! I did not make any changes to my vmx file and it works right out of the box! Cheers to you!

#11
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

Excellent news! Unfortunately won't be able to try until next week.


Tried it an music and movies work really well. Thanks for the update.

#12
Scorched

Scorched

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts
I used the installer inside a virtual machine using Donk's template, which works great by the way Donk, but I'm still getting minor stuttering and occasional popping. Has anyone else heard popping?

#13
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

I used the installer inside a virtual machine using Donk's template, which works great by the way Donk, but I'm still getting minor stuttering and occasional popping. Has anyone else heard popping?


That's the original Maxxuss driver. Use Zenith's to get better sound.

#14
Scorched

Scorched

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts

That's the original Maxxuss driver. Use Zenith's to get better sound.


I confirmed I'm using Zenith's 1.0.1 Ensoniq driver

Zenith, with your new Ensoniq driver, should I use the following options, or leave them alone?

sound.highPriority = "TRUE"
pciSound.priorityBoost = "TRUE"

#15
Donk

Donk

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 2,021 posts
  • Gender:Male
  • Location:Manchester UK

I confirmed I'm using Zenith's 1.0.1 Ensoniq driver

Zenith, with your new Ensoniq driver, should I use the following options, or leave them alone?

sound.highPriority = "TRUE"
pciSound.priorityBoost = "TRUE"


I took them out and it works fine.

#16
radam

radam

    InsanelyMac Protégé

  • Members
  • Pip
  • 18 posts

I used the installer inside a virtual machine using Donk's template, which works great by the way Donk, but I'm still getting minor stuttering and occasional popping. Has anyone else heard popping?


Yeah i also still get slight stuttering but it is way better than it was. Thanks Zenith!

#17
aronx

aronx

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

Yeah i also still get slight stuttering but it is way better than it was. Thanks Zenith!


Yes, it is 98% perfekt. Is it known what causes the imperfections in quality?

Thanks again for posting your work, and I hope there is an update coming soon ;-)

#18
Zenith432

Zenith432

    InsanelyMac Sage

  • Developers
  • 460 posts
  • Gender:Male

Yes, it is 98% perfekt. Is it known what causes the imperfections in quality?

Yes, it's known, and I can't fix it. Would you like the long answer?

#19
aronx

aronx

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

Yes, it's known, and I can't fix it. Would you like the long answer?


Hi Zenith,

Thanks for the quick reply. Yes, I'd (and maybe others too) like to hear the long answer.

Cheers,
Aron

#20
TheGreatDeceiver

TheGreatDeceiver

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 862 posts
  • Location:Soederhof/Germany

Hi Zenith,

Thanks for the quick reply. Yes, I'd (and maybe others too) like to hear the long answer.

Cheers,
Aron


I think that was a bad idea. Now he won't come back for a few months to write about the details. Maybe better to leave him alone so he can work on a fix ;)

just kidding





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy