Index: /OCO/trunk/drv16/audiohw.cpp
===================================================================
--- /OCO/trunk/drv16/audiohw.cpp	(revision 485)
+++ /OCO/trunk/drv16/audiohw.cpp	(revision 486)
@@ -135,5 +135,5 @@
    },
    {  //
-      AUDIOHW_INVALID_DEVICE,
+      AUDIOHW_WAVE_CAPTURE, /* DAZ */
       0,
       DATATYPE_ADPCM_AVC,
Index: /OCO/trunk/drv16/ioctl.cpp
===================================================================
--- /OCO/trunk/drv16/ioctl.cpp	(revision 485)
+++ /OCO/trunk/drv16/ioctl.cpp	(revision 486)
@@ -687,43 +687,42 @@
 extern "C" void StrategyIoctl(PREQPACKET prp, USHORT LDev)
 {
-    if (prp->s.ioctl.bCategory == DAUDIO_IOCTL_CAT)
-    {
-        IoctlDirectAudio(prp);
-        return;
-    }
-
 #ifdef DEBUG
     dprintf(("StrategyIoctl:cat:0x%x, code:0x%x cd %d gd %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device, LDev));
 #endif
-    if (prp->s.ioctl.bCategory == 0x90)
-    {
+	switch (prp->s.ioctl.bCategory) {
+	case DAUDIO_IOCTL_CAT: /* 0x91 */
+        IoctlDirectAudio(prp);
+        break;
+
+	case MIXER_IOCTL_CAT: /* 0x90 */
         IoctlMixer(prp, LDev);
-        return;
-    }
-    if (prp->s.ioctl.bCategory != AUDIO_IOCTL_CAT)
-    {
-        prp->usStatus |= RPERR | RPBADCMD;
-        return;
-    }
-
-    switch (prp->s.ioctl.bCode)
-    {
-           case AUDIO_INIT:
-                IoctlAudioInit(prp, LDev);
-                break;
-           case AUDIO_CONTROL:
-                IoctlAudioControl(prp);
-                break;
-           case AUDIO_CAPABILITY:
-                IoctlAudioCapability(prp, LDev);
-                break;
-           default:
-                prp->usStatus |= RPERR | RPBADCMD;
-               break;
-    }
+        break;
+
+	case AUDIO_IOCTL_CAT: /* 0x80 */
+		switch (prp->s.ioctl.bCode) {
+		case AUDIO_INIT: /* 0x40 */
+			IoctlAudioInit(prp, LDev);
+			break;
+		case AUDIO_CONTROL: /* 0x42 */
+			IoctlAudioControl(prp);
+			break;
+		case AUDIO_CAPABILITY: /* 0x48 */
+			IoctlAudioCapability(prp, LDev);
+			break;
+		default:
+			prp->usStatus |= RPERR | RPBADCMD;
+			break;
+		}
+		break;
+
+	default:
+		prp->usStatus |= RPERR | RPBADCMD;
+		break;
+	}
 
 #ifdef DEBUG
-//    dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus));
+	dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus));
 #endif
-    return;
+	return;
 }
+
Index: /OCO/trunk/drv16/mixer.cpp
===================================================================
--- /OCO/trunk/drv16/mixer.cpp	(revision 485)
+++ /OCO/trunk/drv16/mixer.cpp	(revision 486)
@@ -50,20 +50,20 @@
 static int IOCTL90ToALSAControl[IOCTL90_MAX_CONTROLS][3] = {
 // IOCTL90 id       ALSA id,                 ALSA id 2,              fIsProperty
-/* MONOIN        */ OSS32_MIX_VOLUME_SPEAKER,  -1,                     FALSE,
-/* PHONESET      */ OSS32_MIX_VOLUME_PHONE,  -1,                     FALSE,
-/* MICSET        */ OSS32_MIX_VOLUME_MIC,    -1,                     FALSE,
-/* LINESET       */ OSS32_MIX_VOLUME_LINEIN, -1,                     FALSE,
-/* CDSET         */ OSS32_MIX_VOLUME_CD,     -1,                     FALSE,
-/* VIDEOSET      */ OSS32_MIX_VOLUME_VIDEO,  -1,                     FALSE,
-/* AUXSET        */ OSS32_MIX_VOLUME_AUX,    -1,                     FALSE,
-/* none          */ -1,                      -1,                     FALSE,
-/* none          */ -1,                      -1,                     FALSE,
-/* none          */ -1,                      -1,                     FALSE,
-/* none          */ -1,                      -1,                     FALSE,
-/* BASSTREBLESET */ OSS32_MIX_LEVEL_BASS,    OSS32_MIX_LEVEL_TREBLE, TRUE,
-/* THREEDSET     */ -1,                      -1,                     FALSE,
-/* STREAMVOLSET  */ OSS32_MIX_VOLUME_PCM,    -1,                     FALSE,
-/* RECORDSRCSET  */ OSS32_MIX_INPUTSRC,      -1,                     TRUE,
-/* RECORDGAINSET */ OSS32_MIX_VOLUME_CAPTURE,-1,                     FALSE,
+/* MONOIN        */ OSS32_MIX_VOLUME_SPEAKER,   -1,                     FALSE,
+/* PHONESET      */ OSS32_MIX_VOLUME_PHONE,     -1,                     FALSE,
+/* MICSET        */ OSS32_MIX_VOLUME_MIC,       -1,                     FALSE,
+/* LINESET       */ OSS32_MIX_VOLUME_LINEIN,    -1,                     FALSE,
+/* CDSET         */ OSS32_MIX_VOLUME_CD,        -1,                     FALSE,
+/* VIDEOSET      */ OSS32_MIX_VOLUME_VIDEO,     -1,                     FALSE,
+/* AUXSET        */ OSS32_MIX_VOLUME_AUX,       -1,                     FALSE,
+/* HEADPHONESET  */ OSS32_MIX_VOLUME_HEADPHONE, -1,                     FALSE,
+/* none          */ -1,                         -1,                     FALSE,
+/* none          */ -1,                         -1,                     FALSE,
+/* none          */ -1,                         -1,                     FALSE,
+/* BASSTREBLESET */ OSS32_MIX_LEVEL_BASS,    OSS32_MIX_LEVEL_TREBLE,    TRUE,
+/* THREEDSET     */ -1,                         -1,                     FALSE,
+/* STREAMVOLSET  */ OSS32_MIX_VOLUME_PCM,       -1,                     FALSE,
+/* RECORDSRCSET  */ OSS32_MIX_INPUTSRC,         -1,                     TRUE,
+/* RECORDGAINSET */ OSS32_MIX_VOLUME_CAPTURE,   -1,                     FALSE,
 };
 
@@ -81,5 +81,5 @@
 /* OSS32_MIX_VOLUME_SPEAKER       */   MONOINSET & 0xF,
 /* OSS32_MIX_VOLUME_PHONE         */   PHONESET & 0xF,
-/* OSS32_MIX_VOLUME_HEADPHONE     */   -1,
+/* OSS32_MIX_VOLUME_HEADPHONE     */   HEADPHONESET & 0xF,
 /* OSS32_MIX_VOLUME_AUX           */   AUXSET & 0xF,
 /* OSS32_MIX_VOLUME_CAPTURE       */   RECORDGAINSET & 0xF,
@@ -313,4 +313,5 @@
 BOOL DBGCALLCONV MixerSetWaveVolume(OSSSTREAMID mixerStreamId, OSSSTREAMID StreamId, ULONG Volume, int fFlags)
 {
+    dprintf(("MixerSetWaveVolume Vol=%lx", Volume));
     if(!fSetWaveVolume || OSS16_WaveSetVolume(StreamId, Volume) != OSSERR_SUCCESS) {
         fSetWaveVolume = FALSE;
@@ -327,4 +328,5 @@
     BOOL fInputGainHack = FALSE;
 
+    dprintf(("MixerSetVolume Ctl=%lx Vol=%lx", ulControl, ulVolume));
     if(!(fFlags & MIXFLAG_FORCE_UPDATE) && fRecGainIOCTL90 && ulControl == OSS32_MIX_VOLUME_CAPTURE)
         return TRUE;    //locked
@@ -649,4 +651,5 @@
     }
     if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_MIDI)) {
+		dprintf(("MixerInit: MIX_VOLUME_MIDI not processed"));
     }
     if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_LINEIN)) {
@@ -717,4 +720,14 @@
     }
     if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_HEADPHONE)) {
+        ALSAIOCTLMap[HEADPHONESET]     = 1;
+        ALSAIOCTLMap[HEADPHONEQUERY]   = 1;
+
+        //Set HEADPHONE
+        rp.s.ioctl.bCode  = HEADPHONESET;
+        rp.s.ioctl.pvData = (void FAR *)&mixinfo;
+        mixinfo.Mute    = 0;
+        mixinfo.VolumeR = mixinfo.VolumeL = 80;
+        IoctlMixer(&rp, LDev);
+//		dprintf(("MixerInit: MIX_VOLUME_HEADPHONE not processed"));
     }
     if(mixcaps.fuCtrlCaps & OSS32_MIX_FLAG(OSS32_MIX_VOLUME_AUX)) {
Index: /OCO/trunk/drv16/mixer.h
===================================================================
--- /OCO/trunk/drv16/mixer.h	(revision 485)
+++ /OCO/trunk/drv16/mixer.h	(revision 486)
@@ -1,4 +1,6 @@
 #ifndef __MIXER_H__
 #define __MIXER_H__
+
+#define MIXER_IOCTL_CAT   0x90
 
 #define MIXFLAG_FORCE_UPDATE	1
Index: /OCO/trunk/drv16/wavestrm.cpp
===================================================================
--- /OCO/trunk/drv16/wavestrm.cpp	(revision 485)
+++ /OCO/trunk/drv16/wavestrm.cpp	(revision 486)
@@ -209,5 +209,5 @@
     ULONG ulBuffLeft;
 	ULONG ulBytesWritten;
-	ULONG ulStartPos;
+//DAZ	ULONG ulStartPos;
 
     /* make sure we have a buffer to copy from */
@@ -230,4 +230,6 @@
     }
 
