Jump to content

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


Recommended Posts

Looks good as such, only last line should have been:

$00C3B180;AC_VERB_SET_AMP_GAIN_MUTE;mute-channel1

IF you wanted to mute Channel 1 on widget 0C (the payload is 12 16 bits in case of the 'B'-verb).

Some laptops seem to have a manual mute-switch, still working if driven by HDA2.DLL.

As such we are done.

To close this file I would like to know if 'pcipatchB=$7900' is really necessary on your system.

So if you would be so kind to test with 'pcipatchB=$0000' I would be very happy.

Edited by deomsh
correction
Link to comment
Share on other sites


PcipatchB= was not necessary. set to $0000 and it still worked

Volume control still doesn't go to silent after fixing that line, but its not an issue.

The only problem I have is a system crash when I try to launch a game called puzzle fighter with ram over 2048 or 4096 in system.ini as TSR seems to (?) preform an illegal action and bluescreen the system. Weirdly enough though, the desktop comes back after the bluescreen and the system continues as normal. I can live with the limited ram as I only use 98 once in a million years, but this is wierd. If needed, I can supply the hdalog after it happening and related system.ini settings, but it seems that it is an unsolvable problem because of hdatsr.exe glitching when puzzlefighter launches. I can live with it (not really a problem just glad to have (somehow) sound and (somehow) video at all) but just though to report it.

Link to comment
Share on other sites

Thanks for testing 'pcipatchB'.

About HDATSR, there is following workaround described earlier in this tread. In case of Windows ME obligatory, because ME can't load TSR's.

AUTOEXEC.BAT
(.......)
REM HDATSR

SYSTEM.INI
(.......)
[386Enh]
(.......)
MaxPhysPage=40000
(.......)

HDACFG.INI
(.......)
[BUSMASTER]
myPCIHI=$4012
myPCILO=$0000
myPCI=$40120000
aPCIHI=$4011
aPCILO=$0000
aPCI=$40110000

Link to comment
Share on other sites

@deomsh  Hi, I'm back, sorry for the delay..

I did a trial test, and I'd like to check with you if I know what I'm doing. I'm pretty sure I'd know better if I had a chance to read more on this, as you suggested, but currently my time is very limited, so I tried some quick things that seemed logical for start. I think I've got some results, let me know if they mean anything (test v11 on gdrive).

I did this, let me know was that a correct procedure:

1. to make a SET verb out of a GET verb, I used the instructions/notes from the codec manual - the same page where you showed me the GET commands.

2. I used some of the first get verbs from the HDAICOUT, for each one first the GET verb, then the SET verb, then GET again, and some of them manage to get set, if I see things right 

 

Some of the questions I have:

