Jump to content

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


Recommended Posts


On 6/7/2023 at 10:08 PM, sifonium said:

- doubling VolumeWidget doesn't work

I tested this too lately, a no-go indeed.

In 'Virtual Box 7' I tried changes on-the-fly in HDAICOUT.HDA, doesn't work either. So AFTER codec initialization it seems HDAICOUT.HDA is not used anymore.

But I noticed something about the volume SET verbs in HDAICOUT.HDA which can be of importance: in the case of VBox' (virtual) HDA-codec my 'new' volume settings with SET verbs '$XYY3B01F;AC_VERB_SET_AMP_GAIN_MUTE;max_vol;R+L' are far too low. Even with max volume on the Host I barely could hear Windows' Startup Sound. So maybe I should make variations with max_vol's 7F, respective 3F and 1F.

BTW with HDA2.DLL version 9L, HDAICOUT.HDA will be less needed IF 'widget types' are correctly identified (I observed 'identifying widgets' in HDALOG.TXT on 'Virtual Box 7', with sending appropriate SET verbs too).

On 6/7/2023 at 10:08 PM, sifonium said:

- KB138857 you suggested seems to be for playing SB sounds on speaker, not the other way around. I was hoping HDAICOUT might make it work, since there is DIGITAL BEEP widget and all, I did some more tries, but nothing. So I'm leaving the pc speaker thing alone for now

The Digital Beep can be used, but must be activated with a special SET verb AND 'guided' to the output of choice. But still a HDA-driver needed, which SPEAK.EXE isn't.

On 6/7/2023 at 10:08 PM, sifonium said:

- and somebody might find this useful - Device Manager / System Properties / Performance / File System / Troubleshooting - checking "Disable synchronous buffer commits" solves stuttering of the audio in DOS mode using the VDMsound. Seems to help the stability overall as well, but it's hard to tell for now.

Interesting, I have red this setting can speed up disks with 10%. But don't forget KB139669: https://web.archive.org/web/20090827171449/http://support.microsoft.com/kb/139669

BTW I am very happy with your 'tip' using 'Yamaha S-YXG100plus soft synth' as midi device together with VDMSound. Works great with 'Prince of Persia 1', on my (VBox 7) system only IF Windows' Startup Sound is NOT disturbed - sadly this is not always the case. But I passed Level 9 already - again, after 20 years. :)

Edited by deomsh
addition
Link to comment
Share on other sites

  • 2 weeks later...

Hello everyone,

A few days ago I came across this thread and first of all I want to thank @deomsh and the author of this driver for finally solving the sound issue on my retro Core2Duo machine from 2007, with Intel 945G + ICH7 chipset and Realtek ALC882 HDA integrated card.

I followed instructions and the installation was very quick and easy, the sound worked immediately after I copied the HDAICOUT.HDA to the Windows folder and perform reset.

The sound works great, without interference, tried system sound, winamp, gom player (mp3, avi) and finally game Warcraft II Battle.net edition, where the sound worked perfectly both in the game and with cd audio.

Here are some of my experiences and a couple of doubts.

First I have to say, that my setup works without HDATSR.exe, so I removed it from the windows folder, as well as the autoexec.bat entry.

Of course in HDAcfg.ini it says "TSR not loaded", but the sound works perfectly, even though I don't have BUSMASTER entries in the cfg file. Somewhere in the thread it says that without TSR loaded we lose some functionality, but I haven't noticed any problems.

During testing, I discovered that MinFileCache=1024 and MaxFileCache=8192 in thesystem.ini [vcache] section suit me best in terms of stability.

I also changed wait1 and wait2 value in HDAcfg.ini, from $100 to $10 and now the windows desktop appears almost without any boot delay. As for the VolumeWidget entry, I left the default $14, although I also tried $02, $0C and $10, but I didn't notice any difference.

Finally, one more question. I was using the latest HDADRV9L version of the driver which has its HDAICOUT.HDA file which is quite different and shorter than the @deomsh version I'm currently using. Both work, but it's not clear to me how they really differ. 

Generally, driver works surprisingly good and I want to thank again @deomsh and everyone who helped with the whole endeavor.

My default HDAcfg.ini is attached (without my personal changes), it might be useful to someone.

HDAcfg.ini

Edited by retrofan011
Link to comment
Share on other sites

Nice :thumbup

16 hours ago, retrofan011 said:

First I have to say, that my setup works without HDATSR.exe, so I removed it from the windows folder, as well as the autoexec.bat entry.

Of course in HDAcfg.ini it says "TSR not loaded", but the sound works perfectly, even though I don't have BUSMASTER entries in the cfg file. Somewhere in the thread it says that without TSR loaded we lose some functionality, but I haven't noticed any problems.

