os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/teststepcisbcencoder.cpp
Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "teststepcisbcencoder.h"
18 /*****************************************************************************/
19 CTestStepCISbcEncoder::CTestStepCISbcEncoder()
21 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0020-HP");
24 /*****************************************************************************/
25 TVerdict CTestStepCISbcEncoder::DoTestStepL()
27 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
29 //Initialize - with the UID of our test HwDevice and try to get the interface
30 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
31 TUid testUID = {KUidSbcEncoderTestDevice};
33 TFourCC testUID('T','0','0','3');
36 MSbcEncoderIntfc* interface = NULL;
37 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
41 iTestStepResult = EPass;
42 INFO_PRINTF1(_L("Successfully retrieved the interface."));
46 iTestStepResult = EFail;
47 ERR_PRINTF1(_L("Failed to retrieve the interface"));
50 return iTestStepResult;
53 /****************************************************************************/
54 CTestStepCISbcEncoderGetSupportedFrequencies::CTestStepCISbcEncoderGetSupportedFrequencies()
56 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0021-HP");
59 TVerdict CTestStepCISbcEncoderGetSupportedFrequencies::DoTestStepL()
61 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
63 //Initialize - with the UID of our test HwDevice and try to get the interface
64 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
65 TUid testUID = {KUidSbcEncoderTestDevice};
67 TFourCC testUID('T','0','0','3');
70 MSbcEncoderIntfc* interface = NULL;
71 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
74 INFO_PRINTF1(_L("Getting the SBC Encoder's Supported Sampling Frequencies"));
76 RArray<TUint> frequencies;
77 CleanupClosePushL(frequencies);
78 TInt err = interface->GetSupportedSamplingFrequencies(frequencies);
80 // Data is hard coded in the test HwDevice implementation
81 // to add 10 values from 0 to 9000 in intervals of 1000.
82 TBool validValues = ValidateArray(frequencies);
83 if (err == KErrNone && validValues)
85 iTestStepResult = EPass;
86 INFO_PRINTF1(_L("Successfully got the frequencies."));
90 iTestStepResult = EFail;
91 ERR_PRINTF1(_L("Failed to get the frequencies"));
93 CleanupStack::PopAndDestroy(); // frequencies
97 iTestStepResult = EInconclusive;
98 INFO_PRINTF1(_L("Failed to retrieve the interface."));
101 return iTestStepResult;
105 TBool CTestStepCISbcEncoderGetSupportedFrequencies::ValidateArray(const RArray<TUint>& aArray) const
107 TBool iTestStepResult = ETrue;
109 TInt count = aArray.Count();
112 iTestStepResult = EFalse;
117 for (TInt i = 0; i < count; i++)
119 if (aArray[i] != val)
121 iTestStepResult = EFalse;
128 return iTestStepResult;
131 /****************************************************************************/
132 CTestStepCISbcEncoderGetSupportedSubbands::CTestStepCISbcEncoderGetSupportedSubbands()
134 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0023-HP");
137 TVerdict CTestStepCISbcEncoderGetSupportedSubbands::DoTestStepL()
139 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
141 //Initialize - with the UID of our test HwDevice and try to get the interface
142 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
143 TUid testUID = {KUidSbcEncoderTestDevice};
145 TFourCC testUID('T','0','0','3');
148 MSbcEncoderIntfc* interface = NULL;
149 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
152 INFO_PRINTF1(_L("Getting the SBC Encoder's Number Of Subbands"));
154 RArray<TUint> subbands;
155 CleanupClosePushL(subbands);
156 TInt err = interface->GetSupportedNumOfSubbands(subbands);
158 // Data is hard coded in the test HwDevice implementation
159 // to add 5 values from 100 to 500 in intervals of 100.
160 TBool validValues = ValidateArray(subbands);
161 if (err == KErrNone && validValues)
163 iTestStepResult = EPass;
164 INFO_PRINTF1(_L("Successfully got the subbands."));
168 iTestStepResult = EFail;
169 ERR_PRINTF1(_L("Failed to get the subbands"));
171 CleanupStack::PopAndDestroy(); // subbands
175 iTestStepResult = EInconclusive;
176 INFO_PRINTF1(_L("Failed to retrieve the interface."));
179 return iTestStepResult;
183 TBool CTestStepCISbcEncoderGetSupportedSubbands::ValidateArray(const RArray<TUint>& aArray) const
185 TBool iTestStepResult = ETrue;
187 TInt count = aArray.Count();
190 iTestStepResult = EFalse;
195 for (TInt i = 0; i < count; i++)
197 if (aArray[i] != val)
199 iTestStepResult = EFalse;
206 return iTestStepResult;
209 /****************************************************************************/
210 CTestStepCISbcEncoderGetSupportedNumOfBlocks::CTestStepCISbcEncoderGetSupportedNumOfBlocks()
212 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0025-HP");
215 TVerdict CTestStepCISbcEncoderGetSupportedNumOfBlocks::DoTestStepL()
217 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
219 //Initialize - with the UID of our test HwDevice and try to get the interface
220 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
221 TUid testUID = {KUidSbcEncoderTestDevice};
223 TFourCC testUID('T','0','0','3');
226 MSbcEncoderIntfc* interface = NULL;
227 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
230 INFO_PRINTF1(_L("Getting the SBC Encoder's Number Of Supported Blocks"));
232 RArray<TUint> blocks;
233 CleanupClosePushL(blocks);
234 TInt err = interface->GetSupportedNumOfBlocks(blocks);
236 // Data is hard coded in the test HwDevice implementation
237 // to add 10 values from 1 to 10
238 TBool validValues = ValidateArray(blocks);
239 if (err == KErrNone && validValues)
241 iTestStepResult = EPass;
242 INFO_PRINTF1(_L("Successfully got the blocks."));
246 iTestStepResult = EFail;
247 ERR_PRINTF1(_L("Failed to get the blocks"));
249 CleanupStack::PopAndDestroy(); // blocks
253 iTestStepResult = EInconclusive;
254 INFO_PRINTF1(_L("Failed to retrieve the interface."));
257 return iTestStepResult;
261 TBool CTestStepCISbcEncoderGetSupportedNumOfBlocks::ValidateArray(const RArray<TUint>& aArray) const
263 TBool iTestStepResult = ETrue;
265 TInt count = aArray.Count();
268 iTestStepResult = EFalse;
273 for (TInt i = 0; i < count; i++)
275 if (aArray[i] != val)
277 iTestStepResult = EFalse;
284 return iTestStepResult;
287 /****************************************************************************/
288 CTestStepCISbcEncoderGetSupportedChannelModes::CTestStepCISbcEncoderGetSupportedChannelModes()
290 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0022-HP");
293 TVerdict CTestStepCISbcEncoderGetSupportedChannelModes::DoTestStepL()
295 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
297 //Initialize - with the UID of our test HwDevice and try to get the interface
298 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
299 TUid testUID = {KUidSbcEncoderTestDevice};
301 TFourCC testUID('T','0','0','3');
304 MSbcEncoderIntfc* interface = NULL;
305 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
308 INFO_PRINTF1(_L("Getting the SBC Encoder's Supported Channel Modes"));
310 RArray<MSbcEncoderIntfc::TSbcChannelMode> modes;
311 CleanupClosePushL(modes);
312 TInt err = interface->GetSupportedChannelModes(modes);
314 // Data is hard coded in the test HwDevice implementation
315 // to add the 4 available values
316 TBool validValues = ValidateArray(modes);
317 if (err == KErrNone && validValues)
319 iTestStepResult = EPass;
320 INFO_PRINTF1(_L("Successfully got the supported modes."));
324 iTestStepResult = EFail;
325 ERR_PRINTF1(_L("Failed to get the supported modes"));
327 CleanupStack::PopAndDestroy(); // modes
331 iTestStepResult = EInconclusive;
332 INFO_PRINTF1(_L("Failed to retrieve the interface."));
335 return iTestStepResult;
339 TBool CTestStepCISbcEncoderGetSupportedChannelModes::ValidateArray(const RArray<MSbcEncoderIntfc::TSbcChannelMode>& aArray) const
341 TBool iTestStepResult = ETrue;
343 TInt count = aArray.Count();
346 iTestStepResult = EFalse;
350 if ((aArray[0] != MSbcEncoderIntfc::ESbcChannelMono) ||
351 (aArray[1] != MSbcEncoderIntfc::ESbcChannelDual) ||
352 (aArray[2] != MSbcEncoderIntfc::ESbcChannelStereo) ||
353 (aArray[3] != MSbcEncoderIntfc::ESbcChannelJointStereo))
355 iTestStepResult = EFalse;
359 return iTestStepResult;
362 /****************************************************************************/
363 CTestStepCISbcEncoderGetSupportedAllocationMethods::CTestStepCISbcEncoderGetSupportedAllocationMethods()
365 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0024-HP");
368 TVerdict CTestStepCISbcEncoderGetSupportedAllocationMethods::DoTestStepL()
370 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
372 //Initialize - with the UID of our test HwDevice and try to get the interface
373 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
374 TUid testUID = {KUidSbcEncoderTestDevice};
376 TFourCC testUID('T','0','0','3');
379 MSbcEncoderIntfc* interface = NULL;
380 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
383 INFO_PRINTF1(_L("Getting the SBC Encoder's Supported Allocation Methods"));
385 RArray<MSbcEncoderIntfc::TSbcAllocationMethod> allocMethods;
386 CleanupClosePushL(allocMethods);
387 TInt err = interface->GetSupportedAllocationMethods(allocMethods);
389 // Data is hard coded in the test HwDevice implementation
390 // to add the 2 available allocation methods
391 TBool validValues = ValidateArray(allocMethods);
392 if (err == KErrNone && validValues)
394 iTestStepResult = EPass;
395 INFO_PRINTF1(_L("Successfully got the allocation methods."));
399 iTestStepResult = EFail;
400 ERR_PRINTF1(_L("Failed to get the allocation methods"));
402 CleanupStack::PopAndDestroy(); // allocMethods
406 iTestStepResult = EInconclusive;
407 ERR_PRINTF1(_L("Failed to retrieve the interface."));
410 return iTestStepResult;
414 TBool CTestStepCISbcEncoderGetSupportedAllocationMethods::ValidateArray(const RArray<
415 MSbcEncoderIntfc::TSbcAllocationMethod>&
418 TBool iTestStepResult = ETrue;
420 TInt count = aArray.Count();
423 iTestStepResult = EFalse;
427 if ((aArray[0] != MSbcEncoderIntfc::ESbcAllocationSNR) ||
428 (aArray[1] != MSbcEncoderIntfc::ESbcAllocationLoudness))
430 iTestStepResult = EFalse;
434 return iTestStepResult;
437 /*****************************************************************************/
438 CTestStepCISbcEncoderGetSupportedBitpoolRange::CTestStepCISbcEncoderGetSupportedBitpoolRange()
440 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0026-HP");
443 TVerdict CTestStepCISbcEncoderGetSupportedBitpoolRange::DoTestStepL()
445 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
447 //Initialize - with the UID of our test HwDevice and try to get the interface
448 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
449 TUid testUID = {KUidSbcEncoderTestDevice};
451 TFourCC testUID('T','0','0','3');
454 MSbcEncoderIntfc* interface = NULL;
455 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
458 INFO_PRINTF1(_L("Getting the SBC Encoder's Supported Bitpool Range"));
461 TInt err = interface->GetSupportedBitpoolRange(minSize, maxSize);
463 // Hard coded min and max values in the test device
464 if ((err == KErrNone) &&
468 iTestStepResult = EPass;
469 INFO_PRINTF1(_L("Successfully got the bitpool range."));
473 iTestStepResult = EFail;
474 ERR_PRINTF1(_L("Failed to get the bitpool range"));
479 iTestStepResult = EInconclusive;
480 ERR_PRINTF1(_L("Failed to retrieve the interface."));
483 return iTestStepResult;
486 /*****************************************************************************/
487 CTestStepCISbcEncoderGetSetFrequency::CTestStepCISbcEncoderGetSetFrequency(TBool aIsGetTest)
488 : iIsGetTest(aIsGetTest)
492 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0034-HP");
496 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0027-HP");
500 TVerdict CTestStepCISbcEncoderGetSetFrequency::DoTestStepL()
502 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
504 //Initialize - with the UID of our test HwDevice and try to get the interface
505 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
506 TUid testUID = {KUidSbcEncoderTestDevice};
508 TFourCC testUID('T','0','0','3');
511 MSbcEncoderIntfc* interface = NULL;
512 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
515 INFO_PRINTF1(_L("Setting the SBC Encoder's Sampling Frequency"));
517 TUint frequency = 666;
518 interface->SetSamplingFrequency(frequency);
521 TInt err = interface->GetSamplingFrequency(testFreq);
522 if (err == KErrNone && (frequency == testFreq))
524 iTestStepResult = EPass;
527 INFO_PRINTF1(_L("Successfully got the frequency."));
531 INFO_PRINTF1(_L("Successfully set the frequency."));
536 iTestStepResult = EFail;
539 ERR_PRINTF1(_L("Failed to get the frequency"));
543 ERR_PRINTF1(_L("Failed to set the frequency"));
549 iTestStepResult = EInconclusive;
550 ERR_PRINTF1(_L("Failed to retrieve the interface."));
553 return iTestStepResult;
556 /*****************************************************************************/
557 CTestStepCISbcEncoderGetSetChannelMode::CTestStepCISbcEncoderGetSetChannelMode(TBool aIsGetTest)
558 : iIsGetTest(aIsGetTest)
562 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0035-HP");
566 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0028-HP");
570 TVerdict CTestStepCISbcEncoderGetSetChannelMode::DoTestStepL()
572 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
574 //Initialize - with the UID of our test HwDevice and try to get the interface
575 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
576 TUid testUID = {KUidSbcEncoderTestDevice};
578 TFourCC testUID('T','0','0','3');
581 MSbcEncoderIntfc* interface = NULL;
582 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
585 INFO_PRINTF1(_L("Setting the SBC Encoder's Channel Mode"));
586 MSbcEncoderIntfc::TSbcChannelMode channelMode = MSbcEncoderIntfc::ESbcChannelStereo;
587 interface->SetChannelMode(channelMode);
589 MSbcEncoderIntfc::TSbcChannelMode testChannelMode = MSbcEncoderIntfc::ESbcChannelMono;
590 TInt err = interface->GetChannelMode(testChannelMode);
591 if ((err == KErrNone) && (channelMode == testChannelMode))
593 iTestStepResult = EPass;
596 INFO_PRINTF1(_L("Successfully got the channel mode."));
600 INFO_PRINTF1(_L("Successfully set the channel mode."));
605 iTestStepResult = EFail;
608 ERR_PRINTF1(_L("Failed to get channel mode"));
612 ERR_PRINTF1(_L("Failed to set channel mode"));
618 iTestStepResult = EInconclusive;
619 ERR_PRINTF1(_L("Failed to retrieve the interface."));
622 return iTestStepResult;
625 /*****************************************************************************/
626 CTestStepCISbcEncoderGetSetNumOfSubbands::CTestStepCISbcEncoderGetSetNumOfSubbands(TBool aIsGetTest)
627 : iIsGetTest(aIsGetTest)
631 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0036-HP");
635 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0029-HP");
639 TVerdict CTestStepCISbcEncoderGetSetNumOfSubbands::DoTestStepL()
641 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
643 //Initialize - with the UID of our test HwDevice and try to get the interface
644 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
645 TUid testUID = {KUidSbcEncoderTestDevice};
647 TFourCC testUID('T','0','0','3');
650 MSbcEncoderIntfc* interface = NULL;
651 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
654 INFO_PRINTF1(_L("Setting the SBC Encoder's Number of Subbands"));
655 TUint numOfSubbands = 6;
656 interface->SetNumOfSubbands(numOfSubbands);
658 TUint testSubbands = 0;
659 TInt err = interface->GetNumOfSubbands(testSubbands);
660 if (err == KErrNone && (testSubbands == numOfSubbands))
662 iTestStepResult = EPass;
665 INFO_PRINTF1(_L("Successfully got subbands."));
669 INFO_PRINTF1(_L("Successfully set subbands."));
674 iTestStepResult = EFail;
677 ERR_PRINTF1(_L("Failed to get subbands."));
681 ERR_PRINTF1(_L("Failed to set subbands."));
687 iTestStepResult = EInconclusive;
688 ERR_PRINTF1(_L("Failed to retrieve the interface."));
691 return iTestStepResult;
694 /*****************************************************************************/
695 CTestStepCISbcEncoderGetSetNumOfBlocks::CTestStepCISbcEncoderGetSetNumOfBlocks(TBool aIsGetTest)
696 : iIsGetTest(aIsGetTest)
700 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0037-HP");
704 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0030-HP");
708 TVerdict CTestStepCISbcEncoderGetSetNumOfBlocks::DoTestStepL()
710 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
712 //Initialize - with the UID of our test HwDevice and try to get the interface
713 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
714 TUid testUID = {KUidSbcEncoderTestDevice};
716 TFourCC testUID('T','0','0','3');
719 MSbcEncoderIntfc* interface = NULL;
720 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
723 INFO_PRINTF1(_L("Setting the SBC Encoder's Number of Blocks"));
724 TUint numOfBlocks = 6;
725 interface->SetNumOfBlocks(numOfBlocks);
726 TUint testBlocks = 0;
727 TInt err = interface->GetNumOfBlocks(testBlocks);
728 if ((err == KErrNone) && (numOfBlocks == testBlocks))
730 iTestStepResult = EPass;
733 INFO_PRINTF1(_L("Successfully got the number of blocks."));
737 INFO_PRINTF1(_L("Successfully set the number of blocks."));
742 iTestStepResult = EFail;
745 ERR_PRINTF1(_L("Failed to get the number of blocks."));
749 ERR_PRINTF1(_L("Failed to set the number of blocks."));
755 iTestStepResult = EInconclusive;
756 ERR_PRINTF1(_L("Failed to retrieve the interface."));
759 return iTestStepResult;
762 /*****************************************************************************/
763 CTestStepCISbcEncoderGetSetAllocationMethod::CTestStepCISbcEncoderGetSetAllocationMethod(TBool aIsGetTest)
764 : iIsGetTest(aIsGetTest)
768 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0038-HP");
772 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0031-HP");
776 TVerdict CTestStepCISbcEncoderGetSetAllocationMethod::DoTestStepL()
778 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
780 //Initialize - with the UID of our test HwDevice and try to get the interface
781 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
782 TUid testUID = {KUidSbcEncoderTestDevice};
784 TFourCC testUID('T','0','0','3');
787 MSbcEncoderIntfc* interface = NULL;
788 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
791 INFO_PRINTF1(_L("Setting the SBC Encoder's Allocation Method"));
792 MSbcEncoderIntfc::TSbcAllocationMethod allocationMethod = MSbcEncoderIntfc::ESbcAllocationLoudness;
793 interface->SetAllocationMethod(allocationMethod);
795 MSbcEncoderIntfc::TSbcAllocationMethod testAllocationMethod;
796 TInt err = interface->GetAllocationMethod(testAllocationMethod);
797 if ((err == KErrNone) && (allocationMethod == testAllocationMethod))
799 iTestStepResult = EPass;
802 INFO_PRINTF1(_L("Successfully got the allocation method."));
806 INFO_PRINTF1(_L("Successfully set the allocation method."));
810 iTestStepResult = EFail;
813 ERR_PRINTF1(_L("Failed to get the allocation method."));
817 ERR_PRINTF1(_L("Failed to set the allocation method."));
823 iTestStepResult = EInconclusive;
824 ERR_PRINTF1(_L("Failed to retrieve the interface."));
827 return iTestStepResult;
830 /*****************************************************************************/
831 CTestStepCISbcEncoderGetSetBitpoolSize::CTestStepCISbcEncoderGetSetBitpoolSize(TBool aIsGetTest)
832 : iIsGetTest(aIsGetTest)
836 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0039-HP");
840 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0032-HP");
844 TVerdict CTestStepCISbcEncoderGetSetBitpoolSize::DoTestStepL()
846 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
848 //Initialize - with the UID of our test HwDevice and try to get the interface
849 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
850 TUid testUID = {KUidSbcEncoderTestDevice};
852 TFourCC testUID('T','0','0','3');
855 MSbcEncoderIntfc* interface = NULL;
856 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
859 INFO_PRINTF1(_L("Setting the SBC Encoder's Bitpool Size"));
860 TUint bitpoolSize = 6;
861 interface->SetBitpoolSize(bitpoolSize);
863 TUint testBitpoolSize = 0;
864 TInt err = interface->GetBitpoolSize(testBitpoolSize);
865 if ((err == KErrNone) && (bitpoolSize == testBitpoolSize))
867 iTestStepResult = EPass;
870 INFO_PRINTF1(_L("Successfully got the bitpool size."));
874 INFO_PRINTF1(_L("Successfully set the bitpool size."));
879 iTestStepResult = EFail;
882 ERR_PRINTF1(_L("Failed to get the bitpool size."));
886 ERR_PRINTF1(_L("Failed to set the bitpool size."));
892 iTestStepResult = EInconclusive;
893 ERR_PRINTF1(_L("Failed to retrieve the interface."));
896 return iTestStepResult;
899 /*****************************************************************************/
900 CTestStepCISbcEncoderApplyConfig::CTestStepCISbcEncoderApplyConfig()
902 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0033-HP");
905 TVerdict CTestStepCISbcEncoderApplyConfig::DoTestStepL()
907 INFO_PRINTF1(_L("Initializing test SBC Encoder CI device"));
909 //Initialize - with the UID of our test HwDevice and try to get the interface
910 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
911 TUid testUID = {KUidSbcEncoderTestDevice};
913 TFourCC testUID('T','0','0','3');
916 MSbcEncoderIntfc* interface = NULL;
917 interface = static_cast<MSbcEncoderIntfc*>(InitializeAndInstantiateInterfaceL(testUID, KUidSbcEncoderIntfc));
920 INFO_PRINTF1(_L("Applying the config to the SBC Encoder"));
921 TInt err = interface->ApplyConfig();
924 iTestStepResult = EPass;
925 INFO_PRINTF1(_L("Successfully applied the config."));
929 iTestStepResult = EFail;
930 ERR_PRINTF2(_L("Failed to apply the config, error: %d"), err);
935 iTestStepResult = EInconclusive;
936 ERR_PRINTF1(_L("Failed to retrieve the interface."));
938 return iTestStepResult;