win3x
Programming >> Pascal >> High Definition Audio
http://win3x.conforums.com/index.cgi?board=Pascal&action=display&num=1502071336

High Definition Audio
Post by Win 3x High Definition Audio on Aug 6th, 2017, 9:02pm

The current release of the windows 3.1 High Definition Audio drivers is version 6.
I've added a TSR for computers with less than 512mb of RAM.

http://turkeys4me.byethost4.com/files/Hdadrv6.zip

Only tested on Realtek HDA.
Let me know how they work for you. grin
Re: High Definition Audio
Post by watler on Aug 10th, 2017, 1:28pm

Although I only have Realtek HDA working, you could try other types.

Here is a program for looking at HDA nodules and widgets.
http://turkeys4me.byethost4.com/files/AHDA16.zip

Have fun!


Re: High Definition Audio
Post by deomsh on Sep 18th, 2017, 10:20am

For weeks I am trying your HDA driver on Windows 3.1, but without succes. Lately I found your forum, so I'de like to aks for some advice, if possible.

My board has Realtek HDA (ALC662). HDA is working in real-mode DOS with Judas player (from Judas 201C), playing XM and MOD files. Also WAV files with MS-DOS Mplayer.

When I try to install HDA2.DLL I get "Exception ERangeError in module HDA2.dll at 0001:0732 (+) Range check error".

I also tried your TSR HDATSR.EXE. In that case the driver doesn't seem to have installation problems. HDACFG.INI says "TSR=TSR Found" and gives memory addresses 1-2 MB (if I counted right: "myPCIaddr $00100000"; "aPCIaddr $00200000").

But opening Soundrecorder gives that there is no driver installed.

I tried different memory combinations with HIMEMX and also with HIMEM.SYS & SETXMXTO up to 1GB (with PageOverCommit=0 in SYSTEM.INI).

Enhanced mode or Standard mode makes no difference, same with or without HDARUN.EXE.

Re: High Definition Audio
Post by watler on Sep 18th, 2017, 1:50pm

My drivers don't work? huh
Deomsh, thank you for telling me!

In the past, I have used the HDA driver on my emachines W3644 (MCP61);Asus M2N68-AM SE2;
;Sabertooth X58(ICH10); and NFORCE4.

Perhaps I have not included your HDA PCI vendor/device info in my driver.
What computers/motherboards are you working with?


Good to hear you have HDATSR.EXE working.
If you chose not to use HDATSR, then you must manually configure HDACFG.INI to use an address above 257MB.
Is the HDA Control panel -> drivers setup dialog working?

You can manually install HDA2.DLL as the primary windows wave driver:
SYSTEM.INI
[drivers]
wave=HDA2.DLL
wave2=nextwavdrv.drv

The only DOS driver that might cause trouble is EMM386.

If you want to examine your HDA nodes and widgets, try this program:
http://turkeys4me.byethost4.com/files/AHDA16.zip
Re: High Definition Audio
Post by deomsh on Sep 18th, 2017, 5:34pm

Thank you for your reply.

I don't use EMM386.

In Control Panel -> Drivers the driver setup dialog is only working in the range $80000000-$FFFFFFFF, when I am going below this range HDACFG.INI always returns $00100000-$00200000.

Manually editing HDACFG.INI with addresses just below physical 1024MB brings nothing (I tried $3FEFFFFF-$3FFFFFFF), although Windows is starting normally. With more physical memory Windows won't start, unless I set MaxPhysPage=40000 in SYSTEM.INI.

My motherboard is Asrock 960GM-GS3 FX, Northbridge 760G/Southbridge SB710.

The HDA-controller has Vendor ID=1002 and Device ID=4383. This is the same ID as "ATI Technologies SB600 integrated High Definition Audio controller"

I searched all the files inside HDADRV6.ZIP for ID 1002, but I couldn't find it. But I found somewhere in HDA.PAS the phrase "AMD1_VID=$1022;{AMD Vendor ID}", with "SB600_HDA_DID=$4383;{ATI SB600 HDA}"

Inside JDS210C.ZIP I found in the file JUDASAC.H the phrase "0x1002, 0x4383,(....)".

I cannot compile your files myself, but I am willing to test a version with the ATI vendor ID.
Re: High Definition Audio
Post by watler on Sep 18th, 2017, 6:56pm

I do not have a motherboard like that.

See if this works for you.
http://turkeys4me.byethost4.com/files/Hdadrv7.7z

Use HDATSR
For good luck, first init sound with Judas or MPXPLAY.
Then start windows.


Re: High Definition Audio
Post by deomsh on Sep 21st, 2017, 07:09am

Hello Watler,

Thanks for your efforts!

I tried your new HDA2.DLL and there is BIG progress, although sound is still not working.

Progress:

1) In Control Panel -> "Sound Events" and <Test> button are no longer grayed out, but pushing <Test> button gives no sound.
2) Sound Recorder starts without error message. When opening a WAV-file the Play-button is no longer grayed out. Pushing the Play-button gives no sound.
3) Media Player starts normally, there is no longer an error message which prevent starting. When opening a WAV-file the Play-button is no longer grayed out. Pushing the Play-button gives no sound.
4) HDACFG.INI gives some new information. Under [HDA] there is now "VID=1002" and "DID=4383"

Using HDARUN.EXE make no difference, whatever combination I try. But ending this program with Alt+F4 gives error message" ACTIVATE caused a General Protection Fault in module HDARUN>EXE at 0005:61a4" and after <CLOSE> Windows crashes going back to the Command Prompt.

First playing a sound-file with Judas before starting Windows, or starting Windows in Enhanced/Standard Mode make no difference either. But can only ending Windows with ctrl+alt+del.

I also tried INTELHDA.EXe from your file AHDA16.zip. The program opens with "No HDA found?" and Vendor $10DE; Device $03F0. almost nothing works. [Widgets] -> <BEEP> gives "hda_codec_write error?" Then I nothing works anymore, I have to restart Windows with ctrl+alt+del...

But when I type my Vendor ID and Device ID there is some difference.
1) After pushing button <Find card> I see on the right a table with three collumns, and many rows (W0-W3E) with much information. In W0 there are the right ID's. "PCIbus" stays on zero, but "Function" changes from 0 to 162.
2) After pushing button <Enable memory> "PCI mem" changes from $00000000 to $FBFF4004. This is almost the same as Craig's PCI program gives me (FBFF4000h). My "Windows 10" Device Manager gives memory address "FBFF4000-FBFF7FFF"

[Widgets] -> <BEEP> is still not working. But no error message this time, but have to end the program with ctrl+alt+del.

Maybe you can do something with this information.

I am willing to make any tests you ask for.

Appendix: This is the full HDA-information from Craig's PCI program:

Bus 0 (PCI), Device Number 20, Device Function 2
Vendor 1002h ATI Technologies Inc
Device 4383h IXP SB600 High Definition Audio Controller
Command 0006h (Memory Access, BusMaster)
Status 0410h (Has Capabilities List, Slow Timing)
Revision 00h, Header Type 00h, Bus Latency 20h
Self test 00h (Self test not supported)
Cache line size 64 Bytes (16 DWords)
PCI Class Multimedia, type Unknown!
Subsystem ID 76621849h Unknown
Subsystem Vendor 1849h ASRock Inc
Address 0 is a Memory Address (anywhere in 64-bit space) : FBFF4000h
System IRQ 10, INT# A
New Capabilities List Present:
Power Management Capability
Supports power state D1
Current Power State : D0 (Device operational, no power saving)

Hex-Dump of device configuration space follows:
0000 02 10 83 43 06 00 10 04 00 00 03 04 10 20 00 00 ..C......... ..
0010 04 40 FF FB 00 00 00 00 00 00 00 00 00 00 00 00 .@............
0020 00 00 00 00 00 00 00 00 00 00 00 00 49 18 62 76 ............I.bv
0030 00 00 00 00 50 00 00 00 00 00 00 00 0A 01 00 00 ....P...........
0040 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 ................
0050 01 00 42 C8 00 00 00 00 00 00 00 00 00 00 00 00 ..B............
0060 05 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Re: High Definition Audio
Post by watler on Sep 21st, 2017, 1:09pm

Deomsh, Thanks for the detailed information.

I added the SB600 ID to the viewer:
http://turkeys4me.byethost4.com/files/AHDA17.zip
Some HDA codecs must be enabled before their nodes/widgets become functional.

Although I do not currently have access to an ATI SB600 HDA, I will try to improve my HDA drivers.

ttp://turkeys4me.byethost4.com/files/Hdadrv8.7z
Re: High Definition Audio
Post by deomsh on Sep 21st, 2017, 4:33pm

Thanks for your efforts!

I am sorry to say that the new versions make no real difference.

Files inside HDADRV8 gives same results as I described earlier for HDADRV7.

But now ANY time when pushing the Play-button in Sound Recorder there is an error message: "This device is used by another application. Either interrupt this application or wait until the device is free and then try again".

In MPlayer is the error message: "All wave devices that can play files in the current format are in use. Wait until a wave device is free, and then try again".

AHDA17 gives this time when opening INTELHDA.EXE the VEN/DEV ID's both as $0000.

When typing in the right ID's, results are exactly the same as in case from AHDA16 I described earlier. Still "No HDA found?" in the box just below the Search-button.

Re: High Definition Audio
Post by watler on Sep 21st, 2017, 5:18pm

Oops, AMD is not ATI...
http://turkeys4me.byethost4.com/files/AHDA17a.zip

How do I use the SB600 HDA chip?
I will look for some documents to read.

Deomsh, you said:
"2) Sound Recorder starts without error message. When opening a WAV-file the Play-button is no longer grayed out. Pushing the Play-button gives no sound."
Did the play position of soundrec move as if it were playing?
Re: High Definition Audio
Post by deomsh on Sep 21st, 2017, 5:51pm

No, there is no movement of the play position.

Of cause I can move the ruler with the mouse, 'seeing' sound in the box above, but that is also possible without any driver.

I will test AHDA17A as soon I have time. Is it helpfull when I write results down for you in detail?
Re: High Definition Audio
Post by watler on Sep 21st, 2017, 6:48pm

I am interested in knowing which computers need windows 3.1 drivers.
Your help is much appreciated.

I do not know how to use the ATI HDA.
Perhaps I can learn.


Re: High Definition Audio
Post by deomsh on Sep 23rd, 2017, 1:31pm

I tested AHDA17a and AHDA16.

With or without HDA2-driver makes no difference. I assume the program has its own driver.

Both AHDA-versions gives identical results on my system, except for differences identifying chipset and PCI-information. Differences are preceded by "{Version xx:}", all else are same output. Tab-titles are within "[]", buttons "<>". I wrote everything down as I found it on screen.

I made a textfile with details, but I see now I cannot add an attachment. So here it is...

From AHDA16 INTELHDA.EXE/Win3.1

[PCI]
{Version 16:}
Manual typing Vendor: 1002 & Device: 4383

{Version 17a:}
Vendor: 1002 & Device: 4383
AMD HDA$4383

<Search> Gives second time the phrase:
{Version 16:}
"No HDA found?"

{Version 17a:}
"AMD HDA$4383"