This is possible, but be aware Windows can - without warning :blink: - overwrite memory used by the buffer, to sent digital audio to the HD-audio link. Watler states in the readme you have to use memory 'outside the reach of Windows', so a TSR, or by setting Busmaster values in HDACFG.INI.

But as long it works for you....

If you like you can do a crash-test with a browser like Opera and open 60 tabs or more, in between watching free memory left with System Monitor (if not available System Monitor has to be installed separately with 'Windows Setup' in 'Add/ Remove Programs'.

16 hours ago, retrofan011 said:

During testing, I discovered that MinFileCache=1024 and MaxFileCache=8192 in thesystem.ini [vcache] section suit me best in terms of stability.

Very good. Setting both to 1024 are 'only' experimental fail-safe values. If I remember well a user had to set maxfilecache=8192 to switch keyboard layouts.

Can you tell more how your setting improved stability on your system?

Did you experimented with different values of 'MinTimeSlice' in SYSTEM.INI [386Enh] too?

16 hours ago, retrofan011 said:

I also changed wait1 and wait2 value in HDAcfg.ini, from $100 to $10 and now the windows desktop appears almost without any boot delay.

Congratulations, you are the first user ever reporting such a result in this thread. :rolleyes:

16 hours ago, retrofan011 said:

As for the VolumeWidget entry, I left the default $14, although I also tried $02, $0C and $10, but I didn't notice any difference.

Your volume will be set to max already. The right VolumeWidget is only needed if you want to use WAVEOUT.EXE to set volume. Not needed in case of volume sliders of Players (and Games???) who use DirectSound.

16 hours ago, retrofan011 said:

Finally, one more question. I was using the latest HDADRV9L version of the driver which has its HDAICOUT.HDA file which is quite different and shorter than the @deomsh version I'm currently using. Both work, but it's not clear to me how they really differ.

As far I can judge Watler started with a widget parser in HDA2.DLL 'version L'. With specific GET verbs widgets can be 'asked' which type they are, etc. Codec's return values can be found in HDALOG.TXT. If everything is right, the driver should sent the 'right' SET verbs to respective widgets (if another state than their default state is needed) and also set the 'right' widgets in HDACFG.INI.

With HDAICOUT.HDA about max 200 verbs can be sent to the codec. In my quasi-universal design six important 'standard' SET verbs are sent to ALL widgets 02-1F, so to 30 widgets (some High-End codecs have more widgets!). According to Intel's High Definition Audio Specification widgets 'listen' only to verbs they are programmed for, so most verbs in HDAICOUT.HDA are wasted. :(

Otherwise HDAICOUT.HDA must be tailormade, which is not always easy, as can be seen earlier in this thread. :unsure:

BTW always test first without HDAICOUT.HDA, only use if really needed!

Edited by deomsh
typo
Link to comment
Share on other sites

18 hours ago, deomsh said:

Nice :thumbup

This is possible, but be aware Windows can - without warning :blink: - overwrite memory used by the buffer, to sent digital audio to the HD-audio link. Watler states in the readme you have to use memory 'outside the reach of Windows', so a TSR, or by setting Busmaster values in HDACFG.INI.

But as long it works for you....

If you like you can do a crash-test with a browser like Opera and open 60 tabs or more, in between watching free memory left with System Monitor (if not available System Monitor has to be installed separately with 'Windows Setup' in 'Add/ Remove Programs'.

OK, I tested stability with Opera and after more than 60 tabs open it still had free memory and didn't crash. However, to prevent some future problems, it might be a good idea to insert BUSMASTER entries into the HDAcfg file.
My computer has 2GB of RAM, can you tell me what are the optimal values in that case?

Quote

Can you tell more how your setting improved stability on your system?

Did you experimented with different values of 'MinTimeSlice' in SYSTEM.INI [386Enh] too?

Well, I had a strange problem with windows shutdown, because it didnt complete the process, it remained stuck on the "windows shutdown..." screen and didnt actually turn off the computer, although after the reset, scandisk did not appear. After I increased MaxFileCache value, problem is gone.
I havent experimented with MinTimeSlice settings, what is its purpose and what should I need to change?

Quote

As far I can judge Watler started with a widget parser in HDA2.DLL 'version L'. With specific GET verbs widgets can be 'asked' which type they are, etc. Codec's return values can be found in HDALOG.TXT. If everything is right, the driver should sent the 'right' SET verbs to respective widgets (if another state than their default state is needed) and also set the 'right' widgets in HDACFG.INI.

With HDAICOUT.HDA about max 200 verbs can be sent to the codec. In my quasi-universal design six important 'standard' SET verbs are sent to ALL widgets 02-1F, so to 30 widgets (some High-End codecs have more widgets!). According to Intel's High Definition Audio Specification widgets 'listen' only to verbs they are programmed for, so most verbs in HDAICOUT.HDA are wasted. 

Otherwise HDAICOUT.HDA must be tailormade, which is not always easy, as can be seen earlier in this thread. 

BTW always test first without HDAICOUT.HDA, only use if really needed!

Thanks for the explanation.

I was just wondering, if there was any reason to use that deafult HDAICOUT.HDA, because your universal version serves me just fine and I wouldn't change it unnecessarily. I also tried without HDAICOUT.HDA, but then I have no sound at all, so its a must in my case.

Edited by retrofan011
Link to comment
Share on other sites

On 6/20/2023 at 8:10 PM, retrofan011 said:

OK, I tested stability with Opera and after more than 60 tabs open it still had free memory and didn't crash.

Oops, If you used empty tabs: I ment tabs with 'heavy' websites (as far Opera will load them).

On 6/20/2023 at 8:10 PM, retrofan011 said:

My computer has 2GB of RAM, can you tell me what are the optimal values in that case?

So, you are using Windows ME?

I did the calculations, with following results:

HDACFG.INI Busmaster values in memory, 'out of reach of Windows'

1) Comment out HDATSR.EXE in AUTOEXEC.BAT (if needed)

2) Add to SYSTEM.INI [386Enh]
Case of 1GB: MaxPhysPage=3F000
Case of 2GB: MaxPhysPage=7F000
 (if the entrance already exists with another value: change). 

