accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp
branchRCL_3
changeset 20 1ddbe54d0645
parent 19 94cb00198351
child 21 ccb4f6b3db21
equal deleted inserted replaced
19:94cb00198351 20:1ddbe54d0645
   540 					TPtrC8 dataBlockDes( iDataBlockPtr->iDataBlock, sizeof( *iDataBlockPtr ) );
   540 					TPtrC8 dataBlockDes( iDataBlockPtr->iDataBlock, sizeof( *iDataBlockPtr ) );
   541 
   541 
   542 					INFO_1( "Updating the Rawdata for the Block %d...", iCurrentBlock );
   542 					INFO_1( "Updating the Rawdata for the Block %d...", iCurrentBlock );
   543 					iEdidParserPtr->UpdateRawDataL(dataBlockDes);
   543 					iEdidParserPtr->UpdateRawDataL(dataBlockDes);
   544 					
   544 					
   545 					iCurrentBlock++;
       
   546 					if( inbrOfExtensions >= 2 )
   545 					if( inbrOfExtensions >= 2 )
   547 						{
   546 						{
   548  						inbrOfExtensions = inbrOfExtensions - 2;
   547  						inbrOfExtensions = inbrOfExtensions - 2;
   549 						}
   548 						}
   550 					else
   549 					else
   553 						}
   552 						}
   554   					}
   553   					}
   555 
   554 
   556 				if( inbrOfExtensions )
   555 				if( inbrOfExtensions )
   557 					{
   556 					{
       
   557 					iCurrentBlock++;
   558 					iRetryCounter = KErrNone;
   558 					iRetryCounter = KErrNone;
   559 					
   559 					
   560 					if( ReadEDIDDataL() != KErrNone )
   560 					if( ReadEDIDDataL() != KErrNone )
   561 						{
   561 						{
   562 						ResetData();
   562 						ResetData();
   585 								INFO_1( "CEA 861 extension is being read... at the index %d", i+1 );
   585 								INFO_1( "CEA 861 extension is being read... at the index %d", i+1 );
   586 								iEdidParserPtr->UpdateCea861ExtensionL( i + 1, iExtensionParserPtr );
   586 								iEdidParserPtr->UpdateCea861ExtensionL( i + 1, iExtensionParserPtr );
   587 								}
   587 								}
   588  							}
   588  							}
   589 						}
   589 						}
       
   590 					TRACE_EDID_DATA( *iEdidParserPtr );
       
   591 					
       
   592 					iFSM.Input( EPDEIfEDIDHandler, EPDEIfEDIDHandlerEventEdidDataFetched );
       
   593 					iRetryCounter = KErrNone;
   590 					}
   594 					}
   591 
       
   592 				TRACE_EDID_DATA( *iEdidParserPtr );
       
   593 				
       
   594 				iFSM.Input( EPDEIfEDIDHandler, EPDEIfEDIDHandlerEventEdidDataFetched );
       
   595 				iRetryCounter = KErrNone;
       
   596 				}
   595 				}
   597             else
   596             else
   598                 {
   597                 {
   599                 INFO_1( "CDdcPortAccess::Read failed, error code: %d", iStatus.Int() );
   598                 INFO_1( "CDdcPortAccess::Read failed, error code: %d", iStatus.Int() );
   600                 
   599                 
  1555 				}
  1554 				}
  1556 		    }
  1555 		    }
  1557 		    else // It is DVI connector
  1556 		    else // It is DVI connector
  1558 		    {
  1557 		    {
  1559 				TInt modecount = aHdmiConfigs.Count();
  1558 				TInt modecount = aHdmiConfigs.Count();
       
  1559 
       
  1560 				if( !modecount )
       
  1561 					{
       
  1562 					THdmiDviTimings timings;
       
  1563 					
       
  1564 					INFO( "==No EDID available from the Sink. Setting DMT 4" );
       
  1565 					// No EDID data available from the sink
       
  1566 					// Default VGA resolution should be selected
       
  1567 					const TTimingItem* item = TimingByIndex( KDefaultDMTModeIndex, ETimingModeDMT );
       
  1568 					if( item )
       
  1569 						{
       
  1570 						Mem::FillZ( ( TAny* )&timings, sizeof( timings ) );
       
  1571 						FillHdmiDviTimings( *item, timings );
       
  1572 						timings.iTvPhysicalImageAspectRatioNumerator = 4;
       
  1573 						timings.iTvPhysicalImageAspectRatioDenominator = 3;
       
  1574 						retVal = aHdmiConfigs.Append( timings );
       
  1575 						ERROR_1( retVal, "Failed to append DMT timing: %S in array", item->iTimingName );
       
  1576 						if( retVal == KErrNone )
       
  1577 							{
       
  1578 							modecount = 1;
       
  1579 							ceaMode = EFalse;
       
  1580 							}
       
  1581 						}
       
  1582 					}
  1560 				
  1583 				
  1561 				while( modecount-- )
  1584 				while( modecount-- )
  1562 				  {
  1585 				  {
  1563 
  1586 
  1564 				    if( aHdmiConfigs[ modecount ].iDmtMode && (EFalse == ceaMode) )
  1587 				    if( aHdmiConfigs[ modecount ].iDmtMode && (EFalse == ceaMode) )