DpcForIsr Not getting Invoked

Hi ,

I am getting problem in DpcForIsr. It is not never getting Invoked from my SoundISR().
My DpcForIsr is SoundWaveDeffered().

CONST SOUND_DEVICE_INIT DeviceInit[NumberOfDevices] =
{
…,

{
NULL, NULL, // Wave out
DEFAULT_VOLUME, // Default Volume
FILE_DEVICE_WAVE_OUT,
WAVE_OUT,
“LDWo”,
L"\Device\ICHWaveOut",
SoundWaveDeferred, // DpcForIsr
SoundExcludeRoutine,
SoundWaveDispatch,
SoundWaveOutGetCaps,
SoundVolume,
DO_DIRECT_IO
},

}

I call SoundCreateDevice(), which in turn calls IoInitializeDpcRequest() for my devices.

for ( i = 0; i < NumberOfDevices ; i++)
{
PVOID DeviceSpecificData;

// assign DeviceSpecificData for SoundCreateDevice
switch (i)
{
;;;;;;;;;;;
case WaveOutDevice:
DeviceSpecificData = &pGDI->pWaveInfo[i];
break;
;;;;;;;;;;;;;
}

Status = SoundCreateDevice( &DeviceInit[i],
(BOOLEAN)FALSE,
CardInstance->pDriverObject,
pGDI,
DeviceSpecificData,
&pGDI->Hw,
i,
&pGDI->DeviceObject[i] );

;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;

} // for ( i = 0; i < NumberOfDevices ; i++)

I call IoRequestDpc() in my SoundISR().

BOOLEAN SoundISR( IN PKINTERRUPT pInterrupt,
IN PVOID Context )
{
bResult = FALSE;

// Read Interrupt Src. reg

// Identify our Interrupt

if(OurInterrupt)
{
DeviceObject = pGDI->DeviceObject[WaveOutDevice];

IoRequestDpc( DeviceObject, NULL,NULL );
bResult = TRUE;
}

// Clear Interrupr Source reg

return bResult;
}

Can any one tell me the cause/solution of my problem ?

Thanks & Regards,
Tejen.

Probably something simple; have you tried switching it to a normal DPC
and just calling KeInsertQueueDpc? Switching over to that might reveal
your bug.

BTW- your code is really hard to read on my (text-only) display -
indentation is way off.

-sd

On Tue, 2004-03-02 at 06:36, Tejendra Joshi wrote:

Hi ,

I am getting problem in DpcForIsr. It is not never getting Invoked from my SoundISR().
My DpcForIsr is SoundWaveDeffered().

CONST SOUND_DEVICE_INIT DeviceInit[NumberOfDevices] =
{
…,

{
NULL, NULL, // Wave out
DEFAULT_VOLUME, // Default Volume
FILE_DEVICE_WAVE_OUT,
WAVE_OUT,
“LDWo”,
L"\Device\ICHWaveOut",
SoundWaveDeferred, // DpcForIsr
SoundExcludeRoutine,
SoundWaveDispatch,
SoundWaveOutGetCaps,
SoundVolume,
DO_DIRECT_IO
},

}

I call SoundCreateDevice(), which in turn calls IoInitializeDpcRequest() for my devices.

for ( i = 0; i < NumberOfDevices ; i++)
{
PVOID DeviceSpecificData;

// assign DeviceSpecificData for SoundCreateDevice
switch (i)
{
;;;;;;;;;;;
case WaveOutDevice:
DeviceSpecificData = &pGDI->pWaveInfo[i];
break;
;;;;;;;;;;;;;
}

Status = SoundCreateDevice( &DeviceInit[i],
(BOOLEAN)FALSE,
CardInstance->pDriverObject,
pGDI,
DeviceSpecificData,
&pGDI->Hw,
i,
&pGDI->DeviceObject[i] );

;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;

} // for ( i = 0; i < NumberOfDevices ; i++)

I call IoRequestDpc() in my SoundISR().

BOOLEAN SoundISR( IN PKINTERRUPT pInterrupt,
IN PVOID Context )
{
bResult = FALSE;

// Read Interrupt Src. reg

// Identify our Interrupt

if(OurInterrupt)
{
DeviceObject = pGDI->DeviceObject[WaveOutDevice];

IoRequestDpc( DeviceObject, NULL,NULL );
bResult = TRUE;
}

// Clear Interrupr Source reg

return bResult;
}

Can any one tell me the cause/solution of my problem ?

Thanks & Regards,
Tejen.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@positivenetworks.net
To unsubscribe send a blank email to xxxxx@lists.osr.com