3) Add to HDACFG.INI

Case of 1GB:

    [BUSMASTER]
    myPCIHI=$3F20
    myPCILO=$0000
    myPCI=$3F200000
    aPCIHI=$3F10
    aPCILO=$0000
    aPCI=$3F100000

Case of 2GB:

    [BUSMASTER]
    myPCIHI=$7F20
    myPCILO=$0000
    myPCI=$7F200000
    aPCIHI=$7F10
    aPCILO=$0000
    aPCI=$7F100000

BTW this will set an 1MB buffer in [BUSMASTER], according to the limitation of Windows' physical memory access in SYSTEM.INI

If someone wants to check my calculations, see the print-screen:

Screenshot_20230621-162831.thumb.png.8d0f2c7409a55051e63035c973d8bdfc.png

I hope this will work, total memory seen in Device Manager should be about 2031MB, please check!

On 6/20/2023 at 8:10 PM, retrofan011 said:

Well, I had a strange problem with windows shutdown, because it didnt complete the process, it remained stuck on the "windows shutdown..." screen and didnt actually turn off the computer, although after the reset, scandisk did not appear. After I increased MaxFileCache value, problem is gone.

Thanks. If I have this issue, I increase number of BUFFERS in CONFIG.SYS, but not possible in 'normal' Windows ME of course.

On 6/20/2023 at 8:10 PM, retrofan011 said:

I havent experimented with MinTimeSlice settings, what is its purpose and what should I need to change?

Only needed is case of severe crashes, it's all in the tread.

On 6/20/2023 at 8:10 PM, retrofan011 said:

I was just wondering, if there was any reason to use that deafult HDAICOUT.HDA, because your universal version serves me just fine and I wouldn't change it unnecessarily. I also tried without HDAICOUT.HDA, but then I have no sound at all, so its a must in my case.

Watler's HDAICOUT.HDA is an example, not a part of the default installation.

So just using HDA2.DLL 'version L' didn't do the job in your case. Good to know.

Edited by deomsh
typo in myPCI=$3F20000 ! must myPCI=$3F200000
Link to comment
Share on other sites

@deomsh

No, I'm actually using Win98SE, which sees all 2GB of Ram.

Only in DOS, I limited the RAM to 64Mb, for better compatibility with older games, with the R.Loew patch.

Maybe there was a misunderstanding, so just to be sure, do I need the BUSMASTER section in HDAcfg for Win98 or is it only necessary for ME ? 

As I said, everything works allready without BUSMASTER entries, but if its a good prevention for some potential problem, can I use these examples you gave on Win 98 too ?

Link to comment
Share on other sites

I understand, you are using R Loew's patch, probably without a MaxPhysPage entry.

In my opinion OR HDATSR.EXE should be used (BUSMASTER values auto-written accordingly), OR write your own busmaster values.

I can not judge if/ how the memory address of the HD Audio Controller is used by HDA2.DLL and how the buffer set in memory is related (address of the HD Audio Controller can be found with Device Manager - would have another name, or unknown).

My examples can be used on Windows 98SE too. I gave some 'room' for MS-DOS drivers, and the buffer will/ should lie below 2GB too (this in case of 2GB physical memory).

So feel free to try, or choose your own way and go without.

Please report your results.

Link to comment
Share on other sites