+/* DAZ */
+#if 0
     // get the starting position. Call WaveGetHwPtr. if we get a bad rc then we bail out.
     if(pahw->GetHwPtr(StreamId, &_configinfo, &ulStartPos) == FALSE)
@@ -237,4 +239,5 @@
         return (ULONG)-1;
     }
+#endif
 
     // get the buffer pointer and amount of data remaining
Index: /OCO/trunk/include/ioctl90.h
===================================================================
--- /OCO/trunk/include/ioctl90.h	(revision 485)
+++ /OCO/trunk/include/ioctl90.h	(revision 486)
@@ -8,5 +8,5 @@
 //
 // Crystal Semiconductor defined category 0x90 OS/2 mixer IOCTLS.
-// 
+//
 // STATUS: (Drivers known to implement this API)
 //    Crystal Semiconductor ISA Mode 3 driver version 2.08.
@@ -15,9 +15,9 @@
 //-----------------------------------------------------------------------------
 //
-// This header file contains application usable defines for calls to 
+// This header file contains application usable defines for calls to
 // Crystal Semiconductor device driver to manage hardware mixer.
 // It is primarily used to adjust the listening level of
 // mixer inputs (CD-ROM, Aux, Line, Phone...).  The API also allows
-// adjustment to the record gain as an override to MMPM/2 stream 
+// adjustment to the record gain as an override to MMPM/2 stream
 // specific API.
 //