1. As far as I learned and can see from the HDAICIN results, the last two digits in the SET verb, is the value to assign to the addressed node(or register .., I'm missing some terminology). Is that correct?

2. What should the values of those two last digits be for testing? Should they all be the same? Basically, I don't know anything about them, except they set the volume in some cases. I used 1F, randomly.

3. What is the goal of these first tests, is it to see which nodes can be set (accept the set command), and which not?

4. If these first tests are done well, by chance, what should be my next move - try the SET verb on each of the GET verbs I had in the HDAICOUT, or?

5. Should I be checking the sound at this phase? Or are these just preliminary tests?

6. I didn't quite get what you said about trying the different output widgets. Do you mean in HDACFG? Is that the output widget or did you mean the volume widget, if so?

7. Can INTELHDA help me with any of these tests maybe? To save on restarting..

 

As you can see, I'm quite not sure about many things, so feel free to send me back to school if you think I went too far ahead!

Thank you!

Link to comment
Share on other sites

On 3/31/2019 at 11:05 PM, Dave-H said:

Image2.thumb.jpg.c5342fe897c6868466ba580d046b9b07.jpg

I know this is off topic, but I came across this thread in a web search and I really wanted to know what is that program/shortcut launcher you are using in the bottom right hand corner of this screenshot?

Can you please provide a link to it if you can? Thank you and my humblest apologies for going off topic.

Link to comment
Share on other sites

On 5/26/2023 at 7:51 PM, sifonium said:

I'm pretty sure I'd know better if I had a chance to read more on this, as you suggested, but currently my time is very limited,

On 5/26/2023 at 7:51 PM, sifonium said:

As you can see, I'm quite not sure about many things, so feel free to send me back to school if you think I went too far ahead!

I can't do anything to help you, OR just ask for help and don't try to understand every 'bit',  OR make free time (suggestion: no gaming for next month).

On 5/26/2023 at 7:51 PM, sifonium said:

I did this, let me know was that a correct procedure:

1. to make a SET verb out of a GET verb, I used the instructions/notes from the codec manual - the same page where you showed me the GET commands.

2. I used some of the first get verbs from the HDAICOUT, for each one first the GET verb, then the SET verb, then GET again, and some of them manage to get set, if I see things right

You did well, but you forgot to address 'channel 1' with SET-verbs. Also I asked to make comments with the 'right' description after a semicolon after each verb. Also you forget to test the EAPD verbs for widget '05'.

On 5/26/2023 at 7:51 PM, sifonium said:

1. As far as I learned and can see from the HDAICIN results, the last two digits in the SET verb, is the value to assign to the addressed node(or register .., I'm missing some terminology). Is that correct?

Not in your case. There are two classes of verbs. The verbs: A/2, B/3, C/4 and D/5 use only one of the five digits left after addressing 'Codec Index' and 'widget'. So 4 bytes left = 16 bits. The other verbs: Fxx/7xx has only two digits left for payload, so 8 bits.

On 5/26/2023 at 7:51 PM, sifonium said:

2. What should the values of those two last digits be for testing? Should they all be the same? Basically, I don't know anything about them, except they set the volume in some cases. I used 1F, randomly.

First two digits are used for addressing inside the widget.

Meaning of GET verb: B 80 xx addresses 80 = Output Amplifier, Right, channel 0. The other: B A0 xx addresses A0 = Output Amplifier, Left, channel 0. Remember it is stereo!

Meaning of SET verb: 3 90 xx addresses 90 = Output Amplifier, Right, channel 0. The other: 3 A0 xx addresses A0 = Output Amplifier, Left, channel 0.

Last two digits xx are the volume level. 80 means muted, 00 - 7F is level in 127 steps (some codecs have other specs, so 1F  is a good compromise). If GET verbs response is only 80 OR 00 this means there is no volume level available, only mute/ un-mute.

On 5/26/2023 at 7:51 PM, sifonium said:

3. What is the goal of these first tests, is it to see which nodes can be set (accept the set command), and which not?

No, the final goal is to find the PIN-widget which drives your speaker, and configure this widget to 'activate' your speaker. Because your datasheet does not give full verbs, we have to experiment according to Intel's High Definition Audio Specification.

We have to include the GET-verbs because only these verbs gives meaningful responses in HDAICIN.TXT.

Just like asking questions in a Forum, only 'reading' the 'answers' is a bit more complicated because the 'language' involved is 'machine language' consisting of bits with value '0' or '1' (the eight hex-decimal digits are only a 'handy' representation of bits).

On 5/26/2023 at 7:51 PM, sifonium said:

4. If these first tests are done well, by chance, what should be my next move - try the SET verb on each of the GET verbs I had in the HDAICOUT, or?

You didn't finished the required tests of this 'Level'. So 'Game over' - it's really like gaming....

To speed up things I added HDAICOUT.SIN to this post to test PIN-widget '05' (Line-out). So just rename, reboot and ONLY upload HDAICIN.TXT

On 5/26/2023 at 7:51 PM, sifonium said:

5. Should I be checking the sound at this phase? Or are these just preliminary tests?

Yes, always un-mute your speaker if there are any WORKING physical buttons on your laptop. Headphones are already working, so these are not needed.

On 5/26/2023 at 7:51 PM, sifonium said:

6. I didn't quite get what you said about trying the different output widgets. Do you mean in HDACFG? Is that the output widget or did you mean the volume widget, if so?

Just read my post of May, 20 again. We already identified the signal path to your headphones. So Widgets '03' and '06' are DONE, already correctly configured by HDACFG.INI.

In case of your speaker the other four PIN-widgets are left as potential candidates (port's B, C, D and mono-out - if this widget really exists in your codec).

On 5/26/2023 at 7:51 PM, sifonium said:

7. Can INTELHDA help me with any of these tests maybe? To save on restarting..

Not until you have made plenty of spare time (see my suggestion earlier in this post).

HDAICOUT.SIN

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

On 5/27/2023 at 10:50 AM, ThatOneGuy said:
On 3/31/2019 at 11:05 PM, Dave-H said:

:)

I know this is off topic, but I came across this thread in a web search and I really wanted to know what is that program/shortcut launcher you are using in the bottom right hand corner of this screenshot?

Can you please provide a link to it if you can? Thank you and my humblest apologies for going off topic.

As its window title says, the program is just called 'Run'.
It's 16 bit, so I can't use it on Windows 10, but I do use it on 98 and XP.
Sorry I haven't got a link to it, and I'm away from my main PC at the moment on holiday, but when I get back home next Sunday evening I will try to find the installer for you!
:)

Link to comment
Share on other sites

@deomsh You're the HD Audio whisperer! The sound is coming out of my speaker, and nicely, thanks to your latest HDAICOUT! At glance! 

And thanks to all your input, and again your HDAICOUT, I think I connected all the links I was missing.

HDAICIN is on gdrive - tests v12. I enhanced the volume to 3F's, I initially tried the higher values, but when I got no sound, I remembered the post which suggested the max is somewhere around 4x, beyond that, sound breaks (at least in this codec).

I figured out how to change the volume on the fly with INTELHDA - that was straightforward.

I then tried to include the system beeper in the mix, by trying some of the verbs with the beeper related NIDs, using the manual, however, that didn't work. I haven't tried more because I'm not sure if that's possible at all - maybe the system disables the beep when the audio driver is loaded? I think the system beep didn't work with USB audio as well. If you happen to know about these possibilities, let me know, and I'll do some more testing. It would be nice to have it for DOS purposes (an euphemism :))