17 hours ago, deomsh said:

I understand, you are using R Loew's patch, probably without a MaxPhysPage entry.

In my opinion OR HDATSR.EXE should be used (BUSMASTER values auto-written accordingly), OR write your own busmaster values.

I can not judge if/ how the memory address of the HD Audio Controller is used by HDA2.DLL and how the buffer set in memory is related (address of the HD Audio Controller can be found with Device Manager - would have another name, or unknown).

My examples can be used on Windows 98SE too. I gave some 'room' for MS-DOS drivers, and the buffer will/ should lie below 2GB too (this in case of 2GB physical memory).

So feel free to try, or choose your own way and go without.

Please report your results.

I tried the example for 2Gb of Ram and first let me say, that your calculations are absolutely correct, windows reports 2030Mb of Ram in Device Manager.

The system still works stable, I haven't noticed any issue so far.

However, an interesting side effect occurred. As soon as I entered the MaxPhysPage=7F000 entry in the 386Enh section, msconfig automatically set the Ram memory limit to its max 999Mb.

Still, the system reports that I have 2030Mb, as expected. If I uncheck the limit memory option in the msconfig/advanced section, the MaxPhysPage=7F000 entry from the 386Enh section automatically disappears and then Device Manager report 2046Mb of Ram.

It seems to me, that this happens because of the limit that Windows 98 has for Ram memory by default, which was bypassed by the R. Loew patch.

Can I ignore this, as the system is working just fine ?

Btw, I also tried the example for 1Gb, but then I have no sound at all.

Edited by retrofan011
Link to comment
Share on other sites

MSCONFIG has it's own 'ideas', I only use this tool in special cases.

I normally use SYSEDIT, I believe already there in Windows 3x.

That my 1GB settings are not working is strange. Please be so kind to test again, with SYSEDIT to set MaxPhysPage.

I made a typo in this case:

myPCI=$3F20000 is missing one zero, should be:

myPCI=$3F200000

(print-screen was correct)

Edited by deomsh
addition
Link to comment
Share on other sites

22 hours ago, deomsh said:

MSCONFIG has it's own 'ideas', I only use this tool in special cases.

I normally use SYSEDIT, I believe already there in Windows 3x.

That my 1GB settings are not working is strange. Please be so kind to test again, with SYSEDIT to set MaxPhysPage.

I made a typo in this case:

myPCI=$3F20000 is missing one zero, should be:

myPCI=$3F200000

(print-screen was correct)

Ok, I tested this fixed 1GB version and now it works just fine, Device Manager reports 1006Mb of Ram.

So, both versions are very stable, the only question is which one to use. :)

btw, I did another test with the demanding game Half Life and the sound works flawlessly.

I'm still impressed that the 16-bit win 3.1 driver solved the problem, which I couldn't do until now...

Link to comment
Share on other sites

Thanks for testing.

About your question: if you really use R. Loew's PATCHMEM, why not go for the 2GB settings? If you have any problem: there is always the 1GB option (or less if needed: on Windows 3.1 for instance, or on a low-memory system).

But the physical memory addressed in HDACFG.INI [BUSMASTER] must exist.

I have no personal experience with 2GB memory in Windows 9x. Many of my contributions to this thread are purely theoretical, also because I have only access to a few High Definition Audio codecs/ controllers.

Edited by deomsh
typo's
Link to comment
Share on other sites

4 hours ago, deomsh said:

Thanks for testing.

About your question: if you really use R. Loew's PATCHMEM, why not go for the 2GB settings? If you have any problem: there is always the 1GB option (or less if needed: on Windows 3.1 for instance, or on a low-memory system).

But the physical memory addressed in HDACFG.INI [BUSMASTER] must exist.

I have no personal experience with 2GB memory in Windows 9x. Many of my contributions to this thread are purely theoretical, also because I have only access to a few High Definition Audio codecs/ controllers.

I agree.
Since there really aren't any issues with 2Gb for now, I'll start with those settings.
Thank you for your effort, your contribution to this thread is enormous.
I will continue to use this win98 setup and if theres any unusual behavior, I will report here.

Link to comment
Share on other sites

Thanks for your kind words. Good luck with your machine.

I have a question about your retro-machine: which disk are you using, a 'real' hard disk, or a (fast) SSD?

I ask this because the performance of Win98SE+HDA2.DLL was much better in Virtual Box 7 than in Vbox 6 after I upgraded. I first thought this was because of the new version of VBox, but when I had to make a clone of my SSD to a hard disk (because of bad sectors on the SSD), I tested by chance my setup from the hard disk. Now HD-audio was not 'good' anymore. After testing from the SSD again, the 'good' sound was there again.

My current theory is the read-speed can be important, but I didn't run any serious tests so far.

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