|
From: <ad...@us...> - 2003-03-07 08:04:18
|
Update of /cvsroot/bdadev/NovaTDriver
In directory sc8-pr-cvs1:/tmp/cvs-serv9073
Modified Files:
automation.cpp device.cpp device.h l64781.cpp l64781.h
saa7146.cpp
Log Message:
Temp remove monitoring thread
Index: automation.cpp
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/automation.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** automation.cpp 6 Mar 2003 17:48:42 -0000 1.6
--- automation.cpp 7 Mar 2003 08:04:11 -0000 1.7
***************
*** 56,62 ****
if(*pulProperty!=GETCONTEXT(device)->tuner.frequency) {
GETCONTEXT(device)->tuner.frequency=*pulProperty;
- GETCONTEXT(device)->tuner.ChangeOutstanding=TRUE;
- GETCONTEXT(device)->demodulator.ChangeOutstanding=TRUE;
}
return STATUS_SUCCESS;
}
--- 56,62 ----
if(*pulProperty!=GETCONTEXT(device)->tuner.frequency) {
GETCONTEXT(device)->tuner.frequency=*pulProperty;
}
+ GETCONTEXT(device)->tuner.ChangeOutstanding=TRUE;
+ GETCONTEXT(device)->demodulator.ChangeOutstanding=TRUE;
return STATUS_SUCCESS;
}
***************
*** 238,242 ****
NTSTATUS DemodOuterFecTypePut(IN PIRP pIrp,IN PKSPROPERTY pKSProperty,IN FECMethod* pulProperty)
{
! _DbgPrintF(DEBUGLVL_TERSE, ("DemodOuterFecTypePut(%u)",*pulProperty));
if(*pulProperty < BDA_FEC_METHOD_NOT_SET ||
*pulProperty >= BDA_FEC_MAX) {
--- 238,242 ----
NTSTATUS DemodOuterFecTypePut(IN PIRP pIrp,IN PKSPROPERTY pKSProperty,IN FECMethod* pulProperty)
{
! _DbgPrintF(DEBUGLVL_TERSE, ("DemodOuterFecTypePut(%d)",*pulProperty));
if(*pulProperty < BDA_FEC_METHOD_NOT_SET ||
*pulProperty >= BDA_FEC_MAX) {
***************
*** 261,265 ****
NTSTATUS DemodOuterFecRatePut(IN PIRP pIrp,IN PKSPROPERTY pKSProperty,IN BinaryConvolutionCodeRate* pulProperty)
{
! _DbgPrintF(DEBUGLVL_TERSE, ("DemodOuterFecRatePut(%u)",pulProperty));
if(*pulProperty < BDA_BCC_RATE_NOT_SET ||
*pulProperty >= BDA_BCC_RATE_MAX) {
--- 261,265 ----
NTSTATUS DemodOuterFecRatePut(IN PIRP pIrp,IN PKSPROPERTY pKSProperty,IN BinaryConvolutionCodeRate* pulProperty)
{
! _DbgPrintF(DEBUGLVL_TERSE, ("DemodOuterFecRatePut(%d)",*pulProperty));
if(*pulProperty < BDA_BCC_RATE_NOT_SET ||
*pulProperty >= BDA_BCC_RATE_MAX) {
***************
*** 425,431 ****
PKSDEVICE device=GETDEVICEFROMIRPFILT(pIrp);
! // Validate alterations
! status=BdaCommitChanges(pIrp);
! if(NT_SUCCESS(status) && device != NULL && GETCONTEXT(device) != NULL) {
// we will always reset the setting on moving out of stop
// so don't bother updating the hardware if we are stopped
--- 425,429 ----
PKSDEVICE device=GETDEVICEFROMIRPFILT(pIrp);
! if(device != NULL && GETCONTEXT(device) != NULL) {
// we will always reset the setting on moving out of stop
// so don't bother updating the hardware if we are stopped
***************
*** 469,472 ****
--- 467,473 ----
/*****************************************************************************\
* $Log$
+ * Revision 1.7 2003/03/07 08:04:11 adcockj
+ * Temp remove monitoring thread
+ *
* Revision 1.6 2003/03/06 17:48:42 adcockj
* Added TPS change monitoring thread
Index: device.cpp
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/device.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** device.cpp 6 Mar 2003 17:48:42 -0000 1.6
--- device.cpp 7 Mar 2003 08:04:12 -0000 1.7
***************
*** 25,30 ****
#include "saa7146.h"
! #pragma const_seg("PAGECONST")
! #pragma code_seg("PAGE")
--- 25,30 ----
#include "saa7146.h"
! #pragma const_seg()
! #pragma code_seg()
***************
*** 175,179 ****
_DbgPrintF(DEBUGLVL_TERSE, ("DeviceStop()"));
// confirm that the monitoring thread has stopped
! StopMonitoringThread((PKSDEVICE)GETCONTEXT(device));
// Stop tuner, L64781 and SAA7146 from any current functions
L64781_Close(device);
--- 175,179 ----
_DbgPrintF(DEBUGLVL_TERSE, ("DeviceStop()"));
// confirm that the monitoring thread has stopped
! //StopMonitoringThread(device);
// Stop tuner, L64781 and SAA7146 from any current functions
L64781_Close(device);
***************
*** 250,255 ****
// time as the user is trying to retune
ExAcquireFastMutex(&GETCONTEXT(device)->i2cMutex);
! L64781_CheckForTPSUpdate(device);
ExReleaseFastMutex(&GETCONTEXT(device)->i2cMutex);
}
// if we exited the above for any other reason then
--- 250,258 ----
// time as the user is trying to retune
ExAcquireFastMutex(&GETCONTEXT(device)->i2cMutex);
! BOOL GotUpdate=L64781_CheckForTPSUpdate(device);
ExReleaseFastMutex(&GETCONTEXT(device)->i2cMutex);
+ if(GotUpdate==TRUE) {
+ break;
+ }
}
// if we exited the above for any other reason then
***************
*** 312,324 ****
Tuner_SetFrequency((PKSDEVICE)Pin->Context);
L64781_UpdateParameters((PKSDEVICE)Pin->Context);
! StartMonitoringThread((PKSDEVICE)Pin->Context);
}
if((ToState==KSSTATE_STOP)&&(FromState!=KSSTATE_STOP)) {
! StopMonitoringThread((PKSDEVICE)Pin->Context);
SAA7146_StopStream((PKSDEVICE)Pin->Context);
}
- if(ToState==KSSTATE_RUN) {
- GETCONTEXT(Pin->Context)->sendDiscontinuity = true;
- }
GETCONTEXT(Pin->Context)->cur_state=ToState;
_DbgPrintF(DEBUGLVL_TERSE, ("State changed!"));
--- 315,324 ----
Tuner_SetFrequency((PKSDEVICE)Pin->Context);
L64781_UpdateParameters((PKSDEVICE)Pin->Context);
! //StartMonitoringThread((PKSDEVICE)Pin->Context);
}
if((ToState==KSSTATE_STOP)&&(FromState!=KSSTATE_STOP)) {
! //StopMonitoringThread((PKSDEVICE)Pin->Context);
SAA7146_StopStream((PKSDEVICE)Pin->Context);
}
GETCONTEXT(Pin->Context)->cur_state=ToState;
_DbgPrintF(DEBUGLVL_TERSE, ("State changed!"));
***************
*** 328,331 ****
--- 328,334 ----
/*****************************************************************************\
* $Log$
+ * Revision 1.7 2003/03/07 08:04:12 adcockj
+ * Temp remove monitoring thread
+ *
* Revision 1.6 2003/03/06 17:48:42 adcockj
* Added TPS change monitoring thread
Index: device.h
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/device.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** device.h 6 Mar 2003 17:48:43 -0000 1.4
--- device.h 7 Mar 2003 08:04:13 -0000 1.5
***************
*** 28,32 ****
int lost_error;
int counter;
- bool sendDiscontinuity;
KEVENT monitorThreadKill;
PKTHREAD monitorThread;
--- 28,31 ----
Index: l64781.cpp
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/l64781.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** l64781.cpp 6 Mar 2003 17:48:43 -0000 1.6
--- l64781.cpp 7 Mar 2003 08:04:14 -0000 1.7
***************
*** 68,72 ****
{
L64781_WriteRegister(device,0x2a,0x01);
! L64781_WriteRegister(device,0x2a,0x00);
}
--- 68,73 ----
{
L64781_WriteRegister(device,0x2a,0x01);
! L64781_WriteRegister(device,0x2a,0x0a);
! L64781_WriteRegister(device,0x2a,0x02);
}
***************
*** 114,117 ****
--- 115,120 ----
data->demodulator.HP_coderate=BDA_BCC_RATE_2_3;
data->demodulator.modulation=BDA_MOD_64QAM;
+ data->demodulator.HP_coderate=BDA_BCC_RATE_3_4;
+ data->demodulator.modulation=BDA_MOD_16QAM;
data->demodulator.transmit_mode=BDA_XMIT_MODE_2K;
data->demodulator.guard_interval=BDA_GUARD_1_32;
***************
*** 191,198 ****
// this is accurate and should work for any ppm
! qwSPIBias=1512 * fec_tab[hp_coderate] * qam_tab[constellation];
! qwSPIBias*=((1<<10) * 32 * bandwidth * 1000000);
! qwSPIBias/=((fec_tab[hp_coderate] + 1) * (guard_tab[guardinterval]+32));
! qwSPIBias/=(8 * (1000000 + ppm));
spi_bias = (unsigned __int32)qwSPIBias;
--- 194,202 ----
// this is accurate and should work for any ppm
! qwSPIBias=(__int64)(1512 * fec_tab[hp_coderate] * qam_tab[constellation]);
! qwSPIBias*=(__int64)((1<<10) * 32 * bandwidth);
! qwSPIBias*=(__int64)1000000;
! qwSPIBias/=(__int64)((fec_tab[hp_coderate] + 1) * (guard_tab[guardinterval]+32));
! qwSPIBias/=(__int64)(8 * (1000000 + ppm));
spi_bias = (unsigned __int32)qwSPIBias;
***************
*** 352,356 ****
_DbgPrintF(DEBUGLVL_TERSE, ("L64781 updated"));
}
! void L64781_CheckForTPSUpdate(PKSDEVICE device)
{
// see if the TPS interrupt has been triggered
--- 356,360 ----
_DbgPrintF(DEBUGLVL_TERSE, ("L64781 updated"));
}
! BOOL L64781_CheckForTPSUpdate(PKSDEVICE device)
{
// see if the TPS interrupt has been triggered
***************
*** 389,396 ****
--- 393,408 ----
L64781_ReadRegister(device,0x00); // Clear interrupt register
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
}
}
/*****************************************************************************\
* $Log$
+ * Revision 1.7 2003/03/07 08:04:14 adcockj
+ * Temp remove monitoring thread
+ *
* Revision 1.6 2003/03/06 17:48:43 adcockj
* Added TPS change monitoring thread
Index: l64781.h
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/l64781.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** l64781.h 6 Mar 2003 17:48:43 -0000 1.4
--- l64781.h 7 Mar 2003 08:04:14 -0000 1.5
***************
*** 34,38 ****
int L64781_Signal2NoiseRatio(PKSDEVICE device);
void L64781_UpdateParameters(PKSDEVICE device);
! void L64781_CheckForTPSUpdate(PKSDEVICE device);
#define L64781_HasSignal(device) (_L64781_SignalStrength(device)>5)
--- 34,38 ----
int L64781_Signal2NoiseRatio(PKSDEVICE device);
void L64781_UpdateParameters(PKSDEVICE device);
! BOOL L64781_CheckForTPSUpdate(PKSDEVICE device);
#define L64781_HasSignal(device) (_L64781_SignalStrength(device)>5)
Index: saa7146.cpp
===================================================================
RCS file: /cvsroot/bdadev/NovaTDriver/saa7146.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** saa7146.cpp 4 Mar 2003 08:02:22 -0000 1.5
--- saa7146.cpp 7 Mar 2003 08:04:15 -0000 1.6
***************
*** 79,83 ****
GETCONTEXT(device)->lost_error=0; // Indicates lost buffers due to kernel not processing fast enough
GETCONTEXT(device)->counter=0;
- GETCONTEXT(device)->sendDiscontinuity = true;
DeviceWriteRegister32(device,REG_MC1,RESET_BITS(MC1_TR_E_3)); // DMA3 off
for(i=0;i<PAGE_ALLOCATE;i++) RtlZeroMemory(GETCONTEXT(device)->dma_pages[i],0x1000);
--- 79,82 ----
***************
*** 208,218 ****
}
}
- if(GETCONTEXT(device)->sendDiscontinuity == true) {
- stream_pointer->StreamHeader->OptionsFlags |= KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY;
- GETCONTEXT(device)->sendDiscontinuity = false;
- }
- else {
- stream_pointer->StreamHeader->OptionsFlags &= ~KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY;
- }
KsStreamPointerAdvanceOffsetsAndUnlock(stream_pointer,0,TRANSPORT_PACKET_SIZE*TRANSPORT_PACKET_COUNT,FALSE);
--- 207,210 ----
***************
*** 380,383 ****
--- 372,378 ----
/*****************************************************************************\
* $Log$
+ * Revision 1.6 2003/03/07 08:04:15 adcockj
+ * Temp remove monitoring thread
+ *
* Revision 1.5 2003/03/04 08:02:22 adcockj
* Interim Checkin
|