Also, any ideas would it be complex to develop a simple program to manage the volume and some other things these verbs might handle? In other words, something that sends verbs. Just wondering, not that I have an idea on how to make one anyway.. 

This stuff here is pretty much my gaming - troubleshooting stuff. :) And games are just for testing purposes, in most cases ;)! Regardless - it's a fun, but time-guzzling hobby!

Edited by sifonium
Link to comment
Share on other sites

1 hour ago, Dave-H said:

As its window title says, the program is just called 'Run'.
It's 16 bit, so I can't use it on Windows 10, but I do use it on 98 and XP.
Sorry I haven't got a link to it, and I'm away from my main PC at the moment on holiday, but when I get back home next Sunday evening I will try to find the installer for you!
:)

Thank you so much. :)

Link to comment
Share on other sites

20 hours ago, sifonium said:

You're the HD Audio whisperer! The sound is coming out of my speaker, and nicely, thanks to your latest HDAICOUT! At glance! 

And thanks to all your input, and again your HDAICOUT, I think I connected all the links I was missing.

HDAICIN is on gdrive - tests v12. I enhanced the volume to 3F's, I initially tried the higher values, but when I got no sound, I remembered the post which suggested the max is somewhere around 4x, beyond that, sound breaks (at least in this codec).

Thanks, 'HD Audio whisperer' sounds nice!

About your HDAICOUT.HDA, seen the response values of the GET verbs, not all lines are needed. Less lines is better.

BTW this is a 'weak' aspect of any universal HDAICOUT.HDA, although users can make their own version by commenting lines out one-by-one. Only max about 180 reboot's needed. :crazy:

