HDA2.dll is a High Definition Audio wave driver for windows 3.1.

Remove emm386 from config.sys

Add  to system.ini 
[drivers]
wave=hda2.dll

If running windows in standard mode (win/s), 
 add (hdarun.exe) to the startup group.

Tested on 2 and 3ghz computers with 
 Intel ICH10,NFORCE MCP61 and VIA 
  HDA audio.

2017 update:
When using windows in Enhanced Mode,
you will need to add hdatsr.exe to autoexec.bat.

If you are using windows in Standard Mode
and you decide not to install hdatsr.exe,
you must use control panel driver settings to specify an unused memory 
address outside the range of allocated memory addresses.
Since Windows 3.1 may allocate up to 512mb($20000000), use an address above than that.
This method does not work well with Enhanced Mode due to virtualization of memory addresses.

If HDA2.DLL does not find HDAICOUT.HDA, 
the driver will attempt to automatically configure the HDA codec.

If HDAICOUT.HDA is found in the main windows directory,
it will be read as 32-bit Hex commands to be sent to out the HDA.
Each line must start with $.
$000F0000;

2021 update:
QUERYHDA.EXE was added for viewing nodules and widgets
It also may be used to issue simple CODEC commands.


2022 update:
You can now specify the use of a particular PCI device if you wish.
[HDA]
PCI_BUS=$02
PCI_DEVICE=$14
PCI_FUNCTION=$02
SEARCH=FALSE

2026 update:
Reduced default hdacfg.ini setting for wait2 (it was $100).
Renamed activate.exe to hdarun.exe
Adjusted default settings.
Added hdaicout.hda settings