@@ -58,9 +58,9 @@
 // 4E - RecordSrcSet     6E - RecordSrcQuery
 // 4F - RecordGainSet    6F - RecordGainQuery
-// 80 - ApiLevelQuery    
+// 80 - ApiLevelQuery
 // 81 - GetApiMap
 // 82 - CallbackReg
 //
-// Application passes a structure (ioctl data buffer) 
+// Application passes a structure (ioctl data buffer)
 // which contains:
 // ULONG Mute;     // UnMute==0, Mute==1
@@ -68,5 +68,5 @@
 // ULONG ulVolR;   // Right volume in percent 0..100
 //
-// With the exception of the record gain APIs, these APIs effect 
+// With the exception of the record gain APIs, these APIs effect
 // what you hear (output bus connections).
 //
@@ -93,11 +93,11 @@
 //    ULONG ulActionTaken   = 0;
 //    HFILE hPdd            = NULL;
-// 
+//
 //    OpenFlags = OPEN_ACTION_OPEN_IF_EXISTS;   // Do not create file
-// 
+//
 //    OpenMode  = OPEN_ACCESS_READWRITE +       // Read/Write file
 //                OPEN_SHARE_DENYNONE +         // Non-exclusive access
 //                OPEN_FLAGS_FAIL_ON_ERROR;     // No system popups on errors
-// 
+//
 //    ulRC = DosOpen (ddName,          // in
 //                    &hPdd,           //    out (handle)
@@ -108,10 +108,10 @@
 //                    OpenMode,        // in
 //                    NULL);           // in