Next version of HDAICOUT.HDA should be your final one, if I see things right (don't forget: from my point of view it's all 'pure theory', I don't even have access to a laptop to do tests with speakers etc.):

Begin
$0053B03F;AC_VERB_SET_AMP_GAIN_MUTE;max_vol;R+L;AD1981HD-speaker
$00570C02;AC_VERB_SET_EAPD_BTLENABLE;ExternalAmplifierPowerUp
;$00570C06;AC_VERB_SET_EAPD_BTLENABLE;ExternalAmplifierPowerUp+SwapL&R
$0063B03F;AC_VERB_SET_AMP_GAIN_MUTE;max_vol;R+L;AD1981HD-headphones
End

If you like to test swapping Left and Right channels, unlock third verb. Should be working according to Intel's High Definition Audio Specification (Chapter 7.3.3.16), AND if supported by your codec, but not tested in this thread so far.

Also I added set max volume to volume widget '06', just in case you want to use 'VolumeWidget=$05' in HDACFG.INI to set speaker volume with WAVEOUT.EXE

BTW I never tested doubling this line in HDACFG.INI, like:

VolumeWidget=$05
VolumeWidget=$06

In HDALOG.TXT can the result be seen, if any.

If it is working both headphones and speaker volumes should response to settings of WAVEOUT.EXE.

20 hours ago, sifonium said:

HDAICIN is on gdrive - tests v12. I enhanced the volume to 3F's, I initially tried the higher values, but when I got no sound, I remembered the post which suggested the max is somewhere around 4x, beyond that, sound breaks (at least in this codec).

I found some information about AD1981HD in Linux sources, 3F should be max volume (63 steps) and BF should be the default state indeed.

20 hours ago, sifonium said:

I figured out how to change the volume on the fly with INTELHDA - that was straightforward.

Good!

BTW there are two interfaces to sent verbs with INTELHDA.EXE: called 'Immediate Command' and 'CORB/RIRB'.

20 hours ago, sifonium said:

I then tried to include the system beeper in the mix, by trying some of the verbs with the beeper related NIDs, using the manual, however, that didn't work. I haven't tried more because I'm not sure if that's possible at all - maybe the system disables the beep when the audio driver is loaded? I think the system beep didn't work with USB audio as well. If you happen to know about these possibilities, let me know, and I'll do some more testing. It would be nice to have it for DOS purposes (an euphemism :))

I doubt this is possible, but you can try SPEAKER.DRV - just search for 'KB138857'.

20 hours ago, sifonium said:

Also, any ideas would it be complex to develop a simple program to manage the volume and some other things these verbs might handle? In other words, something that sends verbs. Just wondering, not that I have an idea on how to make one anyway.. 

A program should be interconnected with HDA2.DLL, that is out of my reach. I am not a programmer, not even an engineer.
But you can try to make changes to HDAICOUT.HDA on-the-fly, so WITHOUT rebooting.
If I am reading Intel's High Definition Audio Specification right, the so called 'Link protocol' mentions max 256 verbs can be sent from a buffer, and also every digital audio 'frame' can contain ONE verb sent and ONE response to be received back.
I have never tested this, so you would be the first HDA2.DLL-user EVER. :yes:

However, I don't know about the 'handling' of HDAICOUT.HDA by HDA2.DLL: if verbs are sent only during codec-initialization, this is a no-go of course.

Edited by deomsh
typo, addition
Link to comment
Share on other sites

  • 2 weeks later...
On 5/28/2023 at 6:54 PM, ThatOneGuy said:

Thank you so much. :)

OK, back from my holiday, I can't find where I got it from, but here's my launcher program folder.
It doesn't actually need installation, just unzip it to a folder and run it.
I've removed all my data.
Cheers, Dave.
:)

Launcher.zip

Link to comment
Share on other sites

@deomsh Thank you for this final version of HDAICOUT, works perfectly! And for all the effort you put in making this driver work. I think now I have enough commodities to keep this laptop alive, almost as a full fledged Win98 machine. Hopefully our conversation helps someone else as well!

Some notes:

- doubling VolumeWidget doesn't work
- 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

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

I will come by! :)

Cheers!

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