Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

845 lines
31 KiB

  1. //***************************************************************************
  2. //
  3. // FileName:
  4. // $Workfile: DVDINIT.CPP $
  5. //
  6. // Author:
  7. // TOSHIBA [PCS](PSY) Satoshi Watanabe
  8. // Copyright (c) 1998 TOSHIBA CORPORATION
  9. //
  10. // Description:
  11. // 1998.05.27 dvdwdm.cpp ���番��
  12. //
  13. //***************************************************************************
  14. // $Header: /DVD Drivers/ZIVA2PC.WDM/DVDINIT.CPP 29 99/07/14 10:31 K-ogi $
  15. // $Modtime: 99/07/07 13:08 $
  16. // $Nokeywords:$
  17. //***************************************************************************
  18. #include "includes.h"
  19. #include "hal.h"
  20. #include "wdmkserv.h"
  21. #include "mpevent.h"
  22. #include "classlib.h"
  23. #include "ctime.h"
  24. #include "schdat.h"
  25. #include "ccque.h"
  26. #include "ctvctrl.h"
  27. #include "hlight.h"
  28. #include "hwdevex.h"
  29. #include "wdmbuff.h"
  30. #include "dvdinit.h"
  31. #include "dvdwdm.h"
  32. #include "wrapdef.h"
  33. #include "ssif.h"
  34. //--- 98.05.27 S.Watanabe
  35. BYTE PaletteY[256] = {
  36. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  37. 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
  38. 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
  39. 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
  40. 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47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0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfd, 0xfd,
  52. };
  53. BYTE PaletteCb[256] = {
  54. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  55. 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x21,
  56. 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2d, 0x2e, 0x2f, 0x30, 0x31,
  57. 0x32, 0x33, 0x34, 0x35, 0x36, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x43,
  58. 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
  59. 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x63,
  60. 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
  61. 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x84,
  62. 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93,
  63. 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3,
  64. 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa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, 0xfd, 0xfd,
  88. };
  89. //--- End.
  90. NTSTATUS GetConfigValue(
  91. IN PWSTR ValueName,
  92. IN ULONG ValueType,
  93. IN PVOID ValueData,
  94. IN ULONG ValueLength,
  95. IN PVOID Context,
  96. IN PVOID EntryContext
  97. );
  98. ////////////////////////////////////////////////////////////////////////////
  99. //
  100. // Public Functions
  101. //
  102. ////////////////////////////////////////////////////////////////////////////
  103. extern "C" NTSTATUS DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath )
  104. {
  105. // DBG_BREAK();
  106. HW_INITIALIZATION_DATA HwInitData;
  107. // 1998.9.24 K.Ishizaki
  108. RTL_QUERY_REGISTRY_TABLE queryRegistryTable[NUMBER_OF_REGISTRY_PARAMETERS + 1];
  109. PWSTR parameterPath = NULL;
  110. ULONG lengthOfPath = 0;
  111. UNICODE_STRING parameters;
  112. ULONG zero = 0;
  113. ULONG breakOnEntry = 0;
  114. RtlInitUnicodeString(&parameters, L"\\Parameters");
  115. lengthOfPath = RegistryPath->Length + parameters.Length + sizeof(WCHAR);
  116. parameterPath = (PWSTR)ExAllocatePool(NonPagedPool, lengthOfPath);
  117. if (parameterPath) {
  118. // Construct a path string.
  119. RtlZeroMemory(parameterPath, lengthOfPath);
  120. RtlCopyMemory(parameterPath, RegistryPath->Buffer, RegistryPath->Length);
  121. RtlCopyMemory((BYTE *)parameterPath + RegistryPath->Length,
  122. parameters.Buffer, parameters.Length);
  123. // Query registry values.
  124. RtlZeroMemory(queryRegistryTable, sizeof(queryRegistryTable));
  125. queryRegistryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
  126. queryRegistryTable[0].Name = L"EnablePrintf";
  127. queryRegistryTable[0].EntryContext = &Dbg_Printf_Enable;
  128. queryRegistryTable[0].DefaultType = REG_DWORD;
  129. queryRegistryTable[0].DefaultData = &zero;
  130. queryRegistryTable[0].DefaultLength = sizeof(ULONG);
  131. queryRegistryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
  132. queryRegistryTable[1].Name = L"EnableBreak";
  133. queryRegistryTable[1].EntryContext = &Dbg_Break_Enable;
  134. queryRegistryTable[1].DefaultType = REG_DWORD;
  135. queryRegistryTable[1].DefaultData = &zero;
  136. queryRegistryTable[1].DefaultLength = sizeof(ULONG);
  137. queryRegistryTable[2].Flags = RTL_QUERY_REGISTRY_DIRECT;
  138. queryRegistryTable[2].Name = L"DebugLevel";
  139. queryRegistryTable[2].EntryContext = &Dbg_Print_Level;
  140. queryRegistryTable[2].DefaultType = REG_DWORD;
  141. queryRegistryTable[2].DefaultData = &zero;
  142. queryRegistryTable[2].DefaultLength = sizeof(ULONG);
  143. queryRegistryTable[3].Flags = RTL_QUERY_REGISTRY_DIRECT;
  144. queryRegistryTable[3].Name = L"DebugFlags";
  145. queryRegistryTable[3].EntryContext = &Dbg_Print_Flags;
  146. queryRegistryTable[3].DefaultType = REG_DWORD;
  147. queryRegistryTable[3].DefaultData = &zero;
  148. queryRegistryTable[3].DefaultLength = sizeof(ULONG);
  149. queryRegistryTable[4].Flags = RTL_QUERY_REGISTRY_DIRECT;
  150. queryRegistryTable[4].Name = L"BreakOnEntry";
  151. queryRegistryTable[4].EntryContext = &breakOnEntry;
  152. queryRegistryTable[4].DefaultType = REG_DWORD;
  153. queryRegistryTable[4].DefaultData = &zero;
  154. queryRegistryTable[4].DefaultLength = sizeof(ULONG);
  155. #ifndef TVALD
  156. queryRegistryTable[5].Flags = RTL_QUERY_REGISTRY_DIRECT;
  157. queryRegistryTable[5].Name = L"EnableTvald";
  158. queryRegistryTable[5].EntryContext = &Dbg_Tvald;
  159. queryRegistryTable[5].DefaultType = REG_DWORD;
  160. queryRegistryTable[5].DefaultData = &zero;
  161. queryRegistryTable[5].DefaultLength = sizeof(ULONG);
  162. #endif TVALD
  163. RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, parameterPath,
  164. queryRegistryTable, NULL, NULL);
  165. ExFreePool(parameterPath);
  166. }
  167. if (breakOnEntry) {
  168. __asm { int 3 }
  169. }
  170. // END
  171. DBG_PRINTF( ("DVDWDM:TOSDVD02 DriverEntry\n\r") );
  172. RtlZeroMemory( &HwInitData, sizeof(HW_INITIALIZATION_DATA) );
  173. HwInitData.HwInitializationDataSize = sizeof( HwInitData );
  174. HwInitData.HwInterrupt = (PHW_INTERRUPT)HwInterrupt;
  175. HwInitData.HwReceivePacket = AdapterReceivePacket;
  176. HwInitData.HwCancelPacket = AdapterCancelPacket;
  177. HwInitData.HwRequestTimeoutHandler = AdapterTimeoutPacket;
  178. HwInitData.DeviceExtensionSize = sizeof( HW_DEVICE_EXTENSION );
  179. HwInitData.PerRequestExtensionSize = sizeof( SRB_EXTENSION );
  180. HwInitData.PerStreamExtensionSize = sizeof( STREAMEX );
  181. HwInitData.FilterInstanceExtensionSize = 0;
  182. HwInitData.BusMasterDMA = TRUE;
  183. HwInitData.Dma24BitAddresses = FALSE;
  184. HwInitData.BufferAlignment = 4;
  185. HwInitData.TurnOffSynchronization = FALSE;
  186. HwInitData.DmaBufferSize = DMASIZE;
  187. return( StreamClassRegisterMinidriver( (PVOID)DriverObject,
  188. (PVOID)RegistryPath,
  189. &HwInitData ) );
  190. }
  191. // Quiet compiler on bogus code: should use placement operator new instead
  192. #pragma warning(push)
  193. #pragma warning(disable:4701)
  194. // Set vtbl into HW_DEVICE_EXTENSION.
  195. BOOL InitialHwDevExt( PHW_DEVICE_EXTENSION pHwDevExt )
  196. {
  197. CMPEGBoardHAL temp1;
  198. CMPEGBoard temp2;
  199. CMPEGBoardState temp3;
  200. CDVDStream temp4;
  201. CTransfer temp5;
  202. CWDMKernelService temp6;
  203. CDataXferEvent temp7;
  204. CTickTime pttime;
  205. #ifdef REARRANGEMENT
  206. CScheduleData pschd;
  207. #endif REARRANGEMENT
  208. CCQueue temp8;
  209. CUserDataEvent temp9;
  210. CVSyncEvent tempa;
  211. CTVControl tempb;
  212. HlightControl tempc;
  213. #ifndef REARRANGEMENT
  214. CScheduleData *pschd = new CScheduleData;
  215. #endif REARRANGEMENT
  216. pHwDevExt->m_InitComplete = FALSE;
  217. RtlCopyMemory( &(pHwDevExt->mphal), &temp1, sizeof(CMPEGBoardHAL) );
  218. RtlCopyMemory( &(pHwDevExt->mpboard), &temp2, sizeof(CMPEGBoard) );
  219. RtlCopyMemory( &(pHwDevExt->mpbstate), &temp3, sizeof(CMPEGBoardState) );
  220. RtlCopyMemory( &(pHwDevExt->dvdstrm), &temp4, sizeof(CDVDStream) );
  221. RtlCopyMemory( &(pHwDevExt->transfer), &temp5, sizeof(CTransfer) );
  222. RtlCopyMemory( &(pHwDevExt->kserv), &temp6, sizeof(CWDMKernelService) );
  223. RtlCopyMemory( &(pHwDevExt->senddata), &temp7, sizeof(CDataXferEvent) );
  224. RtlCopyMemory( &(pHwDevExt->ticktime), &pttime, sizeof(CTickTime) );
  225. #ifndef REARRANGEMENT
  226. RtlCopyMemory( &(pHwDevExt->scheduler), pschd, sizeof(CScheduleData) );
  227. #else
  228. RtlCopyMemory( &(pHwDevExt->scheduler), &pschd, sizeof(CScheduleData) );
  229. #endif REARRANGEMENT
  230. RtlCopyMemory( &(pHwDevExt->ccque), &temp8, sizeof(CCQueue) );
  231. RtlCopyMemory( &(pHwDevExt->userdata), &temp9, sizeof(CUserDataEvent) );
  232. RtlCopyMemory( &(pHwDevExt->vsync), &tempa, sizeof(CVSyncEvent) );
  233. RtlCopyMemory( &(pHwDevExt->tvctrl), &tempb, sizeof(CTVControl) );
  234. RtlCopyMemory( &(pHwDevExt->m_HlightControl), &tempc, sizeof(HlightControl) );
  235. #ifndef REARRANGEMENT
  236. delete pschd;
  237. #endif REARRANGEMENT
  238. return TRUE;
  239. }
  240. #pragma warning(pop)
  241. BOOL GetPCIConfigSpace( IN PHW_STREAM_REQUEST_BLOCK pSrb )
  242. {
  243. PPORT_CONFIGURATION_INFORMATION ConfigInfo = pSrb->CommandData.ConfigInfo;
  244. PHW_DEVICE_EXTENSION pHwDevExt = (PHW_DEVICE_EXTENSION)ConfigInfo->HwDeviceExtension;
  245. DBG_PRINTF( ("DVDWDM:HeDevExt=%08x\n\r", pHwDevExt ) );
  246. if( !StreamClassReadWriteConfig( pSrb->HwDeviceExtension,
  247. TRUE, (PVOID)&pHwDevExt->PciConfigSpace, 0, 64 ) ){ // Read
  248. DBG_PRINTF( ( "DVDWDM:No PCI ConfigArea!!\n\r") );
  249. DBG_BREAK();
  250. return( FALSE );
  251. }else{
  252. ULONG i, j;
  253. for( i=0; i<64; ){
  254. DBG_PRINTF( ( "DVDWDM:PCI Data: ") );
  255. for( j=0;j<8 && i<64; j++,i++ ){
  256. DBG_PRINTF( ( "0x%02x ", (UCHAR)*(((PUCHAR)&pHwDevExt->PciConfigSpace)+i)) );
  257. }
  258. DBG_PRINTF( ( "\n\r") );
  259. }
  260. }
  261. DWORD Id = *(DWORD *)(&pHwDevExt->PciConfigSpace);
  262. pHwDevExt->kserv.InitConfig( Id );
  263. return( TRUE );
  264. }
  265. BOOL SetInitialize( IN PHW_STREAM_REQUEST_BLOCK pSrb )
  266. {
  267. PPORT_CONFIGURATION_INFORMATION ConfigInfo = pSrb->CommandData.ConfigInfo;
  268. PHW_DEVICE_EXTENSION pHwDevExt = (PHW_DEVICE_EXTENSION)(ConfigInfo->HwDeviceExtension);
  269. // NTSTATUS Status;
  270. BOOL bTVct=FALSE;
  271. if( ConfigInfo->NumberOfAccessRanges<1 ){
  272. DBG_PRINTF( ( "DVDWDM:Illegal Config info\n\r") );
  273. DBG_BREAK();
  274. return( FALSE );
  275. }
  276. // Debug Dump ConfigInfo
  277. DBG_PRINTF( ( "DVDWDM: Port = 0x%04x\n\r", ConfigInfo->AccessRanges[0].RangeStart.LowPart) );
  278. DBG_PRINTF( ( "DVDWDM: Length = 0x%04x\n\r", ConfigInfo->AccessRanges[0].RangeLength) );
  279. DBG_PRINTF( ( "DVDWDM: IRQ = 0x%04x\n\r", ConfigInfo->BusInterruptLevel) );
  280. DBG_PRINTF( ( "DVDWDM: Vector = 0x%04x\n\r", ConfigInfo->BusInterruptVector) );
  281. DBG_PRINTF( ( "DVDWDM: DMA = 0x%04x\n\r", ConfigInfo->DmaChannel) );
  282. // Initialize the size of stream descriptor information.
  283. ConfigInfo->StreamDescriptorSize =
  284. STREAMNUM * sizeof(HW_STREAM_INFORMATION) + sizeof(HW_STREAM_HEADER);
  285. pHwDevExt->ioBaseLocal = (PUCHAR)ConfigInfo->AccessRanges[0].RangeStart.LowPart;
  286. pHwDevExt->Irq = ConfigInfo->BusInterruptLevel;
  287. DBG_PRINTF( ("DVDWDM:I/O-Base = %08x\n\r", pHwDevExt->ioBaseLocal ) );
  288. DBG_PRINTF( ("DVDWDM:Irq = %08x\n\r", pHwDevExt->Irq ) );
  289. /********* 98.12.22 H.Yagi
  290. // Read Machine information from Registry.
  291. UNICODE_STRING RegPath;
  292. UNICODE_STRING IdString;
  293. ANSI_STRING AnsiRegPath;
  294. ANSI_STRING AnsiIdString;
  295. // BYTE IdByte[100];
  296. RTL_QUERY_REGISTRY_TABLE Table[2];
  297. // DBG_BREAK();
  298. RtlInitUnicodeString( &RegPath, L"\\Registry\\Machine\\Enum\\Root\\*PNP0C01\\0000");
  299. RtlInitAnsiString( &AnsiRegPath, "\\Registry\\Machine\\Enum\\Root\\*PNP0C01\\0000");
  300. IdString.Length = 0;
  301. IdString.MaximumLength = 200;
  302. IdString.Buffer = (PWSTR)ExAllocatePool( PagedPool, IdString.MaximumLength);
  303. if( IdString.Buffer==NULL ){
  304. DBG_PRINTF( ("DVDINIT:Mem Alloc Error\n\r") );
  305. DBG_BREAK();
  306. }
  307. AnsiIdString.Length = 0;
  308. AnsiIdString.MaximumLength = 100;
  309. AnsiIdString.Buffer = (PCHAR)ExAllocatePool( PagedPool, IdString.MaximumLength);
  310. if( AnsiIdString.Buffer==NULL ){
  311. DBG_PRINTF( ("DVDINIT:Mem Alloc Error\n\r") );
  312. DBG_BREAK();
  313. }
  314. RtlZeroMemory( Table, sizeof(Table) );
  315. Table[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
  316. RTL_QUERY_REGISTRY_REQUIRED;
  317. Table[0].Name = L"BIOSVersion";
  318. Table[0].EntryContext = &IdString;
  319. Table[0].DefaultType = REG_SZ;
  320. Table[0].DefaultData = &RegPath;
  321. Table[0].DefaultLength = 0;
  322. Status = RtlQueryRegistryValues( RTL_REGISTRY_ABSOLUTE,
  323. RegPath.Buffer,
  324. Table,
  325. NULL,
  326. NULL );
  327. DBG_PRINTF( ("DVDINIT:Machine ID Check Status = 0x%08x\n\r", Status ) );
  328. if( NT_SUCCESS( Status ) ){
  329. RtlUnicodeStringToAnsiString( &AnsiIdString, &IdString, FALSE );
  330. // DBG_PRINTF( ("DVDINIT:Machine ID(Unicode) = %s\n\r", IdString.Buffer ) );
  331. DBG_PRINTF( ("DVDINIT:Machine ID(Ansi) = %s\n\r", AnsiIdString.Buffer ) );
  332. }else{
  333. // check NT5 Registry
  334. RtlInitUnicodeString( &RegPath, L"\\Registry\\Machine\\HARDWARE\\DESCRIPTION\\System");
  335. RtlZeroMemory( Table, sizeof(Table) );
  336. Table[0].Flags = RTL_QUERY_REGISTRY_DIRECT |
  337. RTL_QUERY_REGISTRY_REQUIRED;
  338. Table[0].Name = L"SystemBiosVersion";
  339. Table[0].EntryContext = &IdString;
  340. Table[0].DefaultType = REG_MULTI_SZ;
  341. Table[0].DefaultData = &RegPath;
  342. Table[0].DefaultLength = 0;
  343. Status = RtlQueryRegistryValues( RTL_REGISTRY_ABSOLUTE,
  344. RegPath.Buffer,
  345. Table,
  346. NULL,
  347. NULL );
  348. DBG_PRINTF( ("DVDINIT:Binary Check Status = 0x%08x\n\r", Status ) );
  349. if( NT_SUCCESS( Status ) ){
  350. RtlUnicodeStringToAnsiString( &AnsiIdString, &IdString, FALSE );
  351. // DBG_PRINTF( ("DVDINIT:Machine ID(Unicode) = %s\n\r", IdString.Buffer ) );
  352. DBG_PRINTF( ("DVDINIT:Machine ID(Ansi) = %s\n\r", AnsiIdString.Buffer ) );
  353. }else{
  354. DBG_PRINTF( ("DVDINIT:Machine ID Read Error!\n\r") );
  355. DBG_BREAK();
  356. }
  357. }
  358. ***********/
  359. // Not checking Registry BIOSVersion, so we deal with Portege7000 as Tecra8000.
  360. // Pass the string 'TECRA' to KernelService object.
  361. ANSI_STRING AnsiIdString;
  362. AnsiIdString.Buffer="TECRA\0";
  363. //
  364. if( !( pHwDevExt->mpboard.Init() ) ||
  365. !( pHwDevExt->mpbstate.Init() ) ||
  366. !( pHwDevExt->dvdstrm.Init() ) ||
  367. !( pHwDevExt->transfer.Init() ) ){
  368. DBG_PRINTF( ("DVDWDM:Initialize objects error!\n\r") );
  369. // DBG_BREAK();
  370. return( FALSE );
  371. }
  372. pHwDevExt->mphal.Init( WrapperType_WDM ); // WrapperType
  373. pHwDevExt->kserv.Init( (DWORD)(pHwDevExt->ioBaseLocal), pHwDevExt, AnsiIdString.Buffer );
  374. // Setup kernel service object to hal object.
  375. pHwDevExt->mphal.SetKernelService( &(pHwDevExt->kserv ) );
  376. // Setup CMPEGBoard object.
  377. pHwDevExt->mpboard.SetHALObjectInterface( &(pHwDevExt->mphal) );
  378. pHwDevExt->mpboard.AddStreamObjectInterface( &(pHwDevExt->dvdstrm) );
  379. // Setup CBaseStream objects.
  380. pHwDevExt->dvdstrm.SetStateObject( &(pHwDevExt->mpbstate) );
  381. pHwDevExt->dvdstrm.SetTransferObject( &(pHwDevExt->transfer) );
  382. // Register data xfer event object to transfer object.
  383. pHwDevExt->transfer.SetSink( &(pHwDevExt->senddata) );
  384. // Register vsync event object to transfer object.
  385. pHwDevExt->vsync.Init( pHwDevExt );
  386. // pHwDevExt->mphal.SetSinkWrapper( &(pHwDevExt->vsync) ); // commented out this line,
  387. // SetsinkWrapper and UnsetSinkWrapper
  388. // dynamically, cause of MS bug?
  389. // stream State init
  390. pHwDevExt->StreamState = StreamState_Off;
  391. // Clear CppFlagCount 99.01.07 H.Yagi
  392. pHwDevExt->CppFlagCount = 0;
  393. // Ask and Set DMA buffer address & size to HAL.
  394. // DBG_BREAK();
  395. STREAM_PHYSICAL_ADDRESS adr;
  396. DWORD size, flag;
  397. DWORD PAdr, LAdr;
  398. ULONG Length;
  399. pHwDevExt->mphal.QueryDMABufferSize( &size, &flag );
  400. if( size>DMASIZE ){
  401. DBG_PRINTF( ("DVDWDM:Not enough DMA memory\n\r") );
  402. DBG_BREAK();
  403. return( FALSE);
  404. }
  405. if( size!=0 ){
  406. LAdr = (DWORD)StreamClassGetDmaBuffer( pHwDevExt );
  407. adr = StreamClassGetPhysicalAddress( pHwDevExt, NULL, (PVOID)LAdr, DmaBuffer, &Length );
  408. PAdr = (DWORD)adr.LowPart;
  409. pHwDevExt->mphal.SetDMABuffer( LAdr, PAdr );
  410. }
  411. bTVct = pHwDevExt->tvctrl.Initialize( );
  412. pHwDevExt->m_bTVct = bTVct;
  413. pHwDevExt->m_HlightControl.Init( pHwDevExt );
  414. /************** 98.12.22 H.Yagi
  415. if( IdString.Buffer!=NULL){
  416. ExFreePool( IdString.Buffer );
  417. }
  418. if( AnsiIdString.Buffer!=NULL){
  419. ExFreePool( AnsiIdString.Buffer );
  420. }
  421. *********************/
  422. pHwDevExt->m_InitComplete = TRUE;
  423. return( TRUE );
  424. }
  425. BOOL HwInitialize( IN PHW_STREAM_REQUEST_BLOCK pSrb )
  426. {
  427. HALTYPE HType; // add by H.Yagi 1999.04.21
  428. PHW_DEVICE_EXTENSION pHwDevExt = (PHW_DEVICE_EXTENSION)(pSrb->HwDeviceExtension);
  429. // No procedure in this routine, because I will set PowerOn to ZiVA
  430. // when Video stream is opend.
  431. // Now I Check Vendr-ID & Device-ID using kserv method.
  432. // Vender-ID
  433. pHwDevExt->kserv.GetPCIConfigData( 0x00, &(pHwDevExt->VenderID) );
  434. // Device-ID
  435. pHwDevExt->kserv.GetPCIConfigData( 0x02, &(pHwDevExt->DeviceID) );
  436. // Sub Vender-ID
  437. pHwDevExt->kserv.GetPCIConfigData( 0x2C, &(pHwDevExt->SubVenderID) );
  438. // Sub Device-ID
  439. pHwDevExt->kserv.GetPCIConfigData( 0x2E, &(pHwDevExt->SubDeviceID) );
  440. DBG_PRINTF( ("DVDWDM:Vender ID = 0x%04x\n\r", pHwDevExt->VenderID ) );
  441. DBG_PRINTF( ("DVDWDM:Sub-Vender ID = 0x%04x\n\r", pHwDevExt->SubVenderID ) );
  442. DBG_PRINTF( ("DVDWDM:Device ID = 0x%04x\n\r", pHwDevExt->DeviceID ) );
  443. DBG_PRINTF( ("DVDWDM:Sub-Device ID = 0x%04x\n\r", pHwDevExt->SubDeviceID ) );
  444. pHwDevExt->m_PCID = PC_TECRA750;
  445. if( (pHwDevExt->VenderID==0x1179) && (pHwDevExt->DeviceID==0x0407) ){
  446. switch( pHwDevExt->SubDeviceID ){
  447. case 0x0001:
  448. pHwDevExt->m_PCID = PC_TECRA750;
  449. break;
  450. case 0x0003:
  451. pHwDevExt->m_PCID = PC_TECRA780;
  452. break;
  453. }
  454. }else if( (pHwDevExt->VenderID==0x123f) && (pHwDevExt->DeviceID==0x8888) ){
  455. switch( pHwDevExt->SubDeviceID ){
  456. case 0x0001:
  457. pHwDevExt->m_PCID = PC_TECRA8000;
  458. break;
  459. case 0x0002:
  460. pHwDevExt->m_PCID = PC_PORTEGE7000;
  461. break;
  462. default:
  463. pHwDevExt->m_PCID = PC_PORTEGE7000; // PC_TECRA8000 is also OK.
  464. break;
  465. }
  466. }
  467. // check HAL Type & driver itself.
  468. pHwDevExt->mphal.GetHALType( &HType );
  469. DBG_PRINTF( ("DVDWDM: HALTYPE = %d\n\r", HType ) );
  470. // TECRA750/780 == HalType_ZIVA
  471. if( pHwDevExt->m_PCID==PC_TECRA750 || pHwDevExt->m_PCID==PC_TECRA780 ){
  472. DBG_PRINTF( ("DVDWDM: PC is TECRA750/780\n\r" ) );
  473. if( HType!=HalType_ZIVA ){
  474. return( FALSE );
  475. }
  476. }
  477. // TECRA8000/Portege7000 == HalType_ZIVAPC
  478. if( pHwDevExt->m_PCID==PC_PORTEGE7000 || pHwDevExt->m_PCID==PC_TECRA8000 ){
  479. DBG_PRINTF( ("DVDWDM: PC is TECRA8000/Portege70000\n\r" ) );
  480. if( HType!=HalType_ZIVAPC ){
  481. return( FALSE );
  482. }
  483. }
  484. // This setting is temporary.
  485. // Note that this informations must be read from registry!!
  486. // But there is no way to get registry information from minidriver.
  487. // So, Now I set the default value directry.
  488. pHwDevExt->m_AC3LowBoost = 0x80;
  489. pHwDevExt->m_AC3HighCut = 0x80;
  490. pHwDevExt->m_AC3OperateMode = 0x00;
  491. if( !InitialSetting( pSrb ) ){ // Initial setting except
  492. return( FALSE ); // H/W default value.
  493. }
  494. //// Check TVALD.sys is available or not( TECRA8000 or PORTEGE7000 only ).
  495. //// If tvald.sys is not available, not start TOSDVD.sys. 99.03.01
  496. #ifndef TVALD
  497. if(Dbg_Tvald == 0)
  498. {
  499. if( (pHwDevExt->m_PCID==PC_TECRA8000) || (pHwDevExt->m_PCID==PC_PORTEGE7000) )
  500. {
  501. if( pHwDevExt->m_bTVct==FALSE ){
  502. return( FALSE );
  503. }
  504. }
  505. }
  506. #endif
  507. return( TRUE );
  508. }
  509. //--- 98.05.27 S.Watanabe
  510. NTSTATUS GetConfigValue(
  511. IN PWSTR ValueName,
  512. IN ULONG ValueType,
  513. IN PVOID ValueData,
  514. IN ULONG ValueLength,
  515. IN PVOID Context,
  516. IN PVOID EntryContext
  517. )
  518. {
  519. NTSTATUS ntStatus = STATUS_SUCCESS;
  520. DBG_PRINTF(( "Type 0x%x, Length 0x%x\n\r", ValueType, ValueLength ));
  521. switch( ValueType ) {
  522. case REG_DWORD:
  523. *(PVOID*)EntryContext = *(PVOID*)ValueData;
  524. break;
  525. case REG_BINARY:
  526. RtlCopyMemory( EntryContext, ValueData, ValueLength );
  527. break;
  528. default:
  529. ntStatus = STATUS_INVALID_PARAMETER;
  530. }
  531. return ntStatus;
  532. }
  533. //--- End.
  534. BOOL InitialSetting( IN PHW_STREAM_REQUEST_BLOCK pSrb )
  535. {
  536. PHW_DEVICE_EXTENSION pHwDevExt = (PHW_DEVICE_EXTENSION)(pSrb->HwDeviceExtension);
  537. DWORD AProp;
  538. DWORD dProp1, dProp2, dProp3;
  539. //--- 99.01.13 S.Watanabe
  540. // // Display Device type
  541. // // Currently I will set it directly, but I will read this setting
  542. // // from registry and user will be able to change this setting in the
  543. // // near future. 98.12.23 H.Yagi
  544. // pHwDevExt->m_DisplayDevice = DisplayDevice_Wide; // LCD output take priority
  545. //--- End.
  546. // AC-3 Dynamic Range control
  547. AProp = pHwDevExt->m_AC3LowBoost;
  548. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_AC3DRangeLowBoost, &AProp ) ){
  549. DBG_PRINTF( ("DVDWDM:AC3 Low Boost Error\n\r") );
  550. DBG_BREAK();
  551. return( FALSE );
  552. }
  553. AProp = pHwDevExt->m_AC3HighCut;
  554. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_AC3DRangeHighCut, &AProp ) ){
  555. DBG_PRINTF( ("DVDWDM:AC3 High Cut Error\n\r") );
  556. DBG_BREAK();
  557. return( FALSE );
  558. }
  559. // AC-3 Operational mode
  560. AProp = pHwDevExt->m_AC3OperateMode;
  561. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_AC3OperateMode, &AProp ) ){
  562. DBG_PRINTF( ("DVDWDM:AC3 Operate Mode Error\n\r") );
  563. DBG_BREAK();
  564. return( FALSE );
  565. }
  566. //--- 98.05.27 S.Watanabe
  567. Digital_Palette dp;
  568. NTSTATUS status;
  569. //--- 99.01.13 S.Watanabe
  570. // RTL_QUERY_REGISTRY_TABLE Table[6];
  571. RTL_QUERY_REGISTRY_TABLE Table[7];
  572. //--- End.
  573. DWORD TVOut = 0; // 99.02.03 H.Yagi
  574. DWORD AudioOut = 0;
  575. //--- 99.01.13 S.Watanabe
  576. DWORD VOutDev = SSIF_DISPMODE_VGA;
  577. //--- End.
  578. DWORD defaultTVOut = 0; // 99.02.03 H.Yagi
  579. DWORD defaultAudioOut = 0;
  580. //--- 99.01.13 S.Watanabe
  581. DWORD defaultVOutDev = SSIF_DISPMODE_VGA;
  582. //--- End.
  583. RtlZeroMemory( Table, sizeof(Table) );
  584. Table[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
  585. Table[0].Name = L"AnalogVideoOut";
  586. Table[0].EntryContext = &TVOut;
  587. Table[0].DefaultType = REG_DWORD;
  588. Table[0].DefaultData = &defaultTVOut;
  589. Table[0].DefaultLength = sizeof(DWORD);
  590. Table[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
  591. Table[1].Name = L"DigitalAudioOut";
  592. Table[1].EntryContext = &AudioOut;
  593. Table[1].DefaultType = REG_DWORD;
  594. Table[1].DefaultData = &defaultAudioOut;
  595. Table[1].DefaultLength = sizeof(DWORD);
  596. // DefaultType = REG_BINARY �̏ꍇ�AFlags = RTL_QUERY_REGISTRY_DIRECT �ŌĂяo���Ǝ��s����
  597. // GetConfigValue �R�[���o�b�N���[�`�����Ăяo���悤�ɂ������Ńf�[�^�R�s�[���s��
  598. Table[2].QueryRoutine = GetConfigValue;
  599. Table[2].Flags = 0;
  600. Table[2].Name = L"PaletteY";
  601. Table[2].EntryContext = PaletteY;
  602. Table[2].DefaultType = REG_BINARY;
  603. Table[2].DefaultData = PaletteY;
  604. Table[2].DefaultLength = sizeof(PaletteY);
  605. Table[3].QueryRoutine = GetConfigValue;
  606. Table[3].Flags = 0;
  607. Table[3].Name = L"PaletteCb";
  608. Table[3].EntryContext = PaletteCb;
  609. Table[3].DefaultType = REG_BINARY;
  610. Table[3].DefaultData = PaletteCb;
  611. Table[3].DefaultLength = sizeof(PaletteCb);
  612. Table[4].QueryRoutine = GetConfigValue;
  613. Table[4].Flags = 0;
  614. Table[4].Name = L"PaletteCr";
  615. Table[4].EntryContext = PaletteCr;
  616. Table[4].DefaultType = REG_BINARY;
  617. Table[4].DefaultData = PaletteCr;
  618. Table[4].DefaultLength = sizeof(PaletteCr);
  619. //--- 99.01.13 S.Watanabe
  620. Table[5].QueryRoutine = GetConfigValue;
  621. Table[5].Flags = 0;
  622. Table[5].Name = L"PriorityDisplayMode";
  623. Table[5].EntryContext = &VOutDev;
  624. Table[5].DefaultType = REG_DWORD;
  625. Table[5].DefaultData = &defaultVOutDev;
  626. Table[5].DefaultLength = sizeof(VOutDev);
  627. //--- End.
  628. // Table[6] �͂��ׂ� 0�A�I�[
  629. status = RtlQueryRegistryValues(
  630. RTL_REGISTRY_SERVICES,
  631. REGPATH_FOR_WDM,
  632. Table,
  633. NULL,
  634. NULL
  635. );
  636. DBG_PRINTF(( "status : 0x%x\n\r", status ));
  637. DBG_PRINTF(( "TVOut : %d, AudioOut : %d\n\r", TVOut, AudioOut ));
  638. if( TVOut == 0 )
  639. dProp1 = OutputSource_VGA;
  640. else
  641. dProp1 = OutputSource_DVD;
  642. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_OutputSource, &dProp1 ) ) {
  643. DBG_PRINTF( ("DVDWDM:Set VideoProperty_OutputSource Error\n\r") );
  644. DBG_BREAK();
  645. return( FALSE );
  646. }
  647. pHwDevExt->m_OutputSource = dProp1;
  648. if( AudioOut == 2 )
  649. dProp1 = AudioDigitalOut_On;
  650. else if( AudioOut == 1 )
  651. dProp1 = AudioDigitalOut_On;
  652. else
  653. dProp1 = AudioDigitalOut_Off;
  654. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_DigitalOut, &dProp1 ) ) {
  655. DBG_PRINTF( ("DVDWDM:Set AudioProperty_DigitalOut Error\n\r") );
  656. DBG_BREAK();
  657. return( FALSE );
  658. }
  659. pHwDevExt->m_AudioDigitalOut = dProp1;
  660. if( AudioOut == 2 ) {
  661. dProp1 = AudioOut_Decoded;
  662. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_AudioOut, &dProp1 ) ) {
  663. DBG_PRINTF( ("DVDWDM:Set AudioProperty_AudioOut Error\n\r") );
  664. DBG_BREAK();
  665. return( FALSE );
  666. }
  667. }
  668. else if( AudioOut == 1 ) {
  669. dProp1 = AudioOut_Encoded;
  670. if( !pHwDevExt->dvdstrm.SetAudioProperty( AudioProperty_AudioOut, &dProp1 ) ) {
  671. DBG_PRINTF( ("DVDWDM:Set AudioProperty_AudioOut Error\n\r") );
  672. DBG_BREAK();
  673. return( FALSE );
  674. }
  675. }
  676. pHwDevExt->m_AudioEncode = dProp1;
  677. dp.Select = Video_Palette_Y;
  678. dp.pPalette = PaletteY;
  679. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_DigitalPalette, &dp ) ) {
  680. DBG_PRINTF( ("DVDWDM:Set VideoProperty_DigitalPalette(Y) Error\n\r") );
  681. DBG_BREAK();
  682. return( FALSE );
  683. }
  684. dp.Select = Video_Palette_Cb;
  685. dp.pPalette = PaletteCb;
  686. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_DigitalPalette, &dp ) ) {
  687. DBG_PRINTF( ("DVDWDM:Set VideoProperty_DigitalPalette(Cb) Error\n\r") );
  688. DBG_BREAK();
  689. return( FALSE );
  690. }
  691. dp.Select = Video_Palette_Cr;
  692. dp.pPalette = PaletteCr;
  693. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_DigitalPalette, &dp ) ) {
  694. DBG_PRINTF( ("DVDWDM:Set VideoProperty_DigitalPalette(Cr) Error\n\r") );
  695. DBG_BREAK();
  696. return( FALSE );
  697. }
  698. //--- End.
  699. //--- 99.01.13 S.Watanabe
  700. if( VOutDev == SSIF_DISPMODE_43TV )
  701. pHwDevExt->m_DisplayDevice = DisplayDevice_NormalTV;
  702. else if( VOutDev == SSIF_DISPMODE_169TV )
  703. pHwDevExt->m_DisplayDevice = DisplayDevice_WideTV;
  704. else
  705. pHwDevExt->m_DisplayDevice = DisplayDevice_VGA;
  706. //--- End.
  707. /////////////////////////////////////////////
  708. //--- 98.05.27 S.Watanabe
  709. // dProp1 = OutputSource_DVD;
  710. //--- End.
  711. dProp2 = CompositeOut_On;
  712. dProp3 = SVideoOut_On;
  713. //--- 98.05.27 S.Watanabe
  714. // if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_OutputSource, &dProp1 ) ){
  715. // DBG_PRINTF( ("DVDWDM:Set Video output Error\n\r") );
  716. // DBG_BREAK();
  717. // return( FALSE );
  718. // }
  719. //--- End.
  720. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_CompositeOut, &dProp2 ) ){
  721. DBG_PRINTF( ("DVDWDM:Set Composite Video output Error\n\r") );
  722. DBG_BREAK();
  723. return( FALSE );
  724. }
  725. pHwDevExt->m_CompositeOut = dProp2;
  726. if( !pHwDevExt->dvdstrm.SetVideoProperty( VideoProperty_SVideoOut, &dProp3 ) ){
  727. DBG_PRINTF( ("DVDWDM:Set S-Video output Error\n\r") );
  728. DBG_BREAK();
  729. return( FALSE );
  730. }
  731. pHwDevExt->m_SVideoOut = dProp3;
  732. return( TRUE );
  733. }