Normalize line endings to LF across entire repository
Apply .gitattributes normalization to convert all CRLF line endings inherited from Windows-origin source files to Unix LF. 175 files, zero content changes.
This commit is contained in:
parent
696d2dd387
commit
bbdcb243dc
175 changed files with 56794 additions and 56794 deletions
|
|
@ -1,102 +1,102 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1AntennaPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Antenna Pin related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_ANTENNA_PIN_H
|
||||
#define __SKYWALKER1_ANTENNA_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
#include "SkyWalker1Extended.h" //For the Extended BDA
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//Antenna Pin class.
|
||||
class CAntennaPin : public CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
static NTSTATUS PinSetDeviceState(
|
||||
IN PKSPIN Pin,
|
||||
IN KSSTATE ToState,
|
||||
IN KSSTATE FromState
|
||||
);
|
||||
|
||||
static NTSTATUS IntersectDataFormat(
|
||||
IN PVOID pContext,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSP_PIN Pin,
|
||||
IN PKSDATARANGE DataRange,
|
||||
IN PKSDATARANGE MatchingDataRange,
|
||||
IN ULONG DataBufferSize,
|
||||
OUT PVOID Data OPTIONAL,
|
||||
OUT PULONG DataSize
|
||||
);
|
||||
|
||||
//Network provider and AVStream use these functions
|
||||
//to set and get properties of nodes that are controlled
|
||||
//by the input pin.
|
||||
|
||||
static NTSTATUS GetTunerProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetTunerProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
|
||||
|
||||
//Network provider and AVStream use these functions
|
||||
//to set and get properties of nodes that are controlled
|
||||
//by the input pin.
|
||||
static NTSTATUS GetTunerLnbProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetTunerLnbProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
private:
|
||||
|
||||
KSSTATE m_KsState;
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1AntennaPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Antenna Pin related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_ANTENNA_PIN_H
|
||||
#define __SKYWALKER1_ANTENNA_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
#include "SkyWalker1Extended.h" //For the Extended BDA
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//Antenna Pin class.
|
||||
class CAntennaPin : public CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
static NTSTATUS PinSetDeviceState(
|
||||
IN PKSPIN Pin,
|
||||
IN KSSTATE ToState,
|
||||
IN KSSTATE FromState
|
||||
);
|
||||
|
||||
static NTSTATUS IntersectDataFormat(
|
||||
IN PVOID pContext,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSP_PIN Pin,
|
||||
IN PKSDATARANGE DataRange,
|
||||
IN PKSDATARANGE MatchingDataRange,
|
||||
IN ULONG DataBufferSize,
|
||||
OUT PVOID Data OPTIONAL,
|
||||
OUT PULONG DataSize
|
||||
);
|
||||
|
||||
//Network provider and AVStream use these functions
|
||||
//to set and get properties of nodes that are controlled
|
||||
//by the input pin.
|
||||
|
||||
static NTSTATUS GetTunerProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetTunerProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
|
||||
|
||||
//Network provider and AVStream use these functions
|
||||
//to set and get properties of nodes that are controlled
|
||||
//by the input pin.
|
||||
static NTSTATUS GetTunerLnbProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetTunerLnbProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
private:
|
||||
|
||||
KSSTATE m_KsState;
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_TRANSPORT_PIN_H*/
|
||||
|
|
@ -1,72 +1,72 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CaptureFilter.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains the filter level header for
|
||||
the capture filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_CAPTURE_FILTER_H
|
||||
#define SKYWALKER1_CAPTURE_FILTER_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Capture filter class.
|
||||
class CCaptureFilter
|
||||
{
|
||||
public:
|
||||
|
||||
//The capture filter object constructor. Since the new operator will
|
||||
//have zeroed the memory, do not bother initializing any NULL or 0
|
||||
//fields. Only initialize non-NULL, non-0 fields.
|
||||
CCaptureFilter (IN PKSFILTER Filter);
|
||||
|
||||
//The capture filter destructor.
|
||||
~CCaptureFilter ();
|
||||
|
||||
//This is the filter creation dispatch for the capture filter. It
|
||||
//creates the CCaptureFilter object, associates it with the AVStream
|
||||
//object, and bags it for easy cleanup later.
|
||||
static NTSTATUS Create( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//The AVStream filter object associated with this CCaptureFilter.
|
||||
PKSFILTER m_Filter;
|
||||
|
||||
//This is the bag cleanup callback for the CCaptureFilter. Not providing
|
||||
//one would cause ExFreePool to be used. This is not good for C++
|
||||
//constructed objects. We simply delete the object here.
|
||||
static void Cleanup ( IN CCaptureFilter *CapFilter );
|
||||
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CaptureFilter.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains the filter level header for
|
||||
the capture filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_CAPTURE_FILTER_H
|
||||
#define SKYWALKER1_CAPTURE_FILTER_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Capture filter class.
|
||||
class CCaptureFilter
|
||||
{
|
||||
public:
|
||||
|
||||
//The capture filter object constructor. Since the new operator will
|
||||
//have zeroed the memory, do not bother initializing any NULL or 0
|
||||
//fields. Only initialize non-NULL, non-0 fields.
|
||||
CCaptureFilter (IN PKSFILTER Filter);
|
||||
|
||||
//The capture filter destructor.
|
||||
~CCaptureFilter ();
|
||||
|
||||
//This is the filter creation dispatch for the capture filter. It
|
||||
//creates the CCaptureFilter object, associates it with the AVStream
|
||||
//object, and bags it for easy cleanup later.
|
||||
static NTSTATUS Create( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//The AVStream filter object associated with this CCaptureFilter.
|
||||
PKSFILTER m_Filter;
|
||||
|
||||
//This is the bag cleanup callback for the CCaptureFilter. Not providing
|
||||
//one would cause ExFreePool to be used. This is not good for C++
|
||||
//constructed objects. We simply delete the object here.
|
||||
static void Cleanup ( IN CCaptureFilter *CapFilter );
|
||||
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*SKYWALKER1_CAPTURE_FILTER_H*/
|
||||
|
|
@ -1,161 +1,161 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CapturePin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains header for the video capture pin on the capture
|
||||
filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//This Structure can be used in future for the
|
||||
//better stream management
|
||||
typedef struct _STREAM_POINTER_CONTEXT
|
||||
{
|
||||
ULONG ulFrameIndex;
|
||||
|
||||
} STREAM_POINTER_CONTEXT, *PSTREAM_POINTER_CONTEXT;
|
||||
|
||||
|
||||
//The video capture pin class.
|
||||
class CCapturePin : public ICaptureSink
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
//The AVStream pin we're associated with.
|
||||
PKSPIN m_Pin;
|
||||
|
||||
//Pointer to the internal device object for our capture device.
|
||||
//We access the Device through this object.
|
||||
CSkyWalker1Device *m_Device;
|
||||
|
||||
//The state we've put the hardware into. This allows us to keep track
|
||||
//of whether to do things like unpausing or restarting.
|
||||
HARDWARE_STATE m_HardwareState;
|
||||
|
||||
//The clock we've been assigned. As with other capture filters, we do
|
||||
//not expose a clock. If one has been assigned, we will use it to
|
||||
//time stamp packets (plus a reasonable delta to work the capture stream
|
||||
//in a preview graph).
|
||||
PIKSREFERENCECLOCK m_Clock;
|
||||
|
||||
//The transport information for this capture pin. The settings for device will be
|
||||
//programmed for this transport info.
|
||||
PBDA_TRANSPORT_INFO m_TransportInfo;
|
||||
|
||||
//This Variable is used to keep the count of the Streams sent for the
|
||||
//Data read
|
||||
ULONG m_CurrentFrameIndex;
|
||||
|
||||
//An indication of whether or not this pin has acquired the necessary
|
||||
//hardware resources to operate. When the pin reaches KSSTATE_ACQUIRE,
|
||||
//we attempt to acquire the hardware. This flag will be set based on
|
||||
//our success / failure.
|
||||
BOOLEAN m_AcquiredResources;
|
||||
|
||||
//Clean up any references we hold on frames in the queue. This is called
|
||||
//when we abruptly stop the fake hardware.
|
||||
NTSTATUS CleanupReferences ();
|
||||
|
||||
//This is the state transition handler for the capture pin. It attempts
|
||||
//to acquire resources for the capture pin (or releasing them if
|
||||
//necessary) and starts and stops the hardware as required.
|
||||
NTSTATUS SetState ( IN KSSTATE ToState,IN KSSTATE FromState);
|
||||
|
||||
//This is the processing dispatch for the capture pin. It handles
|
||||
//sending the Streams to the Device.
|
||||
NTSTATUS Process();
|
||||
|
||||
//This routine is not required as the Transport Information is already
|
||||
//provided into the CCapturePin but still using it to make the
|
||||
//settings flexible
|
||||
PBDA_TRANSPORT_INFO CaptureBdaTransportInfo ();
|
||||
|
||||
//This is the free callback from the bagged item (CCapturePin). If we
|
||||
//do not provide a callback when we bag the CCapturePin, ExFreePool
|
||||
//would be called. This is not desirable for C++ constructed objects.
|
||||
//We merely delete the object here.
|
||||
static void Cleanup (IN CCapturePin *Pin)
|
||||
{
|
||||
delete Pin;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//The capture pin's constructor. Initialize any non-0, non-NULL fields
|
||||
//(since new will have zero'ed the memory anyway) and set up our
|
||||
//device level pointers for access during capture routines.
|
||||
CCapturePin (IN PKSPIN Pin);
|
||||
|
||||
//The capture pin's destructor.
|
||||
~CCapturePin ();
|
||||
|
||||
CSkyWalker1Device* GetDevice()
|
||||
{
|
||||
return m_Device;
|
||||
}
|
||||
|
||||
//This is the capture sink notification mechanism for mapping completion.
|
||||
//When the device DPC detects that a given number of mappings have been
|
||||
//completed by the fake hardware, it signals the capture sink of this
|
||||
//through this method.
|
||||
virtual void ReleaseStream(IN ULONG ulStreamIndex);
|
||||
|
||||
//This is the creation dispatch for the capture pin. It creates
|
||||
//the CCapturePin object and associates it with the AVStream object
|
||||
//bagging it in the process.
|
||||
static NTSTATUS PinCreate( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//This is the set device state dispatch for the pin. The routine bridges
|
||||
//to SetState() in the context of the CCapturePin.
|
||||
static NTSTATUS DispatchSetState (
|
||||
IN PKSPIN Pin,
|
||||
IN KSSTATE ToState,
|
||||
IN KSSTATE FromState
|
||||
)
|
||||
{
|
||||
return
|
||||
(reinterpret_cast<CCapturePin *>(Pin->Context))->
|
||||
SetState(ToState, FromState);
|
||||
}
|
||||
|
||||
//This is the processing dispatch for the capture pin. The routine
|
||||
//bridges to Process() in the context of the CCapturePin.
|
||||
static NTSTATUS DispatchProcess (IN PKSPIN Pin)
|
||||
{
|
||||
return
|
||||
(reinterpret_cast<CCapturePin *>(Pin->Context))->Process();
|
||||
}
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CapturePin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains header for the video capture pin on the capture
|
||||
filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//This Structure can be used in future for the
|
||||
//better stream management
|
||||
typedef struct _STREAM_POINTER_CONTEXT
|
||||
{
|
||||
ULONG ulFrameIndex;
|
||||
|
||||
} STREAM_POINTER_CONTEXT, *PSTREAM_POINTER_CONTEXT;
|
||||
|
||||
|
||||
//The video capture pin class.
|
||||
class CCapturePin : public ICaptureSink
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
//The AVStream pin we're associated with.
|
||||
PKSPIN m_Pin;
|
||||
|
||||
//Pointer to the internal device object for our capture device.
|
||||
//We access the Device through this object.
|
||||
CSkyWalker1Device *m_Device;
|
||||
|
||||
//The state we've put the hardware into. This allows us to keep track
|
||||
//of whether to do things like unpausing or restarting.
|
||||
HARDWARE_STATE m_HardwareState;
|
||||
|
||||
//The clock we've been assigned. As with other capture filters, we do
|
||||
//not expose a clock. If one has been assigned, we will use it to
|
||||
//time stamp packets (plus a reasonable delta to work the capture stream
|
||||
//in a preview graph).
|
||||
PIKSREFERENCECLOCK m_Clock;
|
||||
|
||||
//The transport information for this capture pin. The settings for device will be
|
||||
//programmed for this transport info.
|
||||
PBDA_TRANSPORT_INFO m_TransportInfo;
|
||||
|
||||
//This Variable is used to keep the count of the Streams sent for the
|
||||
//Data read
|
||||
ULONG m_CurrentFrameIndex;
|
||||
|
||||
//An indication of whether or not this pin has acquired the necessary
|
||||
//hardware resources to operate. When the pin reaches KSSTATE_ACQUIRE,
|
||||
//we attempt to acquire the hardware. This flag will be set based on
|
||||
//our success / failure.
|
||||
BOOLEAN m_AcquiredResources;
|
||||
|
||||
//Clean up any references we hold on frames in the queue. This is called
|
||||
//when we abruptly stop the fake hardware.
|
||||
NTSTATUS CleanupReferences ();
|
||||
|
||||
//This is the state transition handler for the capture pin. It attempts
|
||||
//to acquire resources for the capture pin (or releasing them if
|
||||
//necessary) and starts and stops the hardware as required.
|
||||
NTSTATUS SetState ( IN KSSTATE ToState,IN KSSTATE FromState);
|
||||
|
||||
//This is the processing dispatch for the capture pin. It handles
|
||||
//sending the Streams to the Device.
|
||||
NTSTATUS Process();
|
||||
|
||||
//This routine is not required as the Transport Information is already
|
||||
//provided into the CCapturePin but still using it to make the
|
||||
//settings flexible
|
||||
PBDA_TRANSPORT_INFO CaptureBdaTransportInfo ();
|
||||
|
||||
//This is the free callback from the bagged item (CCapturePin). If we
|
||||
//do not provide a callback when we bag the CCapturePin, ExFreePool
|
||||
//would be called. This is not desirable for C++ constructed objects.
|
||||
//We merely delete the object here.
|
||||
static void Cleanup (IN CCapturePin *Pin)
|
||||
{
|
||||
delete Pin;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//The capture pin's constructor. Initialize any non-0, non-NULL fields
|
||||
//(since new will have zero'ed the memory anyway) and set up our
|
||||
//device level pointers for access during capture routines.
|
||||
CCapturePin (IN PKSPIN Pin);
|
||||
|
||||
//The capture pin's destructor.
|
||||
~CCapturePin ();
|
||||
|
||||
CSkyWalker1Device* GetDevice()
|
||||
{
|
||||
return m_Device;
|
||||
}
|
||||
|
||||
//This is the capture sink notification mechanism for mapping completion.
|
||||
//When the device DPC detects that a given number of mappings have been
|
||||
//completed by the fake hardware, it signals the capture sink of this
|
||||
//through this method.
|
||||
virtual void ReleaseStream(IN ULONG ulStreamIndex);
|
||||
|
||||
//This is the creation dispatch for the capture pin. It creates
|
||||
//the CCapturePin object and associates it with the AVStream object
|
||||
//bagging it in the process.
|
||||
static NTSTATUS PinCreate( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//This is the set device state dispatch for the pin. The routine bridges
|
||||
//to SetState() in the context of the CCapturePin.
|
||||
static NTSTATUS DispatchSetState (
|
||||
IN PKSPIN Pin,
|
||||
IN KSSTATE ToState,
|
||||
IN KSSTATE FromState
|
||||
)
|
||||
{
|
||||
return
|
||||
(reinterpret_cast<CCapturePin *>(Pin->Context))->
|
||||
SetState(ToState, FromState);
|
||||
}
|
||||
|
||||
//This is the processing dispatch for the capture pin. The routine
|
||||
//bridges to Process() in the context of the CCapturePin.
|
||||
static NTSTATUS DispatchProcess (IN PKSPIN Pin)
|
||||
{
|
||||
return
|
||||
(reinterpret_cast<CCapturePin *>(Pin->Context))->Process();
|
||||
}
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,149 +1,149 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CommonDef.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : File to hold the common definitions for the Driver
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef __SKYWALKER1_COMMON_DEF_H
|
||||
#define __SKYWALKER1_COMMON_DEF_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define TUNER_MEM_TAG 'MNUT'
|
||||
#define CAPTURE_MEM_TAG 'MPAC'
|
||||
|
||||
// Implementation GUID for SkyWalker1 Tuner and Capture
|
||||
// Must match the KSSTRING used in the installation INFs interface sections
|
||||
//Tuner Filter GUID {5C4E764F-AB43-46A9-B21E-8529C70F0A23}
|
||||
#define GUID_SKYWALKER_TUNER_FILTER\
|
||||
0x5C4E764F, 0xAB43, 0x46A9, 0xB2, 0x1E, 0x85, 0x29, 0xC7, 0x0F, 0x0A, 0x23
|
||||
DEFINE_GUIDSTRUCT("5C4E764F-AB43-46A9-B21E-8529C70F0A23", SKYWALKER_TUNER_FILTER);
|
||||
#define SKYWALKER_TUNER_FILTER DEFINE_GUIDNAMED(SKYWALKER_TUNER_FILTER)
|
||||
|
||||
//Capture Filter GUID {0F8F74D9-E524-4D05-BB60-F0C69ACB1756}
|
||||
#define GUID_SKYWALKER_CAPTURE_FILTER\
|
||||
0x0F8F74D9, 0xE524, 0x4D05, 0xBB, 0x60, 0xF0, 0xC6, 0x9A, 0xCB, 0x17, 0x56
|
||||
DEFINE_GUIDSTRUCT("0F8F74D9-E524-4D05-BB60-F0C69ACB1756", SKYWALKER_CAPTURE_FILTER);
|
||||
// Defines the SKYWALKER_CAPTURE_FILTER as a GUID.
|
||||
#define SKYWALKER_CAPTURE_FILTER DEFINE_GUIDNAMED(SKYWALKER_CAPTURE_FILTER)
|
||||
|
||||
//Medium GUID {2AEB4A94-FBB7-4FB1-8D74-243B91886EAB}
|
||||
#define GUID_SKYWALKER_TUNER_OUT_MEDIUM\
|
||||
0x2AEB4A94, 0xFBB7, 0x4FB1, 0x8D, 0x74, 0x24, 0x3B, 0x91, 0x88, 0x6E, 0xAB
|
||||
DEFINE_GUIDSTRUCT("2AEB4A94-FBB7-4FB1-8D74-243B91886EAB", SKYWALKER_TUNER_OUT_MEDIUM);
|
||||
// Defines the SKYWALKER_TUNER_OUT_MEDIUM as a GUID.
|
||||
#define SKYWALKER_TUNER_OUT_MEDIUM DEFINE_GUIDNAMED(SKYWALKER_TUNER_OUT_MEDIUM)
|
||||
|
||||
#define TRANSPORT_PACKET_SIZE 128 //188
|
||||
#define TRANSPORT_PACKET_COUNT 64 //512
|
||||
#define NUMBER_OF_FRAMES 8
|
||||
#define PACKET_PER_FRAME 2
|
||||
|
||||
#define SYMBOL_RATE_MIN 1000
|
||||
#define SYMBOL_RATE_MAX 45000
|
||||
|
||||
#define TUNER_FREQ_MIN 800000
|
||||
#define TUNER_FREQ_MAX 2250000
|
||||
|
||||
#define IS_VALID(X) (((X)!=NULL)?true:false)
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
// Structure for the Tuner Parameters
|
||||
|
||||
typedef struct _BDATUNER_DEVICE_PARAMETER
|
||||
{
|
||||
//Tuner Properties
|
||||
ULONG ulCarrierFrequency;
|
||||
ULONG ulFrequencyMultiplier;
|
||||
ULONG ulBandWidth;
|
||||
Polarisation Polarity;
|
||||
ULONG ulRange;
|
||||
ULONG ulTransponder;
|
||||
|
||||
//LNB Parameters
|
||||
ULONG ulLnbLowLOFrequency;
|
||||
ULONG ulLnbHighLOFrequency;
|
||||
ULONG ulLnbSwitchFrequency;
|
||||
|
||||
//Demodulator Properties
|
||||
ULONG ulInnerFecType;
|
||||
BinaryConvolutionCodeRate InnerFecRate;
|
||||
ULONG ulOuterFecType;
|
||||
BinaryConvolutionCodeRate OuterFecRate;
|
||||
ModulationType CurrentModulationType;
|
||||
TransmissionMode CurrentTransmissionMode;
|
||||
GuardInterval CurrentGuardInterval;
|
||||
SpectralInversion CurrentSpectralInversion;
|
||||
ULONG ulSymbolRate;
|
||||
|
||||
} BDATUNER_DEVICE_PARAMETER, * PBDATUNER_DEVICE_PARAMETER;
|
||||
|
||||
|
||||
// Define a structure that represents the underlying device status.
|
||||
//
|
||||
typedef struct _BDATUNER_DEVICE_STATUS
|
||||
{
|
||||
//Tuner Status
|
||||
DWORD dwSignalStrength;
|
||||
DWORD dwSignalQuality;
|
||||
BOOLEAN fCarrierPresent;
|
||||
|
||||
//Demodulator Status
|
||||
BOOLEAN fSignalLocked;
|
||||
} BDATUNER_DEVICE_STATUS, * PBDATUNER_DEVICE_STATUS;
|
||||
|
||||
// ICaptureSink:
|
||||
//
|
||||
// This is a capture sink interface. The device level calls back the
|
||||
// CompleteMappings method passing the number of completed mappings for
|
||||
// the capture pin. This method is called during the device DPC.
|
||||
|
||||
class ICaptureSink
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void ReleaseStream (IN ULONG ulStreamIndex) = 0;
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
extern const BDA_FILTER_TEMPLATE TunerFilterTemplate;
|
||||
extern const BDA_FILTER_TEMPLATE SkyWalker1CaptureTemplate;
|
||||
extern const KSFILTER_DESCRIPTOR SkyWalker1TunerFilterDescriptor;
|
||||
extern const KSFILTER_DESCRIPTOR SkyWalker1CaptureFilterDescriptor;
|
||||
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
typedef enum _HARDWARE_STATE {
|
||||
|
||||
HardwareStopped = 0,
|
||||
HardwarePaused,
|
||||
HardwareRunning
|
||||
|
||||
} HARDWARE_STATE, *PHARDWARE_STATE;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif // __SKYWALKER1_COMMON_DEF_H
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1CommonDef.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : File to hold the common definitions for the Driver
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef __SKYWALKER1_COMMON_DEF_H
|
||||
#define __SKYWALKER1_COMMON_DEF_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define TUNER_MEM_TAG 'MNUT'
|
||||
#define CAPTURE_MEM_TAG 'MPAC'
|
||||
|
||||
// Implementation GUID for SkyWalker1 Tuner and Capture
|
||||
// Must match the KSSTRING used in the installation INFs interface sections
|
||||
//Tuner Filter GUID {5C4E764F-AB43-46A9-B21E-8529C70F0A23}
|
||||
#define GUID_SKYWALKER_TUNER_FILTER\
|
||||
0x5C4E764F, 0xAB43, 0x46A9, 0xB2, 0x1E, 0x85, 0x29, 0xC7, 0x0F, 0x0A, 0x23
|
||||
DEFINE_GUIDSTRUCT("5C4E764F-AB43-46A9-B21E-8529C70F0A23", SKYWALKER_TUNER_FILTER);
|
||||
#define SKYWALKER_TUNER_FILTER DEFINE_GUIDNAMED(SKYWALKER_TUNER_FILTER)
|
||||
|
||||
//Capture Filter GUID {0F8F74D9-E524-4D05-BB60-F0C69ACB1756}
|
||||
#define GUID_SKYWALKER_CAPTURE_FILTER\
|
||||
0x0F8F74D9, 0xE524, 0x4D05, 0xBB, 0x60, 0xF0, 0xC6, 0x9A, 0xCB, 0x17, 0x56
|
||||
DEFINE_GUIDSTRUCT("0F8F74D9-E524-4D05-BB60-F0C69ACB1756", SKYWALKER_CAPTURE_FILTER);
|
||||
// Defines the SKYWALKER_CAPTURE_FILTER as a GUID.
|
||||
#define SKYWALKER_CAPTURE_FILTER DEFINE_GUIDNAMED(SKYWALKER_CAPTURE_FILTER)
|
||||
|
||||
//Medium GUID {2AEB4A94-FBB7-4FB1-8D74-243B91886EAB}
|
||||
#define GUID_SKYWALKER_TUNER_OUT_MEDIUM\
|
||||
0x2AEB4A94, 0xFBB7, 0x4FB1, 0x8D, 0x74, 0x24, 0x3B, 0x91, 0x88, 0x6E, 0xAB
|
||||
DEFINE_GUIDSTRUCT("2AEB4A94-FBB7-4FB1-8D74-243B91886EAB", SKYWALKER_TUNER_OUT_MEDIUM);
|
||||
// Defines the SKYWALKER_TUNER_OUT_MEDIUM as a GUID.
|
||||
#define SKYWALKER_TUNER_OUT_MEDIUM DEFINE_GUIDNAMED(SKYWALKER_TUNER_OUT_MEDIUM)
|
||||
|
||||
#define TRANSPORT_PACKET_SIZE 128 //188
|
||||
#define TRANSPORT_PACKET_COUNT 64 //512
|
||||
#define NUMBER_OF_FRAMES 8
|
||||
#define PACKET_PER_FRAME 2
|
||||
|
||||
#define SYMBOL_RATE_MIN 1000
|
||||
#define SYMBOL_RATE_MAX 45000
|
||||
|
||||
#define TUNER_FREQ_MIN 800000
|
||||
#define TUNER_FREQ_MAX 2250000
|
||||
|
||||
#define IS_VALID(X) (((X)!=NULL)?true:false)
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
// Structure for the Tuner Parameters
|
||||
|
||||
typedef struct _BDATUNER_DEVICE_PARAMETER
|
||||
{
|
||||
//Tuner Properties
|
||||
ULONG ulCarrierFrequency;
|
||||
ULONG ulFrequencyMultiplier;
|
||||
ULONG ulBandWidth;
|
||||
Polarisation Polarity;
|
||||
ULONG ulRange;
|
||||
ULONG ulTransponder;
|
||||
|
||||
//LNB Parameters
|
||||
ULONG ulLnbLowLOFrequency;
|
||||
ULONG ulLnbHighLOFrequency;
|
||||
ULONG ulLnbSwitchFrequency;
|
||||
|
||||
//Demodulator Properties
|
||||
ULONG ulInnerFecType;
|
||||
BinaryConvolutionCodeRate InnerFecRate;
|
||||
ULONG ulOuterFecType;
|
||||
BinaryConvolutionCodeRate OuterFecRate;
|
||||
ModulationType CurrentModulationType;
|
||||
TransmissionMode CurrentTransmissionMode;
|
||||
GuardInterval CurrentGuardInterval;
|
||||
SpectralInversion CurrentSpectralInversion;
|
||||
ULONG ulSymbolRate;
|
||||
|
||||
} BDATUNER_DEVICE_PARAMETER, * PBDATUNER_DEVICE_PARAMETER;
|
||||
|
||||
|
||||
// Define a structure that represents the underlying device status.
|
||||
//
|
||||
typedef struct _BDATUNER_DEVICE_STATUS
|
||||
{
|
||||
//Tuner Status
|
||||
DWORD dwSignalStrength;
|
||||
DWORD dwSignalQuality;
|
||||
BOOLEAN fCarrierPresent;
|
||||
|
||||
//Demodulator Status
|
||||
BOOLEAN fSignalLocked;
|
||||
} BDATUNER_DEVICE_STATUS, * PBDATUNER_DEVICE_STATUS;
|
||||
|
||||
// ICaptureSink:
|
||||
//
|
||||
// This is a capture sink interface. The device level calls back the
|
||||
// CompleteMappings method passing the number of completed mappings for
|
||||
// the capture pin. This method is called during the device DPC.
|
||||
|
||||
class ICaptureSink
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void ReleaseStream (IN ULONG ulStreamIndex) = 0;
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
extern const BDA_FILTER_TEMPLATE TunerFilterTemplate;
|
||||
extern const BDA_FILTER_TEMPLATE SkyWalker1CaptureTemplate;
|
||||
extern const KSFILTER_DESCRIPTOR SkyWalker1TunerFilterDescriptor;
|
||||
extern const KSFILTER_DESCRIPTOR SkyWalker1CaptureFilterDescriptor;
|
||||
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
typedef enum _HARDWARE_STATE {
|
||||
|
||||
HardwareStopped = 0,
|
||||
HardwarePaused,
|
||||
HardwareRunning
|
||||
|
||||
} HARDWARE_STATE, *PHARDWARE_STATE;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif // __SKYWALKER1_COMMON_DEF_H
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,127 +1,127 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Control.cpp
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Device Control related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_CONTROL_H
|
||||
#define __SKYWALKER1_CONTROL_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
|
||||
/* gp8psk commands */
|
||||
|
||||
/* Twinhan Vendor requests */
|
||||
#define TH_COMMAND_IN 0xC0
|
||||
#define TH_COMMAND_OUT 0xC1
|
||||
|
||||
/* gp8psk commands */
|
||||
|
||||
#define GET_8PSK_CONFIG 0x80 /* in */
|
||||
#define SET_8PSK_CONFIG 0x81
|
||||
#define I2C_WRITE 0x83
|
||||
#define I2C_READ 0x84
|
||||
#define ARM_TRANSFER 0x85
|
||||
#define TUNE_8PSK 0x86
|
||||
#define GET_SIGNAL_STRENGTH 0x87 /* in */
|
||||
#define LOAD_BCM4500 0x88
|
||||
#define BOOT_8PSK 0x89 /* in */
|
||||
#define START_INTERSIL 0x8A /* in */
|
||||
#define SET_LNB_VOLTAGE 0x8B
|
||||
#define SET_22KHZ_TONE 0x8C
|
||||
#define SEND_DISEQC_COMMAND 0x8D
|
||||
#define SET_DVB_MODE 0x8E
|
||||
#define SET_DN_SWITCH 0x8F
|
||||
#define GET_SIGNAL_LOCK 0x90 /* in */
|
||||
#define GET_SERIAL_NUMBER 0x93 /* in */
|
||||
#define USE_EXTRA_VOLT 0x94
|
||||
#define CW3K_INIT 0x9d
|
||||
|
||||
/* PSK_configuration bits */
|
||||
#define bm8pskStarted 0x01
|
||||
#define bm8pskFW_Loaded 0x02
|
||||
#define bmIntersilOn 0x04
|
||||
#define bmDVBmode 0x08
|
||||
#define bm22kHz 0x10
|
||||
#define bmSEL18V 0x20
|
||||
#define bmDCtuned 0x40
|
||||
#define bmArmed 0x80
|
||||
|
||||
/* Satellite modulation modes */
|
||||
#define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */
|
||||
#define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */
|
||||
#define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */
|
||||
#define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */
|
||||
|
||||
#define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */
|
||||
#define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */
|
||||
#define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */
|
||||
#define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */
|
||||
#define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */
|
||||
#define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */
|
||||
|
||||
#define GET_USB_SPEED 0x07
|
||||
#define USB_SPEED_LOW 0
|
||||
#define USB_SPEED_FULL 1
|
||||
#define USB_SPEED_HIGH 2
|
||||
|
||||
#define RESET_FX2 0x13
|
||||
|
||||
#define FW_VERSION_READ 0x0B
|
||||
#define VENDOR_STRING_READ 0x0C
|
||||
#define PRODUCT_STRING_READ 0x0D
|
||||
#define FW_BCD_VERSION_READ 0x14
|
||||
|
||||
#define SEC_VOLTAGE_13 0
|
||||
#define SEC_VOLTAGE_18 1
|
||||
|
||||
#define SEC_TONE_ON 0
|
||||
#define SEC_TONE_OFF 1
|
||||
|
||||
#define SWITCH_ON_TUNER 1
|
||||
#define SWITCH_OFF_TUNER 0
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
NTSTATUS GetSignalStatus( IN PKSDEVICE pKSDeviceObject,
|
||||
OUT PBOOLEAN pbSignalLockStatus
|
||||
);
|
||||
NTSTATUS ReadTunerSignalStrength( IN PKSDEVICE pKSDeviceObject,
|
||||
OUT PULONG pulSigStrength
|
||||
);
|
||||
NTSTATUS SetLnbVoltage(IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucVoltage);
|
||||
NTSTATUS TuneDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PBDATUNER_DEVICE_PARAMETER pDeviceParameter);
|
||||
NTSTATUS SetupTunerPower( IN PKSDEVICE pKSDeviceObject,
|
||||
IN BOOLEAN bOnOff);
|
||||
NTSTATUS SetStreamingControl( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucOnOff);
|
||||
NTSTATUS SetTunerTone( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucTone);
|
||||
NTSTATUS ConfigureTuner(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PBDATUNER_DEVICE_PARAMETER pNewConfiguration);
|
||||
NTSTATUS DiseqcCommand( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PDISEQC_COMMAND pCommand);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Control.cpp
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Device Control related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_CONTROL_H
|
||||
#define __SKYWALKER1_CONTROL_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
|
||||
/* gp8psk commands */
|
||||
|
||||
/* Twinhan Vendor requests */
|
||||
#define TH_COMMAND_IN 0xC0
|
||||
#define TH_COMMAND_OUT 0xC1
|
||||
|
||||
/* gp8psk commands */
|
||||
|
||||
#define GET_8PSK_CONFIG 0x80 /* in */
|
||||
#define SET_8PSK_CONFIG 0x81
|
||||
#define I2C_WRITE 0x83
|
||||
#define I2C_READ 0x84
|
||||
#define ARM_TRANSFER 0x85
|
||||
#define TUNE_8PSK 0x86
|
||||
#define GET_SIGNAL_STRENGTH 0x87 /* in */
|
||||
#define LOAD_BCM4500 0x88
|
||||
#define BOOT_8PSK 0x89 /* in */
|
||||
#define START_INTERSIL 0x8A /* in */
|
||||
#define SET_LNB_VOLTAGE 0x8B
|
||||
#define SET_22KHZ_TONE 0x8C
|
||||
#define SEND_DISEQC_COMMAND 0x8D
|
||||
#define SET_DVB_MODE 0x8E
|
||||
#define SET_DN_SWITCH 0x8F
|
||||
#define GET_SIGNAL_LOCK 0x90 /* in */
|
||||
#define GET_SERIAL_NUMBER 0x93 /* in */
|
||||
#define USE_EXTRA_VOLT 0x94
|
||||
#define CW3K_INIT 0x9d
|
||||
|
||||
/* PSK_configuration bits */
|
||||
#define bm8pskStarted 0x01
|
||||
#define bm8pskFW_Loaded 0x02
|
||||
#define bmIntersilOn 0x04
|
||||
#define bmDVBmode 0x08
|
||||
#define bm22kHz 0x10
|
||||
#define bmSEL18V 0x20
|
||||
#define bmDCtuned 0x40
|
||||
#define bmArmed 0x80
|
||||
|
||||
/* Satellite modulation modes */
|
||||
#define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */
|
||||
#define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */
|
||||
#define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */
|
||||
#define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */
|
||||
|
||||
#define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */
|
||||
#define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */
|
||||
#define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */
|
||||
#define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */
|
||||
#define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */
|
||||
#define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */
|
||||
|
||||
#define GET_USB_SPEED 0x07
|
||||
#define USB_SPEED_LOW 0
|
||||
#define USB_SPEED_FULL 1
|
||||
#define USB_SPEED_HIGH 2
|
||||
|
||||
#define RESET_FX2 0x13
|
||||
|
||||
#define FW_VERSION_READ 0x0B
|
||||
#define VENDOR_STRING_READ 0x0C
|
||||
#define PRODUCT_STRING_READ 0x0D
|
||||
#define FW_BCD_VERSION_READ 0x14
|
||||
|
||||
#define SEC_VOLTAGE_13 0
|
||||
#define SEC_VOLTAGE_18 1
|
||||
|
||||
#define SEC_TONE_ON 0
|
||||
#define SEC_TONE_OFF 1
|
||||
|
||||
#define SWITCH_ON_TUNER 1
|
||||
#define SWITCH_OFF_TUNER 0
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
NTSTATUS GetSignalStatus( IN PKSDEVICE pKSDeviceObject,
|
||||
OUT PBOOLEAN pbSignalLockStatus
|
||||
);
|
||||
NTSTATUS ReadTunerSignalStrength( IN PKSDEVICE pKSDeviceObject,
|
||||
OUT PULONG pulSigStrength
|
||||
);
|
||||
NTSTATUS SetLnbVoltage(IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucVoltage);
|
||||
NTSTATUS TuneDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PBDATUNER_DEVICE_PARAMETER pDeviceParameter);
|
||||
NTSTATUS SetupTunerPower( IN PKSDEVICE pKSDeviceObject,
|
||||
IN BOOLEAN bOnOff);
|
||||
NTSTATUS SetStreamingControl( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucOnOff);
|
||||
NTSTATUS SetTunerTone( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucTone);
|
||||
NTSTATUS ConfigureTuner(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PBDATUNER_DEVICE_PARAMETER pNewConfiguration);
|
||||
NTSTATUS DiseqcCommand( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PDISEQC_COMMAND pCommand);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_CONTROL_H*/
|
||||
|
|
@ -1,187 +1,187 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Device.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Main Skywalker Device level Implementation
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_TUNER_DEVICE_H
|
||||
#define SKYWALKER1_TUNER_DEVICE_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1USB.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The SkyWalker1 Device class.
|
||||
class CSkyWalker1Device
|
||||
{
|
||||
public:
|
||||
|
||||
//Device Initialization and Dispatch Related definitions
|
||||
NTSTATUS Create(IN PKSDEVICE pKSDeviceObject);
|
||||
NTSTATUS Start(
|
||||
IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIrp,
|
||||
IN PCM_RESOURCE_LIST pResourceList OPTIONAL,
|
||||
IN PCM_RESOURCE_LIST pTranslatedResourceList OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS Stop( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
NTSTATUS Close( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SetPower(
|
||||
IN PKSDEVICE pKSDeviceObject, //Pointer to the device object
|
||||
//provided by the system.
|
||||
IN PIRP pIoRequestPacket,//Pointer to the IRP related to this request.
|
||||
IN DEVICE_POWER_STATE To, //Requested power state.
|
||||
IN DEVICE_POWER_STATE From //Current power state.
|
||||
);
|
||||
|
||||
NTSTATUS InitializeTuner( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
// Device access related Function definitions
|
||||
// An instance of the filter uses these functions
|
||||
// to manage resources on the device.
|
||||
|
||||
NTSTATUS Acquire(IN PBDATUNER_DEVICE_PARAMETER pNewResource,
|
||||
OUT PULONG pulAcquiredResourceID);
|
||||
|
||||
NTSTATUS Update( IN PBDATUNER_DEVICE_PARAMETER pNewResource,
|
||||
IN ULONG ulResourceID);
|
||||
|
||||
NTSTATUS SendDiseqcCommand(
|
||||
IN PDISEQC_COMMAND pDiseqcCommand,
|
||||
IN ULONG ulResourceID
|
||||
);
|
||||
|
||||
NTSTATUS Release(IN ULONG ulResourceID);
|
||||
|
||||
NTSTATUS GetStatus(PBDATUNER_DEVICE_STATUS pDeviceStatus);
|
||||
|
||||
//DMA Adapter related Functions
|
||||
NTSTATUS InitializeAdapterStream(IN PKSDEVICE pKSDeviceObject);
|
||||
|
||||
//Stream Capture Related Fuctions
|
||||
NTSTATUS SetupCaptureSink (
|
||||
IN ICaptureSink * pCapturePin,
|
||||
IN PBDA_TRANSPORT_INFO TransportInfo
|
||||
);
|
||||
void RemoveCaptureSink ();
|
||||
|
||||
NTSTATUS StartStream ();
|
||||
NTSTATUS PauseStream (IN BOOLEAN Pausing);
|
||||
NTSTATUS StopStream ();
|
||||
NTSTATUS ReadStream(IN ULONG ulStreamIndex);
|
||||
void ProcessStream(IN ULONG ulStreamIndex);
|
||||
|
||||
BOOLEAN TimeToReadSignalStatus(void);
|
||||
|
||||
PKSDEVICE m_pKSDevice;
|
||||
|
||||
//USB Related definitions
|
||||
USB_DEVICE_DESCRIPTOR USBDeviceDescriptor;
|
||||
USBD_PIPE_INFORMATION ReadPipe;
|
||||
USBD_PIPE_INFORMATION WritePipe;
|
||||
USBSTATE UsbDeviceState;
|
||||
USBSTATE PreviousUsbDeviceState;
|
||||
//Pending I/O queue state
|
||||
QUEUE_STATE QueueState;
|
||||
|
||||
//obtain and hold this lock while changing the device state,
|
||||
//the queue state and while processing the queue.
|
||||
KSPIN_LOCK DeviceStateLock;
|
||||
//Current Usb Irp
|
||||
PIRP pUsbStreamIrp[PACKET_PER_FRAME * NUMBER_OF_FRAMES];
|
||||
//Device Stop Event
|
||||
KEVENT EvDeviceStopOk;
|
||||
//Device Remove Event
|
||||
KEVENT EvDeviceRemoveOk;
|
||||
//Outstanding IO Count for the Driver
|
||||
ULONG ulOutStandingIoCount;
|
||||
//Outstanding IO Count Lock
|
||||
KSPIN_LOCK kIoCountLock;
|
||||
|
||||
PDMA_ADAPTER m_pDMAAdapter;
|
||||
|
||||
ULONG m_SampleSize;
|
||||
|
||||
//Temporary Bytes Read Counter
|
||||
ULONG m_NumberOfBytesRead[NUMBER_OF_FRAMES];
|
||||
|
||||
PUCHAR GetSynthBuffer(ULONG ulStreamIndex)
|
||||
{
|
||||
return m_SynthesisBuffer[ulStreamIndex];
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ULONG m_ulDeviceInstance;
|
||||
BDATUNER_DEVICE_PARAMETER m_CurResource;
|
||||
BDATUNER_DEVICE_STATUS m_TunerStatus;
|
||||
ULONG m_ulCurResourceID;
|
||||
ULONG m_ulcResourceUsers;
|
||||
LARGE_INTEGER m_PreviousStatusReadTime;
|
||||
|
||||
//The synthesis buffer. This is a private buffer we use to store the
|
||||
//references of the Streaming Data.It is used for the Reading data
|
||||
//from the device and also Copying Data to the Stream Buffer sent
|
||||
//by the application
|
||||
PUCHAR m_SynthesisBuffer[NUMBER_OF_FRAMES];
|
||||
|
||||
//Key information regarding the frames we generate.
|
||||
LONGLONG m_TimePerFrame;
|
||||
ULONG m_PacketSize;
|
||||
ULONG m_PacketsPerSample;
|
||||
|
||||
//The current state of the Device
|
||||
HARDWARE_STATE m_HardwareState;
|
||||
|
||||
//The pause / stop hardware flag and event.
|
||||
BOOLEAN m_StopHardware;
|
||||
KEVENT m_HardwareEvent;
|
||||
|
||||
//Number of pins with resources acquired. This is used as a locking
|
||||
//mechanism for resource acquisition on the device.
|
||||
LONG m_PinsWithResources;
|
||||
|
||||
//The capture sink. When we complete stream reading, we
|
||||
//notify the capture sink.
|
||||
ICaptureSink *m_CaptureSink;
|
||||
|
||||
//The video info header we're basing hardware settings on. The pin
|
||||
//provides this to us when acquiring resources and must guarantee its
|
||||
//stability until resources are released.
|
||||
PBDA_TRANSPORT_INFO m_TransportInfo;
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*SKYWALKER1_TUNER_DEVICE_H*/
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Device.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Main Skywalker Device level Implementation
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_TUNER_DEVICE_H
|
||||
#define SKYWALKER1_TUNER_DEVICE_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1USB.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The SkyWalker1 Device class.
|
||||
class CSkyWalker1Device
|
||||
{
|
||||
public:
|
||||
|
||||
//Device Initialization and Dispatch Related definitions
|
||||
NTSTATUS Create(IN PKSDEVICE pKSDeviceObject);
|
||||
NTSTATUS Start(
|
||||
IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIrp,
|
||||
IN PCM_RESOURCE_LIST pResourceList OPTIONAL,
|
||||
IN PCM_RESOURCE_LIST pTranslatedResourceList OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS Stop( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
NTSTATUS Close( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SetPower(
|
||||
IN PKSDEVICE pKSDeviceObject, //Pointer to the device object
|
||||
//provided by the system.
|
||||
IN PIRP pIoRequestPacket,//Pointer to the IRP related to this request.
|
||||
IN DEVICE_POWER_STATE To, //Requested power state.
|
||||
IN DEVICE_POWER_STATE From //Current power state.
|
||||
);
|
||||
|
||||
NTSTATUS InitializeTuner( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
// Device access related Function definitions
|
||||
// An instance of the filter uses these functions
|
||||
// to manage resources on the device.
|
||||
|
||||
NTSTATUS Acquire(IN PBDATUNER_DEVICE_PARAMETER pNewResource,
|
||||
OUT PULONG pulAcquiredResourceID);
|
||||
|
||||
NTSTATUS Update( IN PBDATUNER_DEVICE_PARAMETER pNewResource,
|
||||
IN ULONG ulResourceID);
|
||||
|
||||
NTSTATUS SendDiseqcCommand(
|
||||
IN PDISEQC_COMMAND pDiseqcCommand,
|
||||
IN ULONG ulResourceID
|
||||
);
|
||||
|
||||
NTSTATUS Release(IN ULONG ulResourceID);
|
||||
|
||||
NTSTATUS GetStatus(PBDATUNER_DEVICE_STATUS pDeviceStatus);
|
||||
|
||||
//DMA Adapter related Functions
|
||||
NTSTATUS InitializeAdapterStream(IN PKSDEVICE pKSDeviceObject);
|
||||
|
||||
//Stream Capture Related Fuctions
|
||||
NTSTATUS SetupCaptureSink (
|
||||
IN ICaptureSink * pCapturePin,
|
||||
IN PBDA_TRANSPORT_INFO TransportInfo
|
||||
);
|
||||
void RemoveCaptureSink ();
|
||||
|
||||
NTSTATUS StartStream ();
|
||||
NTSTATUS PauseStream (IN BOOLEAN Pausing);
|
||||
NTSTATUS StopStream ();
|
||||
NTSTATUS ReadStream(IN ULONG ulStreamIndex);
|
||||
void ProcessStream(IN ULONG ulStreamIndex);
|
||||
|
||||
BOOLEAN TimeToReadSignalStatus(void);
|
||||
|
||||
PKSDEVICE m_pKSDevice;
|
||||
|
||||
//USB Related definitions
|
||||
USB_DEVICE_DESCRIPTOR USBDeviceDescriptor;
|
||||
USBD_PIPE_INFORMATION ReadPipe;
|
||||
USBD_PIPE_INFORMATION WritePipe;
|
||||
USBSTATE UsbDeviceState;
|
||||
USBSTATE PreviousUsbDeviceState;
|
||||
//Pending I/O queue state
|
||||
QUEUE_STATE QueueState;
|
||||
|
||||
//obtain and hold this lock while changing the device state,
|
||||
//the queue state and while processing the queue.
|
||||
KSPIN_LOCK DeviceStateLock;
|
||||
//Current Usb Irp
|
||||
PIRP pUsbStreamIrp[PACKET_PER_FRAME * NUMBER_OF_FRAMES];
|
||||
//Device Stop Event
|
||||
KEVENT EvDeviceStopOk;
|
||||
//Device Remove Event
|
||||
KEVENT EvDeviceRemoveOk;
|
||||
//Outstanding IO Count for the Driver
|
||||
ULONG ulOutStandingIoCount;
|
||||
//Outstanding IO Count Lock
|
||||
KSPIN_LOCK kIoCountLock;
|
||||
|
||||
PDMA_ADAPTER m_pDMAAdapter;
|
||||
|
||||
ULONG m_SampleSize;
|
||||
|
||||
//Temporary Bytes Read Counter
|
||||
ULONG m_NumberOfBytesRead[NUMBER_OF_FRAMES];
|
||||
|
||||
PUCHAR GetSynthBuffer(ULONG ulStreamIndex)
|
||||
{
|
||||
return m_SynthesisBuffer[ulStreamIndex];
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ULONG m_ulDeviceInstance;
|
||||
BDATUNER_DEVICE_PARAMETER m_CurResource;
|
||||
BDATUNER_DEVICE_STATUS m_TunerStatus;
|
||||
ULONG m_ulCurResourceID;
|
||||
ULONG m_ulcResourceUsers;
|
||||
LARGE_INTEGER m_PreviousStatusReadTime;
|
||||
|
||||
//The synthesis buffer. This is a private buffer we use to store the
|
||||
//references of the Streaming Data.It is used for the Reading data
|
||||
//from the device and also Copying Data to the Stream Buffer sent
|
||||
//by the application
|
||||
PUCHAR m_SynthesisBuffer[NUMBER_OF_FRAMES];
|
||||
|
||||
//Key information regarding the frames we generate.
|
||||
LONGLONG m_TimePerFrame;
|
||||
ULONG m_PacketSize;
|
||||
ULONG m_PacketsPerSample;
|
||||
|
||||
//The current state of the Device
|
||||
HARDWARE_STATE m_HardwareState;
|
||||
|
||||
//The pause / stop hardware flag and event.
|
||||
BOOLEAN m_StopHardware;
|
||||
KEVENT m_HardwareEvent;
|
||||
|
||||
//Number of pins with resources acquired. This is used as a locking
|
||||
//mechanism for resource acquisition on the device.
|
||||
LONG m_PinsWithResources;
|
||||
|
||||
//The capture sink. When we complete stream reading, we
|
||||
//notify the capture sink.
|
||||
ICaptureSink *m_CaptureSink;
|
||||
|
||||
//The video info header we're basing hardware settings on. The pin
|
||||
//provides this to us when acquiring resources and must guarantee its
|
||||
//stability until resources are released.
|
||||
PBDA_TRANSPORT_INFO m_TransportInfo;
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*SKYWALKER1_TUNER_DEVICE_H*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,109 +1,109 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1AntennaPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Extended BDA Definitions
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_EXTENDED_H
|
||||
#define __SKYWALKER1_EXTENDED_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#if !defined(_KSMEDIA_)
|
||||
#error KSMEDIA.H must be included before BDAMEDIA.H
|
||||
#endif // !defined(_KSMEDIA_)
|
||||
|
||||
#if !defined(_BDATYPES_)
|
||||
#error BDATYPES.H must be included before BDAMEDIA.H
|
||||
#endif // !defined(_BDATYPES_)
|
||||
|
||||
#if !defined(_BDAMEDIA_)
|
||||
#define _BDAMEDIA_
|
||||
#endif // !defined(_BDAMEDIA_)
|
||||
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
|
||||
#define MAX_DISEQC_COMMAND_LENGTH 6
|
||||
|
||||
/* Extended Property*/
|
||||
|
||||
//Used to extend the feature of the BDA
|
||||
//{0B5221EB-F4C4-4976-B959-EF74427464D9}
|
||||
#define STATIC_KSPROPSETID_BdaExtendedProperty \
|
||||
0x0B5221EB, 0xF4C4, 0x4976, 0xB9, 0x59, 0xEF, 0x74, 0x42, 0x74, 0x64, 0xD9
|
||||
DEFINE_GUIDSTRUCT("0B5221EB-F4C4-4976-B959-EF74427464D9", KSPROPSETID_BdaExtendedProperty);
|
||||
#define KSPROPSETID_BdaExtendedProperty DEFINE_GUIDNAMED(KSPROPSETID_BdaExtendedProperty)
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
//Extended Property List
|
||||
typedef enum __KSPROPERTY_EXTENDED
|
||||
{
|
||||
/* DiSEqC Command */
|
||||
//Used to send the Digital Sattelite Equipment Control (DiSEqC)
|
||||
//Commands by application
|
||||
KSPROPERTY_BDA_DISEQC = 0, //Extension Property 1
|
||||
|
||||
//Add New Extended Commands Here
|
||||
|
||||
}KSPROPERTY_EXTENDED;
|
||||
|
||||
//Enumeration can be used during Simple Tone Burst Command
|
||||
typedef enum enSimpleToneBurst
|
||||
{
|
||||
SEC_MINI_A,
|
||||
SEC_MINI_B
|
||||
}SIMPLE_TONE_BURST;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//DiSEqC Command related Structure definitions
|
||||
typedef struct __DISEQC_COMMAND
|
||||
{
|
||||
UCHAR ucMessage[MAX_DISEQC_COMMAND_LENGTH]; /*
|
||||
Byte - 0 : Framing,
|
||||
Byte - 1 : Address,
|
||||
Byte - 2 : Command,
|
||||
Byte - 3 : Data[0],
|
||||
Byte - 4 : Data[1],
|
||||
Byte - 5 : Data[2]
|
||||
*/
|
||||
UCHAR ucMessageLength;/* The Valid values for DiSEqC Command are 3...6
|
||||
If this value is 1 then the Byte 0 is taken as Simple "Tone Burst" Control
|
||||
Command */
|
||||
|
||||
}DISEQC_COMMAND,*PDISEQC_COMMAND;
|
||||
|
||||
//Property that will be used to send the Diseqc command by the application
|
||||
#define DEFINE_KSPROPERTY_ITEM_BDA_DISEQC(GetHandler, SetHandler)\
|
||||
DEFINE_KSPROPERTY_ITEM(\
|
||||
KSPROPERTY_BDA_DISEQC,\
|
||||
(GetHandler),\
|
||||
sizeof(KSP_NODE),\
|
||||
sizeof(DISEQC_COMMAND),\
|
||||
(SetHandler),\
|
||||
NULL, 0, NULL, NULL, 0)
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1AntennaPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Extended BDA Definitions
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_EXTENDED_H
|
||||
#define __SKYWALKER1_EXTENDED_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#if !defined(_KSMEDIA_)
|
||||
#error KSMEDIA.H must be included before BDAMEDIA.H
|
||||
#endif // !defined(_KSMEDIA_)
|
||||
|
||||
#if !defined(_BDATYPES_)
|
||||
#error BDATYPES.H must be included before BDAMEDIA.H
|
||||
#endif // !defined(_BDATYPES_)
|
||||
|
||||
#if !defined(_BDAMEDIA_)
|
||||
#define _BDAMEDIA_
|
||||
#endif // !defined(_BDAMEDIA_)
|
||||
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
|
||||
#define MAX_DISEQC_COMMAND_LENGTH 6
|
||||
|
||||
/* Extended Property*/
|
||||
|
||||
//Used to extend the feature of the BDA
|
||||
//{0B5221EB-F4C4-4976-B959-EF74427464D9}
|
||||
#define STATIC_KSPROPSETID_BdaExtendedProperty \
|
||||
0x0B5221EB, 0xF4C4, 0x4976, 0xB9, 0x59, 0xEF, 0x74, 0x42, 0x74, 0x64, 0xD9
|
||||
DEFINE_GUIDSTRUCT("0B5221EB-F4C4-4976-B959-EF74427464D9", KSPROPSETID_BdaExtendedProperty);
|
||||
#define KSPROPSETID_BdaExtendedProperty DEFINE_GUIDNAMED(KSPROPSETID_BdaExtendedProperty)
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
//Extended Property List
|
||||
typedef enum __KSPROPERTY_EXTENDED
|
||||
{
|
||||
/* DiSEqC Command */
|
||||
//Used to send the Digital Sattelite Equipment Control (DiSEqC)
|
||||
//Commands by application
|
||||
KSPROPERTY_BDA_DISEQC = 0, //Extension Property 1
|
||||
|
||||
//Add New Extended Commands Here
|
||||
|
||||
}KSPROPERTY_EXTENDED;
|
||||
|
||||
//Enumeration can be used during Simple Tone Burst Command
|
||||
typedef enum enSimpleToneBurst
|
||||
{
|
||||
SEC_MINI_A,
|
||||
SEC_MINI_B
|
||||
}SIMPLE_TONE_BURST;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//DiSEqC Command related Structure definitions
|
||||
typedef struct __DISEQC_COMMAND
|
||||
{
|
||||
UCHAR ucMessage[MAX_DISEQC_COMMAND_LENGTH]; /*
|
||||
Byte - 0 : Framing,
|
||||
Byte - 1 : Address,
|
||||
Byte - 2 : Command,
|
||||
Byte - 3 : Data[0],
|
||||
Byte - 4 : Data[1],
|
||||
Byte - 5 : Data[2]
|
||||
*/
|
||||
UCHAR ucMessageLength;/* The Valid values for DiSEqC Command are 3...6
|
||||
If this value is 1 then the Byte 0 is taken as Simple "Tone Burst" Control
|
||||
Command */
|
||||
|
||||
}DISEQC_COMMAND,*PDISEQC_COMMAND;
|
||||
|
||||
//Property that will be used to send the Diseqc command by the application
|
||||
#define DEFINE_KSPROPERTY_ITEM_BDA_DISEQC(GetHandler, SetHandler)\
|
||||
DEFINE_KSPROPERTY_ITEM(\
|
||||
KSPROPERTY_BDA_DISEQC,\
|
||||
(GetHandler),\
|
||||
sizeof(KSP_NODE),\
|
||||
sizeof(DISEQC_COMMAND),\
|
||||
(SetHandler),\
|
||||
NULL, 0, NULL, NULL, 0)
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_EXTENDED_H*/
|
||||
|
|
@ -1,69 +1,69 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Main.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Entry point for the Driver
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_MAIN_H
|
||||
#define __SKYWALKER1_MAIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include <winerror.h>
|
||||
#include <unknown.h>
|
||||
#include <ks.h> //Kernel Streaming Driver
|
||||
#include <ksmedia.h>
|
||||
#include <bdatypes.h>
|
||||
#include <bdamedia.h>
|
||||
#include <atsmedia.h>
|
||||
#include <bdasup.h>
|
||||
|
||||
#include <kcom.h>
|
||||
#include <ksdebug.h>
|
||||
#include "SkyWalker1AntennaPin.h"
|
||||
#include "SkyWalker1CaptureFilter.h"
|
||||
#include "SkyWalker1CapturePin.h"
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1Control.h"
|
||||
#include "SkyWalker1Device.h"
|
||||
#include "SkyWalker1TransportPin.h"
|
||||
#include "SkyWalker1TunerFilter.h"
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <wdm.h> //For the Mutex
|
||||
#include <wchar.h> //For the WCHAR and swprintf
|
||||
#include <stdio.h> //For sprintf() function
|
||||
|
||||
#include "SkyWalker1PnP.h" //Header for the PnP related definitions
|
||||
#include "SkyWalker1USB.h"
|
||||
#include "SkyWalker1Utility.h"
|
||||
|
||||
}
|
||||
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Main.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Entry point for the Driver
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_MAIN_H
|
||||
#define __SKYWALKER1_MAIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include <winerror.h>
|
||||
#include <unknown.h>
|
||||
#include <ks.h> //Kernel Streaming Driver
|
||||
#include <ksmedia.h>
|
||||
#include <bdatypes.h>
|
||||
#include <bdamedia.h>
|
||||
#include <atsmedia.h>
|
||||
#include <bdasup.h>
|
||||
|
||||
#include <kcom.h>
|
||||
#include <ksdebug.h>
|
||||
#include "SkyWalker1AntennaPin.h"
|
||||
#include "SkyWalker1CaptureFilter.h"
|
||||
#include "SkyWalker1CapturePin.h"
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1Control.h"
|
||||
#include "SkyWalker1Device.h"
|
||||
#include "SkyWalker1TransportPin.h"
|
||||
#include "SkyWalker1TunerFilter.h"
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <wdm.h> //For the Mutex
|
||||
#include <wchar.h> //For the WCHAR and swprintf
|
||||
#include <stdio.h> //For sprintf() function
|
||||
|
||||
#include "SkyWalker1PnP.h" //Header for the PnP related definitions
|
||||
#include "SkyWalker1USB.h"
|
||||
#include "SkyWalker1Utility.h"
|
||||
|
||||
}
|
||||
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_MAIN_H*/
|
||||
|
|
@ -1,56 +1,56 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1PnP.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : PnP IRP Message Handler
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef __SKYWALKER1_PNP_H
|
||||
#define __SKYWALKER1_PNP_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
NTSTATUS SkyWalker1AddDevice(IN PKSDEVICE pKSDeviceObject);
|
||||
VOID SkyWalker1Remove( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SkyWalker1Start(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PCM_RESOURCE_LIST pResourceList,
|
||||
IN PCM_RESOURCE_LIST pCIResourceListTranslated);
|
||||
VOID SkyWalker1Stop(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SkyWalker1QueryStop( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
VOID SkyWalker1SetPower
|
||||
(
|
||||
IN PKSDEVICE pKSDeviceObject, //Pointer to the device object
|
||||
//provided by the system.
|
||||
IN PIRP pIoRequestPacket, //Pointer to the IRP related to this request.
|
||||
IN DEVICE_POWER_STATE To, //Requested power state.
|
||||
IN DEVICE_POWER_STATE From //Current power state.
|
||||
);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif // __SKYWALKER1_PNP_H
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1PnP.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : PnP IRP Message Handler
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef __SKYWALKER1_PNP_H
|
||||
#define __SKYWALKER1_PNP_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
NTSTATUS SkyWalker1AddDevice(IN PKSDEVICE pKSDeviceObject);
|
||||
VOID SkyWalker1Remove( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SkyWalker1Start(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PCM_RESOURCE_LIST pResourceList,
|
||||
IN PCM_RESOURCE_LIST pCIResourceListTranslated);
|
||||
VOID SkyWalker1Stop(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SkyWalker1QueryStop( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
VOID SkyWalker1SetPower
|
||||
(
|
||||
IN PKSDEVICE pKSDeviceObject, //Pointer to the device object
|
||||
//provided by the system.
|
||||
IN PIRP pIoRequestPacket, //Pointer to the IRP related to this request.
|
||||
IN DEVICE_POWER_STATE To, //Requested power state.
|
||||
IN DEVICE_POWER_STATE From //Current power state.
|
||||
);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif // __SKYWALKER1_PNP_H
|
||||
|
|
|
|||
|
|
@ -1,84 +1,84 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TransportPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains header for the Transport pin on the Tuner
|
||||
filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_TRANSPORT_PIN_H
|
||||
#define __SKYWALKER1_TRANSPORT_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
//#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Trasport Pin class.
|
||||
class CTransportPin : public CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
//Define a data intersection handler function for the
|
||||
//pin (KSPIN_DESCRIPTOR_EX structure).
|
||||
//Network provider and AVStream use this function
|
||||
//to connect the output pin with a downstream filter.
|
||||
static NTSTATUS IntersectDataFormat(
|
||||
IN PVOID pContext,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSP_PIN Pin,
|
||||
IN PKSDATARANGE DataRange,
|
||||
IN PKSDATARANGE MatchingDataRange,
|
||||
IN ULONG DataBufferSize,
|
||||
OUT PVOID Data OPTIONAL,
|
||||
OUT PULONG DataSize
|
||||
);
|
||||
|
||||
static NTSTATUS GetDigitalDemodProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetDigitalDemodProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
//Function to send the Extended BDA Commands to the Tuner
|
||||
static NTSTATUS SetExtendedProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TransportPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file contains header for the Transport pin on the Tuner
|
||||
filter.
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_TRANSPORT_PIN_H
|
||||
#define __SKYWALKER1_TRANSPORT_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
//#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1TunerPin.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Trasport Pin class.
|
||||
class CTransportPin : public CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
//Define a data intersection handler function for the
|
||||
//pin (KSPIN_DESCRIPTOR_EX structure).
|
||||
//Network provider and AVStream use this function
|
||||
//to connect the output pin with a downstream filter.
|
||||
static NTSTATUS IntersectDataFormat(
|
||||
IN PVOID pContext,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSP_PIN Pin,
|
||||
IN PKSDATARANGE DataRange,
|
||||
IN PKSDATARANGE MatchingDataRange,
|
||||
IN ULONG DataBufferSize,
|
||||
OUT PVOID Data OPTIONAL,
|
||||
OUT PULONG DataSize
|
||||
);
|
||||
|
||||
static NTSTATUS GetDigitalDemodProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
static NTSTATUS SetDigitalDemodProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
//Function to send the Extended BDA Commands to the Tuner
|
||||
static NTSTATUS SetExtendedProperty(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_TRANSPORT_PIN_H*/
|
||||
|
|
@ -1,140 +1,140 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TunerFilter.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Tuner Filter Class Definition
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_TUNER_FILTER_H
|
||||
#define SKYWALKER1_TUNER_FILTER_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1Device.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Tuner Filter class.
|
||||
class CTunerFilter
|
||||
{
|
||||
public:
|
||||
|
||||
//Functions to Create and Close Filter
|
||||
static NTSTATUS Create( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
static NTSTATUS FilterClose( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
//KSMETHODSETID_BdaChangeSync pKSFilter change sync methods
|
||||
static NTSTATUS StartChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS CheckChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS CommitChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS GetChangeState( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OUT PULONG pulChangeState);
|
||||
|
||||
|
||||
//KSMETHODSETID_BdaDeviceConfiguration Method to modify filter topology.
|
||||
static NTSTATUS CreateTopology( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
|
||||
//pKSFilter Implementation Methods
|
||||
(class CSkyWalker1Device *) GetDevice()
|
||||
{
|
||||
return m_pDevice;
|
||||
};
|
||||
|
||||
NTSTATUS SetDeviceState(KSSTATE NewKsState)
|
||||
{
|
||||
m_KsState = NewKsState;
|
||||
return STATUS_SUCCESS;
|
||||
};
|
||||
|
||||
|
||||
//Tuner Node Properties
|
||||
NTSTATUS GetTunerProperty(OUT PBDATUNER_DEVICE_PARAMETER pTunerParameter);
|
||||
NTSTATUS SetFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetMultiplier(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetBandwidth(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetPolarity(IN Polarisation NewPolarity);
|
||||
NTSTATUS SetRange(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetTransponder(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetLowLOFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetHighLOFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetSwitchFrequency(IN ULONG ulBdaParameter);
|
||||
|
||||
//Demodulator Node Properties
|
||||
NTSTATUS GetDemodProperty(OUT PBDATUNER_DEVICE_PARAMETER pDemodParameter);
|
||||
NTSTATUS SetModulatorType(IN ModulationType NewModulatorType);
|
||||
NTSTATUS SetInnerFecType(IN ULONG ulNewInnerFecType);
|
||||
NTSTATUS SetInnerFecRate(IN BinaryConvolutionCodeRate NewFecRate);
|
||||
NTSTATUS SetOuterFecType(IN ULONG ulNewOuterFecType);
|
||||
NTSTATUS SetOuterFecRate(IN BinaryConvolutionCodeRate NewFecRate);
|
||||
NTSTATUS SetSymbolRate(IN ULONG ulNewSymbolRate);
|
||||
NTSTATUS SetSpectralInversion(IN SpectralInversion SpecInv);
|
||||
NTSTATUS SetGuardInterval(IN GuardInterval GuardInt);
|
||||
NTSTATUS SetTransmissionMode(IN TransmissionMode TransMode);
|
||||
|
||||
//Extended Property
|
||||
NTSTATUS SendDiseqcCommand(IN PDISEQC_COMMAND pDiseqcCommand);
|
||||
|
||||
//Function to retrive the Device Status.
|
||||
NTSTATUS GetStatus(PBDATUNER_DEVICE_STATUS pDeviceStatus);
|
||||
|
||||
//Functions to get and release device access
|
||||
NTSTATUS AcquireResources();
|
||||
NTSTATUS ReleaseResources();
|
||||
|
||||
|
||||
private:
|
||||
class CSkyWalker1Device * m_pDevice;
|
||||
|
||||
//Filter Resources
|
||||
KSSTATE m_KsState;
|
||||
BDA_CHANGE_STATE m_BdaChangeState;
|
||||
BDATUNER_DEVICE_PARAMETER m_CurResource;
|
||||
BDATUNER_DEVICE_PARAMETER m_NewResource;
|
||||
ULONG m_ulResourceID;
|
||||
BOOLEAN m_fResourceAcquired;
|
||||
CTunerFilter();
|
||||
~CTunerFilter();
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TunerFilter.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : Tuner Filter Class Definition
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SKYWALKER1_TUNER_FILTER_H
|
||||
#define SKYWALKER1_TUNER_FILTER_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1Device.h"
|
||||
#include "SkyWalker1Extended.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
//The Tuner Filter class.
|
||||
class CTunerFilter
|
||||
{
|
||||
public:
|
||||
|
||||
//Functions to Create and Close Filter
|
||||
static NTSTATUS Create( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
static NTSTATUS FilterClose( IN OUT PKSFILTER pKSFilter,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
//KSMETHODSETID_BdaChangeSync pKSFilter change sync methods
|
||||
static NTSTATUS StartChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS CheckChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS CommitChanges( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
static NTSTATUS GetChangeState( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OUT PULONG pulChangeState);
|
||||
|
||||
|
||||
//KSMETHODSETID_BdaDeviceConfiguration Method to modify filter topology.
|
||||
static NTSTATUS CreateTopology( IN PIRP pIoRequestPacket,
|
||||
IN PKSMETHOD pKSMethod,
|
||||
OPTIONAL PVOID pvIgnored);
|
||||
|
||||
|
||||
//pKSFilter Implementation Methods
|
||||
(class CSkyWalker1Device *) GetDevice()
|
||||
{
|
||||
return m_pDevice;
|
||||
};
|
||||
|
||||
NTSTATUS SetDeviceState(KSSTATE NewKsState)
|
||||
{
|
||||
m_KsState = NewKsState;
|
||||
return STATUS_SUCCESS;
|
||||
};
|
||||
|
||||
|
||||
//Tuner Node Properties
|
||||
NTSTATUS GetTunerProperty(OUT PBDATUNER_DEVICE_PARAMETER pTunerParameter);
|
||||
NTSTATUS SetFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetMultiplier(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetBandwidth(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetPolarity(IN Polarisation NewPolarity);
|
||||
NTSTATUS SetRange(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetTransponder(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetLowLOFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetHighLOFrequency(IN ULONG ulBdaParameter);
|
||||
NTSTATUS SetSwitchFrequency(IN ULONG ulBdaParameter);
|
||||
|
||||
//Demodulator Node Properties
|
||||
NTSTATUS GetDemodProperty(OUT PBDATUNER_DEVICE_PARAMETER pDemodParameter);
|
||||
NTSTATUS SetModulatorType(IN ModulationType NewModulatorType);
|
||||
NTSTATUS SetInnerFecType(IN ULONG ulNewInnerFecType);
|
||||
NTSTATUS SetInnerFecRate(IN BinaryConvolutionCodeRate NewFecRate);
|
||||
NTSTATUS SetOuterFecType(IN ULONG ulNewOuterFecType);
|
||||
NTSTATUS SetOuterFecRate(IN BinaryConvolutionCodeRate NewFecRate);
|
||||
NTSTATUS SetSymbolRate(IN ULONG ulNewSymbolRate);
|
||||
NTSTATUS SetSpectralInversion(IN SpectralInversion SpecInv);
|
||||
NTSTATUS SetGuardInterval(IN GuardInterval GuardInt);
|
||||
NTSTATUS SetTransmissionMode(IN TransmissionMode TransMode);
|
||||
|
||||
//Extended Property
|
||||
NTSTATUS SendDiseqcCommand(IN PDISEQC_COMMAND pDiseqcCommand);
|
||||
|
||||
//Function to retrive the Device Status.
|
||||
NTSTATUS GetStatus(PBDATUNER_DEVICE_STATUS pDeviceStatus);
|
||||
|
||||
//Functions to get and release device access
|
||||
NTSTATUS AcquireResources();
|
||||
NTSTATUS ReleaseResources();
|
||||
|
||||
|
||||
private:
|
||||
class CSkyWalker1Device * m_pDevice;
|
||||
|
||||
//Filter Resources
|
||||
KSSTATE m_KsState;
|
||||
BDA_CHANGE_STATE m_BdaChangeState;
|
||||
BDATUNER_DEVICE_PARAMETER m_CurResource;
|
||||
BDATUNER_DEVICE_PARAMETER m_NewResource;
|
||||
ULONG m_ulResourceID;
|
||||
BOOLEAN m_fResourceAcquired;
|
||||
CTunerFilter();
|
||||
~CTunerFilter();
|
||||
};
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*SKYWALKER1_TUNER_FILTER_H*/
|
||||
|
|
@ -1,82 +1,82 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TunerPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Generic Tuner Pin related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_TUNER_PIN_H
|
||||
#define __SKYWALKER1_TUNER_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1TunerFilter.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
// The Tuner Pin class.
|
||||
class CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
//Creates the Pin
|
||||
static NTSTATUS PinCreate( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//Closes the Opened Pin
|
||||
static NTSTATUS PinClose( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//Member Function to get the Various Signal attributes
|
||||
static NTSTATUS GetSignalStatus(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
|
||||
(class CTunerFilter *) GetFilter(void)
|
||||
{
|
||||
return m_pFilter;
|
||||
};
|
||||
|
||||
void SetFilter(class CTunerFilter * pFilter)
|
||||
{
|
||||
m_pFilter = pFilter;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
class CTunerFilter* m_pFilter;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1TunerPin.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds the Generic Tuner Pin related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_TUNER_PIN_H
|
||||
#define __SKYWALKER1_TUNER_PIN_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include "SkyWalker1CommonDef.h"
|
||||
#include "SkyWalker1TunerFilter.h"
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
|
||||
// The Tuner Pin class.
|
||||
class CTunerPin
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
//Creates the Pin
|
||||
static NTSTATUS PinCreate( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//Closes the Opened Pin
|
||||
static NTSTATUS PinClose( IN OUT PKSPIN pKSPin,
|
||||
IN PIRP pIoRequestPacket
|
||||
);
|
||||
|
||||
//Member Function to get the Various Signal attributes
|
||||
static NTSTATUS GetSignalStatus(
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PKSPROPERTY pKSProperty,
|
||||
IN PULONG pulProperty
|
||||
);
|
||||
|
||||
|
||||
(class CTunerFilter *) GetFilter(void)
|
||||
{
|
||||
return m_pFilter;
|
||||
};
|
||||
|
||||
void SetFilter(class CTunerFilter * pFilter)
|
||||
{
|
||||
m_pFilter = pFilter;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
class CTunerFilter* m_pFilter;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_TUNER_PIN_H*/
|
||||
|
|
@ -1,126 +1,126 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Usb.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds all the USB Device access related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_USB_H
|
||||
#define __SKYWALKER1_USB_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
extern "C"
|
||||
{
|
||||
//USB Related Headers
|
||||
#include <initguid.h>
|
||||
#pragma warning(disable:4200)
|
||||
#include <usbdi.h>
|
||||
#include <usbdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <usb100.h>
|
||||
#include "SkyWalker1Device.h"
|
||||
|
||||
}
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define MAX_BULK_PACKET_SIZE 8 * 512
|
||||
#define MAX_BULK_TRANSFER_SIZE (TRANSPORT_PACKET_COUNT * TRANSPORT_PACKET_SIZE) //Suppoting max Frame Size
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
typedef enum __USBSTATE {
|
||||
|
||||
NotStarted, // not started
|
||||
Stopped, // device stopped
|
||||
Working, // started and working
|
||||
PendingStop, // stop pending
|
||||
PendingRemove, // remove pending
|
||||
SurpriseRemoved, // removed by surprise
|
||||
Removed // removed
|
||||
|
||||
}USBSTATE;
|
||||
|
||||
typedef enum _QUEUE_STATE {
|
||||
|
||||
HoldRequests, // device is not started yet
|
||||
AllowRequests, // device is ready to process
|
||||
FailRequests // fail both existing and queued up requests
|
||||
|
||||
} QUEUE_STATE;
|
||||
|
||||
#define INITIALIZE_PNP_STATE(_Data_) \
|
||||
(_Data_)->UsbDeviceState = NotStarted;\
|
||||
(_Data_)->PreviousUsbDeviceState = NotStarted;
|
||||
|
||||
#define SET_NEW_PNP_STATE(_Data_, _state_) \
|
||||
(_Data_)->PreviousUsbDeviceState = (_Data_)->UsbDeviceState;\
|
||||
(_Data_)->UsbDeviceState = (_state_);
|
||||
|
||||
#define RESTORE_PREVIOUS_PNP_STATE(_Data_) \
|
||||
(_Data_)->UsbDeviceState = (_Data_)->PreviousUsbDeviceState;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
//BulkUsb Read Write Context
|
||||
typedef struct _BULKUSB_RW_CONTEXT {
|
||||
|
||||
PURB pUSBRequestBlock;
|
||||
PUCHAR pTransferBuffer;
|
||||
ULONG ulRemainingByteTransfer; // remaining to xfer
|
||||
ULONG ulCompletedByteTransfer; // cumulate xfer
|
||||
ULONG ulStreamIndex;
|
||||
class CSkyWalker1Device * pDevice;
|
||||
|
||||
} BULKUSB_RW_CONTEXT, * PBULKUSB_RW_CONTEXT;
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
//Usb Access functions
|
||||
NTSTATUS InitializeUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoReqestPacket);
|
||||
NTSTATUS DeconfigureUsbDevice(IN PKSDEVICE pKSDeviceObject);
|
||||
NTSTATUS StopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS ReadWriteUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN ULONG ulStreamIndex,
|
||||
IN ULONG ulPacketIndex,
|
||||
IN PUCHAR pucTransferBuffer,
|
||||
IN ULONG ulTransferLength,
|
||||
IN BOOLEAN bRead);
|
||||
NTSTATUS ControlUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucRequest,
|
||||
IN USHORT usValue,
|
||||
IN USHORT usIndex,
|
||||
IN PUCHAR pucTransferBuffer,
|
||||
IN ULONG ulTransferLength,
|
||||
IN BOOLEAN bRead);
|
||||
NTSTATUS RemoveUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SurpriseUsbDeviceRemoval(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS CancelRemoveUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS QueryRemoveUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS QueryStopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS CancelStopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Usb.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This File Holds all the USB Device access related declarations
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SKYWALKER1_USB_H
|
||||
#define __SKYWALKER1_USB_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
extern "C"
|
||||
{
|
||||
//USB Related Headers
|
||||
#include <initguid.h>
|
||||
#pragma warning(disable:4200)
|
||||
#include <usbdi.h>
|
||||
#include <usbdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <usb100.h>
|
||||
#include "SkyWalker1Device.h"
|
||||
|
||||
}
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define MAX_BULK_PACKET_SIZE 8 * 512
|
||||
#define MAX_BULK_TRANSFER_SIZE (TRANSPORT_PACKET_COUNT * TRANSPORT_PACKET_SIZE) //Suppoting max Frame Size
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
typedef enum __USBSTATE {
|
||||
|
||||
NotStarted, // not started
|
||||
Stopped, // device stopped
|
||||
Working, // started and working
|
||||
PendingStop, // stop pending
|
||||
PendingRemove, // remove pending
|
||||
SurpriseRemoved, // removed by surprise
|
||||
Removed // removed
|
||||
|
||||
}USBSTATE;
|
||||
|
||||
typedef enum _QUEUE_STATE {
|
||||
|
||||
HoldRequests, // device is not started yet
|
||||
AllowRequests, // device is ready to process
|
||||
FailRequests // fail both existing and queued up requests
|
||||
|
||||
} QUEUE_STATE;
|
||||
|
||||
#define INITIALIZE_PNP_STATE(_Data_) \
|
||||
(_Data_)->UsbDeviceState = NotStarted;\
|
||||
(_Data_)->PreviousUsbDeviceState = NotStarted;
|
||||
|
||||
#define SET_NEW_PNP_STATE(_Data_, _state_) \
|
||||
(_Data_)->PreviousUsbDeviceState = (_Data_)->UsbDeviceState;\
|
||||
(_Data_)->UsbDeviceState = (_state_);
|
||||
|
||||
#define RESTORE_PREVIOUS_PNP_STATE(_Data_) \
|
||||
(_Data_)->UsbDeviceState = (_Data_)->PreviousUsbDeviceState;
|
||||
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
//BulkUsb Read Write Context
|
||||
typedef struct _BULKUSB_RW_CONTEXT {
|
||||
|
||||
PURB pUSBRequestBlock;
|
||||
PUCHAR pTransferBuffer;
|
||||
ULONG ulRemainingByteTransfer; // remaining to xfer
|
||||
ULONG ulCompletedByteTransfer; // cumulate xfer
|
||||
ULONG ulStreamIndex;
|
||||
class CSkyWalker1Device * pDevice;
|
||||
|
||||
} BULKUSB_RW_CONTEXT, * PBULKUSB_RW_CONTEXT;
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
//Usb Access functions
|
||||
NTSTATUS InitializeUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoReqestPacket);
|
||||
NTSTATUS DeconfigureUsbDevice(IN PKSDEVICE pKSDeviceObject);
|
||||
NTSTATUS StopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS ReadWriteUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN ULONG ulStreamIndex,
|
||||
IN ULONG ulPacketIndex,
|
||||
IN PUCHAR pucTransferBuffer,
|
||||
IN ULONG ulTransferLength,
|
||||
IN BOOLEAN bRead);
|
||||
NTSTATUS ControlUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN UCHAR ucRequest,
|
||||
IN USHORT usValue,
|
||||
IN USHORT usIndex,
|
||||
IN PUCHAR pucTransferBuffer,
|
||||
IN ULONG ulTransferLength,
|
||||
IN BOOLEAN bRead);
|
||||
NTSTATUS RemoveUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS SurpriseUsbDeviceRemoval(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS CancelRemoveUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS QueryRemoveUsbDevice( IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS QueryStopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
NTSTATUS CancelStopUsbDevice(IN PKSDEVICE pKSDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
#endif /*__SKYWALKER1_USB_H*/
|
||||
|
|
@ -1,91 +1,91 @@
|
|||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Utility.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file basically holds the Utility related Common Declarations
|
||||
used in the SkyWalker Driver Module
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef SKYWALKER1_UTILITY_H
|
||||
#define SKYWALKER1_UTILITY_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include <wdm.h>
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define SKYWALKER1_DRIVER_NAME "SkyWalker1TVTuner"
|
||||
|
||||
extern int nCurrentDebugLevel;
|
||||
|
||||
#define DEBUG_ON
|
||||
#ifdef DEBUG_ON
|
||||
|
||||
#define SkyWalkerDebugPrint(DebugLevel,_ARGUMENTS_) \
|
||||
if((DebugLevel) <= nCurrentDebugLevel) \
|
||||
{ \
|
||||
DbgPrint _ARGUMENTS_; \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define SkyWalkerDebugPrint(DebugLevel,__ARGUMENTS__)
|
||||
|
||||
#endif
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
|
||||
/* ENUM : enDebugLevels */
|
||||
/* PURPOSE : To Define Different Debug Levels */
|
||||
enum enDebugLevels
|
||||
{
|
||||
DISABLE_DEBUG = 0,
|
||||
ENTRY_LEVEL,
|
||||
INTERMEDIATE_LEVEL,
|
||||
EXTREME_LEVEL,
|
||||
};
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
void PrintFunctionEntry(IN char * pcFunctionName);
|
||||
void PrintFunctionExit(IN char * pcFunctionName, IN NTSTATUS ntReturnCode);
|
||||
char * GetCurrentIrqlString(void);
|
||||
VOID Delay(IN ULONG ulDelayInMicroSeconds); //To Delay the Execution Thread
|
||||
|
||||
NTSTATUS LowerDeviceCompletedIrp(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PVOID pContext);
|
||||
NTSTATUS PassDownIRPAndWaitForCompletion(IN PDEVICE_OBJECT pLowerDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN BOOLEAN bCopyStackLocation);
|
||||
NTSTATUS PassDownIRPAndForget(IN PDEVICE_OBJECT pLowerDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
VOID CompleteIrpInDispatch(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
PUCHAR NTStatusToString(NTSTATUS Status) ;
|
||||
VOID PrintDeviceChangeState(IN KSSTATE ToState,IN KSSTATE FromState);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
|
||||
|
||||
#endif /*SKYWALKER1_UTILITY_H*/
|
||||
|
||||
/*****************************************************************************
|
||||
Company : Shree Ganesha Inc.
|
||||
File Name : SkyWalker1Utility.h
|
||||
Author :
|
||||
Date :
|
||||
Purpose : This file basically holds the Utility related Common Declarations
|
||||
used in the SkyWalker Driver Module
|
||||
|
||||
Revision History:
|
||||
===============================================================================
|
||||
DATE VERSION AUTHOR REMARK
|
||||
===============================================================================
|
||||
|
||||
XXth April,2009 01 Initial Version
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef SKYWALKER1_UTILITY_H
|
||||
#define SKYWALKER1_UTILITY_H
|
||||
|
||||
/* Include the Library and Other header file */
|
||||
#include <wdm.h>
|
||||
/* End of Inclusion the Library and Other header file */
|
||||
|
||||
/* Macro Definitions */
|
||||
#define SKYWALKER1_DRIVER_NAME "SkyWalker1TVTuner"
|
||||
|
||||
extern int nCurrentDebugLevel;
|
||||
|
||||
#define DEBUG_ON
|
||||
#ifdef DEBUG_ON
|
||||
|
||||
#define SkyWalkerDebugPrint(DebugLevel,_ARGUMENTS_) \
|
||||
if((DebugLevel) <= nCurrentDebugLevel) \
|
||||
{ \
|
||||
DbgPrint _ARGUMENTS_; \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define SkyWalkerDebugPrint(DebugLevel,__ARGUMENTS__)
|
||||
|
||||
#endif
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* End of Macro Definitions */
|
||||
|
||||
/* Global & Static variables Declaration */
|
||||
/* End of Global & Static variables Declaration */
|
||||
|
||||
/* External Variable Declaration */
|
||||
/* End of External Variable Declaration */
|
||||
|
||||
/* Declare Enumerations here */
|
||||
|
||||
/* ENUM : enDebugLevels */
|
||||
/* PURPOSE : To Define Different Debug Levels */
|
||||
enum enDebugLevels
|
||||
{
|
||||
DISABLE_DEBUG = 0,
|
||||
ENTRY_LEVEL,
|
||||
INTERMEDIATE_LEVEL,
|
||||
EXTREME_LEVEL,
|
||||
};
|
||||
/* End of Enumeration declaration */
|
||||
|
||||
/* Function Prototypes */
|
||||
void PrintFunctionEntry(IN char * pcFunctionName);
|
||||
void PrintFunctionExit(IN char * pcFunctionName, IN NTSTATUS ntReturnCode);
|
||||
char * GetCurrentIrqlString(void);
|
||||
VOID Delay(IN ULONG ulDelayInMicroSeconds); //To Delay the Execution Thread
|
||||
|
||||
NTSTATUS LowerDeviceCompletedIrp(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN PVOID pContext);
|
||||
NTSTATUS PassDownIRPAndWaitForCompletion(IN PDEVICE_OBJECT pLowerDeviceObject,
|
||||
IN PIRP pIoRequestPacket,
|
||||
IN BOOLEAN bCopyStackLocation);
|
||||
NTSTATUS PassDownIRPAndForget(IN PDEVICE_OBJECT pLowerDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
VOID CompleteIrpInDispatch(IN PDEVICE_OBJECT pDeviceObject,
|
||||
IN PIRP pIoRequestPacket);
|
||||
PUCHAR NTStatusToString(NTSTATUS Status) ;
|
||||
VOID PrintDeviceChangeState(IN KSSTATE ToState,IN KSSTATE FromState);
|
||||
/* End of Function prototype definitions */
|
||||
|
||||
|
||||
|
||||
#endif /*SKYWALKER1_UTILITY_H*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue