Jump to content

Audio driver for Realtek HD Audio Hardware? [Testing thread]


Recommended Posts

Hello gents!

Very happy to report that after following this thread I have sound working in Win98SE on a HP 6710b laptop with Microsoft UAA (8086 27D4) and Soundmax AD1981HD (11D4 1981) on board.

This laptop also has an Agere HDA modem attached and strangely the hdacfg.ini is registering this device as the codec.. I assume im not playing through the HDA modem codec as it sounds great!

I typed up and rejigged the AD1984 HD HDAICOUT.HDA from DEOMSH's diagram to suit the widgets on the AD1981 but still no sound.

I downloaded the HP manufacturer driver for the AD1981 and checked out the WDM inf to find verbs in there specific to this laptops configuration for the codec!!

In this case I was trying to set mono out as the mixer by setting '00' after the '701' connection select verb. The inf file showed this set as '03' which worked! - 03 is the DAC I assume? as NID03 is the (only) DAC on this codec along with an S/PDIF on NID02.

I found these 3 verbs - Set LineOut, HP and Mono out to the same initial levels (-3 dB)

Whilst Lineout and HP used the '3B0' Amplifier gain/mute verb to set this, Mono out was set by '71F' verb - Config Def byte 4 (31:24) to '41'. - Still learning my bits and bytes so I have no idea what 41 means or how to calculate/find it other than the inf, but it works at full blast!

Going to add some more to the HDAICOUT tomorrow and test with the volume control app. - To note the laptops volume button did not change levels (yet) but the mute button worked.

Thanks very much to Deomsh and all of the testers on here for all of this great info! I will post back with any more updates.

Side note: The laptop has an Intel 965GM video chip and is being driven by a patched version of the SVGA driver (1024x768x256) that was for Win3.1 \m/

Cheers!

Link to comment
Share on other sites


5 hours ago, isolar said:

Config Def byte 4 (31:24) to '41'. - Still learning my bits and bytes so I have no idea what 41 means or how to calculate/find it other than the inf, but it works at full blast!

8 bits = 1 byte (old, not S.I. !).