-// 
+//
 //    printf ("DosOpen RC = %x\n", ulRC);
-// 
+//
 //    if (ulRC != 0)
 //       hPdd = NULL;
-// 
+//
 //    return (hPdd);
 // }
@@ -121,6 +121,6 @@
 //    ULONG     ulRC;
 //    ULONG     ulSizeOfStruct =  = sizeof (MixStruct);
-// 
-//    ulRC = DosDevIOCtl 
+//
+//    ulRC = DosDevIOCtl
 //       (hPdd,               // Device Handle
 //        0x90,               // Category (user defined >= 0x80)
@@ -132,7 +132,7 @@
 //        ulSizeOfStruct,     // in      Maximum size of command data
 //        &ulSizeOfStruct);   // in out  Size of command data
-// 
+//
 //    printf ("DosDevIOCtl ulRC = %d\n", ulRC);
-// 
+//
 //    return (ulRC);
 // }
@@ -150,7 +150,7 @@
 
 // This prototype is used in the device driver only (common header)
-//USHORT ioctlmixMain (USHORT Function, 
+//USHORT ioctlmixMain (USHORT Function,
 //                     USHORT SysFileNum,
-//                     ULONG  ulpvData, 
+//                     ULONG  ulpvData,
 //                     USHORT usDLength);
 
@@ -184,4 +184,5 @@
 #define VIDEOSET        0x45
 #define AUXSET          0x46
+#define HEADPHONESET    0x47
 #define BASSTREBLESET   0x4B
 #define THREEDSET       0x4C
@@ -197,4 +198,5 @@
 #define VIDEOQUERY      0x65
 #define AUXQUERY        0x66
+#define HEADPHONEQUERY  0x67
 #define BASSTREBLEQUERY 0x6B
 #define THREEDQUERY     0x6C
@@ -213,5 +215,5 @@
 // This allows override of settings from MMPM/2 applications.
 
-#define I90SRC_BASE     0x00000010      // 0..F are reserved (MMPM/2 space)        
+#define I90SRC_BASE     0x00000010      // 0..F are reserved (MMPM/2 space)
 #define I90SRC_MIC      0x00000010
 #define I90SRC_CD       0x00000020
@@ -224,17 +226,17 @@
 
 
-// In first release, the APILEVELQUERY function returns a ULONG, 0x01.  
+// In first release, the APILEVELQUERY function returns a ULONG, 0x01.
 // As significant changes are made to the ioctlmix API, the return value
 // of this function will be incremented.
 
 // GETAPIMAP
-// To help an application know what APIs are supported by this device driver, 
+// To help an application know what APIs are supported by this device driver,
 // return an array of booleans (BYTES).  TRUE => Supported.
-// The array must be declared as 256 bytes.  This is larger than necessary as 
+// The array must be declared as 256 bytes.  This is larger than necessary as
 // the first 64 entries, range 0x00..0x39, are guaranteed to be zero.
 // The extra bytes allows the array to be indexed using the IOCTL function
 // defines in this file.
 //
-// Notice that a FALSE value in an array position (for example "video set") 
+// Notice that a FALSE value in an array position (for example "video set")
 // can be used to inform the mixer application that this device driver does
 // not support a "video" connection to the audio device.
Index: /OCO/trunk/install/control.scr
===================================================================
--- /OCO/trunk/install/control.scr	(revision 485)
+++ /OCO/trunk/install/control.scr	(revision 486)
@@ -25,5 +25,5 @@
 ssgroup=0
 ssname="mmbase"
-ssversion="1.9.1-SVNr483"
+ssversion="1.9.1-SVNr486"
 sstermdll="ITERM.DLL"
 sstermdllentry="ITermEntry"
@@ -43,5 +43,5 @@
 ssgroup=17
 ssname="OS/2 Universal Audio: Wave"
-ssversion="1.9.1-SVNr483"
+ssversion="1.9.1-SVNr486"
 sssize=680
 ssdll="genin.dll"
Index: /OCO/trunk/uniaud.inc
===================================================================
--- /OCO/trunk/uniaud.inc	(revision 485)
+++ /OCO/trunk/uniaud.inc	(revision 486)
@@ -13,5 +13,5 @@
 # ex RC3  GA  FIXPACK2 beta_47
 # Comment out to avoid a fixpack line in bldlevel
-FIXPACK = SVNr483
+FIXPACK = SVNr486
 
 # ALSA BUILD VERSION
