298 |
300 |
299 return iVendorSpecificDataBlockSupported; |
301 return iVendorSpecificDataBlockSupported; |
300 } |
302 } |
301 |
303 |
302 // ---------------------------------------------------------------------------- |
304 // ---------------------------------------------------------------------------- |
|
305 // CCea861EdidParser::HasIEEERegistration |
|
306 // |
|
307 // ---------------------------------------------------------------------------- |
|
308 // |
|
309 EXPORT_C TBool CCea861EdidParser::HasIEEERegistration() |
|
310 { |
|
311 FUNC_LOG; |
|
312 |
|
313 if ( iVendorSpecificDataBlockSupported && iParsedInfo->iVendorSpecificData && |
|
314 iParsedInfo->iVendorSpecificData->iIEEE24bitRegistrationIdentifier == KIEEERegistrationID ) |
|
315 { |
|
316 return ETrue; |
|
317 } |
|
318 |
|
319 return EFalse; |
|
320 } |
|
321 |
|
322 // ---------------------------------------------------------------------------- |
303 // CCea861EdidParser::GetParsedInformation |
323 // CCea861EdidParser::GetParsedInformation |
304 // |
324 // |
305 // ---------------------------------------------------------------------------- |
325 // ---------------------------------------------------------------------------- |
306 // |
326 // |
307 EXPORT_C CCea861ExtEdidInformation* CCea861EdidParser::GetParsedInformation() |
327 EXPORT_C CCea861ExtEdidInformation* CCea861EdidParser::GetParsedInformation() |
575 |
595 |
576 if( aIndex > KEdidParserSizeOfEdidBlock ) |
596 if( aIndex > KEdidParserSizeOfEdidBlock ) |
577 { |
597 { |
578 return KErrOverflow; |
598 return KErrOverflow; |
579 } |
599 } |
|
600 |
|
601 TCEA861TEdidDescriptorBlockList* lastnode = iParsedInfo->iDescriptorBlocks; |
580 |
602 |
581 for( TInt index = aIndex; index < KEdidParserSizeOfEdidBlock; index++ ) |
603 for( TInt index = aIndex; index < KEdidParserSizeOfEdidBlock; index++ ) |
582 { |
604 { |
583 // Offset. If this is a newer version of CEA-861, |
605 // Offset. If this is a newer version of CEA-861, |
584 // then this is skipped (we are already past the offset) |
606 // then this is skipped (we are already past the offset) |
592 } |
614 } |
593 } |
615 } |
594 |
616 |
595 if( aData[index] != KEdidPaddingByte ) // padding = 0x00 |
617 if( aData[index] != KEdidPaddingByte ) // padding = 0x00 |
596 { |
618 { |
597 // start of 18-byte descriptors: See section 3.10.2 of VESA E-EDID Standard [10] |
619 // start of 18-byte descriptors: See section 3.10.2 of E-EDID Standard [10] |
598 |
|
599 TBool first = ETrue; |
|
600 if( iParsedInfo->iDescriptorBlocks == 0 ) |
|
601 { |
|
602 iParsedInfo->iDescriptorBlocks |
|
603 = new ( ELeave ) TCEA861TEdidDescriptorBlockList(); |
|
604 } |
|
605 |
|
606 // read the descriptors here |
620 // read the descriptors here |
607 TEdidDescriptorBlock tmp = GetDescriptorBlock( aData, index ); |
621 TEdidDescriptorBlock tmp = GetDescriptorBlock( aData, index ); |
608 if( first ) |
622 |
609 { |
623 if( iParsedInfo->iDescriptorBlocks == 0 ) |
610 first = EFalse; |
624 { |
611 iParsedInfo->iDescriptorBlocks->iData = tmp; |
625 iParsedInfo->iDescriptorBlocks = new ( ELeave ) TCEA861TEdidDescriptorBlockList(); |
612 continue; |
626 lastnode = iParsedInfo->iDescriptorBlocks; |
613 } |
627 } |
614 TCEA861TEdidDescriptorBlockList* last = |
628 else |
615 iParsedInfo->iDescriptorBlocks; |
629 { |
616 while( last->iNext != 0 ) // go to last block |
630 lastnode->iNext = new ( ELeave ) TCEA861TEdidDescriptorBlockList(); |
617 { |
631 lastnode = lastnode->iNext; |
618 last = last->iNext; |
632 } |
619 } |
633 lastnode->iData = tmp; |
620 last->iNext = new ( ELeave ) TCEA861TEdidDescriptorBlockList(); |
|
621 last = last->iNext; |
|
622 last->iData = tmp; |
|
623 } |
634 } |
624 else |
635 else |
625 { |
636 { |
626 // this is only padding, no need to do anything |
637 // this is only padding, no need to do anything |
627 } |
638 } |
1480 break; |
1491 break; |
1481 case 4: |
1492 case 4: |
1482 ReadCea861SpeakerAllocationDataBlock( aData, aIndex, L1 ); |
1493 ReadCea861SpeakerAllocationDataBlock( aData, aIndex, L1 ); |
1483 break; |
1494 break; |
1484 case 5: |
1495 case 5: |
1485 //VESA DTC Data Block |
1496 //DTC Data Block |
1486 ReadUnknownTagCode( aData, aIndex, L1 ); |
1497 ReadUnknownTagCode( aData, aIndex, L1 ); |
1487 break; |
1498 break; |
1488 case 6: |
1499 case 6: |
1489 //reserved |
1500 //reserved |
1490 ReadUnknownTagCode( aData, aIndex, L1 ); |
1501 ReadUnknownTagCode( aData, aIndex, L1 ); |
1505 } |
1516 } |
1506 else if( auxTag == 0x11 ) // Vendor-Specific Audio Data Block, see table 57 |
1517 else if( auxTag == 0x11 ) // Vendor-Specific Audio Data Block, see table 57 |
1507 { |
1518 { |
1508 } |
1519 } |
1509 // TODO: these should be read as well, not just as unknown |
1520 // TODO: these should be read as well, not just as unknown |
1510 ReadUnknownTagCode( aData, aIndex, L1 ); |
|
1511 break; |
|
1512 default: |
|
1513 // if tag-code is unknown, we still must read through it |
|
1514 ReadUnknownTagCode( aData, aIndex, L1 ); |
1521 ReadUnknownTagCode( aData, aIndex, L1 ); |
1515 break; |
1522 break; |
1516 } |
1523 } |
1517 |
1524 |
1518 return KErrNone; |
1525 return KErrNone; |