Verbs use hexadecimal values for addressing and for payload of the commands (values of set/get commands are given by Intel's High Definition Audio Specification ) 

In a verb "41" means: 4 * 16^1 + 1 = 65.

But datasheets use bit-values.

4 lower bits [27-24] calculated as such: 0001 = 0 * 2^3 + 0 * 2^2 + 0 * 2^1 + 1 * 2^0 = 1

4 higher bits [31-28] calculated as such: 0100 = 0 * 2^3 + 1 * 2^2 + 0 * 2^1 + 0 * 2^0 = 4

Lower and higher bits together gives "41" in hex. The reverse is also easygoing, but not needed if the datasheet is available.

4 bits: highest number = 15 = F in hex, so 8 bits gives hexadecimal numbers from 00 up to FF (0-255 decimal), but counting to fifteen is all what's needed (most at the time). :cheerleader:

Link to comment
Share on other sites

Thanks Deomsh! I went on a journey into binary and hex land and made it out the other side still in 1 piece! 

The reading on the IHDA specification made a lot more sense this time through. I was able to convert the hex offset bytes from the verbs into bits and then divide the bits according to the specs to see the settings. I was then able to decode the Default Configuration Parameters from my datasheet and tweak as necessary for this laptop.

On further investigation regarding the '41' offset = This is indeed disabling the mono output to enable the DAC to send the stream to the analog mixer instead.

I am still testing with the volume controls through hdaconfig. I'm down to 2 possibilities to test - either the amp attached to the analog mixer, or the analog mixer itself. Hoping to have some success today with that!

I am also testing the jack-sense settings.

Further studies: I attempted to run VDMSound for 9x to see if it plays nicely with HDA2.dll (to emulate a soundblaster on A220 I7 D1) and am happy to report it works great! I was able to run quite a few old DOS games in 9x with soundblaster audio (and midi) output through the HDA interface. The games that come with soundcard detectors in the install packages had no issues detecting and setting.

I have 2 questions that i'm hoping you can help advise on:

1 - (I highly doubt, but) Would there be a way through the verb setting to tell the HDA controller to report itself as a soundblaster? The verb 'Subsystem ID' bytes 1 to 4 I am interested in.

2 - When I tested Judas according to your procedure it produced sound in DOS mode simply using the HDATSR. At that point I did not have sound working in 9x so Judas was able to interface directly with the HDA controller and produce sound in DOS by itself. Is there a way to determine how Judas was able to play audio, to be able to determine what Address, IRQ, and DMA it is using, and to be able to use that to get audio functioning in DOS mode for games and applications?

 

Cheers! \m/

Link to comment
Share on other sites

1 hour ago, isolar said:

Thanks Deomsh! I went on a journey into binary and hex land and made it out the other side still in 1 piece! 

Congratulations. When I started with HDA.DLL I had to make my own journey.

1 hour ago, isolar said:

I am still testing with the volume controls through hdaconfig. I'm down to 2 possibilities to test - either the amp attached to the analog mixer, or the analog mixer itself. Hoping to have some success today with that!

Don't understand, you mean your laptop volume buttons?

1 hour ago, isolar said:

Further studies: I attempted to run VDMSound for 9x to see if it plays nicely with HDA2.dll (to emulate a soundblaster on A220 I7 D1) and am happy to report it works great! I was able to run quite a few old DOS games in 9x with soundblaster audio (and midi) output through the HDA interface. The games that come with soundcard detectors in the install packages had no issues detecting and setting.

Great! Once I tried VDMSound with HDA.DLL to play Prince of Persia in a MS-DOS window. Only sounds where working for me, but not midi. How did you managed the midi part?

1 hour ago, isolar said:

I have 2 questions that i'm hoping you can help advise on:

1 - (I highly doubt, but) Would there be a way through the verb setting to tell the HDA controller to report itself as a soundblaster? The verb 'Subsystem ID' bytes 1 to 4 I am interested in.

2 - When I tested Judas according to your procedure it produced sound in DOS mode simply using the HDATSR. At that point I did not have sound working in 9x so Judas was able to interface directly with the HDA controller and produce sound in DOS by itself. Is there a way to determine how Judas was able to play audio, to be able to determine what Address, IRQ, and DMA it is using, and to be able to use that to get audio functioning in DOS mode for games and applications?

1. I don't think the controller is involved, must be somewhere in the source code of HDA2.DLL. It's included, so you can take a look.  Although I possess Delphi 2, I never came further than compiling HDA2.DLL :ph34r:

2. Can't help you with Judas. I vaguely remember posts on Dos forums with the same wish (Vogons?), but it seemed to be impossible unless Judas is rewritten to a driver (or TSR?). But I'm afraid such a journey will take many years. 

Edited by deomsh
Typo
Link to comment
Share on other sites

21 hours ago, deomsh said:

Congratulations. When I started with HDA.DLL I had to make my own journey.

This is why you are now the HDA sensei!

21 hours ago, deomsh said:

Don't understand, you mean your laptop volume buttons?

Ah sorry I meant to control the volume using Waveout.exe - Which widget to set in hdaconfig.ini. Still to test but it should be either $11 (The amplifier between DAC and Analog mixer), or the analog mixer itself $0E according to the 1981HD datasheet. The physical volume buttons on the laptop DID work with Judas but only the mute button works in 9x. I'll have to have a look at the laptop datasheet to see how the volume button is wired to the speakers to see what controls it.

Just for clarity in HDAConfig.ini - 

Sleeping Widget = The DAC?

Volume Widget = The Amp connected to DAC OR the Analog mixer?

Output Widget = The Amp connected to DAC OR the Analog mixer?

21 hours ago, deomsh said:

Great! Once I tried VDMSound with HDA.DLL to play Prince of Persia in a MS-DOS window. Only sounds where working for me, but not midi. How did you managed the midi part?

There's a version of VDMS called 'Alpha3' and it seems to handle midi - to the point where the games are detecting the port at 0x330 and allowing me to select soundblaster pro, and then playing it. As for whether these are true midi sounds or how good the emulation is I can't say (I'll leave that to the midi critics) but certainly playing with no stutters.

There's another item on my 'to test' list which is MUNT for 9x which seems to have had some success over at Vogons - Can handle Roland MT-32 in a 9x dos window apparently?

Link to comment
Share on other sites

15 hours ago, isolar said:

Just for clarity in HDAConfig.ini - 

Sleeping Widget = The DAC?

Volume Widget = The Amp connected to DAC OR the Analog mixer?

Output Widget = The Amp connected to DAC OR the Analog mixer?

Sleeping widget is ONE widget that will be powered up if set in HDACFG.INI. Normally the DAC. So according to the datasheet I found: widget $03.

Volume widget is the widget with Master OUTPUT volume. Can be the DAC, a mixer or a PIN-widget. The AD1981HD has no Master volume on the DAC, nor on Mixer 0E, as far I can judge. Each PIN-complex seems to have its own Master volume (named 'GAM' in the Functional Block Diagram and named 'LO' in Table 17).

So there ar four possibilities:

1) Mono-out = widget $07 

2) HP-out = widget $06 