<Find card> Gives:
{Version 16:}
Pci Bus: 0
Function: 162
PCI information in table
(looks like Hex-Dump of device configuration space from Craig's PCI program)

{Version 17a:}
Pci Bus: 0
Function: 0
NO PCI information in table (greyed out !)

<Enable memory> Gives:
$FBFF4004

[HDA]

<HDA Pci Mem> Gives:
"...." means not readeable

00 $003C GCAP Global Capabilities 4401
02 $001D Version
04 $0001 OUTPAY Output Payload Capabilaty
06 $0000 INPAY Input PayLoad Capability
08 $0000 GCTLGlobal Con-
0A $0001 trol w1 R/W
0C $0000 WAKEEN Wake Enable 0000h
0E $0000 STATESTS State Change Status
10 $0000 GSTS Global Status 0000h R/W
12 $0000
14 $003C
16 $001D
18 $0000
1A $0000
1C $0000
1E $0000
20 $0000 INTCTL Interrupt Control 000000...
22 $0000
24 $0000 INTSTS Interrupt Status 000000...
26 $0000
28 $0000
2A $0000
2C $E564
2E $06D1
30 $0000 WALCLK Wall Clock Counter 00....
32 $0000
34 $0000 SSYNC Stream Synchronization
36 $0000
38 $0000
3A $0000
3C $0000
3E $0000
40 $0000 CORBLBASE CORB Lower Base
42 $0000
44 $0000 CORBUBASE CORB Upper Base
46 $0000
48 $0000 CORBWP CORB Write Pointer
4A $0042 CORBRP CORB Read Pointer 0...
4C $0000 CORBCTL CORB Control 00h R.. (R/W?)
4E $0000 CORBSIZE 42h R0
50 $0000
52 $0000 RIRBLBASE Lower Base
54 $0000
56 $0000 RIRBUBASE
58 $0100
5A $0042 RIRBWP
5C $0000 RINTCNT
5E $0000
60 $0000 RIRBSIZE 42h R0
62 $0000
64 $0002 IC Immediate Command
66 $0000 IR Immediate Response
68 $0000
6A $0000 IRS Immediate Command Status
6C $0000 DPLBASE DMA Position Lower
6E $0000 DPLBASE DMA Position Upper

Not many more values up to row 1FC, mostly $0100 or $0080 in xxC positions but no text.

Values 2C&2E are changing when scrolling up and down !!!

[jds]

<Start HDA> Gives:
HDA_SDO0CTL
wait for out of reset
clear stream 0
randomize Audio Data
set buffer 0
set buffer 1
set all buffers
program stream tag
program length of samples
program stream format on controller
program LVI
program BDL address
disable DMA position buffer
setup stream 1-link
codec_start

Dialog: "OK"

<Reset HDA1> Gives:
no error 001D003C

<Reset part 2> Gives:
{Version 16:}
codec_mask 0000
No codec detected?
HDA_SDO0STS=$00000000
HDA_STATESTS=$0000
HDA_RIRBSTS=$00000000
HDA_INTSTS=$00000000
DPLBASE=$0000
DPUBASE=$0000

{Version 17a:}
codec_mask 0000
No codec detected?
HDA_SDO0STS=$1C000000
HDA_STATESTS=$7A6FF
HDA_RIRBSTS=$A0040502
HDA_INTSTS=$400000FF
DPLBASE=$0000
DPUBASE=$0000

<Rst3> GIVES Dialog with "Hda_codec_write error ?" 3x OK gives "GPF in INTELHDA.EXE in 0010:4F4E"

<AC_VERB_PARAMETERS> Gives Dialog box with "hda_codec_write error ?" 11x OK gives:
AC_PAR_VENDOR_ID 00000000
VENDOR_ID $0000
DEVICE_ID $0000
AC_PAR_SUBSYSTEM_ID 00000000

AC_PAR_REV_ID 00000000

AC_PAR_NODE_COUNT #0 $00000000
Total Nodes #1 $00
Starting Node #1 $00

AC_PAR_NODE_COUNT #1 $00000000
Total Nodes #1 $00
Starting Node #1 $00

AC_PAR_FUNCTION_TYPE #1 $00000000
Node function type $00
Reserved
Unsolicited Capable $00

AC_PAR_STREAM #1 $00000000

AC_PAR_CONNLIST_LEN #$0B $00000000
Connection List Length=0
Short Form

AC_PAR_PROC_CAP #32 00000000
NumCoeff=0

AC_PAR_GPIO_CAP #1 00000000
NumGPIOs=0
NumGPOs=0
NumGPIs=0

$12 AC_PAR_AMP_OUT_CAP #3 00000000
Offset=0
NumSteps=0
StepSize=0

<AC_VERB_GET_CONFIG_DEFAULT> Doesn't work

<AC_VERB_GET_CONNECT_LIST> Doesn't work

[Nodules]

<Enumerate nodes> Gives Dialog box with "hda_codec_write error ?"

<Start> Gives Dialog box with "Start?"

<laughrint BDL entries> Gives endless running text

<Stop> Gives Dialog box with "Stop?"

<Button1 15> Gives Dialog box with "Ready?"

[Widgets]

Only button with output:

<Examine All> Gives:
{Version 17a:}
Dialog box with "hda_codec_write error ?"

{Version 16:}
AC_PAR_AUDIO_WIDGET_CAP widget $00 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $01 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $02 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $03 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $04 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $05 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $06 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $07 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $08 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $09 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0A ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0B ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0C ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0D ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0E ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $0F ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $10 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $11 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $12 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $13 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $14 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $15 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $16 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $17 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $18 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $19 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1A ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1B ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1C ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1D ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1E ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $1F ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $20 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $21 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $22 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $23 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $24 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $25 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $26 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $27 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $28 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $29 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2A ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2B ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2C ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2D ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2E ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $2F ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $30 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $31 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $32 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $33 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $34 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $35 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $36 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $37 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $38 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $39 ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3A ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3B ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3C ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3D ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3E ($00000000)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $3F ($00000000)
Type=$00
Audio Output

I double-checked all values.
Re: High Definition Audio
Post by watler on Sep 23rd, 2017, 2:12pm

Thank you for your help, deomsh.
I'm taking the time to look over my old HDA files.

<Enable memory> Gives:$FBFF4004
Well... I was testing AHDA on an i7-960 computer with 24gb of ram...
Do you have +4gb of ram installed?


The version I have on my bootable thumb drive plays nothing on any computer!
I seem to remember having HDA operational on more computers than that...
I will download my online version and test it.




Re: High Definition Audio
Post by deomsh on Sep 23rd, 2017, 3:45pm

No, I have only 4GB. Exactly enough for windows 10 32-bit
Re: High Definition Audio
Post by watler on Sep 23rd, 2017, 6:29pm

It seems that hda_single_send_cmd has returned false;
Perhaps it is because the PCI device was not properly found.

"Bus 0 (PCI), Device Number 20, Device Function 2"

{Version 17a:}
Pci Bus: 0
Function: 0
NO PCI information in table (greyed out !)


I tested the HDA driver on an bootable USB drive.(MS-DOS 6.22/Windows 3.1)
Version 8 is much better than the older ones.
http://turkeys4me.byethost4.com/files/Hdadrv8d.zip

Deomsh, what type of Win/DOS setup are you using to test the driver?


Re: High Definition Audio
Post by deomsh on Sep 24th, 2017, 3:55pm

Thanks for your efforts!

Changes when using HDA2.DLL from HDADRV8d.ZIP

OS: MS-DOS 7.10/Windows 3.1 (io.sys & win386.exe patched)

Sound Recorder or Media Player: opening a WAV-file gives "Playing", no error dialog anymore.
There is no movement and no sound. After reboot Windows error dialogs appear again. Computer must be turned off a while, before a restart gives no error dialogs in Sound Recorder or Media Player.

With or without HDARUN.EXE makes no difference.

Normal exit Windows still not possible when driver is active.

There are many changes in HDACFG.INI.

{with HDA2.DLL Version 8d}

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
CODEC_VID=$0000
CODEC_DID=$0000

[BUSMASTER]
myPCIHI=$0010
myPCILO=$0000
myPCImem=$00110000
myPCIaddr=$00100000
aPCIHI=$0020
aPCILO=$0000
aPCIaddr=$00200000

{with HDA2.DLL Version 8}

[HDA]
TSR=TSR Found
VID=1002
DID=4383

[BUSMASTER]
myPCIHI=$0010
myPCILO=$0000
myPCIaddr=$00100000
aPCIHI=$0020
aPCILO=$0000
aPCIaddr=$00200000

In my Windows 10 installation High Definition Audio Device has main ID's: VEN_10EC&DEV_0662. Manually editing HDACFG.INI with this values in CODEC_VID/DID gives no change, after restart values are back on "$0000".
Re: High Definition Audio
Post by watler on Sep 25th, 2017, 11:31am

Since my driver is unable to read the CODEC vendor ID from your HDA, I must figure out why.

First lets find out if my programs have enabled the PCI HDA device.

You can have more that one HDA device in a computer.
Do you have a graphics card with built in HDA support?
http://turkeys4me.byethost4.com/programs/Pciscan.7z

Were you able to view the second window of AHDA?
http://turkeys4me.byethost4.com/files/AHDA17b.zip

I adjusted hdadrv so that it should list all HDA PCI in hdacfg.ini;
http://turkeys4me.byethost4.com/files/HDADRV8F.7z


Re: High Definition Audio
Post by deomsh on Sep 26th, 2017, 2:23pm

I tested JOJONE.EXE from Pciscan.7Z

Program works, relevant Pci-information is:

"BUS:00;Func:A2=43831002"

I do not have a HDA graphics card or other HDA devices.

AHDA17B Tab [Pci] is fully filled in, including the right VEN/DEV ID's and the table with PCI information.
Some details:
PCI Bus: "0", Function: "162".
In box below <Search>: "ATI HDA$4383".
Pci Mem: "$FBFF4004"

Other Tab's give exactly same results as reported earlier for version 16.

I noticed already the second window, I tried al Tab's and Buttons, but it seems to me this window doesn't give information about my chipset, although I think the information is absolutely useful for writing a HDA-driver

HDA2.dll from HDADRV8e.ZIP gives same results as 8d as reported earlier.

HDACFG.INI:
[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
CODEC_VID=$0000
CODEC_DID=$0000

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000
myPCIaddr=$00100000
aPCIHI=$0020
aPCILO=$0000
aPCIaddr=$00200000

Windows 10 device manager gives for "location information" of the HDA controller: "PCI bus 0, device 20, function 2", so same as Craig's Pci-program.





Re: High Definition Audio
Post by watler on Sep 26th, 2017, 6:19pm

"AHDA17B Tab [Pci] is fully filled in, including the right VEN/DEV ID's and the table with PCI information."

Glad to hear the device was detected.
Now to make certain that the memory I/O buffer is aligned so that the values match my variables.

"Values 2C&2E are changing when scrolling up and down !!!"
Turning on "reset toggle" should stop the rolling timer.

Press reset toggle again to start the timer back up.

http://turkeys4me.byethost4.com/files/HDADRV8G.7z
Re: High Definition Audio
Post by watler on Sep 28th, 2017, 10:13am

Deomsh, I have changed the way Immediate Commands are sent.

Erase HDACFG.ini
Then try: http://turkeys4me.byethost4.com/files/HDADRV8J.zip

Let me know what HDACFG.ini shows.
Re: High Definition Audio
Post by deomsh on Sep 28th, 2017, 3:10pm

Hello Watler,

Thank you very much for all your efforts!

I tested version 8g and 8j. Both give same results and also same HDACFG.INI.

I can report BIG progress. When playing a WAV file, there is regular movement (time indicator). Only no sound. With or without HDARUN.EXE makes no difference.

HDACFG.INI gives:

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
PCI_BUS=$0000
PCI_FUNC=$00A2
CODEC_VID=$10EC
CODEC_DID=$0662

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000

[ALLHDA]
$00A2=$43831002

And after changing the memory address in the driver setup (I tried FBFF4004):

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
PCI_BUS=$0000
PCI_FUNC=$00A2
CODEC_VID=$10EC
CODEC_DID=$0662

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000
myPCIaddr=$FBFF4004
aPCIHI=$FC0F
aPCILO=$0000
aPCIaddr=$FC0F4004

[ALLHDA]
$00A2=$43831002

Trying to exit Windows gives now that "Progman caused a GPF in module HDA2.DLL at 0002:1781" and Windows stalls.

What did you mean with "Now to make certain that the memory I/O buffer is aligned so that the values match my variables."?

I also tried <Reset Toggle> in AHDA17b, but values 2E&2G are still changing, also when I click somewhere with the mouse.


Re: High Definition Audio
Post by watler on Sep 28th, 2017, 5:30pm

CODEC_VID=$10EC
CODEC_DID=$0662
Your HDA card is operational if you can send it VERBS.
http://turkeys4me.byethost4.com/files/HDADRV8K.zip

Let me know if I have the node/widget
program working with your HDA.
http://turkeys4me.byethost4.com/files/AHDA17c.7z

Thanks for the help, deomsh.
Re: High Definition Audio
Post by deomsh on Sep 29th, 2017, 5:22pm

I tested HDA2.DLL version 8k, no differences compared to versions 8g&8j except more information in HDACFG.INI:

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000

[ALLHDA]
$00A2=$43831002

[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$EC0662
CODEC_NODEINFO=$EC0662

I also tested AHDA17c. Differences compared to version 17b:

[PCI]
Same as 17b, except Pci mem: FBFF4000 (instead of FBFF4004 in 17b)

[HDA]

<HDA Pci Mem> Gives same values as earlier except:

18 $003C Outputstream Payload Capabilaty =new

1A $001D Inputstream Payload Capabilaty =new

38 $0000 SSYNC Stream Synchronization =moved, was on line 34

50 $0000 RIRBLBASE Lower Base =moved, was on line 52

54 $0000 RIRBUBASE Upper Base =moved, was on line 56

58 $0100 RIRBWP =moved, was on line 5A

5A $0042 RINTCNT =moved, was on line 5C

5C $0000 RIRBCTL/RIBSTS =new

5E $0000 RIRBSIZE 42h R0 =moved, was on line 60

60 $0000 IC Immediate Command =moved, was on line 64

64 $0002 IR Immediate Response =moved, was on line 66

68 $0000 IRS Immediate Command Status=moved, was on line 6A

70 $0000 DPLBASE DMA Position Lower =moved, was on line 6C

74 $0000 DPLBASE DMA Position Upper =moved, was on line 6E

80 $0000 Input Stream Descriptor o Cont.... =new

Values 2C&2E are zero and no longer changing, but this moved to values 30&32 when scrolling up and down or mouseclick!!! As you say <Reset Toggle> resets these values to zero. Second push starts the timer again, necessary for getting Vendor values in next Tab:

[jds]
<AC_VERB_PARAMETERS> Gives:
AC_PAR_VENDOR_ID 10EC0662
VENDOR_ID $10EC
DEVICE_ID $0662
AC_PAR_SUBSYSTEM_ID 10EC0662

AC_PAR_REV_ID 10EC0662

AC_PAR_NODE_COUNT #0 $10EC0662
Total Nodes #1 $00
Starting Node #1 $00

AC_PAR_NODE_COUNT #1 $00000000
Total Nodes #1 $EC
Starting Node #1 $62

AC_PAR_FUNCTION_TYPE #1 $00000000
Node function type $00
Reserved
Unsolicited Capable $00

AC_PAR_STREAM #1 $00000000

AC_PAR_CONNLIST_LEN #$0B $00000000
Connection List Length=0
Short Form

AC_PAR_PROC_CAP #32 00000000
NumCoeff=0

AC_PAR_GPIO_CAP #1 00000000
NumGPIOs=0
NumGPOs=0
NumGPIs=0

$12 AC_PAR_AMP_OUT_CAP #3 00000000
Offset=0
NumSteps=0
StepSize=0

[Nodules]

<Codec Vendor>, new button, works and gives codec information after 2x "OK" in dialog's ICS=0002 and ICB clear:
CODEC Vendor $10EC
CODEC Device $0662
1_10EC0662
2_10EC0662
3_10EC0662

<Enumerate nodes> Gives:
Function Group $01
AC_NODE_COUNT of node $01
Total Nodes (node $01)=$00
Starting Node (node $01)=$00
AC_PAR_FUNCTION_TYPE of node 1
Node function type $00= Reserved
Unsolicited Capable $00
AC_PAR_AUDIO_FG_CAP of node 1
No Beep generator.
Input Delay $0
Output Delay $0
AC_PAR_PCM of node 1 =$00000000
Bit rates=
Sample rates=
AC_PAR_STREAM of $01= $00000000
AC_PAR_GPIO_CAP of $01 =$00000000
NumGPIOs=$00
NumGPOs=$00
NumGPIs=$00
AC_VERB_GET_SUBSYSTEM_ID of node 1
Implementation Identification
Board Implementation ID (BID) 31:8=$000000
Board Manufacturer Identification (BMID) 31:16=$0000
Board SKU (BSKU)=$00
Assembly ID(AssyID)=$00

and so on, up to function group $33 / node $33 all values are zero.

[Widgets]

Only button with output:

<Examine All> Gives:
AC_PAR_AUDIO_WIDGET_CAP widget $00 $10EC0662)
Type=$0E

AC_PAR_AUDIO_WIDGET_CAP widget $01 ($00000000)
Type=$00
Audio Output

and so on, up to Widget 3F only zero's.

Re: High Definition Audio
Post by watler on Sep 30th, 2017, 6:21pm

Since my cousin has an Everex IMPact (VIA HDA),
I adjusted my driver to work with his computer.

http://turkeys4me.byethost4.com/files/HDADRV8O.zip


Re: High Definition Audio
Post by VirtualDavey on Sep 30th, 2017, 7:11pm

I installed your new driver, but now I can no longer access Windows. I see the Windows 3.1 title screen, but then I see this:
Application Error
Exception E.RangeError in
module HDA2.DLL at
0001:0DB0
Range Check Error

Is there any way to manually remove that driver through DOS?
EDIT: I found what I presumed was the new sound driver (HDA2.DLL) while searching through the Windows System folder. I deleted it and was again able to access Windows. The sound USB sound was working which surprised me because I didn't reinstall your previous sound driver. I had figured that your new driver overwrote the old driver, but I guess not.
Re: High Definition Audio
Post by watler on Sep 30th, 2017, 9:36pm

Thank you for the help, VirtualDavey.

Was That 123USB version 05?
http://turkeys4me.byethost4.com/files/123usb05.zip

I Have not tested this HDA2.DLL version at the same time with usbwav.dll.
Each wave driver shold be tested separately at first.

Had you installed HDATSR.EXE in autoexec.bat?
HDA2.dll will search for HDATSR.EXE and write it's low XMS address into hdacfg.ini.
If you later remove HDATSR.EXE you may want to adjust or erase hdacfg.ini before you start windows.




If you want to use HDA2.dll and USBwav.dll at once,
you could try this manual adjustment:

AUTOEXEC.BAT
HDATSR.EXE
USNDTSR.EXE

SYSTEM.INI
[drivers]
wave1=hda2.dll
wave2=usbwav.dll

When using Windows in 386 mode:
HDA2.dll will automatically play sounds using MMTIMER.
usbwav.dll should work after manually activating loop.


When using Windows in Standard mode:
usbwav.dll will activate automatically.
HDA2.dll should work after manually activating loop.



My drivers will only run if installed properly in the [drivers] section of system.ini
If you wish to temporarily disable a driver, you can do so manually.

SYSTEM.INI
[drivers]
ave1=hda2.d
wave2=usbsound.dll


To remove my drivers from DOS you can simply erase them.

cd windows
cd system
erase hda2.dll
cd..

Re: High Definition Audio
Post by watler on Sep 30th, 2017, 9:49pm

Deomsh, does version 8o play sound for you?
On the VIA computer front panel audio was very quiet.


Re: High Definition Audio
Post by deomsh on Oct 1st, 2017, 3:34pm

Hello Watler,

Thanks for the new version.

I just tried version 8O, but same as reported earlier (versions 8g, 8j, and 8k). There is movement when I play a wav file, but no sound. By the way, I only have backpanel, I do not possess a front panel.

HDACFG.INI shows two new entrances:

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000

[ALLHDA]
$00A2=$43831002

[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$EC0662
CODEC_NODEINFO=$EC0662

Re: High Definition Audio
Post by watler on Oct 2nd, 2017, 1:42pm

Deomsh, since I do not currently own an AMD HDA board,
it is difficult for me to test my driver on one. sad

You said:
"HDA is working in real-mode DOS with Judas player (from Judas 201C)";

If you start Judas and then...
terminate Judas abruptly without stopping HDA.
And then... start Windows 3.1.
Perhaps, my driver will work.

http://turkeys4me.byethost4.com/files/JUD.7z

HDATSR.exe
cd JUD
BUG.BAT
cd..
cd windows
win


Re: High Definition Audio
Post by deomsh on Oct 2nd, 2017, 5:03pm

Watler, Thanks a lot. I modified the batchfile according to my directories. First I tried the JP.EXE from your file. The program identifies itself as Judas version 2.10b and asks for DOS/4GW. With DOS/4GW the program starts, but no sound in real mode MS-DOS... Without the -d switch I can see the music play by the movement of the VU-meters.

I have Judas version 2.10c (found somewhere with the Wayback-machine) and version 2.10d (from Rayer's website). These versions gave me sound in DOS (with CWSDPMI.EXE).

When I started Windows with help of your Batchfile after interrupting Judas 2.10d with <Esc>, I could hear some noise in my headphones while starting Windows. One time I could hear some music fragments in Sound Recorder!!! In that case I could also exit Windows normally.

Mostly I got error dialogs I described in Reply 8#.
Re: High Definition Audio
Post by watler on Oct 2nd, 2017, 6:19pm

Although I do not have access to an Asrock 960GM-GS3 FX,
I was able to test a friends Gateway GT5694.

Since the HDA sound buffer is rather large.
I had to play the short wave several times before the buffer filled up.
After it kicked in, I was able to play wave and MP3 files very clearly.

I remember that on my on my old Dell Insprion 570
playing a file in MPXPLAY before JP and windows seemed to help.


Re: High Definition Audio
Post by watler on Oct 4th, 2017, 2:59pm

For those who can not compile my files, I have created a
reconfigurable startup command file.

When HDA2.DLL loads, it will load a text file called hdaicout.hda;
Each line of hdaicout.hda beginning with $ will be sent as a single 32-bit Immediate HDA command.

Hdaicout.hda should be placed in the main windows directory.
An example hdaicout.hda is included for refrence.

http://turkeys4me.byethost4.com/files/HDADRV8Q.7z

Deomsh, driver timing is slightly different now.
Please list your new hdacfg.ini.
Re: High Definition Audio
Post by deomsh on Oct 4th, 2017, 6:12pm

Thanks, I will test tomorrow.

This evening I tried version 8o with mpxplay and Judas first before starting windows. Only the error dialogs in Sound Recorder and Media Player.

I found old versions of Judas, 210a and 210b. They both work in real mode for my chipset. Very difficult to find. In case someone is interested, this is the link:

https://web.archive.org/web/20121109163845/http://www.piotrkn22.republika.pl/judas/index.html

Downloads are working!
Re: High Definition Audio
Post by deomsh on Oct 5th, 2017, 4:56pm

Hello Watler,

I tried 8q, HDACFG is exactly the same as 8o.

When starting first mpxplay and judas before windows, I only hear a loud grumpy sound, but no music.

Your HDAICOUT.HDA looks promising, I will try to find out the appropriate values for 10EC:0662. Next days I don't have time, so will take a while.
Re: High Definition Audio
Post by watler on Oct 6th, 2017, 11:36am

Volume controls work somewhat better now.
http://turkeys4me.byethost4.com/files/HDADRV8S.zip

A custom volume control widget can now be set in hdacfg.ini.

Example:
VolumeWidget=$0C


Re: High Definition Audio
Post by watler on Oct 8th, 2017, 10:51am

Now you can choose what widget number is used as the output converter widget.

A custom widget can now be set in hdacfg.ini under
OutputWidget=$02

Changing the OutputWidget value may cause sounds to play on different audio jacks.

http://turkeys4me.byethost4.com/HDADRV8U.zip


Re: High Definition Audio
Post by watler on Oct 9th, 2017, 6:41pm

When your card is properly detected and enabled,
windows sounds should play.
Even if the driver fails to unmute output, windows sounds should still play silently.

As long as the Clock Counter spins (while Reset is toggled on "GCTL")
windows should move wave data to the HDA buffer.


Deomsh, at least one hdadrv version was working on your computer: (Reply #21)

Please point me to the HDAdrv versions that play silently on your computer.
When testing this time, do not start any DOS HDA players before windows.



Although each play sounds on different ports, these ALC662 computers work.
[HDA_03F010DE,0D14105B]
PCI_BUS=$00
PCI_DEVICE=$05
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
VolumeWidget=$02
OutputWidget=$02

[HDA_03F010DE,837F1043]
PCI_BUS=$00
PCI_DEVICE=$05
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
VolumeWidget=$0C
OutputWidget=$02

Since NVIDIA is working,
I asume that either the AMD chipset or the ASROCK BIOS are different.

Deomsh:
[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$EC0662
CODEC_NODEINFO=$EC0662
VolumeWidget=$04
OutputWidget=$04

It seems unlikly that the CODEC_VID/CODEC_DID are the same as CODEC_NODEINFO.




HDAdrv uses the "Immediate Command" ports to acquire the CODEC_ data found in HDACFG.ini.

$60 is the data being sent.
$64 is the data being received.
$68 holds two bits that indicate when data is sent and received.

If you write $000F0004 to $60
and then set $68 to 1
usually, $64 will fill with the CODEC node count.

(Enter $000F0004 into edit1 of AHDA and press the "Codec Vendor" button)

Re: High Definition Audio
Post by deomsh on Oct 10th, 2017, 6:22pm

I tested again versions 8g/j/k/o/q/s/u with windows driver install and remove and without play in DOS first. All mentioned versions play without sound, so you are absolutely right! When exit Windows 8j/o/q/ gave a GPF in 0002:1781, other versions seems to be okay. Playing in DOS first seems to give the "Device is in use by another application" error and stalling Windows when trying to exit.

By the way, I cannot say which DOS-player had the best sound quality, because Judas cannot play WAV and Mpxplay/Mplayer cannot play XM. Comparing the first two there is no real difference. Judas sound is not very good, but I don't know what the impact is of the XM-compression.

I tested 8u with different values for OutputWidget, but no succes.

Entering $000F0004 into edit1 of AHDA17c and pressing the "Codec Vendor" button gives:

Codec Vendor $10EC
Codec Device $0662
1_10EC0662
2_10EC0662
3_10EC0662

I tried some other values, its strange that values $000F0000-$000F0059 (I tried all!) gives exactly the same output, in big steps I found that this behaviour continues up to $000FFFFF.
Other values give zero's in the last three sentences.

Editing HDACFG.INI with other values for CODEC_REV/CODEC_NODEINFO is not possible, after a reboot they are again $EC0662. Looks to me that is by design.


Re: High Definition Audio
Post by watler on Oct 10th, 2017, 7:16pm

When you set and sent those values in AHDA17c, what message dialogs did you receive?

As you play with those values, you can see the results under the HDA tab.
Your values should appear at the IC Immediate Command index.


In the AHDA17 HDA tab:

Do the values you enter show up at $60? (IC Immediate Command DWORD)

What values does $68 display?



If you click on a $ value in the HDA tab, you can change that value.

Setting $68 to $0001 will tell the codec to send the value in $60.

When a result is finally sent, $68 will turn to $0002 and your return value will be placed in $64.

When $68 is set to $0002, you can clear that by writing a 2 back to it.


Click on the text description of the values to update the entire display.
Re: High Definition Audio
Post by watler on Oct 11th, 2017, 11:02am

/windows/HDAicOUT.HDA

It might be nice to have some return data from HDAicOUT.HDA;

The results of HDAicOUT.HDA Immediate Commands will be printed into a file in the main windows folder (HDAicgot.wri).

http://turkeys4me.byethost4.com/HDADRV8V.zip

A delay has been added for CODECS that respond slowly.
Re: High Definition Audio
Post by deomsh on Oct 11th, 2017, 5:27pm

Thanks for 8V, I will test soon.

I have followed your directions inside AHDA17C.

[HDA]
Clicking
<HDA Pci Mem>
Values first:
60 $0000 IC Immediate Command
62 $0000
64 $0000 IR Immediate Response
66 $0000
68 $0002 IRS Immediate Command Status

Its possible to edit some registers, but NOT registers $60-$68

=>>

[Nodules]

<Codec Vendor>, after typing in box: $000F0004 2x "OK" in dialog's ICS=0002 and ICB clear. Gives:

CODEC Vendor $10EC
CODEC Device $0662
1_10EC0662
2_10EC0662
3_10EC0662

=>>

[HDA}
Clicking on value $68 gives:

$68 $0000
$64 $0662
$66 $10EC

$60 stays zero.

Still not possible to edit values in $68

<Reset Toggle> and clicking on value $68 gives only zero's in $60-$68


=>>

<Codec Vendor> second click gives only zero's, in dialog "ICS=0000" and "IBC clear"

Close and restart AHDA doesn't change anything. Normal exit Windows no longer possible, only forcing full reboot, than [HDA] values as earlier after opening AHDA17C.

Re: High Definition Audio
Post by watler on Oct 11th, 2017, 7:14pm

Everything looks good in ahda17c.

You should only see three values for $68;

$68=$0000 means you can write to $60 - $62;

$68=$0001 Codec is supposed be reading the command in $60- $62.

$68=$0002 means that your $60 data was received by the CODEC.

Rather than changing $68 to another number, you tell it $0002 again to clear it.

Only the CODEC gets to write to $64-$66;


Since I am displaying all values as 16-bit, larger values will be represented by two slots.

$60 will be the lower part of a 32-bit value;
the next line will be the upper 16-bits;

A value like $000F0000 will appear more like:
$60 $0000 IC Immediate Command DWORD
$62 $000F

I adjusted the command delay once again:
http://turkeys4me.byethost4.com/HDADRV8W.zip
A new HDAicOUT.HDA is included.

Once you copy HDAicOUT.HDA to the windows folder, remember to check there for a HDAicgot.wri.

The general format of Immediate Verb commands is:
$F0000000; Codec ID is the highest part
$0FF00000; Node ID is next byte down
$000FFF00; Verb is in the center.
$000000FF; Data is the lowest byte.


The VIA HDA reads and clears $60 values even before you set $68 to $0001.
If you write:
$000F to $62
The VIA Codec will instantly give you the VID/DID in $64-$66 and Set $68 to $0002;



Deomsh, I appreciate your help in testing the driver.

I do not mean to waste your time, it is clear that
my hda driver does not work on your AMD SB600.

If you enjoy learning about HDA and programming,
you may be enjoying this experience.

However, if you are not having fun, I do not wish to torture you.


Re: High Definition Audio
Post by watler on Oct 12th, 2017, 1:33pm

Updated HDAicOUT.HDA operations
and increased HDAicgot.wri detail;
http://turkeys4me.byethost4.com/HDADRV8W.zip

When adding commands to HDAicOUT.HDA,
remember that your codec may have an index greater than one.

$000F0000;
$200F0000;

Check STATESTS for details.
Re: High Definition Audio
Post by deomsh on Oct 12th, 2017, 4:01pm

Thank you Walter for 8W, I will try to test.

I am still interested, only a bit afraid you are running out of version characters laugh

I have just tried 8V, but I didn't find HDAicgot.wri, only HDALOG.TXT in \SYSTEM.

Same as usual, WAV is playing in Sound Recorder and HDACFG.INI is unchanged. What bothers me is that sometimes after starting Windows and without playing WAV in DOS first, when I try to play a WAV in Sound Recorder I get the "Device is in use (...)" error. After a full reboot thing are mostly alright again.

This is HDALOG.TXT:
$000F0000
$000F0002
$000F0004
$014707C0
$0143B000
$015707C0
$0153B000
$016707C0
$0163B000
$017707C0
$0173B000
$018707C0
$0183B000
$019707C0
$0193B000
$01A707C0
$01A3B000
$01B707C0
$01B3B000
$00224011
$00270610
$0143A07F
$0143907F

Can you tell me a bit about what these values mean?
Re: High Definition Audio
Post by watler on Oct 12th, 2017, 5:49pm


When you place a file in the Main "windows" directory called "hdaicout.hda", HDADRV8X will execute the commands within hdaicout.hda and output/print the results to HDAicgot.wri;

There is an example hdaicout.hda included in the zip file;
copy c:\hdadrv8x\hdaicout.hda c:\windows\hdaicout.hda

Next time you notice that sounds are not playing, use ahda to examine the "WALCLK Wall Clock Counter".

Soundrec may start to play if you manually restart the HDA controller.


HDAlog.txt is a dump of the data that function hda_single_send_cmd sends to the HDA.
(See HDA.PAS line 1089)

Although I do not have all of the HDA commands memorized, I can try to oversimplify the topic. tongue

HDA.PAS line 351: { GET verbs}
HDA.PAS line 428 : Parameter IDs


Codec,Node,Verb,Parameter

$F0000000 Codec
$0FF00000 Node
$000FFF00 Verb
$000000FF Parameter

$0 00 F00 00

Codec=0
Node=0
Verb=F00
Parameter=0

$000F0000
The Verb F00 means "Get Parameter"
Zero is the Parameter (0=Vendor ID)

$000F0002
The Verb F00 means "Get Parameter"
Two is the Parameter (2=Revision ID)



Re: High Definition Audio
Post by watler on Oct 14th, 2017, 10:19am

This version should correct some startup/shutdown errors.
http://turkeys4me.byethost4.com/HDADRV8Y.zip

[HDA_03F010DE,0D14105B]
PCI_BUS=$00
PCI_DEVICE=$05
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
VolumeWidget=$02
OutputWidget=$02

[HDA_03F010DE,837F1043]
PCI_BUS=$00
PCI_DEVICE=$05
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
VolumeWidget=$0C
OutputWidget=$02

[HDA_43831002,960F1002]
PCI_BUS=$01
PCI_DEVICE=$05
PCI_FUNCTION=$1
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$1002
CODEC_DID=$791A
CODEC_REV=$100000
CODEC_NODEINFO=$010001

[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCTL=00000001
CODEC BITMAP=00000001
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$EC0662
CODEC_NODEINFO=$EC0662

My 0662 are function zero.
Your 0662 is showing as the third function of device $14.

Deomsh, perhaps you need a driver for the main device.

http://support.amd.com/TechDocs/42119_sb600_ds_pub_3.07.pdf
http://support.amd.com/TechDocs/46155_sb600_rrg_pub_3.03.pdf
http://support.amd.com/TechDocs/46156_sb600_rpr_pub_3.02b.pdf
http://support.amd.com/TechDocs/46157_sb600_bdg_pub.3.00.pdf


Re: High Definition Audio
Post by deomsh on Oct 14th, 2017, 6:07pm

Thank you Watler,

I've tried all new versions, but no progress.

Today my PS/2-port does not work anymore, so maybe my motherboard is the problem indeed.

When my kids where swimming this afternoon, I found MS High Definition Audio Utility 3.3 (HdauSetup.msi). I can read things about my codec (inside Windows 10).

I can see:
[Parameters]
Vendor Id: 0x10EC0662;
Revision ID: 0x00100101;
Subordinate node count: 0x00010001;
[Audio Function Group]
Controls;
Parameters;
Pivots;
Widgets.

And inside those four groups much, much more, up to widget 37 (0x26).

Export is only in xml-format. You can load this file in the High Definition Audio Utility 3.3. Shall I mail you the xml-file (389K)?
Re: High Definition Audio
Post by watler on Oct 14th, 2017, 8:16pm

Thank you for your help, deomsh.
Good to hear that everyone was able to enjoy the day.

Have you tried another PS/2 keyboard (or mouse)?
Can a USB device be used in its place?

If you are able to setup batch files, testing my driver may not require much input.
Perhaps you can edit hdaicout.hda from Windows 10 and then read the results from hdaicgot.wri;

Now that we know that your Revision ID and Node count are not the same as your VID/DID,
we must figure out how to properly read them from windows 3.1.
Once you have moved hdaicout.hda from your windows system folder to your main windows directory, please run windows 3.1 and post the resulting hdaicgot.wri;


By default my driver does not use any Widget info.
However, it must be able to send and receive those sort of commands for the user.
If your computer's BIOS has not set up your HDA's widgets and nodes, you may still need your HDA widget information.

I do not have access to Windows 10.
Feel free to email me as you like.



Re: High Definition Audio
Post by deomsh on Oct 15th, 2017, 4:36pm

Found an old PS/2 mouse that is working with my motherboard. So I can go on.

I think I can manage batchfiles, I am willing to test further.

The HDAut.msi needs at least Windows 7 audio drivers.

Of cause I copied HDAICOUT.HDA to the Windows directory, as you said. During latest tests I got only ONE time HDAICGOT.WRI:
sent $01470740; got $00000000
sent $0143B07F; got $00000000
sent $0143B07F; got $00000000
sent $01570740; got $00000000
sent $0153B07F; got $00000000
sent $0153B07F; got $00000000
sent $01670740; got $00000000
sent $0163B07F; got $00000000
sent $0163B07F; got $00000000
sent $01770740; got $00000000
sent $0173B07F; got $00000000
sent $0173B07F; got $00000000
sent $01870740; got $00000000
sent $0183B07F; got $00000000
sent $0183B07F; got $00000000
sent $01970740; got $00000000
sent $0193B07F; got $00000000
sent $0193B07F; got $00000000
sent $01A70740; got $00000000
sent $01A3B07F; got $00000000
sent $01A3B07F; got $00000000
sent $01B70740; got $00000000
sent $01B3B07F; got $00000000
sent $01B3B07F; got $00000000
sent $00224011; got $00000000
sent $00270610; got $00000000
sent $00324011; got $00000000
sent $00370610; got $00000000
sent $00424011; got $00000000
sent $00470610; got $00000000
sent $0033B0FF; got $00000000
sent $0043B0FF; got $00000000
sent $0063B0FF; got $00000000
sent $00C3B0FF; got $00000000
sent $00D3B0FF; got $00000000
sent $00E3B0FF; got $00000000
sent $0023A07F; got $00000000
sent $0023907F; got $00000000
sent $0033A07F; got $00000000
sent $0033907F; got $00000000
sent $0043A07F; got $00000000
sent $0043907F; got $00000000
sent $00C3A07F; got $00000000
sent $00C3907F; got $00000000
sent $00D3A07F; got $00000000
sent $00D3907F; got $00000000
sent $00E3A07F; got $00000000
sent $00E3907F; got $00000000
sent $000F0000; got $10EC0662
sent $000F0001; got $10EC0662
sent $000F0002; got $10EC0662
sent $000F0003; got $10EC0662
sent $000F0004; got $10EC0662
sent $000F0005; got $10EC0662
sent $000F0006; got $10EC0662
sent $000F0007; got $10EC0662
sent $001F7700; got $00000000
sent $001F7700; got $00000000
sent $000F0000; got $10EC0662
sent $000F0001; got $10EC0662
sent $000F0002; got $10EC0662
sent $000F0003; got $10EC0662
sent $000F0004; got $10EC0662
sent $000F0005; got $10EC0662
sent $000F0006; got $10EC0662
sent $000F0007; got $10EC0662

The "got's" after sent values $000F0000-$001F7700 are consistent with my results with AHDA17c I posted in Reply #38.

Makes it any difference if HDAICOUT.HDA is during install already in the Windows directory? I assume not.
Re: High Definition Audio
Post by watler on Oct 15th, 2017, 5:46pm

Good to see that everything is working well. cool

Hdaicout.hda is optional and must be managed by the user.
Each new hdaicgot.wri will overwrite the old one.

We are using the Immediate Command ports to talk with the CODEC.
Although most HDA support this method, for HDA the Immediate Command interface is optional.

Since your CODEC is responding.
You might try a different CODEC ID.
You can edit, add, and remove the commands within
hdaicout.hda.

$100F0002;
$200F0002;
$400F0002;
$F00F0002;


Why don't you give version Y a try?
Re: High Definition Audio
Post by deomsh on Oct 16th, 2017, 5:23pm

I have tested 8Y already, as I tried to say in Reply #47. I will experiment again, but first I have to read more documentation. As I am not a programmer its not really easy.
Re: High Definition Audio
Post by watler on Oct 16th, 2017, 6:53pm

Deomsh, were you able to try a different codec index?

You might adjust your batch files to erase the old hdalog.txt and hdaicgot.wri before windows 3.1 starts.

http://turkeys4me.byethost4.com/HDADRV8Z.zip



I have seen and used only a small number of HDA devices and I have no access to an AMD HDA version.
You are my primary source of information for this device.

It would appear that your HDA is not in the same vein as my HDA controllers.
Surely there is some nuance in implementation that effects initialization.
However, I've no notion what it is. huh

My drivers are rather simplistic in nature.
HDA2.DLL expects hardware to be preconfigured and autonomous.
Any HDA interface that works with my 16-bit driver must be extremely verbose.

Perhaps one of the ledgemen at ASROCk could refer you to the architect that sculptured your motherboard.


(I don't own windows 7)


Re: High Definition Audio
Post by watler on Oct 17th, 2017, 1:59pm

Adjusted initialization and output:
http://turkeys4me.byethost4.com/HDADRV8~.zip

Are the HDA reset pop/crack sounds audible at windows 3.1 startup?
Re: High Definition Audio
Post by watler on Oct 18th, 2017, 11:00am

HDA startup code added:
http://turkeys4me.byethost4.com/HDADRV90.zip


Deomsh, has anything changed for you?
Re: High Definition Audio
Post by deomsh on Oct 18th, 2017, 6:04pm

Help, your going very fast rolleyes. I will test version 90 soon.

This evening I have tested 8z and 8~. As long I don't first use a DOS HDA-player, the new versions are playing very well, no shutdown problems. Still no sound, no crackling noise at startup. Only when I play in a DOS HDA-player, there is heavy crackling sound at startup and sometimes during, but impossible to use Sound Recorder because of the 'Device is in use by an other application'. After a full (BIOS-)reboot tis error is gone. It seems to me the driver has problems to reset the codec.

There is a new line in HDACFG.INI: 'CODEC Index=$0', but I am not able to edit the value. After reboot its zero again.

No HDAICGOT.WRI with 8Z and 8~. I tested earlier versions, only with 8W I got SOMETIMES cry this file (same values as in Reply #49).

I did some preliminary reading in Intel's High Definition Audio Specification, I am beginning to have some (vague) notion of a HDA-codec.

Further I found a way to get some verb and response values with MS High Definition Audio Utility 3.3.

RootNode
Revision Id: Verb: 0x000F0002 Reponse: 0x00100101
Subordinate Node Count: Verb: 0x000F0004 Reponse: 0x00010001

Re: High Definition Audio
Post by watler on Oct 18th, 2017, 7:48pm

It is good to hear that the codec is working.

There is a new hdaicout.hda that you can copy to the main windows 3.1 directory.
The meaning of hdalog.txt and HDAicgot.wri has changed between the last few versions.

Even if they appear similar, I would like to see each new version's HDAicgot.wri and hdalog.txt.

Has the windows 3.1 startup time changed between versions or settings?
Does the HDA snap/tick when the computer is first turned on?

Set the windows startup sound to "none".
Have both a 44100hz and a 48000hz wave handy.

Remember to pray. wink
Re: High Definition Audio
Post by deomsh on Oct 19th, 2017, 5:36pm

Thanks a lot for all your efforts. I have tested version 90.

-No crackling noise at startup. System sounds were already disabled.
-44100 and 48000 wav files, both 16 bit, play fine in sound Recorder, but still silence embarassed
-No HDAICGOT.WRI. Only empty HDALOG.TXT in the root directory (in my case C:\).
-Changing in HDACFG.INI VolumeWidget values or OutputWidget values makes no difference.
-Using ACTIVATE.EXE or WAVEOUT.EXE (Volume Mixer) makes no difference. sad

This weekend I will search my old oscilloscope and measure electric output signals.
Re: High Definition Audio
Post by watler on Oct 20th, 2017, 1:18pm

Thank you for testing my drivers, deomsh.
There is no way to know about them till you try them.

As long as the Immediate Command interface is not working, my driver will be unable to make use of your HDA CODEC.
Perhaps your HDA implementation is incompatible with 16-bit access.
No sound during boot may indicate that the BIOS has not activated the HDA (or has disabled it).

You are welcome to peruse my code at your leisure.
If you spot any errors in my code or have any recommendations, just let me know. smiley



Re: High Definition Audio
Post by watler on Oct 23rd, 2017, 12:36pm

Deomsh, you have not mentioned your oscilloscope results.
Did everything go well for you?


http://turkeys4me.byethost4.com/HDADRV91.zip
You say that the position of windows wave files is now moving?

I ususally run windows from the a directory called C:\win310.
Since you are finding HDALOG.TXT in the root directory, I suppose hdaicout.hda should be placed in that directory also.

I added an AHDA setting to manually change the CODEC index:
http://turkeys4me.byethost4.com/files/AHDA17D.zip
You can now edit grid values with the Keyboard's Enter key.


Re: High Definition Audio
Post by deomsh on Oct 23rd, 2017, 5:12pm

I didn't find my oscilloscope yet, but I found my old HP 400E AC voltmeter (analog, from 1 mV full scale up to 300V).
I measured when starting Windows and while playing a wav-file, but the needle doesn't move from the 8 mV position (that signal will be a small 50Hz hum). In Windows 10 the needle moves a lot when playing sound, of course. cool

Placing HDAICOUT.HDA in a Windows.310 directory, didn't bring anything, I even added that directory as the first instance to the path. HDALOG.TXT is still in the root.

Thanks for the new files, I will test them soon.

I found some SB710 documentation (southbridge of my motherboard), I will compare them to your SB600 docs for ALC662.
Re: High Definition Audio
Post by watler on Oct 24th, 2017, 11:56am

I thought you might be down with the fluke or something.
Glad to hear that you are feeling well.
If you can find a tach you can test the dwell.

Since it seems things are going down the wrong path, lets see If I can keep to the windows directory.
http://turkeys4me.byethost4.com/files/HDADRV92.zip

Fixed ICH IC error reset bind:
http://turkeys4me.byethost4.com/programs/AHDA17E.zip

Let me know if you spot any peculiarities that distinguish your device from the rest.

Re: High Definition Audio
Post by watler on Oct 25th, 2017, 1:21pm

Do your widgets have power management?

I've added simple PM control:
http://turkeys4me.byethost4.com/programs/HDADRV94.zip

Since someone recently gave me a Gateway GT5026E, I have been able to produce sound on it by powering up the AFG and Audio Output (widget 02).

[HDA_27D88086,5049107B]
PCI_BUS=$00
PCI_DEVICE=$1B
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000100
CODEC Index=$2
CODEC_VID=$8384
CODEC_DID=$7680
CODEC_REV=$103201
CODEC_NODEINFO=$010001
VolumeWidget=$02
OutputWidget=$02
SleepingWidget=$02

The same settings seem to work with the my Dell E510.

[HDA_27D88086,01D21028]
PCI_BUS=$00
PCI_DEVICE=$1B
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00000001
CODEC Index=$0
CODEC_VID=$8384
CODEC_DID=$7680
CODEC_REV=$103201
CODEC_NODEINFO=$010001
VolumeWidget=$02
OutputWidget=$02
SleepingWidget=$02


I hope your AMD chipset works better than these two intel ones.




Re: High Definition Audio
Post by deomsh on Oct 25th, 2017, 5:46pm

About your question about power management, according to the Realtek ALC662 series datasheet 1.3
http://www.hardwaresecrets.com/datasheets/ALC662_DataSheet_1.3.pdf
there are three supported power states (described in 7.5/8.1.13/8.16/8.17).

I will try version 9.4 soon.

Today I compared the SB600 and SB710 docs, but I couldn't find any differences according to HDA, so the self-identification of the HDA-controller as SB600 seems to be correct.

I tested further version 9.1 an 9.2. This time I got HDALOG.TXT and HDAICGOT.WRI in the root for 9.1. Version 9.2 gives HDALOG.TXT and HDAICIN.TXT in the Windows-directory. laugh

HDALOG.TXT (both versions!):
4999
etc, many times
4999
CODEC 1 not sending!
CODEC 2 not sending!
CODEC F not sending!

HDAICIN.TXT (version 9.2):
sent $01470740; got $00000000 ticks=000000A5 + w g
sent $0143B07F; got $00000000 ticks=000000A5 + w g
sent $0143B07F; got $00000000 ticks=000000A5 + w g
sent $01570740; got $00000000 ticks=000000A4 + w g
sent $0153B07F; got $00000000 ticks=000000A5 + w g
sent $0153B07F; got $00000000 ticks=000000A5 + w g
sent $01670740; got $00000000 ticks=000000A5 + w g
sent $0163B07F; got $00000000 ticks=000000A5 + w g
sent $0163B07F; got $00000000 ticks=000000A4 + w g
sent $01770740; got $00000000 ticks=000000A5 + w g
sent $0173B07F; got $00000000 ticks=000000A5 + w g
sent $0173B07F; got $00000000 ticks=000000A5 + w g
sent $01870740; got $00000000 ticks=000000A4 + w g
sent $0183B07F; got $00000000 ticks=000000A5 + w g
sent $0183B07F; got $00000000 ticks=000000A5 + w g
sent $01970740; got $00000000 ticks=000000A5 + w g
sent $0193B07F; got $00000000 ticks=000000A4 + w g
sent $0193B07F; got $00000000 ticks=000000A5 + w g
sent $01A70740; got $00000000 ticks=000000A5 + w g
sent $01A3B07F; got $00000000 ticks=000000A5 + w g
sent $01A3B07F; got $00000000 ticks=000000A5 + w g
sent $01B70740; got $00000000 ticks=000000A4 + w g
sent $01B3B07F; got $00000000 ticks=000000A5 + w g
sent $01B3B07F; got $00000000 ticks=000000A5 + !g
sent $00224011; got $00000000 ticks=000000A5 + w g
sent $00270610; got $00000000 ticks=000000A4 + w g
sent $00324011; got $00000000 ticks=000000A5 + w g
sent $00370610; got $00000000 ticks=000000A5 + w g
sent $00424011; got $00000000 ticks=000000A5 + w g
sent $00470610; got $00000000 ticks=000000A5 + w g
sent $0033B0FF; got $00000000 ticks=000000A4 + w g
sent $0043B0FF; got $00000000 ticks=000000A5 + w g
sent $0063B0FF; got $00000000 ticks=000000A5 + w g
sent $00C3B0FF; got $00000000 ticks=000000A5 + w g
sent $00D3B0FF; got $00000000 ticks=000000A4 + w g
sent $00E3B0FF; got $00000000 ticks=000000A5 + w g
sent $0023A07F; got $00000000 ticks=000000A5 + w g
sent $0023907F; got $00000000 ticks=000000A5 + w g
sent $0033A07F; got $00000000 ticks=000000A5 + w g
sent $0033907F; got $00000000 ticks=000000A4 + w g
sent $0043A07F; got $00000000 ticks=000000A5 + w g
sent $0043907F; got $00000000 ticks=000000A5 + w g
sent $00C3A07F; got $00000000 ticks=000000A5 + w g
sent $00C3907F; got $00000000 ticks=000000A4 + w g
sent $00D3A07F; got $00000000 ticks=000000A5 + w g
sent $00D3907F; got $00000000 ticks=000000A5 + w g
sent $00E3A07F; got $00000000 ticks=000000A5 + w g
sent $00E3907F; got $00000000 ticks=000000A5 + w g
sent $000F0000; got $10EC0662 ticks=000000A4 + w g
sent $000F0001; got $10EC0662 ticks=000000A5 + w g
sent $000F0002; got $10EC0662 ticks=000000A5 + w g
sent $000F0003; got $10EC0662 ticks=000000A5 + w g
sent $000F0004; got $10EC0662 ticks=000000A4 + w g
sent $000F0005; got $10EC0662 ticks=000000A5 + w g
sent $000F0006; got $10EC0662 ticks=000000A5 + w g
sent $000F0007; got $10EC0662 ticks=000000A5 + w g
sent $001F7700; got $00000000 ticks=000000A4 + w g
sent $001F7700; got $00000000 ticks=000000A5 + w g
sent $000F0000; got $10EC0662 ticks=000000A5 + w g
sent $000F0001; got $10EC0662 ticks=000000A5 + w g
sent $000F0002; got $10EC0662 ticks=000000A5 + w g
sent $000F0003; got $10EC0662 ticks=000000A4 + w g
sent $000F0004; got $10EC0662 ticks=000000A5 + w g
sent $000F0005; got $10EC0662 ticks=000000A5 + w g
sent $000F0006; got $10EC0662 ticks=000000A5 + w g
sent $000F0007; got $10EC0662 ticks=000000A4 + w g
sent $100F0004; got $15D70380 ticks=00000414 + w!
sent $200F0004; got $15D70380 ticks=00000414 + w!

There are four differences in version 9.1 HDAICGOT.WRI:
(second) sent $01B3B07F; got $00000000 ticks=000000A5 + w g
sent $0033A07F; got $00000000 ticks=000000A5 + !g
last two lines are:
sent $100F0004; got $15D70377 ticks=00000414 + w!
sent $200F0004; got $15D70377 ticks=00000414 + w!
(instead of two times "got $15D70380"!).

What means "+ w/w!/g/!g"?

HDACFG.INI was unchanged since last report:
[ALLHDA]
$00A2=$43831002

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000
myPCIaddr=$00100000
aPCIHI=$0020
aPCILO=$0000
aPCIaddr=$00200000

[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCTL=00000001
CODEC BITMAP=00000001
CODEC Index=$0
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$EC0662
CODEC_NODEINFO=$EC0662
VolumeWidget=$14
OutputWidget=$02

I tested several OutputWidget-values and also PCIaddr $FBFF4000.

WAV-files gave movement in SoundRec, so they are playing. No sound yet, no crackling. Starting with a 16-bit 48000 file gave not always playing with movement, but after first playing a 16-bit 44100 file there was always movement. kiss

Finally I did some tests with AHDA17E, but the only node/widgets-output is still the boring "10EC0662" huh
Re: High Definition Audio
Post by watler on Oct 26th, 2017, 3:18pm

Deomsh, I fear that I've run out of handy HDA chipsets that do not work with my driver. sad
If we are to continue, testing may require a bit more of you.

Untill I have an ATI HDA compatible chipset, SB600 testing will be rather unhandy for me.
Unless someone can pinpoint exactly what needs done for your motherboard, it may be a while before I figure out a solution.

Do you percieve some forthright forthcoming solution?
Are you soundly decided to continue?
Re: High Definition Audio
Post by deomsh on Oct 26th, 2017, 4:35pm

I'd like to go on. cool

Today I tested version 9.4. Except for the SleepingWidget things didn't changed compared to version 9.2. Do you need HDAICIN.TXT?

I tested various values for SleepingWidget, no luck sad

In my Windows 10 program "High Definition Audio Utility" gives for "Parameter Power States" Verb 0x000F000F with Response 0X0000000F which means supported powers states D0, D1, D2 and D3. Same as ALC662 datasheet, although my chipsets response code looks different to me.
Re: High Definition Audio
Post by watler on Oct 26th, 2017, 8:31pm

+ indicates that the CODEC was not busy. ($68=0)
After this the command is written to $60 and the driver sets $68 to $0001;

! indicates that when $68 was read it was equal to $0000
w indicates that when $68 was read it was equal to $0001

G indicates that the CODEC set $68 to $0002;


Have you tried to compile any of the open source DOS HDA players that you have found?

Although I'm not very good with C or C++, I did try to compile a few.
I found that none of the DOS players would compile from within windows 3.1
I used Win98 , Open Watcom, and NASM to compile JUD.

Perhaps you may have better luck from Windows 10.


Re: High Definition Audio
Post by watler on Oct 26th, 2017, 9:01pm

Years ago, I was told that I should create a High Definition Audio driver. rolleyes
After that I was given several HDA computers.
However, before I was able to create my HDA driver, I had to ask several HDA enthusiasts (and a few experts) about the subject.
Although each had their own viewpoint, everyone I asked was somewhat helpful.
If you want to know about the exact details of your hardware, you may have to ask.

I asked Asus for advice on my Asus motherboard and I asked Dell about my Dell machines.
Many thanks to everyone for their help and advice.

Since you own an ASROCK motherboard, ASROCK may have some rock solid advice to give.

I seem to remember AMD giving very helpful advice.
Do you think that they might further explain your motherboards HDA operations?

If the programmers of the DOS HDA players have time, they might gladly give their advice.
The least you could do is thank them for their works.


Although I enjoy programming in pascal, I don't know much about HDA.
Deomsh, have you talked with any one other than me about the subject?

Re: High Definition Audio
Post by deomsh on Oct 28th, 2017, 06:15am

Thank you very much for all your efforts.

Basically I am on my own now. I am thinking about a efficient strategie to move on.

Am I right that I can use Delphi 1.0 to work with your HDA-driver?
Re: High Definition Audio
Post by watler on Oct 28th, 2017, 2:08pm

Deomsh, you have given up on me now? cry

There are many things I could still try.
http://turkeys4me.byethost4.com/programs/HDADRV95.zip

If you must gain a greater individuality, I would think it more toward expansion than isolation.
There are many people to talk with about the subjects involved.

I'm still here and learning about High Definition Audio.
However, I don't know much about your motherboard's HDA.

Asking some one who already knows the answer might be the fastest solution.
Experimenting with your motherboard might produce results more quickly than my guesswork.

You should have expected me to talk about programming. grin
Yes, the HDADRV source code will compile with 16-bit Delphi. (1.x)

Your problem is at the initialization/communication level.
The bulk of the HDA spec is only relevant after that step.

The PCI device has been detected.
The PCI IO/BAR seems to be working.
The Immediate Command ports do not respond as mine . ($60,$64,$68)

Re: High Definition Audio
Post by deomsh on Oct 28th, 2017, 3:30pm

Watler, of cause I have'nt give you up. But my programming skills are on very low level, so I feel I have to study a bit to ask the right questions later (and have an understanding of the answers. rolleyes
I ordered an audio front level device for testing the possibility my motherboard gives only front output with your driver, also I ordered a book about Programming in Turbo Pascal and Delphi 1.0, with these programs on the CD that accompanies the book.
In the mean time I am VERY happy with a new opportunity to test version 9.5. laugh
Re: High Definition Audio
Post by watler on Oct 28th, 2017, 6:37pm

A survivalist shoot first ask questions later type approach?
Sort of a Rambo type programmer? shocked

Delphi is the only compiler that will comple the HDADRV project without adjustments.

However, you need not purchase anything unless you wish.
I could create a plugin system, some realtime hooks, or a new TSR interface to make use of other compilers.

Turbo pascal, Borland Pascal, Turbo Pascal for Windows, and Delphi are all somewhat code compatible.
A few older versions of Pascal are available at no cost.
You should be able to find Turbo Pascal 3 and Turbo Pascal 5.5 free (for personal/educational use).

Although it is a bit different, 16-bit POW! Oberon 2 is free and runs under 386 Enhanced mode.

Although Open Watcom is a DOS compiler system, it is free and it can compile DOS,Win16,win32s, and Linux code .
It has an IDE that will try to compile using the virtual DOS boxes of Enhanced mode.

Regular DOS applications can be used to support windows drivers.
You could try to compile JUDAS with Open Watcom and NASM. (bat files in JUD)


When you have time please list your HDA GCAP value.
Re: High Definition Audio
Post by watler on Oct 29th, 2017, 3:16pm

I adjusted the resolution and range of IC inquiry.
http://turkeys4me.byethost4.com/programs/HDADRV96.zip
Let me know if any missing ichcfg.ini data is filled in.


Re: High Definition Audio
Post by deomsh on Oct 29th, 2017, 6:37pm

Thanks for the new version, I will try to test tomorrow.

Today I tested version 9.5. Same as usual.

These values are new in HDACFG.INI:
GCAP=$4401
VMIN=$00
VMAJ=$01

GCTL-value changed from $00000001 to
GCTL=$0001

I have also some good news for your database (If yo like to have one) wink. I installed Windows 3.1 on a USB stick to test your driver on my wife's computer, although I only succeeded to start Windows in standard mode (has nothing to do with your driver). With help form HDARUN.EXE I could play some WAV-files with sound coming from the speakers connected to the back panel. laugh
The motherboard in question is an Asus P541GT-M LE with Realtek codec ALC887 (Intel G41 / ICH7). Maybe this is nothing new, but my MS-DOS 7.10 based setup is working with your driver. tongue
Re: High Definition Audio
Post by watler on Oct 30th, 2017, 11:32am

Congratulations, to you and your wife.
You truly are pioneers in the field.

The HDAcfg.ini from the Asus P541GT-M LE would be interesting to see.
You are also welcome to list other HDA computers that do not produce sound.

Your wife must have good taste in hardware.

On my Dell E510(ICH7) there is an interrupt conflict between BIOS controlled usb devices.
You must move the USB mouse after each USB key press or the system will lock up.
You have to use a windows 3.1 USB mouse driver to get around that problem.

A few computers can only use enhanced mode from local storage(SATA/PATA/SCSI) for similar reasons.

Although the himem from windows 98 works well for standard mode, often you must use other versions.
Machines with more than 1gb of RAM may require himemx for Enhanced Mode:
device=himemx /noabove16 /max=1000000

The himem included with windows 3.1 works on a few machines and can be used with setxmsto.
Re: High Definition Audio
Post by deomsh on Oct 30th, 2017, 5:54pm

I will try, never used HimemX with /NOABOVE16.

With version 9.6 Windows 3.1 cannot load, neither in Enhanced/Standard mode.

HDACFG.INI:
[ALLHDA]
$00A2=$43831002

[HDA]
TSR=TSR Found

[BUSMASTER]
myPCIHI=$0011
myPCILO=$0000
myPCImem=$00110000

No log files at all.

I also tried on the P5G41T-M LE with win /s, I find out the driver can only load without HDAICOUT.HDA. Then there is sound rolleyes

I will sent you the appropriate files.
Re: High Definition Audio
Post by watler on Oct 31st, 2017, 11:06am

HDAICOUT.HDA requires manual adjustments for each computer.
Since hdaicout.hda is not working for you, just delete it.

HDACFG.ini and HDALOG.txt should still give plenty of info.

http://turkeys4me.byethost4.com/files/HDADRV97.zip

Although all the chipsets I've tested are properly responding to simple IC port commands,
each brand of HDA chipset responds a bit differently.


Re: High Definition Audio
Post by deomsh on Nov 1st, 2017, 3:44pm

HDAICOUT is working again in version 9.7. Logfiles are a bit different. 960gm-gs3 (sb710) still no sound, I tried different output widgets. P5G41T-M LE (ICH 7): sound is still there. I will sent you all files.
Re: High Definition Audio
Post by watler on Nov 5th, 2017, 2:36pm

You might see if CORB/RIRB are reacting the same way as the IC ports.
http://turkeys4me.byethost4.com/files/AHDA17F.zip

The second window has a tab called CORB.
First click the "Corb reset" button.
Then change the "CorbWrite" value to your CODEC Index.
My computers use 2 and 0. ($200F0004 and $000F0004)

When you have your command ready, press "CorbWrite".
The RIRB results should display to the right.
Re: High Definition Audio
Post by deomsh on Nov 7th, 2017, 3:43pm

I tested the new AHDA17F CORB-function on my motherboard (s710).

These are the results:

<Corb reset>:
size=01000010
CORBWP set to 0
CORBRP_RESET ignored...
CORBRP=0
CORBCTL=$0002
RIRBSIZE=2;256 entries
RIRBWP=$8000
RIRBCTL=$0002

<CorbWrite> with $200F0004:
$0000000000000000;00-FC (same values from line 00 up to line FC

<CorbWrite> with $000F0000:
$0000000010EC0662;00-FC

Verb and response are equal to "Vendor Id" (Parameters Codec) in Win10 HDA utility 3.3.


<CorbWrite> with $000F0002:
$0000000000100101;00-FC

Verb and response are equal to "Revision Id" (Parameters Codec) in Win10 HDA utility 3.3


<CorbWrite> with $000F0004:
$0000000000000000;00
$0000000000010001;02-FC

Verb and response (except first line) are equal to "Subordinate Node Count" (Parameters Codec) in Win10 HDA utility 3.3.


Other values I tried gave only zero's tongue

Corb reset between the tests didn't gave any difference.
Re: High Definition Audio
Post by watler on Nov 7th, 2017, 6:14pm

The CORB/RIRB is returning different values than the IC interface was?
With the IC ports you were always getting either $10EC0662 or $00000000;
Did you compare the "nodules" tab of the first window with the "CORB" tab of the second window?

Do your wife's devices produce reliable results as well?
Are the Verb Command results the same as the ones from windows 10?

$0XX00000 is the Node index.
Node 00 only responds to a few commands.
You could query another node.

$002F0500 should ask node two about verb $F05;

Re: High Definition Audio
Post by deomsh on Nov 8th, 2017, 5:52pm

Yes, in the other windows all (IC and other) values are as reported earlier!

New tests, inbetween <Corb reset> (MANDATORY!):

I did a hundred tests or so (without documentation cool). Following values are non-zero's

<CorbWrite> with $001F0004:
$0000000000020025;00
$0000000000020025;02
$0000000000020025;04
$0000000000020025;06
$0000000000020025;08
$0000000000020025;0A
$0000000000020025;0C
$0000000000020025;0E
$0000000000020025;10
$0000000000020025;12
$0000000000020025;14
$0000000000020025;16
$0000000000020025;18
$0000000000020025;1A
$0000000000020025;1C
$0000000000020025;1E
$0000000000020025;20
$0000000000020025;22
$0000000000020025;24
$0000000000020025;26
$0000000000020025;28
$0000000000020025;2A
$0000000000020025;2C
$0000000000020025;2E
$0000000000020025;30
$0000000000020025;32
$0000000000020025;34
$0000000000020025;36
$0000000000020025;38
$0000000000020025;3A
$0000000000020025;3C
$0000000000020025;3E
$0000000000020025;40
$0000000000020025;42
$0000000000020025;44
$0000000000020025;46
$0000000000020025;48
$0000000000020025;4A
$0000000000020025;4C
$0000000000020025;4E
$0000000000020025;50
$0000000000020025;52
$0000000000020025;54
$0000000000020025;56
$0000000000020025;58
$0000000000020025;5A
$0000000000020025;5C
$0000000000020025;5E
$0000000000020025;60
$0000000000020025;62
$0000000000020025;64
$0000000000020025;66
$0000000000020025;68
$0000000000020025;6A
$0000000000020025;6C
$0000000000020025;6E
$0000000000020025;70
$0000000000020025;72
$0000000000020025;74
$0000000000020025;76
$0000000000020025;78
$0000000000020025;7A
$0000000000020025;7C
$0000000000020025;7E
$0000000000020025;80
$0000000000020025;82
$0000000000020025;84
$0000000000020025;86
$0000000000020025;88
$0000000000020025;8A
$0000000000020025;8C
$0000000000020025;8E
$0000000000020025;90
$0000000000020025;92
$0000000000020025;94
$0000000000020025;96
$0000000000020025;98
$0000000000020025;9A
$0000000000020025;9C
$0000000000020025;9E
$0000000000020025;A0
$0000000000020025;A2
$0000000000020025;A4
$0000000000020025;A6
$0000000000020025;A8
$0000000000020025;AA
$0000000000020025;AC
$0000000000020025;AE
$0000000000020025;B0
$0000000000020025;B2
$0000000000020025;B4
$0000000000020025;B6
$0000000000020025;B8
$0000000000020025;BA
$0000000000020025;BC
$0000000000020025;BE
$0000000000020025;C0
$0000000000020025;C2
$0000000000020025;C4
$0000000000020025;C6
$0000000000020025;C8
$0000000000020025;CA
$0000000000020025;CC
$0000000000020025;CE
$0000000000020025grin0
$0000000000020025grin2
$0000000000020025grin4
$0000000000020025grin6
$0000000000020025grin8
$0000000000020025grinA
$0000000000020025grinC
$0000000000020025grinE
$0000000000020025;E0
$0000000000020025;E2
$0000000000020025;E4
$0000000000020025;E6
$0000000000020025;E8
$0000000000020025;EA
$0000000000020025;EC
$0000000000020025;EE
$0000000000020025;F0
$0000000000020025;F2
$0000000000020025;F4
$0000000000020025;F6
$0000000000020025;F8
$0000000000020025;FA
$0000000000020025;FC
Could mean "total nodes: 25", "starting node: 2" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F0005:
$0000000000000101;00-FC (al values the same!)
Could mean "unsolcapable: True" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F0008:
$0000000000010F0F;00-FC
Could mean "output-/inputdelay F and Beep presence: True" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F000A:
$00000000000E0160;00-FC
Could mean "24/20/16-bits and 44.1/48.0/96/0 kHz: True" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F000B:
$0000000000000001;00-FC
Could mean "PCM: True" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F000F:
$000000000000000F;00-FC
Could mean "support power states D0/D1/D2/D3" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $001F0011:
$0000000040000002;00-FC
Could mean "number of GPi/o's: 2 and unsolicited: True" (in Parameters from Audio Function Group) in Win10 HDA utility 3.3

<CorbWrite> with $002F0009:
$000000000000001D;00-FC

<CorbWrite> with $002F000A:
$00000000000E0160;00-FC

<CorbWrite> with $002F000B:
$0000000000000001;00-FC

<CorbWrite> with $002F000F:
$0000000000000001;00-FC

<CorbWrite> with $002F0012:
$0000000000034040;00-FC

<CorbWrite> with $003F0009:
$000000000000001D;00-FC

<CorbWrite> with $003F000A:
$00000000000E0160;00-FC

<CorbWrite> with $004F000A:
$00000000000E0160;00-FC

<CorbWrite> with $006F000A:
$00000000001E0160;00-FC

<CorbWrite> with $008F000a:
$0000000000060160;00-FC

Possible meaning nodes 002 and higher not searched yet.

About node 001: last five bits of verbs are the same as in Win10 HDA utility 3.3 (writes 000 for first three bits), response values equal (writes only 8 bits).

Had no time yet to test AHDA17F on my wife's computer. Will try tomorrow rolleyes
Re: High Definition Audio
Post by watler on Nov 8th, 2017, 8:33pm

Those look like some happy results.
If I understand correctly, your CORB and RIRB are working.

I changed HDADRV so that HDAICOUT.HDA is read with CORB/RIRB.
http://turkeys4me.byethost4.com/files/HDADRV98.zip

Since both methods work on my 0662 computer, I can tell no difference between the IC ports and CORB/RIRB. angry

You may be able to send AHDA commands while HDADRV is running.

Now that you can use your CODEC, the Realtek ALC662 Datasheet pdf may be applicable.
Re: High Definition Audio
Post by deomsh on Nov 11th, 2017, 5:22pm

I tested HDA2.DLL version 98. On my wife's ICH7-chipset everything is fine, I can sent you logfiles if you wish.

On sb710/sb600 I am not sure the CORB/RIRB commands are working.

HDALOG.TXT is still 5 lines of "First IRS change $10EC0662".

HDAICIN.TXT gives mostly zero's, lines 50-65 give:
$10EC066200000000
$0000000000000000
$0010010100000000
$0000000000000000
$0001000100000000
$0000000000000000
$0000000000000000
$0000000000000000
$0000000000000000
$0000000000000000
$10EC066200000000
$0000000000000000
$0010010100000000
$0000000000000000
$0001000100000000
and zero's again up to line 270.

HDACFG.INI changed with this new version of driver to:
[ALLHDA]
$00A2=$43831002

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
cardmemregistersLO=$4000
cardmemregistersHI=$F7FF

[BUSMASTER]
myPCIHI=$0031
myPCILO=$0000
myPCImem=$00310000

[HDA_43831002,76621849]
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCAP=$4401
VMIN=$00
VMAJ=$01
GCTL=$0001
CODEC BITMAP=00000001
CODEC Index=$0
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$10EC0662
CODEC_NODEINFO=$10EC0662
CODEC_AFG_GPIO_CAP=$000000
CODEC_AFG_SUBSYSTEM_ID=$00000000
CODEC_AFG_PM_SUPPORT=$00
CODEC_AFG_PCM_DEFINITION=$00000
CODEC_AFG_F000B=$00
SleepingWidget=$02
VolumeWidget=$14
OutputWidget=$02


Re: High Definition Audio
Post by watler on Nov 11th, 2017, 7:30pm

Deomsh, you said:
"HDAICIN.TXT gives mostly zero's, lines 50-65 give:
$10EC066200000000
$0000000000000000
$0010010100000000
$0000000000000000
$0001000100000000
$0000000000000000
$0000000000000000
$0000000000000000
$0000000000000000
$0000000000000000
$10EC066200000000
$0000000000000000
$0010010100000000
$0000000000000000
$0001000100000000
and zero's again up to line 270."

If this output Is from the AMD/ATI machine, then its CORB/RIRB must be working.
Not every command requires a response.

Now, there may be a chance of output noise.
You just need the right commands to setup the CODEC and activate its widgets.
Let me know if you hear anything.

You can enter up to 255 verb commands into hdaicout.hda.
They are the same type of commands that you enter into AHDA's "CORB" tab.

Changes I make later may break functionality.
Since 98 is working, you may want to store this version.

I'll try to make a CORB/RIRB version for you.
http://turkeys4me.byethost4.com/files/HDADRV9C.zip
Let me know if I fix hdacfg.ini or break hdaicin.txt.


Re: High Definition Audio
Post by watler on Nov 12th, 2017, 12:16pm

It might be a good idea to check the delays required to send and receive CORB/RIRB commands.
http://turkeys4me.byethost4.com/files/AHDA17I.zip

On the "CORB" tab:
The timing of the "Get 1" button is adjusted by the spinedit next to it.



Re: High Definition Audio
Post by deomsh on Nov 12th, 2017, 5:53pm

Watler, you are very productive smiley I will test new AHDA17I as soon as I have time.

Today I tested first HDA2 version 98C on my Asrock board (ATI sb600), but this driver is not working yet. Without HDAICOUT.HDA there are is a part of HDACFG.INI with only $AAAAAAAA:

CODEC_VID=$AAAA
CODEC_DID=$AAAA
CODEC_REV=$AAAAAAAA
CODEC_NODEINFO=$AAAAAAAA
CODEC_AFG_GPIO_CAP=$AAAAAAAA
CODEC_AFG_SUBSYSTEM_ID=$AAAAAAAA
CODEC_AFG_PM_SUPPORT=$AAAAAAAA
CODEC_AFG_PCM_DEFINITION=$AAAAAAAA
CODEC_AFG_F000B=$AAAAAAAA

Other values are same as version 98.

With HDAICOUT all values in the logfile HDAICIN are $AAAAAAAA with or 00000149 or 0000014A ticks. Soundrecorder gives "an other program is using..." error, so no movement. HDALOG.TXT is always empty with version 98C.

So I reverted back to version 98. I can reproduce all CORB-output I earlier reported and a lot more widget GET-values. I made different HDAICOUT.HDA-files to see widget-output in HDAICIN.TXT laugh

Lots of homework, to be continued tongue
Re: High Definition Audio
Post by watler on Nov 13th, 2017, 1:44pm

Lets let it go round again and see if that works.
I added manual delay wait time adjustment to hdacfg.ini.
http://turkeys4me.byethost4.com/files/HDADRV9D.zip

I've exhausted my supply of test hardware that is incompatible with my driver's verb command operations.



Re: High Definition Audio
Post by deomsh on Nov 13th, 2017, 4:57pm

My Asrock ATI/AMD-board is still there as a testing field cool

Tomorrow I will test the new driver-version.

Your CORB-version 98 seems to be very interesting according to my codec. I completed obtaining GET-values with help of HDAICOUT.HDA, up to 120 are non-zero's. Interesting is: All verb's/responses are exactly the same as those in "Windows 10 High Definition Audio Utility v3.3". I made a nice Excel-file (.xls) with it. I can sent you the file if you like. cheesy
Re: High Definition Audio
Post by watler on Nov 13th, 2017, 5:26pm

When using ahda, please check the checkbox on form2's "CORB" page and then try the nodule/widget tabs of form1.

Your 0662 CODEC should be quite similar to mine.
Why not display the results of your experiments here on the forum?


Re: High Definition Audio
Post by watler on Nov 14th, 2017, 1:36pm

Since all my hardware is working, I visited my cousin and made his Dell Dimension E310 play sound.

All I had to do was add these lines to hdaicout.hda:
$20B3907f; Dell E310 Master volume R (B80=read)
$20B3A07f; Dell E310 Master volume L (BA0=read)
$20E70760; Dell E310 Pin control in/out enable
$2013B07F; AFG Unmute/Set Volume

Many thanks to the support at Dell,IDT and Intel. smiley
Re: High Definition Audio
Post by deomsh on Nov 14th, 2017, 6:09pm

Here is the output of Widget Capabilities I found with help of HDAICOUT.HDA for my ALC0662. I identified them with Windows High Definition Audio Utility v3.3, including their properties (I only took the "TRUE" ones). Do you have the same values for your Realtek 662?

$002F0009 $0000001D00000000 DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$003F0009 $0000001D00000000 DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$004F0009 $0000001D00000000 DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$005F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$006F0009 $0000021100000000 DAC; Two channel; Format Overide; Digital; Delay=0; Type: Audio Output;
$007F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$008F0009 $0010011B00000000 ADC; Two channel; In Amp Present; Amp Param Overide; Format Overide; Connection List; Delay=0; Type: Audio Input;
$009F0009 $0010011B00000000 ADC; Two channel; In Amp Present; Amp Param Overide; Format Overide; Connection List; Delay=0; Type: Audio Input;
$00AF0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$00BF0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00CF0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00DF0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00EF0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00FF0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$010F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$011F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$012F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$013F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$014F0009 $0040018D00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$015F0009 $0040018D00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$016F0009 $0040018D00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$017F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$018F0009 $0040018F00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$019F0009 $0040018F00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$01AF0009 $0040018D00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$01BF0009 $0040018F00000000 Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$01CF0009 $0040000100000000 Pin; Two channel; Type: Pin Complex;
$01DF0009 $0040000000000000 Pin; One channel; Type: Pin Complex;
$01EF0009 $0040030000000000 Pin; One channel; Connection List; Digital; Type: Pin Complex;
$01FF0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$020F0009 $00F0004000000000 Vendor_Defined; Mono; Delay=0;
$021F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$022F0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$023F0009 $0020010B00000000 Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$024F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$025F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;
$026F0009 $00F0000000000000 Vendor_Defined; Mono; Delay=0;

I tested HDA2 driver version 98D: there is some noise / soft humming when used without HDAICOUT.HDA smiley smiley smiley
Playing different WAV-files gave higher or lower pitch cool

HDACFG.INI gives correct information this time tongue

[ALLHDA]
$00A2=$43831002

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383
cardmemregistersLO=$4000
cardmemregistersHI=$F7FF

[BUSMASTER]
myPCIHI=$0031
myPCILO=$0000
myPCImem=$00310000

[HDA_43831002,76621849]
wait1=$100
wait2=$100
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCAP=$4401
VMIN=$00
VMAJ=$01
GCTL=$0001
CODEC BITMAP=00000001
CODEC Index=$0
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
CODEC_AFG_GPIO_CAP=$40000002
CODEC_AFG_SUBSYSTEM_ID=$18497662
CODEC_AFG_PM_SUPPORT=$0F
CODEC_AFG_PCM_DEFINITION=$E0160
CODEC_AFG_F000B=$01
SleepingWidget=$02
VolumeWidget=$14
OutputWidget=$02

With use of HDAICOUT.HDA there is nothing to hear anymore. I did some first tests with SET-verbs, and at least I got the noise/humming back, but without pitch variances when playing different WAV-files.

HDAICIN.TXT:
sent $001F7700; got $00000000 ticks=00000000
sent $001F7700; got $00000000 ticks=00000000
sent $01470760; got $00000000 ticks=00000000
sent $0143903F; got $00000000 ticks=00000000

Maybe you can give me some clue to enable the Beep Generator. undecided
Re: High Definition Audio
Post by watler on Nov 14th, 2017, 8:09pm

Is that the AMD/ATI board?
Which audio ports produce noise?

If you can hear anything at all, you should be able to adjust its volume.
A few of the settings in hdacfg.ini require manual adjustment.

If I recall properly, the settings I use with my 0662 are:
SleepingWidget=$02
VolumeWidget=$02
OutputWidget=$02

Values $03 and $04 work also, but may produce sound from different ports.
The same settings that produce Headphone output on one motherboard produce Line Out output on another.

Did you investigate AHDA17I.zip? (Reply #85)
With jacksense, finding the right port should no longer be like a game of pin the tail on the donkey.

I think that the beep generator is always on.
Try using AHDA17I to ask your CODEC if it has a beep control widget.


Why not have ASROCK,Realtek or AMD point you in the right direction so that you might beat the piata ?


Re: High Definition Audio
Post by deomsh on Nov 15th, 2017, 5:32pm

Yes, I ment the ATI/AMD Board.

I experimented today with HDACFG.INI only and the three widgets you ment. And I have a question: What is the meaning of the "SleepingWidget", I have red today all earlier posts, but couldn't find a clue.

With "$OutputWidget=02" noise comes always from the rear green jack. According to the electric Block-diagram in the ALC662 specs the green jack belongs to pin-widget with NID 14 (sorry, "10" was a typo), getting signal from mixer-widget with NID 0C, fed by ADC-widget with NID 02. The Get-values I earlier retrieved seems to agree with the electric Block-diagram.

Sent HDAICOUT.HDA Got HDAICIN.TXT Meaning: Windows 7/10 High Definition Audio Utility v3.3
$002F0009 $0000001D DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$002F000A $000E0160 DAC:Supports 24/20/16-bit; 44.1/48.0/96.0kHz;
$002F000B $00000001 PCM
$002F0012 $00034040 Offset: 0x40; Num Steps: 0x40; Step Size 0x3, NoMute;
$003F0009 $0000001D DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$003F000A $000E0160 DAC:Supports 24/20/16-bit; 44.1/48.0/96.0kHz;
$003F000B $00000001 PCM
$003F0012 $00034040 Offset: 0x40; Num Steps: 0x40; Step Size 0x3, NoMute;
$004F0009 $0000001D DAC; Two channel; Out Amp Present; Amp Param Overide; Format Overide; Delay=0; Type: Audio Output;
$004F000A $000E0160 DAC:Supports 24/20/16-bit; 44.1/48.0/96.0kHz;
$004F000B $00000001 PCM
$004F0012 $00034040 Offset: 0x40; Num Steps: 0x40; Step Size 0x3, NoMute;
$00CF0009 $0020010B Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00CF000D $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$00CF000E $00000002 List Length: 0x2; No Long Form;
$00DF0009 $0020010B Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00DF000D $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$00DF000E $00000002 List Length: 0x2; No Long Form;
$00EF0009 $0020010B Mixer; Two channel; In Amp Present; Amp Param Overide; Connection List; Delay=0; Type: Audio Mixer;
$00EF000D $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$00EF000E $00000002 List Length: 0x2; No Long Form;
$014F0009 $0040018D Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$014F000C $0001003C Presence Detect; Headphone Drive; Output; Input;
$014F000E $00000001 List Length: 0x1; No Long Form;
$014F0012 $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$014F1C00 $01014010 Default: Green; 1/8" stereo/mono; Line Out; Rear;External; Jack;
$015F0009 $0040018D Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$015F000C $00010034 Presence Detect; Output; Input;
$015F000E $00000001 List Length: 0x1; No Long Form;
$015F0012 $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$015F1C00 $411111F0 Presesence Detect Overide; Default: Black; 1/8" stereo/mono; Speaker; Rear;External; No Physical Port;
$016F0009 $0040018D Pin; Two channel; Out Amp Present; Amp Param Overide; UnSol Capable; Connection List; Delay=0; Type: Pin Complex;
$016F000C $00000034 Presence Detect; Output; Input;
$016F000E $00000001 List Length: 0x1; No Long Form;
$016F0012 $80000000 Offset: 0x0; Num Steps: 0x0; Step Size 0x0, Mute;
$016F1C00 $411111F0 Presesence Detect Overide; Default: Black; 1/8" stereo/mono; Speaker; Rear;External; No Physical Port;

I think (for now) that widget with NID 14 must be the default rear headphone output.

Further on I will concentrate on these three widgets with help of AHDA17I and I will report my findings wink
Re: High Definition Audio
Post by watler on Nov 15th, 2017, 7:19pm

Power management allows for several power states.
Temporarily powered down is often referred to as sleeping.
The powerless widget must be empowered:The sleeping widget must be wakened.

If it can be made to work with your PC, AHDA might save you some time with data collection.


Re: High Definition Audio
Post by watler on Nov 16th, 2017, 3:56pm

Adjusted CORB/RIRB:
http://turkeys4me.byethost4.com/files/AHDA17J.7z

Changed hdaicout.hda:
http://turkeys4me.byethost4.com/files/HDADRV9E.zip
Re: High Definition Audio
Post by deomsh on Nov 16th, 2017, 6:01pm

First experiments with AHDA17I were succesfull when enabling CORB for verbs, but CORB reset between commands is still necessary. Is that by default?

I experimented with the value below, which I ment you said who will gave the codec longer time to respond? Even maximum value 99999999 made no difference. Or am I wrong?

My most succesfull experiment was disabling and enabling noise I can hear in the headphones with verb 0143B08F for disable and 0143B07F for enable noise again. Same for Right/Left channel with A or 9 instead of B. cool

IC still not working.

I will test soon new versions, but next days I don't have any spare time to test. cry
Re: High Definition Audio
Post by watler on Nov 16th, 2017, 7:24pm

I would think that 99999999 would take some time to complete.
Does it return instantly?

You have the only AMD/ATI hardware available.
Feel free to share your findings when you have time.

Have a happy Thanksgiving. grin
Re: High Definition Audio
Post by deomsh on Nov 17th, 2017, 01:44am

No, return is always instantly. By the way: button "Processlist" returns only (many times) $FFFFFFFF.
Re: High Definition Audio
Post by watler on Nov 19th, 2017, 5:24pm

Changed "Get 1" timing:
http://turkeys4me.byethost4.com/files/AHDA17K.7z
Re: High Definition Audio
Post by deomsh on Nov 19th, 2017, 5:44pm

I just finished a test of AHDA17J without HDA2.DLL. I see there is already a new version shocked

IC is not working with AHDA17J, only CORB for verbs, this version without delays. CORB reset between commands is still necessary.

My idea was to test the output of ALC662 only, using the BIOS-settings. My first goal was to enable the BEEP Generator. After lengthy manipulations of the rear headphone output (green, widget 14), the two channel mixer (widget 0C) that is hardwired to headphone output, and the nine-channel mixer (widget 0B) that can give a connection between the two channel mixer and the BEEP Generator (widget 1D).

I found the Realtek datasheet realy hard to understand, but with parallel reading of a Cirrus Logic HDA-codec datasheet and many tests I finally succeeded to get some nice low sound. cheesy

Verbs I used:
;TOTAL_TEST_PCBEEP
$0017FF00;CODEC_RESET
$01D70720;SET_PCBEEP_IN_ENABLE
$00170A5A;SET_PCBEEP_DIVISOR (48kHz:4X90)
$00B3757F;SET_AMP_GAIN_IN (CH5_MAX)
$00C3717F;SET_AMP_GAIN_IN (CH1_MAX)
$014707C0;SET_PIN_WIDGET_CONTROL (Head Phone&OUT)
$0143B07F;SET_AMP_GAIN_OUT (MAX)
END

Watch your ears! cool
Re: High Definition Audio
Post by watler on Nov 19th, 2017, 7:55pm

Sounds like monotoneous work. rolleyes

The CORB page checkbox still had no effect on the widget page?
Since you have the PDF files, I guess you don't really need AHDA.

Is HDADRV9E.zip/hdaicout.hda still silent?
What wait1 and wait2 values work best for you?
Re: High Definition Audio
Post by deomsh on Nov 20th, 2017, 6:03pm

No, the Widget page is still the same, nothing works.
In AHDA17J the CORB-commands are working great, I really enjoyed it. smiley

Today I took a look at AHDA17K, CORB is the same. In this version it is again possible to give wait values. This time I had to wait for output, especially around the max value of 32000 and a bit. cheesy Minimum value for my system was 132, below output's were only zero's (or first lines) 200 looks safe.
Reset between each command is still necessary. On the Widget page I couldn't start the codec anymore, after the first output-line: "HDA_SDO0CTL" , the program seemed to freeze. I will test next time again.

I also tried HDA2.DLL version 98E. Same results as 98D.
The DMA-value in the Setup tab is this (first!) time the same as the one in HDACFG.INI (although the HDA codec description is still the dull "ICH10/NFMCP61", tongue which is not really important of cause). I shall test different wait1/2-values next time.

HDACFG.INI:
[ALLHDA]
$00A2=$43831002

[HDA]
TSR=TSR Found
PCI_VID=$1002
PCI_DID=$4383

[BUSMASTER]
myPCIHI=$0032
myPCILO=$0000
myPCI=$00320000
aPCIHI=$0031
aPCILO=$0000
aPCI=$00310000

[HDA_43831002,76621849]
cardmemregistersLO=$4000
cardmemregistersHI=$F7FF
Verbinterface=$1
wait1=$100
wait2=$100
PCI_BUS=$00
PCI_DEVICE=$14
PCI_FUNCTION=$2
GCAP=$4401
VMIN=$00
VMAJ=$01
GCTL=$0001
CODEC BITMAP=00000001
CODEC Index=$0
CODEC_VID=$10EC
CODEC_DID=$0662
CODEC_REV=$100101
CODEC_NODEINFO=$010001
CODEC_AFG_GPIO_CAP=$40000002
CODEC_AFG_SUBSYSTEM_ID=$18497662
CODEC_AFG_PM_SUPPORT=$0F
CODEC_AFG_PCM_DEFINITION=$E0160
CODEC_AFG_F000B=$01
SleepingWidget=$02
VolumeWidget=$02
OutputWidget=$02

I also tried some verbs HDAICOUT.HDA to (extra) enable relevant widgets, without succes so far.

HDAICIN.TXT:
sent $0017FF00; got $00000000 ticks=00000000
sent $0017FF00; got $00000000 ticks=00000000
sent $014707C0; got $00000000 ticks=00000000
sent $0143B07F; got $00000000 ticks=00000000
sent $00C3707F; got $00000000 ticks=00000000
sent $0023B040; got $00000000 ticks=00000037
sent $002B8000; got $00000040 ticks=00000000

Enabling the BEEP Generator with following HDAICOUT.HDA works great.
;TEST_BEEP
$0017FF00;CODEC_RESET
$0017FF00;CODEC_RESET
$014707C0;SET_PIN_WIDGET_CONTROL_HP&OUT
$0143B07F;SET_AMP_GAIN_OUT_MAX
$00C3717F;SET_AMP_GAIN_IN_CH1_MAX
$00B3751F;SET_AMP_GAIN_IN_CH5_MAX
$00170A5A;SET_PCBEEP_DIVISOR
;$01D70720;SET_PCBEEP_IN_ENABLE (enabled by default, you were right) kiss
end
Re: High Definition Audio
Post by watler on Nov 21st, 2017, 11:31am

As an example, my Nforce Realtek 883 is very simple.

Edit the volume widget in hdacfg.ini :
VolumeWidget=$0C

Create HDAICOUT.HDA:
BEGIN first line
$014707F0
$0143B000
END last line

After that, you can play wave files.
(Just make shure that your batch files do not erase hdacfg.ini after that.)

http://turkeys4me.byethost4.com/files/AHDA17L.7z

Did you try the new hdaicout.hda included with 9E?
Re: High Definition Audio
Post by deomsh on Nov 21st, 2017, 6:24pm

Thanks for the tips.

To me it seems the problem is not in a pin widget, I can manipulatie output and mixers with BEEP.

I tested wait1 and wait2 up to 800, loading is very slow, but no difference, except that playing a 48000-file after 44100 took FOUR seconds of waiting time. Reverse the same. No waiting between different sound files of same (PCM)-frequency. The 48000 gives slightly higher sound/noise. Maybe there is a problem with the DAC, or with the HDA-link. Is that possible?

What is the meaning of verbinterface=$1 in HDACFG.INI?

I played a bit with new HDAICOUT.HDA, really nice, but no difference. I shall post HDAICIN.TXT later, including GET-verbs after ever SET.
Re: High Definition Audio
Post by watler on Nov 21st, 2017, 8:02pm

An example of a NVIDIA Realtek 662:

Don't bother to change hdacfg.ini default VolumeWidget.

HDAICOUT.HDA:
begin
$01470740;AC_VERB_SET_PIN_WIDGET_CONTROL
$0143B07F;AC_VERB_SET_AMP_GAIN_MUTE
end

After the crack/pop at startup, you can play windows sounds. cool



Here is another NVIDIA Realtek 662:

Edit the volume widget in hdacfg.ini :
VolumeWidget=$02

HDAICOUT.HDA:
begin
$01B70740
$01B3B07F
end

After noise at startup, you can play sounds. grin


Since the IC method worked on all the computers I tested,
I thought I might keep it.
verbinterface=$0; Use Immediate Command ports
verbinterface=$1; Use CORB/RIRB.
There may yet be some computer that requires it.

The delay between verb operations is set manually in wait1 and wait2.

You would have to ask ASROCK or AMD about features unique to your audio system.

Let me know how AHDA17L.7z works.

Do you usually use enhanced or standard mode?
Re: High Definition Audio
Post by deomsh on Nov 22nd, 2017, 6:28pm

Here is the HDAICIN.TXT I couldn't give yesterday. After playing a bit with your new version of HDAICOUT.HDA that comes with HDA2.DLL version 98E. Enjoy! cool

sent $000F0000; got $10EC0662 ticks=00000000
sent $000F0002; got $00100101 ticks=00000000
sent $000F0004; got $00010001 ticks=00000000
sent $00170500; got $00000000 ticks=00000037
sent $001F0500; got $00000000 ticks=00000000
sent $00270500; got $00000000 ticks=00000000
sent $002F0500; got $00000000 ticks=00000036
sent $00370500; got $00000000 ticks=00000000
sent $003F0500; got $00000000 ticks=00000000
sent $00470500; got $00000000 ticks=00000000
sent $004F0500; got $00000000 ticks=00000037
sent $00B70500; got $00000000 ticks=00000000
sent $00BF0500; got $00000000 ticks=00000000
sent $00C70500; got $00000000 ticks=00000037
sent $00CF0500; got $00000000 ticks=00000000
sent $00D70500; got $00000000 ticks=00000000
sent $00DF0500; got $00000000 ticks=00000000
sent $00E70500; got $00000000 ticks=00000037
sent $00EF0500; got $00000000 ticks=00000000
sent $01470500; got $00000000 ticks=00000000
sent $014F0500; got $00000000 ticks=00000037
sent $01970500; got $00000000 ticks=00000000
sent $019F0500; got $00000000 ticks=00000000
sent $01B70500; got $00000000 ticks=00000000
sent $01BF0500; got $00000000 ticks=00000000
sent $014707C0; got $00000000 ticks=00000000
sent $014F0700; got $000000C0 ticks=00000000
sent $014707F0; got $00000000 ticks=00000037
sent $014F0700; got $000000E0 ticks=00000000
sent $019707C0; got $00000000 ticks=00000000
sent $019F0700; got $000000C0 ticks=00000037
sent $01B707C0; got $00000000 ticks=00000000
sent $01BF0700; got $000000C0 ticks=00000000
sent $0143B07F; got $00000000 ticks=00000000
sent $014B8000; got $00000000 ticks=00000037
sent $014B9000; got $00000000 ticks=00000000
sent $014BA000; got $00000000 ticks=00000000
sent $0143B000; got $00000000 ticks=00000037
sent $014B8000; got $00000000 ticks=00000000
sent $0193B07F; got $00000000 ticks=00000000
sent $019B8000; got $00000000 ticks=00000000
sent $019B9000; got $00000000 ticks=00000037
sent $019BA000; got $00000000 ticks=00000000
sent $01B3B17F; got $00000000 ticks=00000000
sent $01BB8001; got $00000000 ticks=00000037
sent $01BB9001; got $00000000 ticks=00000000
sent $01BBA001; got $00000000 ticks=00000000
sent $00C3707F; got $00000000 ticks=00000000
sent $00CB0000; got $00000000 ticks=00000037
sent $00C3717F; got $00000000 ticks=00000000
sent $00CB0000; got $00000000 ticks=00000000
sent $00D3707F; got $00000000 ticks=00000037
sent $00DB0000; got $00000000 ticks=00000000
sent $00D3707F; got $00000000 ticks=00000000
sent $00DB0000; got $00000000 ticks=00000000
sent $00E3707F; got $00000000 ticks=00000037
sent $00EB0000; got $00000000 ticks=00000000
sent $00E3707F; got $00000000 ticks=00000000
sent $00EB0000; got $00000000 ticks=00000036
sent $00224011; got $00000000 ticks=00000000
sent $002A0000; got $00004011 ticks=00000000
sent $002F0600; got $00000000 ticks=00000000
sent $00270610; got $00000000 ticks=00000037
sent $002F0600; got $00000010 ticks=00000000
sent $00324011; got $00000000 ticks=00000000
sent $003A0000; got $00004011 ticks=00000037
sent $003F0600; got $00000000 ticks=00000000
sent $00370610; got $00000000 ticks=00000000
sent $003F0600; got $00000010 ticks=00000000
sent $00424011; got $00000000 ticks=00000037
sent $004A0000; got $00004011 ticks=00000000
sent $004F0600; got $00000000 ticks=00000000
sent $00470610; got $00000000 ticks=00000037
sent $004F0600; got $00000000 ticks=00000000
sent $00B3A57F; got $00000000 ticks=00000000
sent $00BB0005; got $00000080 ticks=00000000
sent $00B3957F; got $00000000 ticks=00000037
sent $00BB0005; got $00000080 ticks=00000000
sent $00B3557F; got $00000000 ticks=00000000
sent $00BB0005; got $0000001F ticks=00000037
sent $00B3657F; got $00000000 ticks=00000000
sent $00BB0005; got $0000001F ticks=00000000
sent $00B3757F; got $00000000 ticks=00000000
sent $00BB0005; got $0000001F ticks=00000037
sent $0023907F; got $00000000 ticks=00000000
sent $002B8000; got $0000007F ticks=00000000
sent $0023A07F; got $00000000 ticks=00000037
sent $002B8000; got $0000007F ticks=00000000
sent $0023B07F; got $00000000 ticks=00000000
sent $002B8000; got $0000007F ticks=00000000
sent $0033907F; got $00000000 ticks=00000037
sent $003B8000; got $0000007F ticks=00000000
sent $0033A07F; got $00000000 ticks=00000000
sent $003B8000; got $0000007F ticks=00000037
sent $0043907F; got $00000000 ticks=00000000
sent $004B8000; got $0000007F ticks=00000000
sent $0043A07F; got $00000000 ticks=00000000
sent $004B8000; got $0000007F ticks=00000037

I also tried your latest tip, HDAICIN.TXT:
sent $01B70740; got $00000000 ticks=00000000
sent $01B3B07F; got $00000000 ticks=00000000

No noise anymore on the backpanel. But my "Front panel" just arrived from Hong Kong (in fact it is only the $2-cable&jacks part) and I could hear a soft noise coming from my Front panel (Green jack of course). cheesy
With AHDA17L I enabled the headphone amplifier (verb: $01B707C0) and this time the noise was nice loud again. tongue

I also experimented with "Stream/Channel selection" of the first DAC (NID 02). Valid verbs were $00270610 and $00270611 (Left channel only). With al other combinations up to $002706F0 there was absolutely nothing to hear anymore. cry

Test with Loud Noise Enabled:
$00270600;Absolutely no noise anymore!
$002F0600;$0000000000000000;
$00270610;linkstream 1:noise again: YES
$002F0600;$0000000000000010laughlays sound: NO
$00270620;linkstream 2:noise again: NO
$002F0600;$0000000000000020laughlays sound: NO
$00270630;linkstream 3:noise again: NO
$002F0600;$0000000000000030laughlays sound: NO
$00270640;linkstream 4:noise again: NO
$002F0600;$0000000000000040laughlays sound: NO
$00270650;linkstream 5:noise again: NO
$002F0600;$0000000000000050laughlays sound: NO
$00270660;linkstream 6:noise again: NO
$002F0600;$0000000000000060laughlays sound: NO
$00270670;linkstream 7:noise again: NO
$002F0600;$0000000000000070laughlays sound: NO etc. up to stream F the same/
$00270611;linkstream 1/channel 1:noise again: Left: YES Right: NO
$002F0600;$0000000000000011laughlays sound: NO
$00270612;linkstream 1/channel 2:noise again: NO
$002F0600;$0000000000000012laughlays sound: NO

I also partly tested AHDA17L. CORB works great, delay 150 seems to me a good default value.

I also played a bit longer with the IC, and I found following strange results: huh
$000F0000
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 23 times!
Codec 0 Sent Data ($10EC0662)
$000F0002
Same
$000F0004
Same
$001F0009
Same
$01BF0700
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 30 times!
Codec 0 Sent Data ($00000000)
$002A0000
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 31 times!
Codec 0 Sent Data ($00004011)
$002F0600
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 22 times!
Codec 0 Sent Data ($00000000)
$003A0000
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 26 times!
Codec 0 Sent Data ($00004011)
$003F0600
CODEC 0 forgot Order 1 times!
Codec 0 Was Busy 12 times!
Codec 0 Sent Data ($00000000)
$00BB0005
CODEC 0 forgot Order 1 times!
Codec 0 Was Busy 11 times!
Codec 0 Sent Data ($00000080)
$00B3557F
CODEC 0 forgot Order 1 times!
Codec 0 Was Busy 10 times!
Codec 0 Sent Data ($00000000)
$00BB0005
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 26 times!
Codec 0 Sent Data ($00000080)
$008A0000
CODEC 0 forgot Order 2 times!
Codec 0 Was Busy 22 times!
Codec 0 Sent Data ($00000020)
$009A0000
CODEC 0 forgot Order 1 times!
Codec 0 Was Busy 15 times!
Codec 0 Sent Data ($00000020)
$022B0000
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 29 times!
Codec 0 Sent Data ($00000080)
$023B0000
CODEC 0 forgot Order 3 times!
Codec 0 Was Busy 29 times!
Codec 0 Sent Data ($00000080)

There is some response of VID's A and B, sometimes right, sometimes wrong (Compare with first HDAICIN.TXT) embarassed
Re: High Definition Audio
Post by watler on Nov 22nd, 2017, 8:49pm

How is your noise?
Is it like one from your Beeper?

On one computer, I can make a jackhammer like noise by enabling output and input to the stream. (record+play)



Re: High Definition Audio
Post by deomsh on Nov 23rd, 2017, 6:45pm

No, different of both. It's more like someone is humming on a monotonous tone in another room. When I switch from a 44100 kHz WAV-file in Soundrec to a 48000 kHz WAV-file the tone is somewhat higher. Switching back gives the original tone again. The playing of the WAV-file make no difference, only switching to another rate, which takes some time. Later I will test different verbs in that direction on the DAC of my codec. tongue
Re: High Definition Audio
Post by deomsh on Nov 27th, 2017, 4:17pm

With help of AHDA17L I did following tests with volume of all involved amplifiers at maximum.
1) Changing stream frequency (48 kHz and 44.1 kHz) of DAC-widget 02 with $00220011 and back to $00224011: no difference in height or quality of the monotonous tone.
2) Changing bit-rate of DAC-widget 02 to 20-bit and 24-bit: there is a difference, the monotonous tone becomes clearer.
3) Changing converter-stream of DAC-widget 02 with $00270620/30: silence, until selecting converter-stream 1 again.
4) Setting pin-widget 1B to front headphone and connecting the input-selector of widget 1B with $01B70101 to third DAC (widget 04): silence again.
5) Changing converter-stream of DAC-widget 04 to $00270620: still silence, until selecting converter-stream 1, this time for DAC widget 04. Monotonous tone is back.

Re: High Definition Audio
Post by watler on Nov 27th, 2017, 6:18pm

Although I found that one friend's Core 2 duo desktop and another friend's laptop are working fine, I've been unable to find a system like yours.
I've never had your particular noise.

Assuming stream 1 is the hum noise, work with what you have.
All output pins should be able to hum the same tune.
Why not try changing the converter-stream of all output-DAC-widgets to stream 1?


Re: High Definition Audio
Post by deomsh on Nov 29th, 2017, 5:58pm

Hello Watler, I did another test with interesting results.

Test-sequence: without HDAICOUT.HDA, all widgets=$02 in HDACFG.INI

First startup, in Enhanced Mode: nothing to hear, no noise.
Second start, in Enhanced Mode: some soft noise/crackles.
Third start, in Standard Mode: loud noise/tone, height of tone varies with stream rate WAV-file (with HDARUN.EXE), as described earlier, but really loud this time.

Soft Reboot, set BIOS defaults.

First startup, in Enhanced Mode: some crackles during boot, no noise.
Playing soundfile in MS-DOS with BUG.BAT (Judas 21C), interrupting after a while, automatic start Windows in Enhanced Mode: some tickling, then there is normal system sound (although none enabled).

AND THEN THERE WAS SOUND, I can play WAV-files in Sound Recorder, or Media Player. cheesy

I also tested WAVEOUT.EXE, volume can be set on all levels, form zero to maximum.
Before playing a file <waveOutGetDevCaps> gives:
szPName: HDA Sound
Driver Version: 0.144
Stereo
Independent L/R volume
11 kHz (1 channel) 8bits
11 kHz (2 channel) 8bits
11 kHz (1 channel) 16bits
11 kHz (2 channel) 16bits
22 kHz (1 channel) 8bits
22 kHz (2 channel) 8bits
22 kHz (1 channel) 16bits
22 kHz (2 channel) 16bits
44 kHz (1 channel) 8bits
44 kHz (2 channel) 8bits
44 kHz (1 channel) 16bits
44 kHz (2 channel) 16bits
48 kHz, mono, 8-bit
48 kHz, stereo, 8-bit
48 kHz, mono, 16-bit
48 kHz, stereo, 16-bit

Third start, in Standard Mode: still sound when playing a WAV-file (with HDARUN.EXE).
In HDACFG.INI there is something new (not sure if it was before or after testing WAVEOUT.EXE first time):
[Volume]
PCM=$C700CC00

Soft Reboot, set BIOS as first (in fact not many differences, only higher memory frequency, no CPU cool, Video on PCI-Express and enabling Floppy disk).

First startup, in Enhanced Mode: nothing to hear, no noise. When trying WAV-file old Sound Recoder Error:"This Device is being used by another application (...)".
Second start, in Enhanced Mode again: same results.
Playing soundfile in MS-DOS with BUG.BAT (Judas 21C), interrupting after a while, automatic start Windows in Enhanced Mode: first some tickling, then: SOUND AGAIN.

Hard reset

First startup, in Enhanced Mode: nothing to hear, no noise.
Playing soundfile in MS-DOS with BUG.BAT (Judas 21C), no interrupting, automatic start Windows in Enhanced Mode: Sound again.

To be continued tongue
Re: High Definition Audio
Post by watler on Nov 29th, 2017, 7:17pm

It sounds as though you have accomplished the impossible.
Congratulations, deomsh! smiley

My programming may have to wait a bit.
The chicken coop needs fixed.

If you find anything that needs fixed or patched, just let me know.


Re: High Definition Audio
Post by deomsh on Dec 2nd, 2017, 4:57pm

Are the chickens happy again?

I think I found something interesting with help of AHDA17L.

I compared VERB response values and Register values in AHDA17L after starting Windows with and without HDA2.DLL or BUG.BAT (JUDAS21C).
On the codec-level I found no real differences when starting Windows with BUG.BAT in comparison with HDA2.DLL only (apart from some minor volume-levels). Also no differences in HD Audio Controller Memory Mapped Registers. In the HD Audio Controller PCI Configuration Space Registers I found one different value in row W20.

TEST: AHDA17L

NO DRIVER: HDA2.DLL (98E): BUG.BAT (JUDAS21C):
PCI W1:$ W2:$ W1:$ W2:$ W1:$ W2:$
W0 1002 4383 1002 4383 1002 4383
W2 0006 0410 0006 0410 0006 0410
W4 0000 0403 0000 0403 0000 0403
W6 2010 0000 2010 0000 2010 0000
W8 4004 F7FF 4004 F7FF 4004 F7FF
WA 0000 0000 0000 0000 0000 0000
WC 0000 0000 0000 0000 0000 0000
WE 0000 0000 0000 0000 0000 0000
W10 0000 0000 0000 0000 0000 0000
W12 0000 0000 0000 0000 0000 0000
W14 0000 0000 0000 0000 0000 0000
W16 1849 7662 1849 7662 1849 7662
W18 0000 0000 0000 0000 0000 0000
W1A 0050 0000 0050 0000 0050 0000
W1C 0000 0000 0000 0000 0000 0000
W1E 010B 0000 010B 0000 010B 0000
W20 0000 0000 0000 0000 0000 0002
W22 0001 0000 0001 0000 0001 0000
W24 0000 0000 0000 0000 0000 0000
W26 0001 0000 0001 0000 0001 0000
W28 0001 C842 0001 C842 0001 C842
W2A 0000 0000 0000 0000 0000 0000
W2C 0000 0000 0000 0000 0000 0000
W2E 0000 0000 0000 0000 0000 0000
W30 0005 0080 0005 0080 0005 0080
W32 0000 0000 0000 0000 0000 0000
W34 0000 0000 0000 0000 0000 0000
W36 0000 0000 0000 0000 0000 0000
W38 0000 0000 0000 0000 0000 0000
W3A 0000 0000 0000 0000 0000 0000
W3C 0000 0000 0000 0000 0000 0000
W3E 0000 0000 0000 0000 0000 0000

When starting Windows with HDA2.DLL only and setting W20/W2 to 0002 enables sound immediately when playing a WAV-file in Sound Recorder. Reset to 0000 disables again, etc.

When I counted right, this can be Misc Control 2 Register R/W 8 bits [PCI_Reg: 42h] in the AMD SB700/710/750 Register Reference Guide.

What do you think?

By the way: in AHDA17L CORB-reset Between each Corb-write is no longer necessary, but Process list gives only a listing for a split-second and then everything is filled out with $FFFFFFFF.
Re: High Definition Audio
Post by watler on Dec 3rd, 2017, 12:31pm

Although there are still a few things left to fix,
the chicken coop should be much warmer this winter.

PCI_Reg: 42h will allow hdadrv to play sounds without first running Judas?
Perhaps this adjustment will help:
http://turkeys4me.byethost4.com/files/HDADRV9G.zip

Deomsh, you are indefatigable.
Thank you for thoroughly testing AHDA17.
The input "list" is the same box that shows the output.
Did you enter several values before you pressed Process list?

Does the "Use CORB for verbs" checkbox empower the widgets page of form1.
Re: High Definition Audio
Post by deomsh on Dec 4th, 2017, 5:31pm

Regarding AHDA17L:

Yes, "Use CORB for verbs" checkbox empowered the widgets page of form1. I could work with much efficiency using keyboard only (TAB/Shift+TAB/->&<-, etc.)
About Process list: I processed about 200 read-only verbs without CORB-reset in between.

Thanks a lot for the new HDA2.DLL version 98G. This version gives a non-empty HDALOG.TXT laugh

Only PCI registers W20/W2 (according to AHDA17L) are still 0000 crycrycrycry

When I set W20/W2 to 0002, sound is working again as noted earlier. By the way, I tried other values, 3 is also working. Further 6, 7 (and A, B, E, F and even FFFF, but these values gives no new bit-settings according to the specs).

I tried Mplayer as my other MS-DOS-player, this player too is setting PCI registers W20/W2 to 0002. And sound is enabled.

I hope you can fix it, if you have any spare time left.

All Linux sources I have red are saying one must enable snooping in case of SB600. As far I can read the source code of JUDAS 2.1c, that's precisely what this player seems to do. The same values I found in your HDA.PAS by the way, but there seems to be no writing to the PCI registers of my chipset.

The AMD SB700/710/750 Register Reference Guide gives following table:

Misc Control 2 Register R/W 8 bits [PCI_Reg: 42h]


Field Name----------Bits-Default Description

Disable No Snoop----0---1: No Snoop attribute is disabled on Buffer Descriptor and Data Buffer DMA.
--------------------------------------0: Set the No Snoop attribute on Buffer Descriptor and Data Buffer DMA when the Traffic Priority bit is set in the Stream Descriptor.
"Disable No Snoop---1---1: Bit [0] of this register controls the No Snoop attribute
Override"-----------------------0: Override the bit[0] setting meaning always generate No Snoop attribute on Buffer Descriptor and Data Buffer DMA
"Enable No Snoop----2---1: Enable No Snoop request to ACPI
Request"------------------------0: Disable No snoop request to ACPI When enabled and the DMA cycle is No Snoop, ACPI will not generate a wake to CPU in C2 state.
Reserved-----------------3
Reserved---------------5:4
Reserved---------------7:6

(Sorry for my primitive table) tongue
Re: High Definition Audio
Post by watler on Dec 5th, 2017, 1:24pm

Ichcfg.ini has a new setting called pcipatchb.
It allows you to adjust a byte value of your HDA's PCI memory.

The high byte of the value is the offset the low byte is the value.
A value of $430E would cause $43 to change to $0E;

http://turkeys4me.byethost4.com/files/HDADRV9H.zip


Re: High Definition Audio
Post by deomsh on Dec 5th, 2017, 6:24pm

Hello Watler,

Sound is working without set pcipatchb. After starting Windows the pci registers W20/W2 are actually 0002! laugh

Thanks you very much for all your efforts.

Volume is working when volumewidget is set to $02.

Its time to listen some music. cool

If I have to make some more tests, just ask.
Re: High Definition Audio
Post by watler on Dec 5th, 2017, 7:40pm

Thank you for your work with the SB600.
If you see anything else that needs adjusted or added, let me know.


Merry kissmoose and happy yew hear. kiss
Make a joyful sound.
Re: High Definition Audio
Post by deomsh on Dec 9th, 2017, 02:45am

Hello Watler,

Sound is great with your HDA-driver, I can also play MP3 with Winplay 3.
After a while I tried CDAudio. Am I right HDA2.DLL is intended for digital audio only?

My motherboard does'nt have a CD-in connecter, but I managed to redirect the internal CD-audiocable to output pins of the HDA-front connector. Everything according to the specifications in my motherboard manual.

With help of the CORB-interface of your great tool AHDA17l I enabled the input amplifier of pin-widget 1B with low gain to avoid distortion. Then I had to enable channel 3 of input-mixer 00B and channel 1 of sum-widget 00C. After installing MCI-CDAUDIO and MS-DOS CD-driver I can play audio cd's with Musicbox. cheesy

I shall post my verbs later.
Re: High Definition Audio
Post by watler on Dec 9th, 2017, 3:00pm


CD audio is digital audio.
You should be able to fit many times more digital music onto a USB drive.
How is the USB legacy disk support on your amd motherboard?

Although I don't usually have a CD connected to my computers,
I seem to remember some old games and programs that made use of CD audio tracks.
Deomsh, do you have any software that requires the MCI CD?
Re: High Definition Audio
Post by deomsh on Dec 10th, 2017, 11:00am

Sure, if I want to play audio CD's I need a CD-player. And I have many audio CD's.
Musicbox from Windows 3.0 is really nice, only needs MCI-CDAUDIO to send command to the CD-drive with help of the MS-DOS CD-drivers. Seeing the files in MS-DOS or Windows is not possible, but a CD-player shows the tracks. The playing part of the audio CD is a fully analog process, going from the CD-drive through audio cable and analog part of the sound card, in my case the ALC662. rolleyes

Your driver works great for CDAudio with following verbs in HDAICOUT.HDA. I am posting HDAICIN.TXT actually. Other verbs are not necessary. Widget 1B is by default set as input: Line2.

sent $014F0700; got $00000020 ticks=00000000
sent $014707C0; got $00000000 ticks=00000000
sent $014F0700; got $000000C0 ticks=00000000
sent $014B8000; got $00000080 ticks=00000000
sent $0143B07F; got $00000000 ticks=00000000
sent $014B8000; got $00000000 ticks=00000037
sent $00BB0003; got $00000080 ticks=00000000
sent $00B3731F; got $00000000 ticks=00000000
sent $00BB0003; got $0000001F ticks=00000000
sent $00CB0001; got $00000080 ticks=00000000
sent $00C3717F; got $00000000 ticks=00000000
sent $00CB0001; got $00000000 ticks=00000000

The GET-verbs are only to control things of cause, and can be left out. So, with only two extra verbs and after installing MCI-CDAUDIO from Windows Driver-Setup I can play CDaudio.

Audio-CD volume control is now through my headphone, but I can try to control volume by sending verbs with AHDA17l to channel 1 of sum-widget 0C. All WAVE-AUDIO I tested earlier is still working.

Do you have any plans to make recording possible with HDA2.DLL? tongue
Re: High Definition Audio
Post by watler on Dec 10th, 2017, 2:34pm

Most of my CD drives have a built in headphone jack.

Necessity is the mother of invention.
Thank you for the thorough explanation of CD audio operations.

HDADRV was written in my spare time for fun.
I've had had no need of recording.
For your media on CD, It sounds like what you need is a CD track ripping program.
No sound card is required for that sort of software.


Most music collectors have far too much to fit on common low density media.
Are you saying that you're actually a brick and mortar collector? shocked

Your ingenuity has already bypassed my driver's operations.
Will you try karaoke now?

Re: High Definition Audio
Post by deomsh on Dec 13th, 2017, 5:31pm

I am more the 'Click and Mortal' type.

Never thought you would like Karaoke. wink

But your 'suggestion' fired my imagination. With following verbs it should be possible with four channels: one Microphone, one Line-In, CD-audio and WAVE-audio. So, if on your party there is only a 786 & Windows 3.1... cool

HDAICOUT.HDA (GET-verbs only for control):
begin
$014F0700;
$014707C0;REAR_HEADPHONEamp&outputamp_enable
$014F0700;
$014B8000;
$0143B000;REAR_HEADPHONEamp&outputamp_unmute
$014B8000;
$018F0700;
$018B0000;
$01AF0700;
$01AB0000;
$00BB0000;
$00B3701F;MIXER_max_vol_ch0=REAR_Mic1
$00BB0000;
$00BB0002;
$00B3721F;MIXER_max_vol_ch2=REAR_Line1
$00BB0002;
$00BB0003;
$00B3731F;MIXER_max_vol_ch3=Line2_CDAUDIO_(=OUT_on_Internal_connector)
$00BB0003;
$00CB0000;
$00CB0001;
$00C37100;SUMWIDGET_mixer_unmute
$00CB0001;
$002A0000;
$002F0600;
$00270610; DAC1_stream_1
$002F0600;
end

HDALOG.TXT:
$000F0000=$10EC0662
$000F0004=$00000000
$000F0005=$00000000
$000F0000=$10EC0662
$000F0002=$00100101
$000F0004=$00010001
$001F0011=$40000002
$001F2000=$18497662
$001F000F=$0000000F
$001F000A=$000E0160
$001F000B=$00000001
$00224011=$00000000
$00270610=$00000000
$00270500=$00000000
$0023A07F=$00000000
$0023907F=$00000000

HDAICIN.TXT
sent $014F0700; got $00000020 ticks=00000000
sent $014707C0; got $00000000 ticks=00000000
sent $014F0700; got $000000C0 ticks=00000000
sent $014B8000; got $00000080 ticks=00000000
sent $0143B000; got $00000000 ticks=00000000
sent $014B8000; got $00000000 ticks=00000036
sent $018F0700; got $00000020 ticks=00000000
sent $018B0000; got $00000000 ticks=00000000
sent $01AF0700; got $00000020 ticks=00000000
sent $01AB0000; got $00000000 ticks=00000000
sent $00BB0000; got $00000080 ticks=00000000
sent $00B3701F; got $00000000 ticks=00000000
sent $00BB0000; got $0000001F ticks=00000000
sent $00BB0002; got $00000080 ticks=00000000
sent $00B3721F; got $00000000 ticks=00000000
sent $00BB0002; got $0000001F ticks=00000037
sent $00BB0003; got $00000080 ticks=00000000
sent $00B3731F; got $00000000 ticks=00000000
sent $00BB0003; got $0000001F ticks=00000000
sent $00CB0000; got $00000000 ticks=00000000
sent $00CB0001; got $00000080 ticks=00000000
sent $00C37100; got $00000000 ticks=00000000
sent $00CB0001; got $00000000 ticks=00000037
sent $002A0000; got $00000020 ticks=00000000
sent $002F0600; got $00000000 ticks=00000000
sent $00270610; got $00000000 ticks=00000000
sent $002F0600; got $00000010 ticks=00000000

As you can see, Pin-widgets 18 and 1A are by default enabled as inputs. Strange enough Pin-widget 14 too.

Using AHDA17l as a Mixer is not really fast as one can imagine, but setting volume-levels is possible. During listening to Bach's 'Goldberg Variations' and playing with AHDA I learned there is no Master Volume widget, Pin-widget 14 (green-rear and my headphone-output) can only be unmuted, volume cannot be set!

Strange: HDA2.DLL sets Pin-widget 14 as volume widget by default (and must be changed to $02 for WAVE-audio, as mentioned earlier). huh
But with the right settings in HDAICOUT.HDA almost everything is possible. tongue

You have made really great tools! rolleyes
Re: High Definition Audio
Post by watler on Dec 15th, 2017, 4:23pm

Deomsh, you are a true High Definition Audio enthusiast.
I appreciate your help.

Today, I tested a HP slimline V3000. (Realtek 888)
It works with volume widget of $0C.

It may be possible to create applets,modules,plugins or programs for custom HDA configurations.
Are you interested in creating custom win3x HDA tools?


Re: High Definition Audio
Post by deomsh on Dec 17th, 2017, 07:14am

Sounds like an interesting project. As far is I can do I will help, with my highly resistant chipset or otherwise.

I took a look at the blockdiagram of the Realtek ALC888 manual, widget 0C is the right one for playback volume. ALC888 has much more possibilties to redirect signals compared with ALC662. undecided
Re: High Definition Audio
Post by watler on Dec 17th, 2017, 2:01pm

Does your computer yet resist?
I've found several computers that will not play.

One friend's apple computer will run DOS but not Win3x.

I was given a Thinkpad T43 that will not play sound for any operating system and will not run win3x in standard or enhanced mode.

My cousin has a Compaq Presario V2000 (Win XP) that will not boot DOS from USB.

He also has a Dell 3520 that looks like it could work.
(Dell 3520)
[HDA_1E208086,05551028]
PCI_BUS=$00
PCI_DEVICE=$1B
PCI_FUNCTION=$0
GCTL=00000001
CODEC BITMAP=00001001
CODEC_VID=$1013
CODEC_DID=$4213
CODEC_REV=$100100
CODEC_NODEINFO=$010001
VolumeWidget=$14
OutputWidget=$02
Although Soundrec play position moves, no music is yet audible. lipsrsealed



Re: High Definition Audio
Post by deomsh on Dec 18th, 2017, 3:47pm

I think you have already broken my chipset's resistance, my only problem left with your driver my dos-prompt most of the time doesn't work.

Just for fun I took a fast look on your Dell 3520. Based on this source: https://askubuntu.com/questions/874756/alsa-and-realtek-alc3246-on-ubuntu-16-04 maybe there is a bios-setting that can cure your problem.

Or otherwise, based on this source: http://140.136.149.249/lxr/source/the-tree/sound/pci/hda/patch_realtek.c (.c is part of the web address!) I imagine following verbs for Headphone-playback, as a first start.

HDACFG.INI:
Volumewidget=$02

HDAICOUT.HDA (parameter verbs only for information and changes):
begin
$015F0700;
$015707C0;
$015F0700;
$015B8000;
$0153B000;
$015B8000;
$00CB0000;
$00C37000;
$00CB0000;
$002A0000;
$002F0600;
$00270610;
$002F0600;
end

Good luck!

Re: High Definition Audio
Post by watler on Dec 18th, 2017, 5:05pm

Thank you for your advice, deomsh.
I will try my cousin's laptop when he lets me.

DOS-prompt often doesn't work?

Which windows mode did you start? (Standard/Enhanced)
What video driver are you using? (MCGA,SVGA,VGA,etc...)

Do DOS-boxes work when my driver is not installed?


Re: High Definition Audio
Post by deomsh on Dec 19th, 2017, 5:13pm

I use Windows 3.1 in Enhanced mode, with ordinary VGA-driver.

Without your driver DOS-boxes are fine. Only with HDA2.DLL installed, nine out of ten times Windows completely crashes, without any message. Even ctrl+alt+del is not working anymore. So I have used my reset-button many times lately. sad
Sometimes a DOS-box works, but after "Exit" NEVER a second time - always a complete crash in that case.

I tried many SYSTEM.INI [386Enh] settings related to VM's, but without any succes. huh
Re: High Definition Audio
Post by watler on Dec 20th, 2017, 3:25pm

Since DOS boxes are "Virtual Machines" perhaps they require "Virtual Memory".
Have you tested the driver with Virtual Memory(swap file) enabled?

What DOS applications do you require from within windows?


Re: High Definition Audio
Post by watler on Dec 22nd, 2017, 11:23am

Deomsh, after I appended your verb list to hdaicout.hda , my cousin's Dell inspiron 3520 works.
The Onboard speakers are nice and loud.

I fear I've run out of new HDA devices to test.

Were you able to get your Virtual Machines working?
Re: High Definition Audio
Post by deomsh on Dec 22nd, 2017, 6:24pm

That's good to hear. After reading the ALSA document I guessed the Dell 3520 codec was a sort of ALC269-clone (but without loopback from the input-mixer). Only widget 15 is the Headphone-output, so maybe Dell decided otherwise. ALC269 datasheet is on the internet. cheesy
If the Dell has Windows 7 or higher onboard, you can try Windows High Definition Audio Utility to gather more information about the codec on the Dell-machine. rolleyes

I have found a nice workaround in case of the "DOS-prompt and DOS Boxes starting-problem". Actually I only need the command prompt inside Windows when an installation program wants to run a batchfile. It appears that when I start Windows 3.1 in standard mode, DOS-prompt starts and batchfiles are running without problems. Sound is okay before, but after usage of a DOS-prompt, or running a batch-file its impossible playing a WAV-file again. cry Unless one restarts Windows (possible without using the reset-button). cool

Only CDAudio is unaffected. So when you want to listen to your favourite music during DOS-sessions, maybe this old technology isn't to bad. kiss

Are your DOS Boxes working in Windows Enhanced mode?
Re: High Definition Audio
Post by watler on Dec 22nd, 2017, 7:52pm

My Enhanced-Mode Virtual Machines are working just fine.
However, I had noticed that when Enhanced Mode has no "Virtual Memory", "Virtual Machines" may have some issues. rolleyes
Have you adjusted the size of your Virtual Memory? (Control Panel -> 386 Enhanced)


Are you using the Loop or Timer method under Standard Mode?

Do you use any Win16 multimedia applications or games that require DOS-boxes? wink
Re: High Definition Audio
Post by watler on Dec 23rd, 2017, 11:52am

I have adjusted hdadrv to better suit your needs.
http://turkeys4me.byethost4.com/files/HDADRV9I.zip

This version should allow the HDA device to continue playing after Standard Mode has run a DOS program.

If you wish to use Virtual Machines with Virtual Memory disabled, change this hdacfg.ini setting:
mytimer=0
And then, press the activation program's "loop" button.


Re: High Definition Audio
Post by deomsh on Dec 23rd, 2017, 6:32pm

Watler, your incredebly fast. shocked

You where right about virtual memory, thanks a lot! I just found out that I can run DOS-boxes in Windows 3.1 Enhanced mode with temporary virtual memory setting enabled! cool
With permanent swapfile Windows cannot start.

Of cause I will try your new version of HDA2.DLL!

Long ago I played Prince of Persia 1 and 2... I found them back, they are playing fine in a DOS-box, but are saying "No digital sound". I don't think there is a Windows 3.1 universal soundcard emulator. I only found Windows 9x one's.
Re: High Definition Audio
Post by watler on Dec 23rd, 2017, 8:43pm

There was a freeware Win32s Apple II emulator a Win16 Spectrum emulator, and even a win32s C64 emulator.
Prince of Persia might have sound on one of those.

Deomsh, I don't know if anyone has made a win16,win32s or win386 compatible port of those games.
Do you want to create a win3x game?

To make a DOS games play sound with a win 3.x driver, you would need a Win3.x compatible 8086 emulator.
Did you want me to start an x86 emulation forum topic?

Although it may be possible to create a *.TSR or *.VXD system that could emulate some sort of DOS/VM sound support, that would require a DOS programmer.


Re: High Definition Audio
Post by deomsh on Dec 24th, 2017, 10:47am

I am not especially interested in gaming, although making your driver working in DOS-boxes is a nice subject. I tested only on behalf of your question sound was working in my DOS-boxes.

BTW: is your forum Win3x only? I ask because I did some prelimenary experiments using HDA2.DLL on Win9x. I'd like to share and discuss my findings.

Or do you think MSFN is the place to be? undecided
Re: High Definition Audio
Post by watler on Dec 24th, 2017, 1:39pm

Deomsh, I am sorry to hear of your aversion to diversions.

This forum is not exclusive.
However, I do like 16-bit windows projects. grin

Although my drivers were created in and for windows 3.1, I have no objections to your using newer windows versons.
I would be happy to hear how you have used them.

Deomsh, this forum and my drivers are not secret.
You may share my drivers freely with anyone you like on any forum.

Is MSFN the place to be? huh
Does anyone at MSFN make windows 3.1 drivers?



I added forum post for discussion of 8086 emulation.
http://win3x.conforums.com/index.cgi?board=Emulated&action=display&num=1514158371

The world could always use a fresh Prince of Persia game.
If you change your mind, just let me know

Re: High Definition Audio
Post by deomsh on Dec 26th, 2017, 09:21am

In my opinion win3x.conforums is the place to be, I only ment just in case, IF you don't like Win9x experiments. rolleyes

Do you like to start a new thread to discuss Win9x experiments?

Lately I had some "502 Bad Gateway" problems when trying to download your new driver, but today I succeeded. HDA2.DLL version 9i runs fine, and with hdacfg.ini setting: mytimer=0, as you described , I have no problems with DOS-boxes anymore when disabling virtual memory in Enhanced mode.

Sound is okay in Windows standard mode with HDARUN.EXE & <Loop>. Thanks a lot for all your efforts. smiley
Re: High Definition Audio
Post by watler on Dec 26th, 2017, 3:25pm

Standard Mode should play sound properly with the default mytimer settings.
You should only need mytimer to equal zero when using Enhanced Mode with Virtual Memory disabled.
If the mmsystem timer is not enabled, your Virtual DOS Machines should not crash.

The host Turkey4me found is not the best.
If you find a nice free win3x compatible ftp or webhost, I'll mirror the files there for you.

As long as the experiments are relevant to the subject at hand, this is the right forum and the right place.
Have you some new win9x drivers that you wish to discuss?


Re: High Definition Audio
Post by deomsh on Dec 27th, 2017, 04:24am

I only want to discuss Win9x experiments with HDA2.DLL.

Lately I googled on a different computer "Watler hda" to find your forum. First hit was a forum where you questioned a Windows 98 HDA driver (https://www.computing.net/answers/windows-95/is-there-a-high-definition-audio-driver-for-win98/171150.html). Maybe I have found one. wink
Re: High Definition Audio
Post by watler on Dec 27th, 2017, 4:43pm

It could not hurt to try the suggestions given there.
Perhaps your luck will be better than mine.

Since my driver was not created for win9x, I fear it may work poorly on that system.
For win9x , a 99 cent sound card from china would probably work better.

Let me know what you find.


Re: High Definition Audio
Post by deomsh on Dec 27th, 2017, 7:02pm

Watler, your HDA2.DLL is working on Windows 98SE! Even AHDA17L does. cheesy

Not working: with permanent swapfile, or without virtual memory.

Never worked for me: finding a memory location for busmastering, so I decided HDATSR.EXE is mandatory.

First: enable Windows 98SE Startup Sound.

Installation
After enabling High Definition Audio in the BIOS, Windows will identify a PCI-card. This PCI-card is needed for HDA2.DLL, so Wizard New Hardware must NEVER be cancelled, and afterwards do NOT disable the yellow-signed "PCI-Card" in Device Manager. shocked

First method: load HDATSR.EXE before starting Windows. When Windows is fully loaded, look if the yellow-signed "PCI-Card" resides Device Manager. Then Run "Add New Hardware Wizard" -> No -> No -> "Sound, Video and Game Controllers" -> "Ask Disk" and use the OEMSETUP.INF that comes with HDADRV9i (System Devices will NOT work!). The HDA2 DMA-address dialog will apear. Choose an option (OK or Close), but do NOT change the menory address. Then reboot and get your headphone. If you get a Windows protection error, use the three finger salute to move on. Afterwards "PCI-Card" in Device Manager will not change and the yellow sign will still be there!

Second method: Do NOT load HDATSR.EXE before starting Windows. Use GENHDA16.INF when Windows detects the new hardware, or later by "Update Driver" in Device Manager. huh
-------------------------------------------------------------------
Copy text between the lines below and paste in a text-editor like notepad and save as GENHDA16.INF
-------------------------------------------------------------------
;; GENHDA16.INF
;; 2017/12/31
;; "Watlers World" 16-bit High Definition Audio Driver
;; Win3x/Win9x only
;; (c) Copyright 2017 Deomsh

[Version]
Signature="$WINDOWS 95$"
Class=System
ClassGUID={4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider=%W_W%
LayoutFile=LAYOUT.INF, LAYOUT1.INF, LAYOUT2.INF
DriverVer=12/23/2017,9i
;CatalogFile=genhda16.cat

[Manufacturer]
%GEN%=GEN.Mfg

[GEN.Mfg]
%GEN_HDA.DeviceDesc%=HDA2,PCI\CC_0403

[HDA2]
DelFiles=HDA2.DelFiles
CopyFiles=HDA2.CopyFiles,HDATSR.CopyFiles
UpdateInis=HDA2.UpdateInis
UpdateAutoBat=HDA2.UpdateAutoBat
Reboot

[HDA2.UpdateInis]
system.ini,drivers,,"wave9=hda2.dll",1

[HDA2.UpdateAutoBat]
CmdAdd=hdatsr.exe

[HDA2.CopyFiles]
hda2.dll,hda2.dll,hda2.000,1

[HDATSR.CopyFiles]
hdatsr.exe,,,1

[HDA2.DelFiles]
drvidx.bin,,,1
drvdata.bin,,,1

[DestinationDirs]
DefaultDestDir=11
HDATSR.CopyFiles=13

[SourceDisksNames]
1="Watlers_World HDA Driver Disk",,0

[SourceDisksFiles]
hda2.dll=1
hdatsr.exe=1

[Strings]
;Localized strings
W_W = "Watlers_World"
GEN = "GENERIC"
GEN_HDA.DeviceDesc = "High Definition Audio Controller"
SystemClassName = "System Devices" ; ENG
;SystemClassName = "Systeemapparaten" ; DUT
------------------------------------------------------------------
BTW: edited to improve [HDA2.UpdateInis]

When Windows decides to be ready with the installation, open Device Manager..... and Have Fun!

If you want a bit more information, try HDAWIN16.INF instead. tongue
-------------------------------------------------------------------
Copy text between the lines below and paste in a text-editor like notepad and save as HDAWIN16.INF
-------------------------------------------------------------------
;; HDAWIN16.INF
;; 2017/12/31
;; "Watlers World" 16-bit High Definition Audio Driver
;; Win3x/Win9x only
;; (c) Copyright 2017 Deomsh

[Version]
Signature="$WINDOWS 95$"
Class=System
ClassGUID={4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider=%W_W%
LayoutFile=LAYOUT.INF, LAYOUT1.INF, LAYOUT2.INF
DriverVer=12/23/2017,9i
;CatalogFile=hdawin16.cat

[Manufacturer]
%GEN%=GEN.Mfg
%ATI%=ATI.Mfg
%AMD1%=AMD1.Mfg
%SIS%=SIS.Mfg
%NVAMD%=NVAMD.Mfg
%ULI%=ULI.Mfg
%VIA%=VIA.Mfg
;%RDCS%=RDCS.Mfg
;%Teradici%=Teradici.Mfg
%INTEL%=INTEL.Mfg

[GEN.Mfg]
%GEN_HDA.DeviceDesc%=HDA2,PCI\CC_0403

[ATI.Mfg]
%ATI_SB450_HDA.DeviceDesc%=HDA2,PCI\VEN_1002&DEV_437B
%ATI_SB600_HDA.DeviceDesc%=HDA2,PCI\VEN_1002&DEV_4383
%ATI_RS600_HDA.DeviceDesc%=HDA2,PCI\VEN_1002&DEV_793B
%ATI_RS690_HDA.DeviceDesc%=HDA2,PCI\VEN_1002&DEV_7919

[AMD1.Mfg]
;%AMD_HDA_768/8111.DeviceDesc%=HDA2,PCI\VEN_1022&DEV_7445 ; AC97 (HDA unknown)
%AMD_HDA_17h.DeviceDesc%=HDA2,PCI\VEN_1022&DEV_1457

[SIS.Mfg]
%SIS_966_HDA.DeviceDesc%=HDA2,PCI\VEN_1039&DEV_7502

[NVAMD.Mfg]
%NFORCE_HDA_MCP51.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_026C
%NFORCE_HDA_MCP55.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0371
%NFORCE_HDA_MCP61a.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_03E4
%NFORCE_HDA_MCP61b.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_03F0
%NFORCE_HDA_MCP65a.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_044A
%NFORCE_HDA_MCP65b.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_044B
%NFORCE_HDA_MCP67a.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_055C
%NFORCE_HDA_MCP67b.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_055D
%NFORCE_HDA_MCP72/78.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0774
;%NFORCE_HDA_MCP78b.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0775 ; unknown
;%NFORCE_HDA_MCP78c.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0776 ; unknown
;%NFORCE_HDA_MCP78d.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0777 ; unknown
%NFORCE_HDA_GF108.DeviceDesc%=HDA2,PCI\VEN_10DE&DEV_0BEA

[ULI.Mfg]
%ULI_HDA.DeviceDesc%=HDA2,PCI\VEN_10B9&DEV_5461

[VIA.Mfg]
%VIA_VT82xx_HDA.DeviceDesc%=HDA2,PCI\VEN_1106&DEV_3288

[RDCS.Mfg]
;%RDCS_HDA.DeviceDesc%=HDA2,PCI\VEN_17f3&DEV_ ; DEV is unkown!

[Teradici.Mfg]
;%Teradici.DeviceDesc%=HDA2,PCI\VEN_6549&DEV_1200 ; TERA1200 PC-over-IP Host

[INTEL.Mfg]
%C200_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_1C20
%C600_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_1D20
%C126_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_1E20
%ICH6_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_2668
%ESB_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_269A
%ICH7_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_27D8
%ICH8_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_284B
%ICH9_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_293E
%ICH10a_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_3A3E
%ICH10b_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_3A6E
%3400_HDA.DeviceDesc%=HDA2,PCI\VEN_8086&DEV_3B56

[HDA2]
DelFiles=HDA2.DelFiles
CopyFiles=HDA2.CopyFiles,HDATSR.CopyFiles
UpdateInis=HDA2.UpdateInis
UpdateAutoBat=HDA2.UpdateAutoBat
Reboot

[HDA2.UpdateInis]
system.ini,drivers,,"wave9=hda2.dll",1

[HDA2.UpdateAutoBat]
CmdAdd=hdatsr.exe

[HDA2.CopyFiles]
hda2.dll,hda2.dll,hda2.000,1

[HDATSR.CopyFiles]
hdatsr.exe,,,1

[HDA2.DelFiles]
drvidx.bin,,,1
drvdata.bin,,,1

[DestinationDirs]
DefaultDestDir=11
HDATSR.CopyFiles=13

[SourceDisksNames]
1="Watlers_World HDA Driver Disk",,0

[SourceDisksFiles]
hda2.dll=1
hdatsr.exe=1

[Strings]
;Localized strings
W_W = "Watlers_World"
GEN = "Generic"
ATI = "ATI Technologies Inc"
;AMD1 = "Advanced Micro Devices Inc."
SIS = "Silicon Integrated Systems"
NVAMD = "NVIDIA Corporation"
ULI = "ULi Electronics Inc."
VIA = "VIA Technologies, Inc."
RDCS = "RDC Semiconductor, Inc."
Teradici= "Teradici Corp."
INTEL= "INTEL Corporation"
GEN_HDA.DeviceDesc = "High Definition Audio Controller"
ATI_SB450_HDA.DeviceDesc = "ATI SB450 HD-Audio Controller"
ATI_SB600_HDA.DeviceDesc = "ATI SB600 HD-Audio Controller"
ATI_RS600_HDA.DeviceDesc = "ATI RS600 HD-Audio Controller"
ATI_RS690_HDA.DeviceDesc = "ATI RS690 HD-Audio Controller"
;AMD_HDA_768/8111.DeviceDesc = "AMD 768/8111 AC97 Controller"
AMD_HDA_17h.DeviceDesc = "AMD 17h HD-Audio Controller"
SIS_966_HDA.DeviceDesc = "SIS 966 HD-Audio Controller"
NFORCE_HDA_MCP51.DeviceDesc = "NFORCE MCP51 HD-Audio Controller"
NFORCE_HDA_MCP55.DeviceDesc = "NFORCE MCP55 HD-Audio Controller"
NFORCE_HDA_MCP61a.DeviceDesc = "NFORCE MCP61a HD-Audio Controller"
NFORCE_HDA_MCP61b.DeviceDesc = "NFORCE MCP61b HD-Audio Controller"
NFORCE_HDA_MCP65a.DeviceDesc = "NFORCE MCP65a HD-Audio Controller"
NFORCE_HDA_MCP65b.DeviceDesc = "NFORCE MCP65b HD-Audio Controller"
NFORCE_HDA_MCP67a.DeviceDesc = "NFORCE MCP67a HD-Audio Controller"
NFORCE_HDA_MCP67b.DeviceDesc = "NFORCE MCP67b HD-Audio Controller"
NFORCE_HDA_MCP72/78.DeviceDesc = "NFORCE MCP78a HD-Audio Controller"
;NFORCE_HDA_MCP78b.DeviceDesc = "NFORCE MCP78b HD-Audio Controller"
;NFORCE_HDA_MCP78c.DeviceDesc = "NFORCE MCP78c HD-Audio Controller"
;NFORCE_HDA_MCP78d.DeviceDesc = "NFORCE MCP78d HD-Audio Controller"
NFORCE_HDA_GF108.DeviceDesc = "NFORCE F108 HD-Audio Controller"
ULI_HDA.DeviceDesc = "ULI HD-Audio Controller"
VIA_VT82xx_HDA.DeviceDesc = "VIA VT82xx HD-Audio Controller"
;RDCS_HDA.DeviceDesc = "RDCS HD-Audio Controller"
;Teradici.DeviceDesc = "Teradici HD-Audio Controller" ; ??
C200_HDA.DeviceDesc = "INTEL C200 HD-Audio Controller"
C600_HDA.DeviceDesc = "INTEL C600 HD-Audio Controller"
C126_HDA.DeviceDesc = "INTEL C126 HD-Audio Controller"
ICH6_HDA.DeviceDesc = "INTEL ICH6 HD-Audio Controller"
ICH7_HDA.DeviceDesc = "INTEL ICH7 HD-Audio Controller"
ESB_HDA.DeviceDesc = "INTEL ESB HD-Audio Controller"
ICH8_HDA.DeviceDesc = "INTEL ICH8 HD-Audio Controller"
ICH9_HDA.DeviceDesc = "INTEL ICH9 HD-Audio Controller"
ICH10a_HDA.DeviceDesc = "INTEL ICH10r HD-Audio Controller"
ICH10b_HDA.DeviceDesc = "INTEL ICH10 HD-Audio Controller"
3400_HDA.DeviceDesc = "INTEL 3400 HD-Audio Controller"
SystemClassName = "System Devices" ; ENG
;SystemClassName = "Systeemapparaten" ; DUT
-------------------------------------------------------------------
BTW: used HDA.PAS from AHDA17L and double-checked on https://vendev.org/pci/ven/

To be continued.... cool
Re: High Definition Audio
Post by watler on Dec 29th, 2017, 8:10pm

Then, Windows 95 may also be able to use this driver.
Deomsh, Will the same *.inf file work for both 95 and 98?

I think that being able to manually edit the system.ini file is rather important.
On systems with multiple sound cards, the index of installed wave drivers can make a difference.

Do you have other sound cards you want to use at the same time?







Re: High Definition Audio
Post by deomsh on Dec 30th, 2017, 07:46am

Hello Watler, your OEMSETUP.INF will be accepted by both Win3x and also by Win9x using First Method of installation. Windows 98SE will then automatically preserve existing "wave=" entries and give HDA2.DLL a higher wave-index. The Second Method *.INF-files (Win9x-only!) preserve only "wave=", but if "wave1=" must preserved because of another soundcard, set the index in UpdateInis one higher. Maximum is 9. There should be a way to do this automatically, but I have'nt found yet. I used http://www-pc.uni-regensburg.de/systemsw/TECHTOOL/w95/doc/INFDOC.HTM, maybe you can take a look.
BTW: I edited my inf-files a bit to "wave9=hda2.dll". Works too.

I am only testing Windows 98SE for now, but I am sure Windows 95 will accept all *.INF-files. Do you have acces to Windows 98SE?
Re: High Definition Audio
Post by watler on Dec 30th, 2017, 3:23pm

I use win98 DOS for my 128gb windows 3.1 setup.
The first of your *.inf files removed the yellow icon and added a device to the system section. cool

You want a win98 HDA driver?
I think some boards had both AC97 and HDA.
There may have been some sort of support for your board.
Did you ask Realtek?

On systems that will not run win98, you may be able to use FreeDOS for larger drives.
Last time I checked, FreeDOS was able to run Windows 3.1 in Standard Mode .



Re: High Definition Audio
Post by deomsh on Dec 30th, 2017, 6:37pm

There is no one.

Did you use GENHDA16.INF? What is the name of the driver in Device Manager?

Did you get sound already? Check system.ini,drivers first.

Your driver gives quite good sound-quality in my opinion, in Windows 98SE too.
Re: High Definition Audio
Post by watler on Dec 31st, 2017, 12:06pm

Deomsh, what realm lies devoid?

I tried out your second *.inf file on another computer.
The MCP51 was added to the system section of device manager.
I only had to change the volume widget to $0C.

You are welcome to repackage the driver for win9x if you like.

Re: High Definition Audio
Post by deomsh on Jan 2nd, 2018, 03:17am

Hello Watler, Happy New Year smiley

I am still not fully satisfied with my inf-files. When installing your OEMSETUP.INF the Add New Hardware Wizard is more intelligent in case of setting a higher Wave-index-number than my UdateInis-script. Although adding HDA2.DLL with the "Wave9"-key (9 is the highest number) gives Windows 98SE no problems to load and use the driver, I puzzled out a more elegant solution.
-------------------------------------------------------------------
[HDA2.UpdateInis]
system.ini,drivers,"wave1=hda2.dll",,1 ; if exists, delete (in case using UpdateInis a second time)
system.ini,drivers,"wave1=*","wave2=*",2 ; shifts index one up if lower one exists
system.ini,drivers,,"wave1=hda2.dll",0 ; adds new entry ("0" can be omitted)
-------------------------------------------------------------------
This method allows for two existing wave-drivers, "wave" and "wave1". If "wave" does'nt exists, (my) Windows adds always "wave=mmsystem.dll", which will never hurts. Give it a try.

Regarding your "VolumeWidget"-correction, did you recognize the volume/balance sliders are working in Mediaplayer (the one that comes with Windows 98SE) WITHOUT setting the VolumeWidget to the right value? kiss
Re: High Definition Audio
Post by watler on Jan 2nd, 2018, 5:03pm

Deomsh, it sounds like windows 98 needs a device manager. cheesy

For applications that do not use mmsystem, there should be no particular limit on the number of wave drivers.
What happens after 9?

If wave9= is the highest then wave0 should be the lowest.
Is wave= the same as wave0=?

A (number and $F) would indicate that the limit 10 was actually a hex limit of $10.
I would think that if there could be a tenth wave driver, it would it be waveA=.

Although I did not test 32-bit mplayer, I'm glad to hear that it works well for you.

The volume was perfect for SVSTP.


Re: High Definition Audio
Post by deomsh on Jan 4th, 2018, 1:48pm

Watler, I tested wave-indexes with surprising results.
"wave0=" is NOT identical with "wave=" and "wave10=", "waveA=" and even "waveG=" are allowed.

The maximum number seemed not to be ten wave-drivers, I even installed HDA2.DLL seventeen times. All equally visible in Multimedia properties.

Although all "wave"-entries in SYSTEM.INI, [Drivers] appear sorted in the Registry key HKLM\System\..\Control\MediaResources\Wave\Wave[index] with index order: none;0;1;10;..;A;..;G, in Multimedia properties they are sorted in exactly the same way as in SYSTEM.INI, [Drivers]. tongue

I think I found a "Device Manager", up to ten existing "wave"-entries will be untouched with following:
-------------------------------------------------------------------
[HDA2.UpdateInis]
system.ini,drivers,"wave*=hda2.dll",,1 ; if exists, delete (when using UpdateInis second time)
system.ini,drivers,"wave1=*","~WaveTemp~=*",2 ; leaves existing "wave=*" allways unchanged
system.ini,drivers,,"wave1=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave1=*",2
system.ini,drivers,"wave2=*","~WaveTemp~=*",2
system.ini,drivers,,"wave2=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave2=*",2
system.ini,drivers,"wave3=*","~WaveTemp~=*",2
system.ini,drivers,,"wave3=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave3=*",2
system.ini,drivers,"wave4=*","~WaveTemp~=*",2
system.ini,drivers,,"wave4=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave4=*",2
system.ini,drivers,"wave5=*","~WaveTemp~=*",2
system.ini,drivers,,"wave5=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave5=*",2
system.ini,drivers,"wave6=*","~WaveTemp~=*",2
system.ini,drivers,,"wave6=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave6=*",2
system.ini,drivers,"wave7=*","~WaveTemp~=*",2
system.ini,drivers,,"wave7=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave7=*",2
system.ini,drivers,"wave8=*","~WaveTemp~=*",2
system.ini,drivers,,"wave8=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave8=*",2
system.ini,drivers,"wave9=*","~WaveTemp~=*",2
system.ini,drivers,,"wave9=hda2.dll"
system.ini,drivers,"~WaveTemp~=*","wave9=*",2
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave5=hda2.dll","wave4=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave6=hda2.dll","wave5=hda2.dll",3
system.ini,drivers,"wave5=hda2.dll","wave4=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave7=hda2.dll","wave6=hda2.dll",3
system.ini,drivers,"wave6=hda2.dll","wave5=hda2.dll",3
system.ini,drivers,"wave5=hda2.dll","wave4=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave8=hda2.dll","wave7=hda2.dll",3
system.ini,drivers,"wave7=hda2.dll","wave6=hda2.dll",3
system.ini,drivers,"wave6=hda2.dll","wave5=hda2.dll",3
system.ini,drivers,"wave5=hda2.dll","wave4=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
system.ini,drivers,"wave9=hda2.dll","wave8=hda2.dll",3
system.ini,drivers,"wave8=hda2.dll","wave7=hda2.dll",3
system.ini,drivers,"wave7=hda2.dll","wave6=hda2.dll",3
system.ini,drivers,"wave6=hda2.dll","wave5=hda2.dll",3
system.ini,drivers,"wave5=hda2.dll","wave4=hda2.dll",3
system.ini,drivers,"wave4=hda2.dll","wave3=hda2.dll",3
system.ini,drivers,"wave3=hda2.dll","wave2=hda2.dll",3
system.ini,drivers,"wave2=hda2.dll","wave1=hda2.dll",3
-------------------------------------------------------------------
I discovered "Flag=3" works (partly?) as an IF-statement. tongue

I did many tests, maybe its fool-proof now. If you have some spare time, feel free to try.
Re: High Definition Audio
Post by watler on Jan 6th, 2018, 1:31pm

Your *.inf files seem to work very well with 98.
Will the HDA driver work for ME also?
Re: High Definition Audio
Post by deomsh on Jan 6th, 2018, 6:19pm

Thanks, I am working on a definitive inf-file.

I must have Windows ME somewhere lying around, I will try when I find it.

Stability in Windows 98SE
At the moment I am busy with video card problems related to DOS-boxes. Without HDA2.DLL I can open about 50 MS-DOS prompts with my PCIe-video card before windows crashes. With HDA2.DLL I am getting immediately a blue screen with an OE fault at address 0177:Bxxx, or a Runtime error 202. In case of the blue screen I can mostly continue. Only no sound anymore and the cursor in the MS-DOS window is no longer flickering, is there, but static.

With my onboard video I can only load standard vga-driver, but in that case I can open the 50 MS-DOS prompts while listening to Hotel California (mp3 with default Windows Media Player, uses Direct Sound and codec L3codec.ax).

All I can find on error 202 is a stack overflow error https://www.inner-smile.com/delphifaq.phtml#Stack.

I tried many memory-related settings in my configuration files, but without succes.

How are your DOS-boxes in win98?
Re: High Definition Audio
Post by watler on Jan 6th, 2018, 9:33pm

Do you want me to start a post about win3x video?

Does your problem occur while fewer than 50 virtual machines are running?
What program was playing the song (CD,wav,mp3,midi,mod.etc)?
Does the same thing happen while in Standard Mode?

Since I seldom use command prompt, I usually delete it from program manager.
Deomsh, I remember no computer on which Enhanced Mode DOS-boxes worked well.


Re: High Definition Audio
Post by deomsh on Jan 7th, 2018, 04:15am

Sorry, not win3x, my DOS-boxes in Windows 3.1 are rock-stable since HDA2.DLL version 9i in case of standard mode/using temporary swapfile in case of Enhanced mode.

I ment stability test in win98se. I modified my former post.
Re: High Definition Audio
Post by watler on Jan 7th, 2018, 4:29pm

Does the same error occur with fifty GUI or console applications?

As Windows 98 moved on to WDM and directX drivers, the methods to be used for timers and interrupts may have changed.
If you change the hdacfg mytimer= value, does the same crash occur?

I saved this link to a page on windows 2.0 programming.
http://bearwindows.zcm.com.au/win2x.htm
The site also has a windows 98 video driver that might work for you.

Re: High Definition Audio
Post by deomsh on Jan 7th, 2018, 8:41pm

With HDA2.DLL and my PCIe video card Windows 98SE crashes when opening the first MS-DOS prompt. I do not think that has anything to do with DirectX. Your driver seems too be compatible with DirectX, when I run DxDiag all sound tests are okay (software rendering only).

Setting mytimer=0 in HDACFG.INI gives no crash, but is no solution. No sound anymore. In a player there is no "movement" when opening a sound-file. HDARUN.EXE cannot run, crashes Windows 98SE.

I have tried my old S3 TRIO 64v PCI card, no problems with DOS-boxes in highest video mode (800x600, 16-bits colour). This card supports Direct Draw only.

In the past I have used the Universal VBE/VESA video driver, but there is no video acceleration, so my old PCI card would give a better performance.

BTW: I tested HDA2.DLL with Windows ME. My inf-file is compatible with Windows ME, files are copied and everything is there in Device Manager etc. Sound works great with Windows Media Player 7, unless you do anything else. Even copying a file gives the blue screen with unspecified OE fault and 0177:BFF79BDB . In case I can continue, sound is gone. In Windows ME it is not possible to load a real-mode driver, HDATSR.EXE is ignored in AUTOEXEC.BAT.

HDACFG.INI gives no busmastering memory address. Giving the standard one in the driver-properties does not make things better.

What did you exactly mean with a free (physical) memory address "out of the range of windows" in your readme-file in HDADRV?
Re: High Definition Audio
Post by watler on Jan 8th, 2018, 3:59pm

I uploaded an adjusted version of hdadrv9i to the watlers_world yahoo group.
http://turkeys4me.byethost4.com/programs/index.htm


The program I created for Standard Mode (/activate/hdarun) should allow you to play sounds without the use of a system timer.
Remember to press the "Loop" button.

Any memory location that the windows does not use might be a good location for the driver's buffer.
You could limit Windows memory to 1gb and then set the buffer to an address in within the second gigabyte of RAM.



Re: High Definition Audio
Post by deomsh on Jan 9th, 2018, 5:35pm

Hello Watler, thanks a lot for HDA2.DLL version 9J!

I have already did some testing in Windows 3.1 and in Windows 98SE.

Windows 3.1
In Enhanced mode the driver is fully stable with "Mytimer=1" in HDACFG.INI. Sound is great, I play MP3's with WinPlay3! Multitasking is fine.

With "Mytimer=0" and using HDARUN.EXE (in the way you teached me kiss), sound seems to be good, but even moving the mouse gives distortions/delays in the music. Maybe an "interrupt-thing"?

Windows 98SE
With "Mytimer=1" music sound is very good. This evening I tested WinAmp. Even DirectSound output-setting works (I tested software rendering only, I do not really like the heavy crashes in Windows). Multitasking is not bad. Only heavy file operations must be avoided. I had a crash when adding a few files to a big ZIP-archive while listening to Iggy Pop singing "In the Death-Car" ("Arizona Dream" OST).

Setting "Mytimer=0" restores the possibility to open MS-DOS prompts. I opened all 64 DOS-windows, the maximum that is said to be possible. With HDARUN active I can play sound again. It is really nice to hear the startup sound at once , I suppose it must be residing somewhere in a buffer.
Same problems as in Windows 3.1 Enhanced mode; multitasking is mostly not possible, crashes Windows in a very bad way.

For the time being I prefer losing MS-DOS boxes. I modified a batch file I made 12 years ago when testing USBDOS-drivers on Windows 95OSR1.

Following batch-file can be used to get a HDA-free session if needed (also with/without loading HDATSR.EXE).
-------------------------------------------------------------------
HDAUDIO.BAT
-------------------------------------------------------------------
@echo off
choice /c:y,n /t:n,30 Do you want to use 16-bits High Definition Audio Driver?
cls

if errorlevel 2 goto win32
if exist c:\WINDOWS\SYSTEM\hda2.dl_ goto win16
if exist c:\WINDOWS\SYSTEM\hda2.dll goto hdatsr
if not exist c:\WINDOWS\SYSTEM\hda2.dl_ goto win32

:win16
ren c:\WINDOWS\SYSTEM\hda2.dl_ hda2.dll
if exist c:\WINDOWS\SYSTEM\hda2.dll goto hdatsr

:win32
if exist c:\WINDOWS\SYSTEM\hda2.dl_ goto choice
if not exist c:\WINDOWS\SYSTEM\hda2.dll goto choice
ren c:\WINDOWS\SYSTEM\hda2.dll hda2.dl_

:hdatsr
choice /c:y,n /t:n,30 Do you want HDATSR?
if errorlevel 2 goto notsr
if exist c:\WINDOWS\COMMAND\hdatsr.exe goto tsr
if not exist c:\WINDOWS\COMMAND\hdatsr.ex_ goto nodriver
ren c:\WINDOWS\COMMAND\hdatsr.ex_ hdatsr.exe
if not exist c:\WINDOWS\COMMAND\hdatsr.exe goto nodriver

:tsr
echo HDATSR.EXE will be installed now
C:\WINDOWS\COMMAND\hdatsr.exe
goto choice

:notsr
ren c:\WINDOWS\COMMAND\hdatsr.exe hdatsr.ex_
if not exist c:\WINDOWS\COMMAND\hdatsr.ex_ goto nodriver
echo HDATSR.EXE is disabled
goto choice

:nodriver
echo HDATSR is not in C:\WINDOWS\COMMAND

:choice
choice /c:y,n /t:n,30 Do you want to stay in MSDos?
if errorlevel 2 goto win
goto msdos

:win
C:\WINDOWS\WIN.COM

:MSDos
echo You are in Real Mode now!
-------------------------------------------------------------------
Last choice works only when setting BootGUI=0 in MSDOS.SYS!
The batchfile is maybe not fully fool-proof! Adding HDA2.DLL when HDA2.DL_ exists is NOT allowed. Of cause I can be outperformed by a real programmer. smiley

I am running this batchfile from AUTOEXEC.BAT (last line).
I use it (modified) too in my Windows 3.1 installation. Watch your own PATH grin
Re: High Definition Audio
Post by watler on Jan 9th, 2018, 8:31pm

Both Windows 95 and 98 run in Enhanced Mode.
You could try an RS232 mouse and use himemx to limit RAM to 512mb.
For Win98 Virtual Machines (DOS programs) you may have to adjust Virtual Memory settings.


Did USB devices cause the crashes?
Re: High Definition Audio
Post by deomsh on Jan 10th, 2018, 8:31pm

I switched video cards. With GF 7950GT all my problems with DOS-boxes seems to be history.

Thanks a lot for all help! cheesy

I noticed last version of HDA2.DLL is much smaller. What did you change?
Re: High Definition Audio
Post by watler on Jan 11th, 2018, 12:49pm

The source code did not change. rolleyes
I simply disabled some debugging features.


I'm glad to hear that you found a solution.
Perhaps synchronous multimedia will work now.

Perhaps you might like to try my Win3x Video Benchmark.
http://win3x.conforums.com/index.cgi?board=Opensource&action=display&num=1502076198
Re: High Definition Audio
Post by deomsh on Jan 20th, 2018, 7:48pm

Today I did some testing of AHDA17L in Windows 3.1, because I am still wondering why HDA2.DLL recognize ALC662's widget $14 as Volume-widget (it is $02 actually).

I used the widget-page of form 1. Everything on this page works very well. There is lots of information about various groups of widgets, so far as they exist in my codec ALC662.

I selected the following output for widgets $02 en $14 and made some comments.

AHDA17L

Widgets: Function Nodes:

<Audio Output>
AC_PAR_AUDIO_WIDGET_CAP widget $02 B(00000000000000000000000000011101)
Type=0
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=False
Unsol Capable=False
ProcWidget=False
Stripe=False
Format Override=True
Amp Param Override=True
Out Amp Present=True
In Amp Present=False
Chan count=1
Total Channels-1=1
AC_PAR_PCM of node 2 =$000E0160
Bit rates= 16-bit, 20-bit, 24-bit,
Sample rates= 44.1khz, 48.0khz,
AC_PAR_STREAM of $02= $00000001
Supports PCM
AC_PAR_AMP_OUT_CAP 2 $00034040
Offset=64
NumSteps=0
StepSize=0
AC_VERB_GET_CONV_STR_CH #$02 =$00000010
Stream 3:0 =$01
Channel 3:0 =$00
AC_VERB_GET_STREAM_FORMAT #$02 =$00004011
TYPE (BIT15)=0;(PCM)
Sample Base Rate(BASE) (BIT14 R/W) =1
1 = 44.1kHZ
RW Sample Base Rate Multiple (MULT) 13:11 =0
000 = 48kHz/44.1kHz or less
Sample Base Rate Divisor (DIV) 10:8 =0
000 = Divide by 1(48kHz,44.1kHz)
Bits per Sample(BITS) 6:4 =1
001 =16 bits. The data will be packed in memory in 16-bit containers on 16-bit boundaries.
Channels(CHAN) 3:0 = 1

[Other two not copied]

[Comments deomsh]:
AC_PAR_AMP_OUT_CAP 2 $00034040
Offset=64
NumSteps=0 => not 64 too?
StepSize=0 => 3x0.25-steps?



<laughIN Comp>
AC_PAR_AUDIO_WIDGET_CAP widget $14 B(00000000010000000000000110001101)
Type=4
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=True
Unsol Capable=True
ProcWidget=False
Stripe=False
Format Override=False
Amp Param Override=True
Out Amp Present=True
In Amp Present=False
Chan count=1
Total Channels-1=1
AC_PAR_PIN_CAP 20 $0001003C
Presence Detect Capable
Headphone Drive Capable
Output Capable
Input Capable
VRef Control=0
EAPD Capable
AC_PAR_AMP_OUT_CAP 20 $80000000
Offset=0
NumSteps=0
StepSize=0
Mute Capable
AC_PAR_CONNLIST_LEN 20 $00000001
Connection List Length=1
Short Form
There is only one hard-wired input possible (read it from the list)
AC_VERB_GET_CONNECT_LIST #$14 =$0000000C
Short Form
Connection List Entry N+3[31:24]=$00
Connection List Entry N+2[23:16] Connectivity[23:16]=$00
Connection List Entry N+1[15:8] Connectivity[15:6]=$00
Connection List Entry N+0[7:0] Connectivity[7:0]=$0C
AC_VERB_GET_CONNECT_SEL #$14 =$00000000
Connection Index currently set=$00
AC_VERB_GET_CONFIG_DEFAULT #$14 =$01014010
Port Connectivity[31:30]=$00
The Port Complex is connected to a jack (1/8",ATAPI,etc.)
Location[29:24]=$01
Rear
External
Main chassis
Default Device[23:20]=$00
Line Out
Connection Type[19:16]=$01
1/8 stereo/mono
Color[15:12]=$04
Green
Misc[11:8]=$00
Default Association (For Grouping)[7:4]=$01
Sequence (Index in Group)[3:0]=$00
AC_VERB_GET_PIN_SENSE #14 =$80000000
Connector Presence Detected on this pin.

[Other ones not copied]

[Comments deomsh]:
AC_PAR_AMP_OUT_CAP 20 $80000000
Offset=0
NumSteps=0
StepSize=0
Mute Capable

This should be all correct, but why is widget $014 identified as the volume-widget in HDACFG.INI in case of ALC662 huh
Re: High Definition Audio
Post by watler on Jan 21st, 2018, 8:05pm

I've not added volume widget detection.
The number $14 is the default value.


http://turkeys4me.byethost4.com/programs/AHDA17M.zip
Re: High Definition Audio
Post by deomsh on Jan 23rd, 2018, 5:02pm

Thanks a lot for AHDA17M!

I am busy to make a full test, I will report when I am finished. rolleyes
Re: High Definition Audio
Post by deomsh on Jan 25th, 2018, 5:08pm

I made a full test of AHDA17M with ALC662 on Windows 3.1

See my report. Enjoy!

First Test: Only Windows, no HDA driver, opening DRUMLOOP.WAV (44.1kHz/16-Bit). CORB for Verbs enabled

[PCI]
No changes,
(PCI) W20 0000 0000 Still 0000 instead 0002 !

[HDA]
No changes,
<Button 21>: still no function

[jds]
Changes:
<Start HDA> {necessary for meaningfull AC_VERB_PARAMETERS !!}
<AC_VERB_PARAMETERS>
AC_PAR_VENDOR_ID 10EC0662
VENDOR_ID $10EC
DEVICE_ID $0662
AC_PAR_SUBSYSTEM_ID 00000000

AC_PAR_REV_ID 00100101

AC_PAR_NODE_COUNT #0 $00010001
Total Nodes #1 $01
Starting Node #1 $01

AC_PAR_NODE_COUNT #1 $00020025
Total Nodes #1 $02
Starting Node #1 $25

AC_PAR_FUNCTION_TYPE #1 $00000101
Node function type $01
Audio Function Group
Unsolicited Capable $01

AC_PAR_STREAM #1 $00000001
Supports PCM

AC_PAR_CONNLIST_LEN #$0B $00000009
Connection List Length=9
Short Form

AC_PAR_PROC_CAP #32 00000C00
NumCoeff=12

AC_PAR_GPIO_CAP #1 40000002
NumGPIOs=2
NumGPOs=0
NumGPIs=0
GPIUnsol

$12 AC_PAR_AMP_OUT_CAP #3 00034040
Offset=64
NumSteps=64
StepSize=3

<AC_VERB_GET_CONFIG_DEFAULT> Still doesn't work

<AC_VERB_GET_CONNECT_LIST> Still doesn't work

[Nodules]
Changes:

<Enumerate nodes> after <Clear IC> & sending one <Immediate Command>, without this procedure some values remain $AAAAAAAA
Starting node $01
Total nodes $01

Function Group $01
AC_NODE_COUNT of node $01
Total Nodes (node $01)=$25
Starting Node (node $01)=$02
AC_PAR_FUNCTION_TYPE of node 1
Node function type $01= Audio Function Group
Unsolicited Capable $01
AC_PAR_AUDIO_FG_CAP of node 1
Optional Beep generator present.
Input Delay $F
Output Delay $F
AC_PAR_PCM of node 1 =$000E0160
Bit rates= 16-bit, 20-bit, 24-bit,
Sample rates= 44.1khz, 48.0khz,
AC_PAR_STREAM of $01= $00000001
Supports PCM
AC_PAR_GPIO_CAP of $01 =$40000002
NumGPIOs=$02
NumGPOs=$00
NumGPIs=$00
GPIUnsol
AC_VERB_GET_SUBSYSTEM_ID of node 1
Implementation Identification
Board Implementation ID (BID) 31:8=$184976
Board Manufacturer Identification (BMID) 31:16=$1849
Board SKU (BSKU)=$76
Assembly ID(AssyID)=$62

< plywave> Ready? <OK> < Print BDL Entries>
ADDRHI32=$00000000
ADDRLO32=$03000000
leng=$00020000
IOC=$00000000
ADDRHI32=$00000000
ADDRLO32=$03020000
leng=$00020000
IOC=$00000000
ADDRHI32=$00000000
ADDRLO32=$03000000
leng=$00020000
IOC=$00000000
ADDRHI32=$00000000
ADDRLO32=$03020000
leng=$00020000
IOC=$00000000

Many times the same, last lines are:

ADDRHI32=$00000000
ADDRLO32=$03020000
leng=$00020000
IOC=$00000000
ADDRHI32=$001F0500
ADDRLO32=$001F0500
leng=$001F0500
IOC=$001F0500

[Widgets]

<Examine All> Gives (the three to six $AAAAAAAA values are not always at the same Widgets the second or third time!!):

AC_PAR_AUDIO_WIDGET_CAP widget $02 ($0000001D)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $03 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $04 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $05 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $06 ($00000211)
Type=$00
Audio Output

AC_PAR_AUDIO_WIDGET_CAP widget $07 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $08 ($0010011B)
Type=$01
Audio Input

AC_PAR_AUDIO_WIDGET_CAP widget $09 ($0010011B)
Type=$01
Audio Input

AC_PAR_AUDIO_WIDGET_CAP widget $0A ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $0B ($0020010B)
Type=$02
Audio Mixer

AC_PAR_AUDIO_WIDGET_CAP widget $0C ($0020010B)
Type=$02
Audio Mixer

AC_PAR_AUDIO_WIDGET_CAP widget $0D ($0020010B)
Type=$02
Audio Mixer

AC_PAR_AUDIO_WIDGET_CAP widget $0E ($0020010B)
Type=$02
Audio Mixer

AC_PAR_AUDIO_WIDGET_CAP widget $0F ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $10 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $11 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $12 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $13 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $14 ($0040018D)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $15 ($0040018D)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $16 ($0040018D)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $17 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $18 ($0040018F)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $19 ($0040018F)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1A ($0040018D)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1B ($0040018F)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1C ($00400001)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1D ($00400000)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1E ($00400300)
Type=$04
Pin Complex

AC_PAR_AUDIO_WIDGET_CAP widget $1F ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $20 ($00F00040)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $21 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $22 ($AAAAAAAA)
Type=$0A

AC_PAR_AUDIO_WIDGET_CAP widget $23 ($0020010B)
Type=$02
Audio Mixer

AC_PAR_AUDIO_WIDGET_CAP widget $24 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $25 ($00F00000)
Type=$0F
Vendor defined Widget

AC_PAR_AUDIO_WIDGET_CAP widget $26 ($00F00000)
Type=$0F
Vendor defined Widget

<Audio Output>
AC_PAR_AUDIO_WIDGET_CAP widget $02 B(00000000000000000000000000011101)
Type=0
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=False
Unsol Capable=False
ProcWidget=False
Stripe=False
Format Override=True
Amp Param Override=True
Out Amp Present=True
In Amp Present=False
Chan count=1
Total Channels-1=1
AC_PAR_PCM of node 2 =$000E0160
Bit rates= 16-bit, 20-bit, 24-bit,
Sample rates= 44.1khz, 48.0khz,
AC_PAR_STREAM of $02= $00000001
Supports PCM
AC_PAR_AMP_OUT_CAP 2 $00034040
Offset=64
NumSteps=64
StepSize=3
AC_VERB_GET_CONV_STR_CH #$02 =$00000000
Stream 3:0 =$00
Channel 3:0 =$00
AC_VERB_GET_STREAM_FORMAT #$02 =$00000020
TYPE (BIT15)=0;(PCM)
Sample Base Rate(BASE) (BIT14 R/W) =0
0 = 48kHZ
RW Sample Base Rate Multiple (MULT) 13:11 =0
000 = 48kHz/44.1kHz or less
Sample Base Rate Divisor (DIV) 10:8 =0
000 = Divide by 1(48kHz,44.1kHz)
Bits per Sample(BITS) 6:4 =2
010 =20 bits. The data will be packed in memory in 32-bit containers on 32-bit boundaries.
Channels(CHAN) 3:0 = 0

And so on..... (with some $AAAAAAAA, not always on the same spot)

<Audio Mixer>
AC_PAR_AUDIO_WIDGET_CAP widget $0B B(00000000001000000000000100001011)
Type=2
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=True
Unsol Capable=False
ProcWidget=False
Stripe=False
Format Override=False
Amp Param Override=True
Out Amp Present=False
In Amp Present=True
Chan count=1
Total Channels-1=1
AC_PAR_AMP_IN_CAP 11 $80051F17
Offset=23
NumSteps=31
StepSize=5
Mute Capable
AC_PAR_CONNLIST_LEN 11 $00000009
Connection List Length=9
Short Form
AC_VERB_GET_CONNECT_LIST #$0B =$1B1A1918
Short Form
Connection List Entry N+3[31:24]=$1B
Connection List Entry N+2[23:16] Connectivity[23:16]=$1A
Connection List Entry N+1[15:8] Connectivity[15:6]=$19
Connection List Entry N+0[7:0] Connectivity[7:0]=$18

And so on..... (with some $AAAAAAAA, not always on the same spot)

< PIN Comp>
AC_PAR_AUDIO_WIDGET_CAP widget $14 B(00000000010000000000000110001101)
Type=4
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=True
Unsol Capable=True
ProcWidget=False
Stripe=False
Format Override=False
Amp Param Override=True
Out Amp Present=True
In Amp Present=False
Chan count=1
Total Channels-1=1
AC_PAR_PIN_CAP 20 $0001003C
Presence Detect Capable
Headphone Drive Capable
Output Capable
Input Capable
VRef Control=0
EAPD Capable
AC_PAR_AMP_OUT_CAP 20 $80000000
Offset=0
NumSteps=0
StepSize=0
Mute Capable
AC_PAR_CONNLIST_LEN 20 $00000001
Connection List Length=1
Short Form
There is only one hard-wired input possible (read it from the list)
AC_VERB_GET_CONNECT_LIST #$14 =$0000000C
Short Form
Connection List Entry N+3[31:24]=$00
Connection List Entry N+2[23:16] Connectivity[23:16]=$00
Connection List Entry N+1[15:8] Connectivity[15:6]=$00
Connection List Entry N+0[7:0] Connectivity[7:0]=$0C
AC_VERB_GET_CONNECT_SEL #$14 =$00000000
Connection Index currently set=$00
AC_VERB_GET_CONFIG_DEFAULT #$14 =$01014010
Port Connectivity[31:30]=$00
The Port Complex is connected to a jack (1/8",ATAPI,etc.)
Location[29:24]=$01
Rear
External
Main chassis
Default Device[23:20]=$00
Line Out
Connection Type[19:16]=$01
1/8 stereo/mono
Color[15:12]=$04
Green
Misc[11:8]=$00
Default Association (For Grouping)[7:4]=$01
Sequence (Index in Group)[3:0]=$00
AC_VERB_GET_PIN_SENSE #14 =$80000000
Connector Presence Detected on this pin.

And so on..... (with some $AAAAAAAA, not always on the same spot)

<Vendor>
AC_PAR_AUDIO_WIDGET_CAP widget $05 B(00000000111100000000000000000000)
Type=15
Delay=0
Chann Count Ext=0
CP Caps=False
L-R Swap=False
Power Cntrl=False
Digital=False
Conn List=False
Unsol Capable=False
ProcWidget=False
Stripe=False
Format Override=False
Amp Param Override=False
Out Amp Present=False
In Amp Present=False
Chan count=0
Total Channels-1=0

And so on.....

Other buttons do not work, but that is right according to the specs of ALC662!

{Form 2}
[CORB]

No changes since last test earlier version.

Tests with HDA2.DLL loaded gives roughly the same results, except that [Widgets] <Examine All> is not working, but no problems with the other widget-button's. grin
Re: High Definition Audio
Post by watler on Jan 26th, 2018, 5:50pm

Adjusted timing:
http://turkeys4me.byethost4.com/programs/AHDA17N.7z


Re: High Definition Audio
Post by deomsh on Jan 27th, 2018, 6:51pm

I tested AHDA17M, all $AAAAAAAA values are gone.

Great, thanks a lot! cheesy

Timings "10" is not high enough if I want sending verbs with Corb on form2. On my system Timings minimum must be 150 to give consistent response-values. But for form1 there is no problem.

In case sending verbs this is not a problem at all, simply adjust timings if necessary.

I tested AHDA17M again with different Corb-timings. With 300 all $AAAAAAAA values are gone in form1.
Re: High Definition Audio
Post by watler on Jan 29th, 2018, 5:16pm

I changed the default corb delay value to 150.
Re: High Definition Audio
Post by deomsh on Jan 30th, 2018, 10:06am

Found it. Timings "10" is still great for the Widgets page. Realy fast. grin
Re: High Definition Audio
Post by watler on Jan 30th, 2018, 6:41pm

This might work:
http://turkeys4me.byethost4.com/programs/AHDA17O.7z
Re: High Definition Audio
Post by deomsh on Feb 7th, 2018, 11:13am

I have tested AHDA17O, timings are excellent! cheesy

I noticed following difference with earlier versions: this version starts without a dialog asking for a wave-file. When I click the plywave-button, this dialog comes again. When I open a Wave-file, nothing seems to change. Or am I wrong?

Whats the purpose of this button?
Re: High Definition Audio
Post by watler on Feb 7th, 2018, 5:18pm

AHDA was my starting point for HDA testing.
The original hda.dll was based on the player found in AHDA.

AHDA's player was designed for my ASUS Sabertooth x58 motherboard.
I've not updated those functions since I started working on the Windows driver.
Playing sounds with AHDA would conflict with HDA2.dll.


Re: High Definition Audio
Post by deomsh on Feb 7th, 2018, 7:17pm

Thanks, so I don't have to try that funtion anymore.

I will in this thread continue with my question about the maximum sample rate in connection withHDA2.DLL.

I have no plans to write drivers, I am only interested in the capabilities of HDA2.DLL.

In Windows 98SE I did some experiments with FOOBAR2000 0.8.3. In FOOBAR you can set the output sample rate / bitrate indepent of the file-rates. I was not really surprised that 24-bits output was not possible.
The maximum output sample rate that was possible with HDA2.DLL: 48000. When I tried 96000 there was an error-message. So I searched a bit about the Windows multimedia system.
Re: High Definition Audio
Post by watler on Feb 7th, 2018, 8:07pm

The base output frequencies supported are 44.1 and 48khz.
Although the HDA standard supports 16,20,24 and 32-bit audio, the most common format is 16-bit.

The limits of runtime software conversion are neither realistic or practical.
However, you have a rather powerful computer. wink

If you want to experiment with software mixing/remixing and bit conversion, then polywave may be of interest to you.
http://win3x.conforums.com/index.cgi?board=Pascal&action=display&num=1502076806


Re: High Definition Audio
Post by deomsh on Feb 15th, 2018, 5:55pm

I took a look at this driver, but I don't have that audio-card.

In the meantime I tested Windows ME with HDA2.DLL. After making ME dos-compatible (because I had to install HDATSR.EXE in AUTOEXEC.BAT) and with latest servicepack I had succes. Your HDA-driver is delivering sound in ME. shocked
Re: High Definition Audio
Post by watler on Feb 15th, 2018, 6:43pm

Glad to hear that Windows ME is working.

It was my intention to post a link to Polywave (Mixing wave driver).
I have corrected the link in my previous post.

If you want to play audio of a bit-rate or frequency that your sound hardware does not support, or if you want to play multiple sounds at once, Polywave may be of interest to you.
My second Windows 3.1 USB sound driver was based upon Polywave.