3) Line-out = widget $05 

4) Rear-mic = widget $18 (if set to Output). 

Output widget is always a DAC (ment is output from digital HD-audio link to a DAC). So in your case widget $03.

Further: Mixer 0E doesn't seem neccesary to me, unless you want to mix analog inputs to your analog output (Line-in, Mic or CD).

15 hours ago, isolar said:

There's a version of VDMS called 'Alpha3' and it seems to handle midi - to the point where the games are detecting the port at 0x330 and allowing me to select soundblaster pro, and then playing it. As for whether these are true midi sounds or how good the emulation is I can't say (I'll leave that to the midi critics) but certainly playing with no stutters.

All right, I've tried that version in the past. Maybe you can be so kind to upload your VDMSound config-file? Will be of interest for me. :yes:

Link to comment
Share on other sites

Awesome thanks for clarifying the settings from HDAConfig.ini, that makes more sense now. I will try the outputs you recommend.

41 minutes ago, deomsh said:

Further: Mixer 0E doesn't seem neccesary to me, unless you want to mix analog inputs to your analog output (Line-in, Mic or CD).

Correct it can all seemingly be routed directly from the DAC to Mono Out ($07). I have had no success with that so far as it seems that one of the outputs may be hardwired to the speakers, being its running in a laptop with no actual line-out port. Just a headphone jack and a mic-in jack for ports which i'm testing too.

As it passes through selector widget ($0B) there is an option listed in the notes of the datasheet to redirect the stream to the analog mixer ($0E) - which I have set in HDAICOUT, although the diagram does not show this path, there is just a greyed out arrow coming out of selector widget ($0B) and into sum widget ($0F) which I assume indicates this. I notice the path from DAC splits down to the Analog Mixer ($0E) but passes through amp ($11) and then a mute before hitting the sum widget. At the moment I have Mono Out ($07) set to 'not connected' so might be possible that ($11) - Amp going into Analog Mixer ($0E) is a candidate for Waveout.exe... unless the greyed out arrow on the datasheet is indicating to use ($0F) as the volume control. Lots to try!! 

1 hour ago, deomsh said:

All right, I've tried that version in the past. Maybe you can be so kind to upload your VDMSound config-file? Will be of interest for me. :yes:

Sure thing! Attached here \m/

VDMS.INI

Link to comment
Share on other sites

  • 1 month later...

Can anyone help with getting this setup on my system please. I put hda2.dll,hdarun.exe,hdatsr.exe,genhda16.inf into a folder and then on reboot when pci card came up i installed the driver. But now after a reboot my machine crashes when it reaches desktop and eventually reboots. Thankyou

 

There are correct files for my system here but i'm not sure what to do with then the guide on the first page isn't really clear as ive never used a version of windows this old lel.

 

Edited by kannalo
Link to comment
Share on other sites

@kannalo First of all: what are the specs of your machine?

Which type of motherboard (or laptop), which HDA-codec? Please give as much details as you can find.

And what message gave Windows during the crash?

Edited by deomsh
Addition
Link to comment
Share on other sites

1 hour ago, deomsh said:

@kannalo First of all: what are the specs of your machine?

Which type of motherboard (or laptop), which HDA-codec? Please give as much details as you can find.

And what message gave Windows during the crash?

Its a thinkpad x61, I was using the files from this archive http://turkeys4me.byethost4.com/files/HDADRV9J.7z

I made a directory C:/drivers/HDAudio/ and put all the files from the archive in there and then copied hte 4 specified files to HDAFILES in that directory. and then installed it, the codec i was using was the one from the message i linked before which that user got working on his x61. I probably installed it wrong, I managed to fix the crashing by booting the install disc editing the system.ini and commenting out one of the new lines which was loading hda2.dll i think.

I wasn't getting any error messages from windows the screen would just freeze and then after like 20 seconds my machine would reboot.

I have wiped the drive now since I got bored and wanted to see if me would install on here. I will try again tomorrow. How should the files be placed if I want the driver in c:/drivers/HDAudio ?

Thankyou

Link to comment
Share on other sites

@kannalo I hope you don't have Windows ME, is more complicated because HDATSR.EXE can't be used.

If: in SYSTEM.INI [drivers] wavehda=hda2.dll is written (file must be in C:\WINDOWS\SYSTEM); in AUTOEXEC.BAT the line HDATSR.EXE is present (and file in C:\WINDOWS), than the installation succeeded.

Link to comment
Share on other sites

8 minutes ago, deomsh said:

@kannalo I hope you don't have Windows ME, is more complicated because HDATSR.EXE can't be used.

If: in SYSTEM.INI [drivers] wavehda=hda2.dll is written (file must be in C:\WINDOWS\SYSTEM); in AUTOEXEC.BAT the line HDATSR.EXE is present (and file in C:\WINDOWS), than the installation succeeded.

yeah the wavehda=hda2.dll is what I commented out to get my system to to stop crashing, where is the hdacfg file supposed to go? 

Link to comment
Share on other sites

HDAcfg.ini and HDAICOUT.HDA go in C:\WINDOWS, but to isolate whatever was causing your system to crash, maybe you should just work without them for now. The HDA driver will create its own HDAcfg.ini file when you first boot with it.

You should also make a [vcache] section in SYSTEM.INI and set MinFileCache=4096 and MaxFileCache=4096 there if you haven't already done that. You can definitely get crashes without those settings.

Once you confirm that your system is stable (though you still won't have sound), then add the X61-specific HDAcfg.ini and HDAICOUT.HDA files to C:\WINDOWS and boot again.

Here's the current HDAcfg.ini and HDAICOUT.HDA I use on my X61, which are updated slightly from the ones I posted before (PC speaker beep is now working).

HDACFG.INI HDAICOUT.HDA

Edited by sweaterfish
Link to comment
Share on other sites

4 hours ago, sweaterfish said:

HDAcfg.ini and HDAICOUT.HDA go in C:\WINDOWS, but to isolate whatever was causing your system to crash, maybe you should just work without them for now. The HDA driver will create its own HDAcfg.ini file when you first boot with it.

You should also make a [vcache] section in SYSTEM.INI and set MinFileCache=4096 and MaxFileCache=4096 there if you haven't already done that. You can definitely get crashes without those settings.

Once you confirm that your system is stable (though you still won't have sound), then add the X61-specific HDAcfg.ini and HDAICOUT.HDA files to C:\WINDOWS and boot again.

Here's the current HDAcfg.ini and HDAICOUT.HDA I use on my X61, which are updated slightly from the ones I posted before (PC speaker beep is now working).

HDACFG.INI 767 B · 0 downloads HDAICOUT.HDA 5.35 kB · 0 downloads

Okay so after installing again I am getting the same crashes, one of the times before it crashed i got a popup saying:

Error Runtime error 202 at 0003:01BE.

After crashing the machine just reboots, I booted with my me boot disk and commented out the wavehda=hda2.dll line again.

I can now boot, if I go into device manager I can see High Definition Audio Controller and it says it is working properly

 

To install the drivers I made C:/Drivers/HDAudio

In that directory was the genhda16.inf. I then made a subdirectory HDAFILES, in this directory was:

hda2.dll

hdarun.exe

hdatsr.exe

genhda16.inf

I then opened device manager, went to pci card > properties > update driver > advanced and then pointed it to C:/Drivers/HDAudio

It then asked for the location of hda2.dll so I pointed it to the C:/Drivers/HDAudio/HDAFILES directory

I then added the system.ini tweaks and rebooted

 

Thankyou

Edited by kannalo
Link to comment
Share on other sites

I can't say I've got any good ideas why you're seeing this crashing.

You should probably be installing the HDA driver into as bare a 98SE environment as possible, with nothing else in AUTOEXEC.BAT other than the HDATSR.EXE, no startup programs in Windows, no special drivers to get other hardware working, etc. Later you shoul dbe able to add that stuff, but again for troubleshooting, it's best to keep everything simple.

Also, what method are you using to manage your memory in this Windows installation? What's your config.sys file look like?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...