devsound/a3fcharacterisationtest/src/char_a3f_devsound_tonetest.cpp
changeset 38 4269ca484c7b
parent 24 2672ba96448e
equal deleted inserted replaced
34:31d6e1ae5283 38:4269ca484c7b
    27 	}
    27 	}
    28 
    28 
    29 RA3FDevSoundToneSetConfigTest* RA3FDevSoundToneSetConfigTest::NewL(const TDesC& aTestName)
    29 RA3FDevSoundToneSetConfigTest* RA3FDevSoundToneSetConfigTest::NewL(const TDesC& aTestName)
    30 	{
    30 	{
    31 	RA3FDevSoundToneSetConfigTest * self = new(ELeave)RA3FDevSoundToneSetConfigTest(aTestName);
    31 	RA3FDevSoundToneSetConfigTest * self = new(ELeave)RA3FDevSoundToneSetConfigTest(aTestName);
    32 	return self; 
    32 	return self;
    33 	}
    33 	}
    34 
    34 
    35 void RA3FDevSoundToneSetConfigTest::DoKickoffTestL()
    35 void RA3FDevSoundToneSetConfigTest::DoKickoffTestL()
    36 	{
    36 	{
    37 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
    37 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
   148 	return self;
   148 	return self;
   149 	}
   149 	}
   150 
   150 
   151 void RA3FDevSoundToneSetPrioritySettingsTest::DoKickoffTestL()
   151 void RA3FDevSoundToneSetPrioritySettingsTest::DoKickoffTestL()
   152 	{
   152 	{
   153 	if (!GetIntFromConfig(iTestStepName, KPriority, iPriority)) 
   153 	if (!GetIntFromConfig(iTestStepName, KPriority, iPriority))
   154 		{
   154 		{
   155 		ERR_PRINTF2(KMsgErrorGetParameter, &KPriority);
   155 		ERR_PRINTF2(KMsgErrorGetParameter, &KPriority);
   156 		StopTest(KErrUnknown);
   156 		StopTest(KErrUnknown);
   157 		}
   157 		}
   158 	}
   158 	}
   196 				StopTest();
   196 				StopTest();
   197 				}
   197 				}
   198 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   198 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   199 				{
   199 				{
   200 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   200 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   201 				StopTest(aError);	
   201 				StopTest(aError);
   202 				}
   202 				}
   203 			else
   203 			else
   204 				{
   204 				{
   205 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   205 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   206 				StopTest(aError, EFail);
   206 				StopTest(aError, EFail);
   230 	return self;
   230 	return self;
   231 	}
   231 	}
   232 
   232 
   233 void RA3FDevSoundToneSetVolumeTest::DoKickoffTestL()
   233 void RA3FDevSoundToneSetVolumeTest::DoKickoffTestL()
   234 	{
   234 	{
   235 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume)) 
   235 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume))
   236 		{
   236 		{
   237 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   237 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   238 		StopTest(KErrUnknown);
   238 		StopTest(KErrUnknown);
   239 		return;
   239 		return;
   240 		}
   240 		}
   288 					}
   288 					}
   289 				}
   289 				}
   290 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   290 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   291 				{
   291 				{
   292 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   292 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   293 				StopTest(aError);	
   293 				StopTest(aError);
   294 				}
   294 				}
   295 			else
   295 			else
   296 				{
   296 				{
   297 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   297 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   298 				StopTest(aError, EFail);
   298 				StopTest(aError, EFail);
   323 	return self;
   323 	return self;
   324 	}
   324 	}
   325 
   325 
   326 void RA3FDevSoundToneVolumeRampTest::DoKickoffTestL()
   326 void RA3FDevSoundToneVolumeRampTest::DoKickoffTestL()
   327 	{
   327 	{
   328 	if (!GetIntFromConfig(iTestStepName, KVolumeRamp, iVolumeRamp)) 
   328 	if (!GetIntFromConfig(iTestStepName, KVolumeRamp, iVolumeRamp))
   329 		{
   329 		{
   330 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolumeRamp);
   330 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolumeRamp);
   331 		StopTest(KErrNotFound);
   331 		StopTest(KErrNotFound);
   332 		return;
   332 		return;
   333 		}
   333 		}
   334 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
   334 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
   335 			{
   335 			{
   336 			ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   336 			ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   337 			StopTest(KErrNotFound);
   337 			StopTest(KErrNotFound);
   338 			return;
   338 			return;
   339 			}
   339 			}
   340 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
   340 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
   341 		{
   341 		{
   342 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   342 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   343 		StopTest(KErrNotFound);
   343 		StopTest(KErrNotFound);
   344 		return;
   344 		return;
   345 		}
   345 		}
   441  */
   441  */
   442 RA3FDevSoundToneSetToneRepeatsTest::RA3FDevSoundToneSetToneRepeatsTest(const TDesC& aTestName)
   442 RA3FDevSoundToneSetToneRepeatsTest::RA3FDevSoundToneSetToneRepeatsTest(const TDesC& aTestName)
   443 	:	RA3FDevSoundTestBase(aTestName),
   443 	:	RA3FDevSoundTestBase(aTestName),
   444 		iDuration(0),
   444 		iDuration(0),
   445 		iFrequencyTone1(0),
   445 		iFrequencyTone1(0),
   446 		iRepeatTrailingSilence(0), 
   446 		iRepeatTrailingSilence(0),
   447 		iRepeatCount(0)
   447 		iRepeatCount(0)
   448 	{
   448 	{
   449 	}
   449 	}
   450 
   450 
   451 RA3FDevSoundToneSetToneRepeatsTest* RA3FDevSoundToneSetToneRepeatsTest::NewL(const TDesC& aTestName)
   451 RA3FDevSoundToneSetToneRepeatsTest* RA3FDevSoundToneSetToneRepeatsTest::NewL(const TDesC& aTestName)
   454 	return self;
   454 	return self;
   455 	}
   455 	}
   456 
   456 
   457 void RA3FDevSoundToneSetToneRepeatsTest::DoKickoffTestL()
   457 void RA3FDevSoundToneSetToneRepeatsTest::DoKickoffTestL()
   458 	{
   458 	{
   459 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount)) 
   459 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount))
   460 		{
   460 		{
   461 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
   461 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
   462 		StopTest(KErrNotFound);
   462 		StopTest(KErrNotFound);
   463 		return;
   463 		return;
   464 		}
   464 		}
   465 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence)) 
   465 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence))
   466 		{
   466 		{
   467 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
   467 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
   468 		StopTest(KErrNotFound);
   468 		StopTest(KErrNotFound);
   469 		return;
   469 		return;
   470 		}
   470 		}
   471 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
   471 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
   472 		{
   472 		{
   473 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   473 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   474 		StopTest(KErrNotFound);
   474 		StopTest(KErrNotFound);
   475 		return;
   475 		return;
   476 		}
   476 		}
   477 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
   477 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
   478 		{
   478 		{
   479 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   479 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   480 		StopTest(KErrNotFound);
   480 		StopTest(KErrNotFound);
   481 		return;
   481 		return;
   482 		}
   482 		}
   527 					}
   527 					}
   528 				}
   528 				}
   529 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   529 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   530 				{
   530 				{
   531 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   531 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   532 				StopTest(aError);	
   532 				StopTest(aError);
   533 				}
   533 				}
   534 			else
   534 			else
   535 				{
   535 				{
   536 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   536 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   537 				StopTest(aError, EFail);
   537 				StopTest(aError, EFail);
   746 	return self;
   746 	return self;
   747 	}
   747 	}
   748 
   748 
   749 void RA3FDevSoundToneSetVolumeWhilePlayingTest::DoKickoffTestL()
   749 void RA3FDevSoundToneSetVolumeWhilePlayingTest::DoKickoffTestL()
   750 	{
   750 	{
   751 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume)) 
   751 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume))
   752 		{
   752 		{
   753 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   753 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   754 		StopTest(KErrNotFound);
   754 		StopTest(KErrNotFound);
   755 		return;
   755 		return;
   756 		}
   756 		}
   757 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
   757 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
   758 		{
   758 		{
   759 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   759 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   760 		StopTest(KErrNotFound);
   760 		StopTest(KErrNotFound);
   761 		return;
   761 		return;
   762 		}
   762 		}
   763 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
   763 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
   764 		{
   764 		{
   765 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   765 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   766 		StopTest(KErrNotFound);
   766 		StopTest(KErrNotFound);
   767 		return;
   767 		return;
   768 		}
   768 		}
   814 				iDevSoundState = EStatePlaying;
   814 				iDevSoundState = EStatePlaying;
   815 				}
   815 				}
   816 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   816 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   817 				{
   817 				{
   818 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   818 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   819 				StopTest(aError);	
   819 				StopTest(aError);
   820 				}
   820 				}
   821 			else
   821 			else
   822 				{
   822 				{
   823 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   823 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   824 				StopTest(aError, EFail);
   824 				StopTest(aError, EFail);
   886  */
   886  */
   887 RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::RA3FDevSoundToneSetPlayBalanceWhilePlayingTest(const TDesC& aTestName)
   887 RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::RA3FDevSoundToneSetPlayBalanceWhilePlayingTest(const TDesC& aTestName)
   888 	:	RA3FDevSoundTestBase(aTestName), iDuration(0),
   888 	:	RA3FDevSoundTestBase(aTestName), iDuration(0),
   889 		iVolume(0), iFrequencyTone1(0), iLSpeakerBalance(0),
   889 		iVolume(0), iFrequencyTone1(0), iLSpeakerBalance(0),
   890 		iRSpeakerBalance(0)
   890 		iRSpeakerBalance(0)
   891 		
   891 
   892 	{
   892 	{
   893 	}
   893 	}
   894 
   894 
   895 RA3FDevSoundToneSetPlayBalanceWhilePlayingTest* RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::NewL(const TDesC& aTestName)
   895 RA3FDevSoundToneSetPlayBalanceWhilePlayingTest* RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::NewL(const TDesC& aTestName)
   896 	{
   896 	{
   898 	return self;
   898 	return self;
   899 	}
   899 	}
   900 
   900 
   901 void RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::DoKickoffTestL()
   901 void RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::DoKickoffTestL()
   902 	{
   902 	{
   903 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume)) 
   903 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume))
   904 		{
   904 		{
   905 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   905 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
   906 		StopTest(KErrNotFound);
   906 		StopTest(KErrNotFound);
   907 		return;
   907 		return;
   908 		}
   908 		}
   909 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
   909 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
   910 		{
   910 		{
   911 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   911 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
   912 		StopTest(KErrNotFound);
   912 		StopTest(KErrNotFound);
   913 		return;
   913 		return;
   914 		}
   914 		}
   915 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
   915 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
   916 		{
   916 		{
   917 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   917 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
   918 		StopTest(KErrNotFound);
   918 		StopTest(KErrNotFound);
   919 		return;
   919 		return;
   920 		}
   920 		}
   921 	if (!GetIntFromConfig(iTestStepName, KLSpeakerBalance, iLSpeakerBalance)) 
   921 	if (!GetIntFromConfig(iTestStepName, KLSpeakerBalance, iLSpeakerBalance))
   922 		{
   922 		{
   923 		ERR_PRINTF2(KMsgErrorGetParameter, &KLSpeakerBalance);
   923 		ERR_PRINTF2(KMsgErrorGetParameter, &KLSpeakerBalance);
   924 		StopTest(KErrNotFound);
   924 		StopTest(KErrNotFound);
   925 		return;
   925 		return;
   926 		}
   926 		}
   927 	if (!GetIntFromConfig(iTestStepName, KRSpeakerBalance, iRSpeakerBalance)) 
   927 	if (!GetIntFromConfig(iTestStepName, KRSpeakerBalance, iRSpeakerBalance))
   928 		{
   928 		{
   929 		ERR_PRINTF2(KMsgErrorGetParameter, &KRSpeakerBalance);
   929 		ERR_PRINTF2(KMsgErrorGetParameter, &KRSpeakerBalance);
   930 		StopTest(KErrNotFound);
   930 		StopTest(KErrNotFound);
   931 		return;
   931 		return;
   932 		}	
   932 		}
   933 	iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
   933 	iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
   934 	}
   934 	}
   935 
   935 
   936 void RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
   936 void RA3FDevSoundToneSetPlayBalanceWhilePlayingTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
   937 	{
   937 	{
   978 				iDevSoundState = EStatePlaying;
   978 				iDevSoundState = EStatePlaying;
   979 				}
   979 				}
   980 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   980 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
   981 				{
   981 				{
   982 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   982 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
   983 				StopTest(aError);	
   983 				StopTest(aError);
   984 				}
   984 				}
   985 			else
   985 			else
   986 				{
   986 				{
   987 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   987 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
   988 				StopTest(aError, EFail);
   988 				StopTest(aError, EFail);
  1058 /*
  1058 /*
  1059  *  **========================================================================================================
  1059  *  **========================================================================================================
  1060  * MM-A3F-DEVSOUND-CHRTZ-TONE-0009
  1060  * MM-A3F-DEVSOUND-CHRTZ-TONE-0009
  1061  */
  1061  */
  1062 RA3FDevSoundToneSetVolumeWhilePausePlayingTest::RA3FDevSoundToneSetVolumeWhilePausePlayingTest(const TDesC& aTestName)
  1062 RA3FDevSoundToneSetVolumeWhilePausePlayingTest::RA3FDevSoundToneSetVolumeWhilePausePlayingTest(const TDesC& aTestName)
  1063 	:	RA3FDevSoundTestBase(aTestName), 
  1063 	:	RA3FDevSoundTestBase(aTestName),
  1064 		iDuration(0), iVolume(0),
  1064 		iDuration(0), iVolume(0),
  1065 		iFrequencyTone1(0),
  1065 		iFrequencyTone1(0),
  1066 		iTimeToEnterPauseElapsed(EFalse)
  1066 		iTimeToEnterPauseElapsed(EFalse)
  1067 	{
  1067 	{
  1068 	}
  1068 	}
  1097 	}
  1097 	}
  1098 
  1098 
  1099 void RA3FDevSoundToneSetVolumeWhilePausePlayingTest::Fsm(TMmfDevSoundEvent aDevSoundEvent,  TInt aError)
  1099 void RA3FDevSoundToneSetVolumeWhilePausePlayingTest::Fsm(TMmfDevSoundEvent aDevSoundEvent,  TInt aError)
  1100 	{
  1100 	{
  1101 	switch (iDevSoundState)
  1101 	switch (iDevSoundState)
  1102 		{		
  1102 		{
  1103 		case EStateCreated:
  1103 		case EStateCreated:
  1104 			{
  1104 			{
  1105 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundToneSetVolumeWhilePausePlayingTest"), EFsmIncorrectErrorPassed));
  1105 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundToneSetVolumeWhilePausePlayingTest"), EFsmIncorrectErrorPassed));
  1106 			if (aDevSoundEvent == EEventInitialize)
  1106 			if (aDevSoundEvent == EEventInitialize)
  1107 				{
  1107 				{
  1253 	}
  1253 	}
  1254 
  1254 
  1255 void RA3FDevSoundToneSetVolumeThenInitializeToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent,  TInt aError)
  1255 void RA3FDevSoundToneSetVolumeThenInitializeToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent,  TInt aError)
  1256 	{
  1256 	{
  1257 	switch (iDevSoundState)
  1257 	switch (iDevSoundState)
  1258 		{		
  1258 		{
  1259 		case EStateCreated:
  1259 		case EStateCreated:
  1260 			{
  1260 			{
  1261 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundToneSetVolumeThenInitializeToPlayAudioTest"), EFsmIncorrectErrorPassed));
  1261 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundToneSetVolumeThenInitializeToPlayAudioTest"), EFsmIncorrectErrorPassed));
  1262 			if (aDevSoundEvent == EEventInitialize)
  1262 			if (aDevSoundEvent == EEventInitialize)
  1263 				{
  1263 				{
  1357 	return self;
  1357 	return self;
  1358 	}
  1358 	}
  1359 
  1359 
  1360 void RA3FDevSoundToneSetVolumeRampWhilePlayingTest::DoKickoffTestL()
  1360 void RA3FDevSoundToneSetVolumeRampWhilePlayingTest::DoKickoffTestL()
  1361 	{
  1361 	{
  1362 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume)) 
  1362 	if (!GetIntFromConfig(iTestStepName, KVolume, iVolume))
  1363 		{
  1363 		{
  1364 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
  1364 		ERR_PRINTF2(KMsgErrorGetParameter, &KVolume);
  1365 		StopTest(KErrNotFound);
  1365 		StopTest(KErrNotFound);
  1366 		return;
  1366 		return;
  1367 		}
  1367 		}
  1368 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  1368 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  1369 		{
  1369 		{
  1370 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1370 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1371 		StopTest(KErrNotFound);
  1371 		StopTest(KErrNotFound);
  1372 		return;
  1372 		return;
  1373 		}
  1373 		}
  1374 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  1374 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  1375 		{
  1375 		{
  1376 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1376 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1377 		StopTest(KErrNotFound);
  1377 		StopTest(KErrNotFound);
  1378 		return;
  1378 		return;
  1379 		}
  1379 		}
  1380 	if (!GetIntFromConfig(iTestStepName, KVolumeRamp, iVolumeRamp)) 
  1380 	if (!GetIntFromConfig(iTestStepName, KVolumeRamp, iVolumeRamp))
  1381 			{
  1381 			{
  1382 			ERR_PRINTF2(KMsgErrorGetParameter, &KVolumeRamp);
  1382 			ERR_PRINTF2(KMsgErrorGetParameter, &KVolumeRamp);
  1383 			StopTest(KErrNotFound);
  1383 			StopTest(KErrNotFound);
  1384 			return;
  1384 			return;
  1385 			}
  1385 			}
  1504 /*
  1504 /*
  1505  *========================================================================================================
  1505  *========================================================================================================
  1506  * MM-A3F-DEVSOUND-CHRTZ-TONE-0012
  1506  * MM-A3F-DEVSOUND-CHRTZ-TONE-0012
  1507  */
  1507  */
  1508 RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest(const TDesC& aTestName)
  1508 RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest(const TDesC& aTestName)
  1509 	:	RA3FDevSoundTestBase(aTestName), 
  1509 	:	RA3FDevSoundTestBase(aTestName),
  1510 		iDuration(0),
  1510 		iDuration(0),
  1511 		iFrequencyTone1(0),
  1511 		iFrequencyTone1(0),
  1512 		iRepeatTrailingSilence(0), 
  1512 		iRepeatTrailingSilence(0),
  1513 		iRepeatCount(0)
  1513 		iRepeatCount(0)
  1514 	{
  1514 	{
  1515 	}
  1515 	}
  1516 
  1516 
  1517 RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest* RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::NewL(const TDesC& aTestName)
  1517 RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest* RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::NewL(const TDesC& aTestName)
  1518 	{
  1518 	{
  1519 	RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest(aTestName);
  1519 	RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest(aTestName);
  1520 	return self;
  1520 	return self;
  1521 	}
  1521 	}
  1522 	
  1522 
  1523 void RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::DoKickoffTestL()
  1523 void RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::DoKickoffTestL()
  1524 	{
  1524 	{
  1525 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount)) 
  1525 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount))
  1526 		{
  1526 		{
  1527 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  1527 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  1528 		StopTest(KErrNotFound);
  1528 		StopTest(KErrNotFound);
  1529 		return;
  1529 		return;
  1530 		}
  1530 		}
  1531 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence)) 
  1531 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence))
  1532 		{
  1532 		{
  1533 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  1533 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  1534 		StopTest(KErrNotFound);
  1534 		StopTest(KErrNotFound);
  1535 		return;
  1535 		return;
  1536 		}
  1536 		}
  1537 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  1537 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  1538 		{
  1538 		{
  1539 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1539 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1540 		StopTest(KErrNotFound);
  1540 		StopTest(KErrNotFound);
  1541 		return;
  1541 		return;
  1542 		}
  1542 		}
  1543 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  1543 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  1544 		{
  1544 		{
  1545 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1545 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1546 		StopTest(KErrNotFound);
  1546 		StopTest(KErrNotFound);
  1547 		return;
  1547 		return;
  1548 		}
  1548 		}
  1611 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1611 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1612 			StopTest(aError, EFail);
  1612 			StopTest(aError, EFail);
  1613 			}
  1613 			}
  1614 		}
  1614 		}
  1615 	}
  1615 	}
  1616 	
  1616 
  1617 void RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::DoTimerCallback()
  1617 void RA3FDevSoundToneSetToneRepetitionsWhilePlayingTest::DoTimerCallback()
  1618 	{
  1618 	{
  1619 	iTimer->Cancel();
  1619 	iTimer->Cancel();
  1620 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  1620 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  1621 	INFO_PRINTF3(_L("Calling CMMFDevSound::SetToneRepeats using RepeatCount = %d and RepeatTrailingSilence = %d microsecs"), iRepeatCount, iRepeatTrailingSilence);
  1621 	INFO_PRINTF3(_L("Calling CMMFDevSound::SetToneRepeats using RepeatCount = %d and RepeatTrailingSilence = %d microsecs"), iRepeatCount, iRepeatTrailingSilence);
  1633 		TInt repeatTrailingSilenceToSecs = iRepeatTrailingSilence/KMicroSecsInOneSec;
  1633 		TInt repeatTrailingSilenceToSecs = iRepeatTrailingSilence/KMicroSecsInOneSec;
  1634 		TInt totalExpectedReproductionTime = (KtimesPlayToneIsCalled*iDuration+iRepeatCount*iDuration + (repeatTrailingSilenceToSecs*iRepeatCount))*KMicroSecsInOneSec;
  1634 		TInt totalExpectedReproductionTime = (KtimesPlayToneIsCalled*iDuration+iRepeatCount*iDuration + (repeatTrailingSilenceToSecs*iRepeatCount))*KMicroSecsInOneSec;
  1635 		if(iPlayToneTime < ((iDuration*KMicroSecsInOneSec) + KPlayVarianceTime)&& iPlayToneTime > (iDuration*KMicroSecsInOneSec) - KPlayVarianceTime)
  1635 		if(iPlayToneTime < ((iDuration*KMicroSecsInOneSec) + KPlayVarianceTime)&& iPlayToneTime > (iDuration*KMicroSecsInOneSec) - KPlayVarianceTime)
  1636 			{
  1636 			{
  1637 			INFO_PRINTF1(_L("First play tone succeded."));
  1637 			INFO_PRINTF1(_L("First play tone succeded."));
  1638 			INFO_PRINTF2(_L("Play time is %Ld microseconds"), iPlayToneTime.Int64());		
  1638 			INFO_PRINTF2(_L("Play time is %Ld microseconds"), iPlayToneTime.Int64());
  1639 			TRAPD(err, iMMFDevSound->PlayToneL(iFrequencyTone1, iDuration*KMicroSecsInOneSec));
  1639 			TRAPD(err, iMMFDevSound->PlayToneL(iFrequencyTone1, iDuration*KMicroSecsInOneSec));
  1640 			if (err != KErrNone)
  1640 			if (err != KErrNone)
  1641 				{
  1641 				{
  1642 				ERR_PRINTF2(_L("CMMFDevSound::PlayToneL failed with error : %d!"), err);
  1642 				ERR_PRINTF2(_L("CMMFDevSound::PlayToneL failed with error : %d!"), err);
  1643 				StopTest(err);
  1643 				StopTest(err);
  1667 /*
  1667 /*
  1668  *========================================================================================================
  1668  *========================================================================================================
  1669  * MM-A3F-DEVSOUND-CHRTZ-TONE-0013
  1669  * MM-A3F-DEVSOUND-CHRTZ-TONE-0013
  1670  */
  1670  */
  1671 RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest(const TDesC& aTestName)
  1671 RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest(const TDesC& aTestName)
  1672 	:	RA3FDevSoundTestBase(aTestName), 
  1672 	:	RA3FDevSoundTestBase(aTestName),
  1673 		iFirstToneFinishedCall(EFalse),
  1673 		iFirstToneFinishedCall(EFalse),
  1674 		iToneOnLength(0), iToneOffLength(0),
  1674 		iToneOnLength(0), iToneOffLength(0),
  1675 		iPauseLength(0), iDTMFString(KNullDesC),
  1675 		iPauseLength(0), iDTMFString(KNullDesC),
  1676 		iDTMFPauses(0), iDTMFTones(0),
  1676 		iDTMFPauses(0), iDTMFTones(0),
  1677 		iTotalExpectedPlayToneTime(0)
  1677 		iTotalExpectedPlayToneTime(0)
  1683 	return self;
  1683 	return self;
  1684 	}
  1684 	}
  1685 
  1685 
  1686 void RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::DoKickoffTestL()
  1686 void RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::DoKickoffTestL()
  1687 	{
  1687 	{
  1688 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength)) 
  1688 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength))
  1689 		{
  1689 		{
  1690 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  1690 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  1691 		StopTest(KErrNotFound);
  1691 		StopTest(KErrNotFound);
  1692 		return;
  1692 		return;
  1693 		}
  1693 		}
  1694 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength)) 
  1694 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength))
  1695 		{
  1695 		{
  1696 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  1696 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  1697 		StopTest(KErrNotFound);
  1697 		StopTest(KErrNotFound);
  1698 		return;
  1698 		return;
  1699 		}
  1699 		}
  1700 	if (!GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength)) 
  1700 	if (!GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength))
  1701 		{
  1701 		{
  1702 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  1702 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  1703 		StopTest(KErrNotFound);
  1703 		StopTest(KErrNotFound);
  1704 		return;
  1704 		return;
  1705 		}
  1705 		}
  1787 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1787 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1788 			StopTest(aError, EFail);
  1788 			StopTest(aError, EFail);
  1789 			}
  1789 			}
  1790 		}
  1790 		}
  1791 	}
  1791 	}
  1792 	
  1792 
  1793 void RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::DoTimerCallback()
  1793 void RA3FDevSoundToneSetDTMFLengthsWhilePlayingTest::DoTimerCallback()
  1794 	{
  1794 	{
  1795 	iTimer->Cancel();
  1795 	iTimer->Cancel();
  1796 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  1796 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  1797 	TTimeIntervalMicroSeconds32 ToneOnLength(iToneOnLength);
  1797 	TTimeIntervalMicroSeconds32 ToneOnLength(iToneOnLength);
  1859 RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest* RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::NewL(const TDesC& aTestName)
  1859 RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest* RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::NewL(const TDesC& aTestName)
  1860 	{
  1860 	{
  1861 	RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest(aTestName);
  1861 	RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest(aTestName);
  1862 	return self;
  1862 	return self;
  1863 	}
  1863 	}
  1864 	
  1864 
  1865 void RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::DoKickoffTestL()
  1865 void RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::DoKickoffTestL()
  1866 	{
  1866 	{
  1867 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount)) 
  1867 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount))
  1868 		{
  1868 		{
  1869 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  1869 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  1870 		StopTest(KErrNotFound);
  1870 		StopTest(KErrNotFound);
  1871 		return;
  1871 		return;
  1872 		}
  1872 		}
  1873 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence)) 
  1873 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence))
  1874 		{
  1874 		{
  1875 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  1875 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  1876 		StopTest(KErrNotFound);
  1876 		StopTest(KErrNotFound);
  1877 		return;
  1877 		return;
  1878 		}
  1878 		}
  1879 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  1879 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  1880 		{
  1880 		{
  1881 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1881 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  1882 		StopTest(KErrNotFound);
  1882 		StopTest(KErrNotFound);
  1883 		return;
  1883 		return;
  1884 		}
  1884 		}
  1885 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  1885 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  1886 		{
  1886 		{
  1887 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1887 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  1888 		StopTest(KErrNotFound);
  1888 		StopTest(KErrNotFound);
  1889 		return;
  1889 		return;
  1890 		}
  1890 		}
  1968 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1968 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  1969 			StopTest(aError, EFail);
  1969 			StopTest(aError, EFail);
  1970 			}
  1970 			}
  1971 		}
  1971 		}
  1972 	}
  1972 	}
  1973 	
  1973 
  1974 
  1974 
  1975 void RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::ToneFinished(TInt aError)
  1975 void RA3FDevSoundToneSetToneRepetitionsNotPlayingTonesModeTest::ToneFinished(TInt aError)
  1976 	{
  1976 	{
  1977 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  1977 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  1978 	if (aError == KErrUnderflow)
  1978 	if (aError == KErrUnderflow)
  1984 		if(iPlayToneTime < (totalExpectedReproductionTime + KPlayVarianceTime) && iPlayToneTime > (totalExpectedReproductionTime - KPlayVarianceTime))
  1984 		if(iPlayToneTime < (totalExpectedReproductionTime + KPlayVarianceTime) && iPlayToneTime > (totalExpectedReproductionTime - KPlayVarianceTime))
  1985 			{
  1985 			{
  1986 			INFO_PRINTF1(_L("Play tone repeats succeded."));
  1986 			INFO_PRINTF1(_L("Play tone repeats succeded."));
  1987 			INFO_PRINTF2(_L("Play time is %Ld microseconds"), iPlayToneTime.Int64());
  1987 			INFO_PRINTF2(_L("Play time is %Ld microseconds"), iPlayToneTime.Int64());
  1988 			StopTest();
  1988 			StopTest();
  1989 			}		
  1989 			}
  1990 		else
  1990 		else
  1991 			{
  1991 			{
  1992 			ERR_PRINTF1(_L("Play tone repeats did not work as planned."));
  1992 			ERR_PRINTF1(_L("Play tone repeats did not work as planned."));
  1993 			ERR_PRINTF3(_L("Play time is %Ld microseconds and it should have been %d microseconds"), iPlayToneTime.Int64(), totalExpectedReproductionTime);
  1993 			ERR_PRINTF3(_L("Play time is %Ld microseconds and it should have been %d microseconds"), iPlayToneTime.Int64(), totalExpectedReproductionTime);
  1994 			StopTest(KErrNone, EFail);	
  1994 			StopTest(KErrNone, EFail);
  1995 			}
  1995 			}
  1996 		}
  1996 		}
  1997 	else
  1997 	else
  1998 		{
  1998 		{
  1999 		ERR_PRINTF2(_L("DevSound called ToneFinished with error = %d"), aError);
  1999 		ERR_PRINTF2(_L("DevSound called ToneFinished with error = %d"), aError);
  2000 		ERR_PRINTF2(_L("Expected error = %d"), KErrUnderflow);
  2000 		ERR_PRINTF2(_L("Expected error = %d"), KErrUnderflow);
  2001 		StopTest(aError, EFail);
  2001 		StopTest(aError, EFail);
  2002 		}	
  2002 		}
  2003 	}
  2003 	}
  2004 
  2004 
  2005 /*
  2005 /*
  2006  *========================================================================================================
  2006  *========================================================================================================
  2007  * MM-A3F-DEVSOUND-CHRTZ-TONE-0015
  2007  * MM-A3F-DEVSOUND-CHRTZ-TONE-0015
  2009 RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest(const TDesC& aTestName)
  2009 RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest(const TDesC& aTestName)
  2010 	:	RA3FDevSoundTestBase(aTestName), iInitializedToPlayTones(EFalse),
  2010 	:	RA3FDevSoundTestBase(aTestName), iInitializedToPlayTones(EFalse),
  2011 		iDTMFString(KNullDesC), iToneOnLength(0),
  2011 		iDTMFString(KNullDesC), iToneOnLength(0),
  2012 		iToneOffLength(0), iPauseLength(0),
  2012 		iToneOffLength(0), iPauseLength(0),
  2013 		iDTMFPauses(0), iDTMFTones(0)
  2013 		iDTMFPauses(0), iDTMFTones(0)
  2014 		
  2014 
  2015 	{
  2015 	{
  2016 	}
  2016 	}
  2017 
  2017 
  2018 RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest* RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::NewL(const TDesC& aTestName)
  2018 RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest* RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::NewL(const TDesC& aTestName)
  2019 	{
  2019 	{
  2020 	RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest * self = new(ELeave)RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest(aTestName);
  2020 	RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest * self = new(ELeave)RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest(aTestName);
  2021 	return self;
  2021 	return self;
  2022 	}
  2022 	}
  2023 	
  2023 
  2024 void RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::DoKickoffTestL()
  2024 void RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::DoKickoffTestL()
  2025 	{
  2025 	{
  2026 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength)) 
  2026 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength))
  2027 		{
  2027 		{
  2028 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2028 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2029 		StopTest(KErrNotFound);
  2029 		StopTest(KErrNotFound);
  2030 		return;
  2030 		return;
  2031 		}
  2031 		}
  2032 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength)) 
  2032 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength))
  2033 		{
  2033 		{
  2034 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2034 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2035 		StopTest(KErrNotFound);
  2035 		StopTest(KErrNotFound);
  2036 		return;
  2036 		return;
  2037 		}
  2037 		}
  2143 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2143 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2144 			StopTest(aError, EFail);
  2144 			StopTest(aError, EFail);
  2145 			}
  2145 			}
  2146 		}
  2146 		}
  2147 	}
  2147 	}
  2148 	
  2148 
  2149 void RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::ToneFinished(TInt aError)
  2149 void RA3FDevSoundToneSetDTMFLengthsNotPlayingTonesModeTest::ToneFinished(TInt aError)
  2150 	{
  2150 	{
  2151 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  2151 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  2152 	if (aError == KErrUnderflow)
  2152 	if (aError == KErrUnderflow)
  2153 		{
  2153 		{
  2178 /*
  2178 /*
  2179  *========================================================================================================
  2179  *========================================================================================================
  2180  * MM-A3F-DEVSOUND-CHRTZ-TONE-0016
  2180  * MM-A3F-DEVSOUND-CHRTZ-TONE-0016
  2181  */
  2181  */
  2182 RA3FDevSoundToneSetConfigWhilePlayingTest::RA3FDevSoundToneSetConfigWhilePlayingTest(const TDesC& aTestName)
  2182 RA3FDevSoundToneSetConfigWhilePlayingTest::RA3FDevSoundToneSetConfigWhilePlayingTest(const TDesC& aTestName)
  2183 	:	RA3FDevSoundTestBase(aTestName), iDuration(0), 
  2183 	:	RA3FDevSoundTestBase(aTestName), iDuration(0),
  2184 		iVolume(0), iFrequencyTone1(0), 
  2184 		iVolume(0), iFrequencyTone1(0),
  2185 		iSampleRate(0), iChannels(0)
  2185 		iSampleRate(0), iChannels(0)
  2186 	{
  2186 	{
  2187 	}
  2187 	}
  2188 
  2188 
  2189 RA3FDevSoundToneSetConfigWhilePlayingTest* RA3FDevSoundToneSetConfigWhilePlayingTest::NewL(const TDesC& aTestName)
  2189 RA3FDevSoundToneSetConfigWhilePlayingTest* RA3FDevSoundToneSetConfigWhilePlayingTest::NewL(const TDesC& aTestName)
  2190 	{
  2190 	{
  2191 	RA3FDevSoundToneSetConfigWhilePlayingTest * self = new(ELeave)RA3FDevSoundToneSetConfigWhilePlayingTest(aTestName);
  2191 	RA3FDevSoundToneSetConfigWhilePlayingTest * self = new(ELeave)RA3FDevSoundToneSetConfigWhilePlayingTest(aTestName);
  2192 	return self;
  2192 	return self;
  2193 	}
  2193 	}
  2194 	
  2194 
  2195 void RA3FDevSoundToneSetConfigWhilePlayingTest::DoKickoffTestL()
  2195 void RA3FDevSoundToneSetConfigWhilePlayingTest::DoKickoffTestL()
  2196 	{
  2196 	{
  2197 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate)) 
  2197 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
  2198 		{
  2198 		{
  2199 		ERR_PRINTF2(KMsgErrorGetParameter, &KSampleRate);
  2199 		ERR_PRINTF2(KMsgErrorGetParameter, &KSampleRate);
  2200 		StopTest(KErrNotFound);
  2200 		StopTest(KErrNotFound);
  2201 		return;
  2201 		return;
  2202 		}
  2202 		}
  2203 	if (!GetIntFromConfig(iTestStepName, KChannel, iChannels)) 
  2203 	if (!GetIntFromConfig(iTestStepName, KChannel, iChannels))
  2204 		{
  2204 		{
  2205 		ERR_PRINTF2(KMsgErrorGetParameter, &KChannel);
  2205 		ERR_PRINTF2(KMsgErrorGetParameter, &KChannel);
  2206 		StopTest(KErrNotFound);
  2206 		StopTest(KErrNotFound);
  2207 		return;
  2207 		return;
  2208 		}
  2208 		}
  2209 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  2209 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  2210 		{
  2210 		{
  2211 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  2211 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  2212 		StopTest(KErrNotFound);
  2212 		StopTest(KErrNotFound);
  2213 		return;
  2213 		return;
  2214 		}
  2214 		}
  2215 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  2215 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  2216 		{
  2216 		{
  2217 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  2217 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  2218 		StopTest(KErrNotFound);
  2218 		StopTest(KErrNotFound);
  2219 		return;
  2219 		return;
  2220 		}
  2220 		}
  2328 	return self;
  2328 	return self;
  2329 	}
  2329 	}
  2330 
  2330 
  2331 void RA3FDevSoundToneSetPriorityWhilePlayingTest::DoKickoffTestL()
  2331 void RA3FDevSoundToneSetPriorityWhilePlayingTest::DoKickoffTestL()
  2332 	{
  2332 	{
  2333 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  2333 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  2334 		{
  2334 		{
  2335 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  2335 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  2336 		StopTest(KErrNotFound);
  2336 		StopTest(KErrNotFound);
  2337 		return;
  2337 		return;
  2338 		}
  2338 		}
  2339 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  2339 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  2340 		{
  2340 		{
  2341 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  2341 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  2342 		StopTest(KErrNotFound);
  2342 		StopTest(KErrNotFound);
  2343 		return;
  2343 		return;
  2344 		}
  2344 		}
  2450 
  2450 
  2451 void RA3FDevSoundToneSetPriorityWhilePlayingTest::DoTimerCallback()
  2451 void RA3FDevSoundToneSetPriorityWhilePlayingTest::DoTimerCallback()
  2452 	{
  2452 	{
  2453 	INFO_PRINTF1(_L("TimerEvent called"));
  2453 	INFO_PRINTF1(_L("TimerEvent called"));
  2454 	iTimer->Cancel();
  2454 	iTimer->Cancel();
  2455 	INFO_PRINTF1(_L("Starting another devsound client using the highest priority"));	
  2455 	INFO_PRINTF1(_L("Starting another devsound client using the highest priority"));
  2456 	iDevsoundToneClient->SetPriority(KMaximumPriority);
  2456 	iDevsoundToneClient->SetPriority(KMaximumPriority);
  2457 	TInt err = iDevsoundToneClient->InitTonePlay(iFrequencyTone1, iDuration*KMicroSecsInOneSec);
  2457 	TInt err = iDevsoundToneClient->InitTonePlay(iFrequencyTone1, iDuration*KMicroSecsInOneSec);
  2458 	if(err != KErrNone)
  2458 	if(err != KErrNone)
  2459 		{
  2459 		{
  2460 		ERR_PRINTF1(_L("Initialization to play tone thru second devsound client failed"));
  2460 		ERR_PRINTF1(_L("Initialization to play tone thru second devsound client failed"));
  2488 	}
  2488 	}
  2489 
  2489 
  2490 RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue* RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::NewL(const TDesC& aTestName)
  2490 RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue* RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::NewL(const TDesC& aTestName)
  2491 	{
  2491 	{
  2492 	RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue * self = new(ELeave)RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue(aTestName);
  2492 	RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue * self = new(ELeave)RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue(aTestName);
  2493 	return self; 
  2493 	return self;
  2494 	}
  2494 	}
  2495 
  2495 
  2496 void RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::DoKickoffTestL()
  2496 void RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::DoKickoffTestL()
  2497 	{
  2497 	{
  2498 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
  2498 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
  2509 		}
  2509 		}
  2510 	}
  2510 	}
  2511 
  2511 
  2512 void RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  2512 void RA3FDevSoundToneSetConfigTestToInvalidSampleRateValue::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  2513 	{
  2513 	{
       
  2514 #ifdef MM_TB101_L
       
  2515 		//Reason: Check remains since this is a valid test case, but we need to know why we are not testing invalid rates.
       
  2516 		INFO_PRINTF1(_L("MM_TB101_L defined: All sample rates are valid for MM_TB101_L (HW), therefore no invalid rates can be tested."));
       
  2517 		StopTest(KErrNotSupported, EPass);
       
  2518 #else
  2514 	switch(iDevSoundState)
  2519 	switch(iDevSoundState)
  2515 		{
  2520 		{
  2516 		case EStateCreated:
  2521 		case EStateCreated:
  2517 			{
  2522 			{
  2518 			if(aDevSoundEvent == EEventInitialize)
  2523 			if(aDevSoundEvent == EEventInitialize)
  2564 					}
  2569 					}
  2565 				}
  2570 				}
  2566 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  2571 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  2567 				{
  2572 				{
  2568 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  2573 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  2569 				StopTest(aError);	
  2574 				StopTest(aError);
  2570 				}
  2575 				}
  2571 			else
  2576 			else
  2572 				{
  2577 				{
  2573 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  2578 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  2574 				StopTest(aError, EFail);
  2579 				StopTest(aError, EFail);
  2579 			{
  2584 			{
  2580 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2585 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2581 			StopTest(aError, EFail);
  2586 			StopTest(aError, EFail);
  2582 			}
  2587 			}
  2583 		}
  2588 		}
       
  2589 #endif// MM_TB101_L
  2584 	}
  2590 	}
  2585 
  2591 
  2586 /*
  2592 /*
  2587  *========================================================================================================
  2593  *========================================================================================================
  2588  * MM-A3F-DEVSOUND-CHRTZ-TONE-0019
  2594  * MM-A3F-DEVSOUND-CHRTZ-TONE-0019
  2594 	}
  2600 	}
  2595 
  2601 
  2596 RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest* RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest::NewL(const TDesC& aTestName)
  2602 RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest* RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest::NewL(const TDesC& aTestName)
  2597 	{
  2603 	{
  2598 	RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest * self = new(ELeave)RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest(aTestName);
  2604 	RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest * self = new(ELeave)RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest(aTestName);
  2599 	return self; 
  2605 	return self;
  2600 	}
  2606 	}
  2601 
  2607 
  2602 void RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest::DoKickoffTestL()
  2608 void RA3FDevSoundToneSetConfigTestToInvalidChannelValueTest::DoKickoffTestL()
  2603 	{
  2609 	{
  2604 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
  2610 	if (!GetIntFromConfig(iTestStepName, KSampleRate, iSampleRate))
  2669 					}
  2675 					}
  2670 				}
  2676 				}
  2671 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  2677 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  2672 				{
  2678 				{
  2673 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  2679 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  2674 				StopTest(aError);	
  2680 				StopTest(aError);
  2675 				}
  2681 				}
  2676 			else
  2682 			else
  2677 				{
  2683 				{
  2678 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  2684 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  2679 				StopTest(aError, EFail);
  2685 				StopTest(aError, EFail);
  2702 RA3FDevSoundToneSetDTMFLengthsToNegativeTest* RA3FDevSoundToneSetDTMFLengthsToNegativeTest::NewL(const TDesC& aTestName)
  2708 RA3FDevSoundToneSetDTMFLengthsToNegativeTest* RA3FDevSoundToneSetDTMFLengthsToNegativeTest::NewL(const TDesC& aTestName)
  2703 	{
  2709 	{
  2704 	RA3FDevSoundToneSetDTMFLengthsToNegativeTest * self = new(ELeave)RA3FDevSoundToneSetDTMFLengthsToNegativeTest(aTestName);
  2710 	RA3FDevSoundToneSetDTMFLengthsToNegativeTest * self = new(ELeave)RA3FDevSoundToneSetDTMFLengthsToNegativeTest(aTestName);
  2705 	return self;
  2711 	return self;
  2706 	}
  2712 	}
  2707 	
  2713 
  2708 void RA3FDevSoundToneSetDTMFLengthsToNegativeTest::DoKickoffTestL()
  2714 void RA3FDevSoundToneSetDTMFLengthsToNegativeTest::DoKickoffTestL()
  2709 	{
  2715 	{
  2710 	if ( !GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength) ) 
  2716 	if ( !GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength) )
  2711 		{
  2717 		{
  2712 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2718 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2713 		StopTest(KErrNotFound);
  2719 		StopTest(KErrNotFound);
  2714 		return;
  2720 		return;
  2715 		}
  2721 		}
  2716 	if ( !GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength) ) 
  2722 	if ( !GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength) )
  2717 		{
  2723 		{
  2718 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2724 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2719 		StopTest(KErrNotFound);
  2725 		StopTest(KErrNotFound);
  2720 		return;
  2726 		return;
  2721 		}
  2727 		}
  2722 	if ( !GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength) ) 
  2728 	if ( !GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength) )
  2723 		{
  2729 		{
  2724 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  2730 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  2725 		StopTest(KErrNotFound);
  2731 		StopTest(KErrNotFound);
  2726 		return;
  2732 		return;
  2727 		}
  2733 		}
  2806 
  2812 
  2807 void RA3FDevSoundToneSetDTMFLengthsToNegativeTest::ToneFinished(TInt aError)
  2813 void RA3FDevSoundToneSetDTMFLengthsToNegativeTest::ToneFinished(TInt aError)
  2808 	{
  2814 	{
  2809 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  2815 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  2810 	INFO_PRINTF3(KMsgErrorDevSoundCallback, &KToneFinishedText, aError);
  2816 	INFO_PRINTF3(KMsgErrorDevSoundCallback, &KToneFinishedText, aError);
  2811 		
  2817 
  2812 	if (aError == KErrUnderflow)
  2818 	if (aError == KErrUnderflow)
  2813 		{
  2819 		{
  2814 		iEndTime.HomeTime();
  2820 		iEndTime.HomeTime();
  2815 		iPlayToneTime = iEndTime.MicroSecondsFrom(iStartTime);
  2821 		iPlayToneTime = iEndTime.MicroSecondsFrom(iStartTime);
  2816 		if(iPlayToneTime <= KPlayVarianceTime)
  2822 		if(iPlayToneTime <= KPlayVarianceTime)
  2817 			{
  2823 			{
  2818 			INFO_PRINTF2(_L("Setting DTMF tone lengths to negative gives a reproduction time of %Ld microseconds which is the expected result"), iPlayToneTime.Int64());	
  2824 			INFO_PRINTF2(_L("Setting DTMF tone lengths to negative gives a reproduction time of %Ld microseconds which is the expected result"), iPlayToneTime.Int64());
  2819 			StopTest(aError, EPass);	
  2825 			StopTest(aError, EPass);
  2820 			}
  2826 			}
  2821 		}
  2827 		}
  2822 	else
  2828 	else
  2823 		{
  2829 		{
  2824 		INFO_PRINTF2(_L("DevSound called ToneFinished with error = %d that was NOT expected"), aError);
  2830 		INFO_PRINTF2(_L("DevSound called ToneFinished with error = %d that was NOT expected"), aError);
  2829 /*
  2835 /*
  2830  *========================================================================================================
  2836  *========================================================================================================
  2831  * MM-A3F-DEVSOUND-CHRTZ-TONE-0021
  2837  * MM-A3F-DEVSOUND-CHRTZ-TONE-0021
  2832  */
  2838  */
  2833 RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest(const TDesC& aTestName)
  2839 RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest(const TDesC& aTestName)
  2834 	:	RA3FDevSoundTestBase(aTestName), 
  2840 	:	RA3FDevSoundTestBase(aTestName),
  2835 		iFirstToneFinishedCall(EFalse),
  2841 		iFirstToneFinishedCall(EFalse),
  2836 		iToneOnLength(0), iToneOffLength(0),
  2842 		iToneOnLength(0), iToneOffLength(0),
  2837 		iPauseLength(0), iDTMFString(KNullDesC)
  2843 		iPauseLength(0), iDTMFString(KNullDesC)
  2838 	{
  2844 	{
  2839 	}
  2845 	}
  2843 	return self;
  2849 	return self;
  2844 	}
  2850 	}
  2845 
  2851 
  2846 void RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::DoKickoffTestL()
  2852 void RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::DoKickoffTestL()
  2847 	{
  2853 	{
  2848 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength)) 
  2854 	if (!GetIntFromConfig(iTestStepName, KToneOnLength, iToneOnLength))
  2849 		{
  2855 		{
  2850 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2856 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOnLength);
  2851 		StopTest(KErrNotFound);
  2857 		StopTest(KErrNotFound);
  2852 		return;
  2858 		return;
  2853 		}
  2859 		}
  2854 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength)) 
  2860 	if (!GetIntFromConfig(iTestStepName, KToneOffLength, iToneOffLength))
  2855 		{
  2861 		{
  2856 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2862 		ERR_PRINTF2(KMsgErrorGetParameter, &KToneOffLength);
  2857 		StopTest(KErrNotFound);
  2863 		StopTest(KErrNotFound);
  2858 		return;
  2864 		return;
  2859 		}
  2865 		}
  2860 	if (!GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength)) 
  2866 	if (!GetIntFromConfig(iTestStepName, KPauseLength, iPauseLength))
  2861 		{
  2867 		{
  2862 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  2868 		ERR_PRINTF2(KMsgErrorGetParameter, &KPauseLength);
  2863 		StopTest(KErrNotFound);
  2869 		StopTest(KErrNotFound);
  2864 		return;
  2870 		return;
  2865 		}
  2871 		}
  2941 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2947 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  2942 			StopTest(aError, EFail);
  2948 			StopTest(aError, EFail);
  2943 			}
  2949 			}
  2944 		}
  2950 		}
  2945 	}
  2951 	}
  2946 	
  2952 
  2947 void RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::DoTimerCallback()
  2953 void RA3FDevSoundToneSetDTMFToneOnLengthToMinusOneTest::DoTimerCallback()
  2948 	{
  2954 	{
  2949 	iTimer->Cancel();
  2955 	iTimer->Cancel();
  2950 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  2956 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  2951 	iEndTime.HomeTime();
  2957 	iEndTime.HomeTime();
  2986 RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest* RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::NewL(const TDesC& aTestName)
  2992 RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest* RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::NewL(const TDesC& aTestName)
  2987 	{
  2993 	{
  2988 	RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest(aTestName);
  2994 	RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest(aTestName);
  2989 	return self;
  2995 	return self;
  2990 	}
  2996 	}
  2991 	
  2997 
  2992 void RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::DoKickoffTestL()
  2998 void RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::DoKickoffTestL()
  2993 	{
  2999 	{
  2994 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount)) 
  3000 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount))
  2995 		{
  3001 		{
  2996 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  3002 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  2997 		StopTest(KErrNotFound);
  3003 		StopTest(KErrNotFound);
  2998 		return;
  3004 		return;
  2999 		}
  3005 		}
  3000 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence)) 
  3006 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence))
  3001 		{
  3007 		{
  3002 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  3008 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  3003 		StopTest(KErrNotFound);
  3009 		StopTest(KErrNotFound);
  3004 		return;
  3010 		return;
  3005 		}
  3011 		}
  3006 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  3012 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  3007 		{
  3013 		{
  3008 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3014 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3009 		StopTest(KErrNotFound);
  3015 		StopTest(KErrNotFound);
  3010 		return;
  3016 		return;
  3011 		}
  3017 		}
  3012 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  3018 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  3013 		{
  3019 		{
  3014 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3020 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3015 		StopTest(KErrNotFound);
  3021 		StopTest(KErrNotFound);
  3016 		return;
  3022 		return;
  3017 		}
  3023 		}
  3080 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  3086 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  3081 			StopTest(aError, EFail);
  3087 			StopTest(aError, EFail);
  3082 			}
  3088 			}
  3083 		}
  3089 		}
  3084 	}
  3090 	}
  3085 	
  3091 
  3086 
  3092 
  3087 void RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::ToneFinished(TInt aError)
  3093 void RA3FDevSoundToneSetToneRepetitionsRepeatTrailingSilenceToNegativeTest::ToneFinished(TInt aError)
  3088 	{
  3094 	{
  3089 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  3095 	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
  3090 	if (aError == KErrUnderflow)
  3096 	if (aError == KErrUnderflow)
  3129 RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest* RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::NewL(const TDesC& aTestName)
  3135 RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest* RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::NewL(const TDesC& aTestName)
  3130 	{
  3136 	{
  3131 	RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest(aTestName);
  3137 	RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest * self = new(ELeave)RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest(aTestName);
  3132 	return self;
  3138 	return self;
  3133 	}
  3139 	}
  3134 	
  3140 
  3135 void RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::DoKickoffTestL()
  3141 void RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::DoKickoffTestL()
  3136 	{
  3142 	{
  3137 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount)) 
  3143 	if (!GetIntFromConfig(iTestStepName, KRepeatCount, iRepeatCount))
  3138 		{
  3144 		{
  3139 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  3145 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatCount);
  3140 		StopTest(KErrNotFound);
  3146 		StopTest(KErrNotFound);
  3141 		return;
  3147 		return;
  3142 		}
  3148 		}
  3143 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence)) 
  3149 	if (!GetIntFromConfig(iTestStepName, KRepeatTrailingSilence, iRepeatTrailingSilence))
  3144 		{
  3150 		{
  3145 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  3151 		ERR_PRINTF2(KMsgErrorGetParameter, &KRepeatTrailingSilence);
  3146 		StopTest(KErrNotFound);
  3152 		StopTest(KErrNotFound);
  3147 		return;
  3153 		return;
  3148 		}
  3154 		}
  3149 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  3155 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  3150 		{
  3156 		{
  3151 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3157 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3152 		StopTest(KErrNotFound);
  3158 		StopTest(KErrNotFound);
  3153 		return;
  3159 		return;
  3154 		}
  3160 		}
  3155 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  3161 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  3156 		{
  3162 		{
  3157 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3163 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3158 		StopTest(KErrNotFound);
  3164 		StopTest(KErrNotFound);
  3159 		return;
  3165 		return;
  3160 		}
  3166 		}
  3225 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  3231 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  3226 			StopTest(aError, EFail);
  3232 			StopTest(aError, EFail);
  3227 			}
  3233 			}
  3228 		}
  3234 		}
  3229 	}
  3235 	}
  3230 	
  3236 
  3231 
  3237 
  3232 void RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::DoTimerCallback()
  3238 void RA3FDevSoundToneSetToneRepetitionsRepeatCountToKMdaRepeatForeverTest::DoTimerCallback()
  3233 	{
  3239 	{
  3234 	iTimer->Cancel();
  3240 	iTimer->Cancel();
  3235 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  3241 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  3346 					}
  3352 					}
  3347 				}
  3353 				}
  3348 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  3354 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  3349 				{
  3355 				{
  3350 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  3356 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  3351 				StopTest(aError);	
  3357 				StopTest(aError);
  3352 				}
  3358 				}
  3353 			else
  3359 			else
  3354 				{
  3360 				{
  3355 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  3361 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  3356 				StopTest(aError, EFail);
  3362 				StopTest(aError, EFail);
  3422 				StopTest(aError, EFail);
  3428 				StopTest(aError, EFail);
  3423 				}
  3429 				}
  3424 			break;
  3430 			break;
  3425 			}
  3431 			}
  3426 		case EStateInitializing:
  3432 		case EStateInitializing:
  3427 			{		
  3433 			{
  3428 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  3434 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  3429 				{
  3435 				{
  3430 				TMMFCapabilities capabilitiesGet;
  3436 				TMMFCapabilities capabilitiesGet;
  3431 				TBuf<KMaxSampleRateStringLength> stringSampleRateGet;
  3437 				TBuf<KMaxSampleRateStringLength> stringSampleRateGet;
  3432 				TBuf<KMaxChannelsStringLength> stringChannelsGet;
  3438 				TBuf<KMaxChannelsStringLength> stringChannelsGet;
  3496 	return self;
  3502 	return self;
  3497 	}
  3503 	}
  3498 
  3504 
  3499 void RA3FDevSoundToneMaxVolumeTest::DoKickoffTestL()
  3505 void RA3FDevSoundToneMaxVolumeTest::DoKickoffTestL()
  3500 	{
  3506 	{
  3501 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  3507 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  3502 		{
  3508 		{
  3503 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  3509 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  3504 		StopTest(KErrNotFound);
  3510 		StopTest(KErrNotFound);
  3505 		return;
  3511 		return;
  3506 		}
  3512 		}
  3532 				StopTest(aError, EFail);
  3538 				StopTest(aError, EFail);
  3533 				}
  3539 				}
  3534 			break;
  3540 			break;
  3535 			}
  3541 			}
  3536 		case EStateInitializing:
  3542 		case EStateInitializing:
  3537 			{		
  3543 			{
  3538 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  3544 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  3539 				{
  3545 				{
  3540 				INFO_PRINTF1(_L("Calling CMMFDevSound::MaxVolume"));
  3546 				INFO_PRINTF1(_L("Calling CMMFDevSound::MaxVolume"));
  3541 				TInt maxVolumeGet = iMMFDevSound->MaxVolume();
  3547 				TInt maxVolumeGet = iMMFDevSound->MaxVolume();
  3542 				if (maxVolumeGet == iExVolume)
  3548 				if (maxVolumeGet == iExVolume)
  3586 	return self;
  3592 	return self;
  3587 	}
  3593 	}
  3588 
  3594 
  3589 void RA3FDevSoundToneVolumeTest::DoKickoffTestL()
  3595 void RA3FDevSoundToneVolumeTest::DoKickoffTestL()
  3590 	{
  3596 	{
  3591 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  3597 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  3592 		{
  3598 		{
  3593 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  3599 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  3594 		StopTest(KErrNotFound);
  3600 		StopTest(KErrNotFound);
  3595 		return;
  3601 		return;
  3596 		}
  3602 		}
  3642 					}
  3648 					}
  3643 				}
  3649 				}
  3644 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  3650 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  3645 				{
  3651 				{
  3646 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  3652 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  3647 				StopTest(aError);	
  3653 				StopTest(aError);
  3648 				}
  3654 				}
  3649 			else
  3655 			else
  3650 				{
  3656 				{
  3651 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  3657 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  3652 				StopTest(aError, EFail);
  3658 				StopTest(aError, EFail);
  3678 	return self;
  3684 	return self;
  3679 	}
  3685 	}
  3680 
  3686 
  3681 void RA3FDevSoundToneQueryCapsWhilePlayingTest::DoKickoffTestL()
  3687 void RA3FDevSoundToneQueryCapsWhilePlayingTest::DoKickoffTestL()
  3682 	{
  3688 	{
  3683 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  3689 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  3684 		{
  3690 		{
  3685 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3691 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3686 		StopTest(KErrNotFound);
  3692 		StopTest(KErrNotFound);
  3687 		return;
  3693 		return;
  3688 		}
  3694 		}
  3689 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  3695 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  3690 		{
  3696 		{
  3691 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3697 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3692 		StopTest(KErrNotFound);
  3698 		StopTest(KErrNotFound);
  3693 		return;
  3699 		return;
  3694 		}
  3700 		}
  3815 	return self;
  3821 	return self;
  3816 	}
  3822 	}
  3817 
  3823 
  3818 void RA3FDevSoundToneConfigWhilePlayingTest::DoKickoffTestL()
  3824 void RA3FDevSoundToneConfigWhilePlayingTest::DoKickoffTestL()
  3819 	{
  3825 	{
  3820 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  3826 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  3821 		{
  3827 		{
  3822 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3828 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  3823 		StopTest(KErrNotFound);
  3829 		StopTest(KErrNotFound);
  3824 		return;
  3830 		return;
  3825 		}
  3831 		}
  3826 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  3832 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  3827 		{
  3833 		{
  3828 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3834 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  3829 		StopTest(KErrNotFound);
  3835 		StopTest(KErrNotFound);
  3830 		return;
  3836 		return;
  3831 		}
  3837 		}
  3990 	return self;
  3996 	return self;
  3991 	}
  3997 	}
  3992 
  3998 
  3993 void RA3FDevSoundToneMaxVolumeWhilePlayingTest::DoKickoffTestL()
  3999 void RA3FDevSoundToneMaxVolumeWhilePlayingTest::DoKickoffTestL()
  3994 	{
  4000 	{
  3995 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  4001 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  3996 		{
  4002 		{
  3997 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4003 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  3998 		StopTest(KErrNotFound);
  4004 		StopTest(KErrNotFound);
  3999 		return;
  4005 		return;
  4000 		}
  4006 		}
  4001 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4007 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4002 		{
  4008 		{
  4003 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4009 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4004 		StopTest(KErrNotFound);
  4010 		StopTest(KErrNotFound);
  4005 		return;
  4011 		return;
  4006 		}
  4012 		}
  4007 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4013 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4008 		{
  4014 		{
  4009 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4015 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4010 		StopTest(KErrNotFound);
  4016 		StopTest(KErrNotFound);
  4011 		return;
  4017 		return;
  4012 		}
  4018 		}
  4139 	return self;
  4145 	return self;
  4140 	}
  4146 	}
  4141 
  4147 
  4142 void RA3FDevSoundToneVolumeWhilePlayingTest::DoKickoffTestL()
  4148 void RA3FDevSoundToneVolumeWhilePlayingTest::DoKickoffTestL()
  4143 	{
  4149 	{
  4144 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  4150 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  4145 		{
  4151 		{
  4146 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4152 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4147 		StopTest(KErrNotFound);
  4153 		StopTest(KErrNotFound);
  4148 		return;
  4154 		return;
  4149 		}
  4155 		}
  4150 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4156 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4151 		{
  4157 		{
  4152 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4158 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4153 		StopTest(KErrNotFound);
  4159 		StopTest(KErrNotFound);
  4154 		return;
  4160 		return;
  4155 		}
  4161 		}
  4156 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4162 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4157 		{
  4163 		{
  4158 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4164 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4159 		StopTest(KErrNotFound);
  4165 		StopTest(KErrNotFound);
  4160 		return;
  4166 		return;
  4161 		}
  4167 		}
  4288 	return self;
  4294 	return self;
  4289 	}
  4295 	}
  4290 
  4296 
  4291 void RA3FDevSoundToneQueryCapsWhilePausePlayingTest::DoKickoffTestL()
  4297 void RA3FDevSoundToneQueryCapsWhilePausePlayingTest::DoKickoffTestL()
  4292 	{
  4298 	{
  4293 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4299 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4294 		{
  4300 		{
  4295 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4301 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4296 		StopTest(KErrNotFound);
  4302 		StopTest(KErrNotFound);
  4297 		return;
  4303 		return;
  4298 		}
  4304 		}
  4299 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4305 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4300 		{
  4306 		{
  4301 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4307 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4302 		StopTest(KErrNotFound);
  4308 		StopTest(KErrNotFound);
  4303 		return;
  4309 		return;
  4304 		}
  4310 		}
  4477 	return self;
  4483 	return self;
  4478 	}
  4484 	}
  4479 
  4485 
  4480 void RA3FDevSoundToneConfigWhilePausePlayingTest::DoKickoffTestL()
  4486 void RA3FDevSoundToneConfigWhilePausePlayingTest::DoKickoffTestL()
  4481 	{
  4487 	{
  4482 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4488 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4483 		{
  4489 		{
  4484 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4490 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4485 		StopTest(KErrNotFound);
  4491 		StopTest(KErrNotFound);
  4486 		return;
  4492 		return;
  4487 		}
  4493 		}
  4488 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4494 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4489 		{
  4495 		{
  4490 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4496 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4491 		StopTest(KErrNotFound);
  4497 		StopTest(KErrNotFound);
  4492 		return;
  4498 		return;
  4493 		}
  4499 		}
  4674 	return self;
  4680 	return self;
  4675 	}
  4681 	}
  4676 
  4682 
  4677 void RA3FDevSoundToneMaxVolumeWhilePausePlayingTest::DoKickoffTestL()
  4683 void RA3FDevSoundToneMaxVolumeWhilePausePlayingTest::DoKickoffTestL()
  4678 	{
  4684 	{
  4679 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4685 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4680 		{
  4686 		{
  4681 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4687 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4682 		StopTest(KErrNotFound);
  4688 		StopTest(KErrNotFound);
  4683 		return;
  4689 		return;
  4684 		}
  4690 		}
  4685 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4691 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4686 		{
  4692 		{
  4687 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4693 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4688 		StopTest(KErrNotFound);
  4694 		StopTest(KErrNotFound);
  4689 		return;
  4695 		return;
  4690 		}
  4696 		}
  4691 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  4697 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  4692 		{
  4698 		{
  4693 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4699 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4694 		StopTest(KErrNotFound);
  4700 		StopTest(KErrNotFound);
  4695 		return;
  4701 		return;
  4696 		}
  4702 		}
  4844 	return self;
  4850 	return self;
  4845 	}
  4851 	}
  4846 
  4852 
  4847 void RA3FDevSoundToneVolumeWhilePausePlayingTest::DoKickoffTestL()
  4853 void RA3FDevSoundToneVolumeWhilePausePlayingTest::DoKickoffTestL()
  4848 	{
  4854 	{
  4849 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  4855 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  4850 		{
  4856 		{
  4851 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4857 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  4852 		StopTest(KErrNotFound);
  4858 		StopTest(KErrNotFound);
  4853 		return;
  4859 		return;
  4854 		}
  4860 		}
  4855 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  4861 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  4856 		{
  4862 		{
  4857 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4863 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  4858 		StopTest(KErrNotFound);
  4864 		StopTest(KErrNotFound);
  4859 		return;
  4865 		return;
  4860 		}
  4866 		}
  4861 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume)) 
  4867 	if (!GetIntFromConfig(iTestStepName, KExVolume, iExVolume))
  4862 		{
  4868 		{
  4863 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4869 		ERR_PRINTF2(KMsgErrorGetParameter, &KExVolume);
  4864 		StopTest(KErrNotFound);
  4870 		StopTest(KErrNotFound);
  4865 		return;
  4871 		return;
  4866 		}
  4872 		}
  4999 /*
  5005 /*
  5000  *========================================================================================================
  5006  *========================================================================================================
  5001  * MM-A3F-DEVSOUND-CHRTZ-TONE-0036
  5007  * MM-A3F-DEVSOUND-CHRTZ-TONE-0036
  5002  */
  5008  */
  5003 RA3FDevSoundTonePlayToneOnceTest::RA3FDevSoundTonePlayToneOnceTest(const TDesC& aTestName)
  5009 RA3FDevSoundTonePlayToneOnceTest::RA3FDevSoundTonePlayToneOnceTest(const TDesC& aTestName)
  5004 	:	RA3FDevSoundTestBase(aTestName), 
  5010 	:	RA3FDevSoundTestBase(aTestName),
  5005 		iDuration(0), iFrequencyTone1(0)
  5011 		iDuration(0), iFrequencyTone1(0)
  5006 	{
  5012 	{
  5007 	}
  5013 	}
  5008 
  5014 
  5009 RA3FDevSoundTonePlayToneOnceTest* RA3FDevSoundTonePlayToneOnceTest::NewL(const TDesC& aTestName)
  5015 RA3FDevSoundTonePlayToneOnceTest* RA3FDevSoundTonePlayToneOnceTest::NewL(const TDesC& aTestName)
  5012 	return self;
  5018 	return self;
  5013 	}
  5019 	}
  5014 
  5020 
  5015 void RA3FDevSoundTonePlayToneOnceTest::DoKickoffTestL()
  5021 void RA3FDevSoundTonePlayToneOnceTest::DoKickoffTestL()
  5016 	{
  5022 	{
  5017 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  5023 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5018 		{
  5024 		{
  5019 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5025 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5020 		StopTest(KErrNotFound);
  5026 		StopTest(KErrNotFound);
  5021 		return;
  5027 		return;
  5022 		}
  5028 		}
  5023 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  5029 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  5024 		{
  5030 		{
  5025 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5031 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5026 		StopTest(KErrNotFound);
  5032 		StopTest(KErrNotFound);
  5027 		return;
  5033 		return;
  5028 		}
  5034 		}
  5121 /*
  5127 /*
  5122  *========================================================================================================
  5128  *========================================================================================================
  5123  * MM-A3F-DEVSOUND-CHRTZ-TONE-0037
  5129  * MM-A3F-DEVSOUND-CHRTZ-TONE-0037
  5124  */
  5130  */
  5125 RA3FDevSoundTonePlayDualToneTest::RA3FDevSoundTonePlayDualToneTest(const TDesC& aTestName)
  5131 RA3FDevSoundTonePlayDualToneTest::RA3FDevSoundTonePlayDualToneTest(const TDesC& aTestName)
  5126 	:	RA3FDevSoundTestBase(aTestName), 
  5132 	:	RA3FDevSoundTestBase(aTestName),
  5127 		iDuration(0), iFrequencyTone1(0),
  5133 		iDuration(0), iFrequencyTone1(0),
  5128 		iFrequencyTone2(0)
  5134 		iFrequencyTone2(0)
  5129 	{
  5135 	{
  5130 	}
  5136 	}
  5131 RA3FDevSoundTonePlayDualToneTest* RA3FDevSoundTonePlayDualToneTest::NewL(const TDesC& aTestName)
  5137 RA3FDevSoundTonePlayDualToneTest* RA3FDevSoundTonePlayDualToneTest::NewL(const TDesC& aTestName)
  5133 	RA3FDevSoundTonePlayDualToneTest * self = new(ELeave)RA3FDevSoundTonePlayDualToneTest(aTestName);
  5139 	RA3FDevSoundTonePlayDualToneTest * self = new(ELeave)RA3FDevSoundTonePlayDualToneTest(aTestName);
  5134 	return self;
  5140 	return self;
  5135 	}
  5141 	}
  5136 void RA3FDevSoundTonePlayDualToneTest::DoKickoffTestL()
  5142 void RA3FDevSoundTonePlayDualToneTest::DoKickoffTestL()
  5137 	{
  5143 	{
  5138 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  5144 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5139 		{
  5145 		{
  5140 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5146 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5141 		StopTest(KErrNotFound);
  5147 		StopTest(KErrNotFound);
  5142 		return;
  5148 		return;
  5143 		}
  5149 		}
  5144 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  5150 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  5145 		{
  5151 		{
  5146 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5152 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5147 		StopTest(KErrNotFound);
  5153 		StopTest(KErrNotFound);
  5148 		return;
  5154 		return;
  5149 		}
  5155 		}
  5150 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  5156 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  5151 		{
  5157 		{
  5152 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  5158 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  5153 		StopTest(KErrNotFound);
  5159 		StopTest(KErrNotFound);
  5154 		return;
  5160 		return;
  5155 		}
  5161 		}
  5200 				iDevSoundState = EStatePlaying;
  5206 				iDevSoundState = EStatePlaying;
  5201 				}
  5207 				}
  5202 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5208 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5203 				{
  5209 				{
  5204 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5210 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5205 				StopTest(aError);	
  5211 				StopTest(aError);
  5206 				}
  5212 				}
  5207 			else
  5213 			else
  5208 				{
  5214 				{
  5209 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5215 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5210 				StopTest(aError, EFail);
  5216 				StopTest(aError, EFail);
  5251  * MM-A3F-DEVSOUND-CHRTZ-TONE-0038
  5257  * MM-A3F-DEVSOUND-CHRTZ-TONE-0038
  5252  */
  5258  */
  5253 RA3FDevSoundTonePlayDTMFToneTest::RA3FDevSoundTonePlayDTMFToneTest(const TDesC& aTestName)
  5259 RA3FDevSoundTonePlayDTMFToneTest::RA3FDevSoundTonePlayDTMFToneTest(const TDesC& aTestName)
  5254 	:	RA3FDevSoundTestBase(aTestName),iDTMFString(KNullDesC),
  5260 	:	RA3FDevSoundTestBase(aTestName),iDTMFString(KNullDesC),
  5255 		iDTMFPauses(0), iDTMFTones(0)
  5261 		iDTMFPauses(0), iDTMFTones(0)
  5256 		
  5262 
  5257 	{
  5263 	{
  5258 	}
  5264 	}
  5259 
  5265 
  5260 RA3FDevSoundTonePlayDTMFToneTest* RA3FDevSoundTonePlayDTMFToneTest::NewL(const TDesC& aTestName)
  5266 RA3FDevSoundTonePlayDTMFToneTest* RA3FDevSoundTonePlayDTMFToneTest::NewL(const TDesC& aTestName)
  5261 	{
  5267 	{
  5430 		case EStateInitializing:
  5436 		case EStateInitializing:
  5431 			{
  5437 			{
  5432 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  5438 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  5433 				{
  5439 				{
  5434 				iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume());
  5440 				iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume());
  5435 				TUint8* tablePointer = const_cast<TUint8*>(&(KFixedSequenceTestSequenceDataX[0])); 
  5441 				TUint8* tablePointer = const_cast<TUint8*>(&(KFixedSequenceTestSequenceDataX[0]));
  5436 				TPtrC8 KFixedSequenceData(tablePointer, sizeof(KFixedSequenceTestSequenceDataX));
  5442 				TPtrC8 KFixedSequenceData(tablePointer, sizeof(KFixedSequenceTestSequenceDataX));
  5437 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  5443 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  5438 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  5444 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  5439 				if (err != KErrNone)
  5445 				if (err != KErrNone)
  5440 					{
  5446 					{
  5468 /*
  5474 /*
  5469  *========================================================================================================
  5475  *========================================================================================================
  5470  * MM-A3F-DEVSOUND-CHRTZ-TONE-0040
  5476  * MM-A3F-DEVSOUND-CHRTZ-TONE-0040
  5471  */
  5477  */
  5472 RA3FDevSoundToneNewToneRequestWhilePlayingTest::RA3FDevSoundToneNewToneRequestWhilePlayingTest(const TDesC& aTestName)
  5478 RA3FDevSoundToneNewToneRequestWhilePlayingTest::RA3FDevSoundToneNewToneRequestWhilePlayingTest(const TDesC& aTestName)
  5473 	:	RA3FDevSoundTestBase(aTestName), 
  5479 	:	RA3FDevSoundTestBase(aTestName),
  5474 		iDuration(0), iFrequencyTone1(0)
  5480 		iDuration(0), iFrequencyTone1(0)
  5475 	{
  5481 	{
  5476 	}
  5482 	}
  5477 
  5483 
  5478 RA3FDevSoundToneNewToneRequestWhilePlayingTest* RA3FDevSoundToneNewToneRequestWhilePlayingTest::NewL(const TDesC& aTestName)
  5484 RA3FDevSoundToneNewToneRequestWhilePlayingTest* RA3FDevSoundToneNewToneRequestWhilePlayingTest::NewL(const TDesC& aTestName)
  5481 	return self;
  5487 	return self;
  5482 	}
  5488 	}
  5483 
  5489 
  5484 void RA3FDevSoundToneNewToneRequestWhilePlayingTest::DoKickoffTestL()
  5490 void RA3FDevSoundToneNewToneRequestWhilePlayingTest::DoKickoffTestL()
  5485 	{
  5491 	{
  5486 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  5492 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5487 		{
  5493 		{
  5488 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5494 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5489 		StopTest(KErrNotFound);
  5495 		StopTest(KErrNotFound);
  5490 		return;
  5496 		return;
  5491 		}
  5497 		}
  5492 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  5498 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  5493 		{
  5499 		{
  5494 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5500 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5495 		StopTest(KErrNotFound);
  5501 		StopTest(KErrNotFound);
  5496 		return;
  5502 		return;
  5497 		}
  5503 		}
  5544 				iDevSoundState = EStatePlaying;
  5550 				iDevSoundState = EStatePlaying;
  5545 				}
  5551 				}
  5546 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5552 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5547 				{
  5553 				{
  5548 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5554 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5549 				StopTest(aError);	
  5555 				StopTest(aError);
  5550 				}
  5556 				}
  5551 			else
  5557 			else
  5552 				{
  5558 				{
  5553 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5559 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5554 				StopTest(aError, EFail);
  5560 				StopTest(aError, EFail);
  5621 /*
  5627 /*
  5622  *========================================================================================================
  5628  *========================================================================================================
  5623  * MM-A3F-DEVSOUND-CHRTZ-TONE-0041
  5629  * MM-A3F-DEVSOUND-CHRTZ-TONE-0041
  5624  */
  5630  */
  5625 RA3FDevSoundTonePreemptionTest::RA3FDevSoundTonePreemptionTest(const TDesC& aTestName)
  5631 RA3FDevSoundTonePreemptionTest::RA3FDevSoundTonePreemptionTest(const TDesC& aTestName)
  5626 	:	RA3FDevSoundTestBase(aTestName), 
  5632 	:	RA3FDevSoundTestBase(aTestName),
  5627 		iDuration(0), iFrequencyTone1(0)
  5633 		iDuration(0), iFrequencyTone1(0)
  5628 	{
  5634 	{
  5629 	}
  5635 	}
  5630 
  5636 
  5631 RA3FDevSoundTonePreemptionTest* RA3FDevSoundTonePreemptionTest::NewL(const TDesC& aTestName)
  5637 RA3FDevSoundTonePreemptionTest* RA3FDevSoundTonePreemptionTest::NewL(const TDesC& aTestName)
  5634 	return self;
  5640 	return self;
  5635 	}
  5641 	}
  5636 
  5642 
  5637 void RA3FDevSoundTonePreemptionTest::DoKickoffTestL()
  5643 void RA3FDevSoundTonePreemptionTest::DoKickoffTestL()
  5638 	{
  5644 	{
  5639 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  5645 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5640 		{
  5646 		{
  5641 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5647 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5642 		StopTest(KErrNotFound);
  5648 		StopTest(KErrNotFound);
  5643 		return;
  5649 		return;
  5644 		}
  5650 		}
  5645 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  5651 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  5646 		{
  5652 		{
  5647 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5653 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5648 		StopTest(KErrNotFound);
  5654 		StopTest(KErrNotFound);
  5649 		return;
  5655 		return;
  5650 		}
  5656 		}
  5702 				iDevSoundState = EStatePlaying;
  5708 				iDevSoundState = EStatePlaying;
  5703 				}
  5709 				}
  5704 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5710 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  5705 				{
  5711 				{
  5706 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5712 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  5707 				StopTest(aError);	
  5713 				StopTest(aError);
  5708 				}
  5714 				}
  5709 			else
  5715 			else
  5710 				{
  5716 				{
  5711 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5717 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  5712 				StopTest(aError, EFail);
  5718 				StopTest(aError, EFail);
  5715 			}
  5721 			}
  5716 		case EStatePlaying:
  5722 		case EStatePlaying:
  5717 			{
  5723 			{
  5718 			if(aDevSoundEvent == EEventTimerComplete)
  5724 			if(aDevSoundEvent == EEventTimerComplete)
  5719 				{
  5725 				{
  5720 				INFO_PRINTF1(_L("Starting lower priority devsound client"));	
  5726 				INFO_PRINTF1(_L("Starting lower priority devsound client"));
  5721 				iDevsoundToneClient->SetPriority(KMaximumPriority);
  5727 				iDevsoundToneClient->SetPriority(KMaximumPriority);
  5722 				TInt err = iDevsoundToneClient->InitTonePlay(iFrequencyTone1, iDuration*KMicroSecsInOneSec);
  5728 				TInt err = iDevsoundToneClient->InitTonePlay(iFrequencyTone1, iDuration*KMicroSecsInOneSec);
  5723 				if(err != KErrNone)
  5729 				if(err != KErrNone)
  5724 					{
  5730 					{
  5725 					ERR_PRINTF1(_L("Initialization to play tone thru second devsound client failed"));
  5731 					ERR_PRINTF1(_L("Initialization to play tone thru second devsound client failed"));
  5799 /*
  5805 /*
  5800  *========================================================================================================
  5806  *========================================================================================================
  5801  * MM-A3F-DEVSOUND-CHRTZ-TONE-0042
  5807  * MM-A3F-DEVSOUND-CHRTZ-TONE-0042
  5802  */
  5808  */
  5803 RA3FDevSoundToneRejectionTest::RA3FDevSoundToneRejectionTest(const TDesC& aTestName)
  5809 RA3FDevSoundToneRejectionTest::RA3FDevSoundToneRejectionTest(const TDesC& aTestName)
  5804 	:	RA3FDevSoundTestBase(aTestName), 
  5810 	:	RA3FDevSoundTestBase(aTestName),
  5805 		iDuration(0), iFrequencyTone1(0)
  5811 		iDuration(0), iFrequencyTone1(0)
  5806 	{
  5812 	{
  5807 	}
  5813 	}
  5808 
  5814 
  5809 RA3FDevSoundToneRejectionTest* RA3FDevSoundToneRejectionTest::NewL(const TDesC& aTestName)
  5815 RA3FDevSoundToneRejectionTest* RA3FDevSoundToneRejectionTest::NewL(const TDesC& aTestName)
  5812 	return self;
  5818 	return self;
  5813 	}
  5819 	}
  5814 
  5820 
  5815 void RA3FDevSoundToneRejectionTest::DoKickoffTestL()
  5821 void RA3FDevSoundToneRejectionTest::DoKickoffTestL()
  5816 	{
  5822 	{
  5817 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  5823 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5818 		{
  5824 		{
  5819 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5825 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5820 		StopTest(KErrNotFound);
  5826 		StopTest(KErrNotFound);
  5821 		return;
  5827 		return;
  5822 		}
  5828 		}
  5823 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  5829 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  5824 		{
  5830 		{
  5825 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5831 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  5826 		StopTest(KErrNotFound);
  5832 		StopTest(KErrNotFound);
  5827 		return;
  5833 		return;
  5828 		}
  5834 		}
  5977 /*
  5983 /*
  5978  *========================================================================================================
  5984  *========================================================================================================
  5979  * MM-A3F-DEVSOUND-CHRTZ-TONE-0043
  5985  * MM-A3F-DEVSOUND-CHRTZ-TONE-0043
  5980  */
  5986  */
  5981 RA3FDevSoundTonePlayToneOnceAndStopTest::RA3FDevSoundTonePlayToneOnceAndStopTest(const TDesC& aTestName)
  5987 RA3FDevSoundTonePlayToneOnceAndStopTest::RA3FDevSoundTonePlayToneOnceAndStopTest(const TDesC& aTestName)
  5982 	:	RA3FDevSoundTestBase(aTestName), 
  5988 	:	RA3FDevSoundTestBase(aTestName),
  5983 		iDuration(0), iFrequencyTone1(0),
  5989 		iDuration(0), iFrequencyTone1(0),
  5984 		iToneStopped(EFalse)
  5990 		iToneStopped(EFalse)
  5985 	{
  5991 	{
  5986 	}
  5992 	}
  5987 
  5993 
  5991 	return self;
  5997 	return self;
  5992 	}
  5998 	}
  5993 
  5999 
  5994 void RA3FDevSoundTonePlayToneOnceAndStopTest::DoKickoffTestL()
  6000 void RA3FDevSoundTonePlayToneOnceAndStopTest::DoKickoffTestL()
  5995 	{
  6001 	{
  5996 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  6002 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  5997 		{
  6003 		{
  5998 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6004 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  5999 		StopTest(KErrNotFound);
  6005 		StopTest(KErrNotFound);
  6000 		return;
  6006 		return;
  6001 		}
  6007 		}
  6002 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  6008 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  6003 		{
  6009 		{
  6004 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6010 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6005 		StopTest(KErrNotFound);
  6011 		StopTest(KErrNotFound);
  6006 		return;
  6012 		return;
  6007 		}
  6013 		}
  6090 			{
  6096 			{
  6091 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  6097 			ERR_PRINTF2(_L("Invalid DevSound state received: %d"), iDevSoundState);
  6092 			StopTest(aError, EFail);
  6098 			StopTest(aError, EFail);
  6093 			}
  6099 			}
  6094 		}
  6100 		}
  6095 	
  6101 
  6096 	}
  6102 	}
  6097 
  6103 
  6098 void RA3FDevSoundTonePlayToneOnceAndStopTest::DoTimerCallback()
  6104 void RA3FDevSoundTonePlayToneOnceAndStopTest::DoTimerCallback()
  6099 	{
  6105 	{
  6100 	INFO_PRINTF1(_L("TimerEvent called"));
  6106 	INFO_PRINTF1(_L("TimerEvent called"));
  6101 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6107 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6102 	if(!iToneStopped)
  6108 	if(!iToneStopped)
  6103 		{
  6109 		{
  6104 		Fsm(EEventTimerComplete, KErrNone); 
  6110 		Fsm(EEventTimerComplete, KErrNone);
  6105 		iToneStopped = ETrue;
  6111 		iToneStopped = ETrue;
  6106 		}
  6112 		}
  6107 	else
  6113 	else
  6108 		{
  6114 		{
  6109 		iTimer->Cancel();
  6115 		iTimer->Cancel();
  6131 /*
  6137 /*
  6132  *========================================================================================================
  6138  *========================================================================================================
  6133  * MM-A3F-DEVSOUND-CHRTZ-TONE-0044
  6139  * MM-A3F-DEVSOUND-CHRTZ-TONE-0044
  6134  */
  6140  */
  6135 RA3FDevSoundTonePlayDualToneOnceAndStopTest::RA3FDevSoundTonePlayDualToneOnceAndStopTest(const TDesC& aTestName)
  6141 RA3FDevSoundTonePlayDualToneOnceAndStopTest::RA3FDevSoundTonePlayDualToneOnceAndStopTest(const TDesC& aTestName)
  6136 	:	RA3FDevSoundTestBase(aTestName), 
  6142 	:	RA3FDevSoundTestBase(aTestName),
  6137 		iDuration(0), iFrequencyTone1(0),
  6143 		iDuration(0), iFrequencyTone1(0),
  6138 		iFrequencyTone2(0), iToneStopped(EFalse)
  6144 		iFrequencyTone2(0), iToneStopped(EFalse)
  6139 	{
  6145 	{
  6140 	}
  6146 	}
  6141 
  6147 
  6145 	return self;
  6151 	return self;
  6146 	}
  6152 	}
  6147 
  6153 
  6148 void RA3FDevSoundTonePlayDualToneOnceAndStopTest::DoKickoffTestL()
  6154 void RA3FDevSoundTonePlayDualToneOnceAndStopTest::DoKickoffTestL()
  6149 	{
  6155 	{
  6150 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  6156 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  6151 		{
  6157 		{
  6152 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6158 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6153 		StopTest(KErrNotFound);
  6159 		StopTest(KErrNotFound);
  6154 		return;
  6160 		return;
  6155 		}
  6161 		}
  6156 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  6162 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  6157 		{
  6163 		{
  6158 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6164 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6159 		StopTest(KErrNotFound);
  6165 		StopTest(KErrNotFound);
  6160 		return;
  6166 		return;
  6161 		}
  6167 		}
  6162 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  6168 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  6163 		{
  6169 		{
  6164 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  6170 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  6165 		StopTest(KErrNotFound);
  6171 		StopTest(KErrNotFound);
  6166 		return;
  6172 		return;
  6167 		}
  6173 		}
  6221 					}
  6227 					}
  6222 				}
  6228 				}
  6223 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  6229 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  6224 				{
  6230 				{
  6225 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  6231 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  6226 				StopTest(aError);	
  6232 				StopTest(aError);
  6227 				}
  6233 				}
  6228 			else
  6234 			else
  6229 				{
  6235 				{
  6230 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  6236 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  6231 				StopTest(aError, EFail);
  6237 				StopTest(aError, EFail);
  6258 	{
  6264 	{
  6259 	INFO_PRINTF1(_L("TimerEvent called"));
  6265 	INFO_PRINTF1(_L("TimerEvent called"));
  6260 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6266 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6261 	if(!iToneStopped)
  6267 	if(!iToneStopped)
  6262 		{
  6268 		{
  6263 		Fsm(EEventTimerComplete, KErrNone); 
  6269 		Fsm(EEventTimerComplete, KErrNone);
  6264 		iToneStopped = ETrue;
  6270 		iToneStopped = ETrue;
  6265 		}
  6271 		}
  6266 	else
  6272 	else
  6267 		{
  6273 		{
  6268 		iTimer->Cancel();
  6274 		iTimer->Cancel();
  6316 	}
  6322 	}
  6317 
  6323 
  6318 void RA3FDevSoundTonePlayDTMFStringOnceAndStopTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  6324 void RA3FDevSoundTonePlayDTMFStringOnceAndStopTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  6319 	{
  6325 	{
  6320 	switch(iDevSoundState)
  6326 	switch(iDevSoundState)
  6321 		{		
  6327 		{
  6322 		case EStateCreated:
  6328 		case EStateCreated:
  6323 			{
  6329 			{
  6324 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceAndStopTest"), EFsmIncorrectErrorPassed));
  6330 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceAndStopTest"), EFsmIncorrectErrorPassed));
  6325 			if (aDevSoundEvent == EEventInitialize)
  6331 			if (aDevSoundEvent == EEventInitialize)
  6326 				{
  6332 				{
  6405 	{
  6411 	{
  6406 	INFO_PRINTF1(_L("TimerEvent called"));
  6412 	INFO_PRINTF1(_L("TimerEvent called"));
  6407 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6413 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6408 	if(!iToneStopped)
  6414 	if(!iToneStopped)
  6409 		{
  6415 		{
  6410 		Fsm(EEventTimerComplete, KErrNone); 
  6416 		Fsm(EEventTimerComplete, KErrNone);
  6411 		iToneStopped = ETrue;
  6417 		iToneStopped = ETrue;
  6412 		}
  6418 		}
  6413 	else
  6419 	else
  6414 		{
  6420 		{
  6415 		iTimer->Cancel();
  6421 		iTimer->Cancel();
  6484 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  6490 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  6485 				{
  6491 				{
  6486 				if (!iToneStopped)
  6492 				if (!iToneStopped)
  6487 					{
  6493 					{
  6488 					iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume());
  6494 					iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume());
  6489 					TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0])); 
  6495 					TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0]));
  6490 					TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  6496 					TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  6491 					INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  6497 					INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  6492 					TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  6498 					TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  6493 					if (err != KErrNone)
  6499 					if (err != KErrNone)
  6494 						{
  6500 						{
  6503 				else
  6509 				else
  6504 					{
  6510 					{
  6505 					INFO_PRINTF1(_L("Calling CMMFDevSound::Stop succeeded"));
  6511 					INFO_PRINTF1(_L("Calling CMMFDevSound::Stop succeeded"));
  6506 					StopTest(aError);
  6512 					StopTest(aError);
  6507 					}
  6513 					}
  6508 				
  6514 
  6509 				}
  6515 				}
  6510 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  6516 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  6511 				{
  6517 				{
  6512 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  6518 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  6513 				StopTest(aError);	
  6519 				StopTest(aError);
  6514 				}
  6520 				}
  6515 			else
  6521 			else
  6516 				{
  6522 				{
  6517 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  6523 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  6518 				StopTest(aError, EFail);
  6524 				StopTest(aError, EFail);
  6545 	{
  6551 	{
  6546 	INFO_PRINTF1(_L("TimerEvent called"));
  6552 	INFO_PRINTF1(_L("TimerEvent called"));
  6547 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6553 	INFO_PRINTF1(_L("DevSound Event: EEventTimerComplete"));
  6548 	if(!iToneStopped)
  6554 	if(!iToneStopped)
  6549 		{
  6555 		{
  6550 		Fsm(EEventTimerComplete, KErrNone); 
  6556 		Fsm(EEventTimerComplete, KErrNone);
  6551 		iToneStopped = ETrue;
  6557 		iToneStopped = ETrue;
  6552 		}
  6558 		}
  6553 	else
  6559 	else
  6554 		{
  6560 		{
  6555 		iTimer->Cancel();
  6561 		iTimer->Cancel();
  6590 	return self;
  6596 	return self;
  6591 	}
  6597 	}
  6592 
  6598 
  6593 void RA3FDevSoundTonePlayToneOncePauseTest::DoKickoffTestL()
  6599 void RA3FDevSoundTonePlayToneOncePauseTest::DoKickoffTestL()
  6594 	{
  6600 	{
  6595 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  6601 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  6596 		{
  6602 		{
  6597 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6603 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6598 		StopTest(KErrNotFound);
  6604 		StopTest(KErrNotFound);
  6599 		return;
  6605 		return;
  6600 		}
  6606 		}
  6601 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  6607 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  6602 		{
  6608 		{
  6603 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6609 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6604 		StopTest(KErrNotFound);
  6610 		StopTest(KErrNotFound);
  6605 		return;
  6611 		return;
  6606 		}
  6612 		}
  6741 /*
  6747 /*
  6742  *========================================================================================================
  6748  *========================================================================================================
  6743  * MM-A3F-DEVSOUND-CHRTZ-TONE-0048
  6749  * MM-A3F-DEVSOUND-CHRTZ-TONE-0048
  6744  */
  6750  */
  6745 RA3FDevSoundTonePlayDualToneOncePauseTest::RA3FDevSoundTonePlayDualToneOncePauseTest(const TDesC& aTestName)
  6751 RA3FDevSoundTonePlayDualToneOncePauseTest::RA3FDevSoundTonePlayDualToneOncePauseTest(const TDesC& aTestName)
  6746 	:	RA3FDevSoundTestBase(aTestName), 
  6752 	:	RA3FDevSoundTestBase(aTestName),
  6747 		iDuration(0),iFrequencyTone1(0),
  6753 		iDuration(0),iFrequencyTone1(0),
  6748 		iFrequencyTone2(0), iPaused(EFalse),
  6754 		iFrequencyTone2(0), iPaused(EFalse),
  6749 		iSamplesPlayedPaused(0)
  6755 		iSamplesPlayedPaused(0)
  6750 	{
  6756 	{
  6751 	}
  6757 	}
  6756 	return self;
  6762 	return self;
  6757 	}
  6763 	}
  6758 
  6764 
  6759 void RA3FDevSoundTonePlayDualToneOncePauseTest::DoKickoffTestL()
  6765 void RA3FDevSoundTonePlayDualToneOncePauseTest::DoKickoffTestL()
  6760 	{
  6766 	{
  6761 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  6767 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  6762 		{
  6768 		{
  6763 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6769 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  6764 		StopTest(KErrNotFound);
  6770 		StopTest(KErrNotFound);
  6765 		return;
  6771 		return;
  6766 		}
  6772 		}
  6767 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  6773 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  6768 		{
  6774 		{
  6769 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6775 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  6770 		StopTest(KErrNotFound);
  6776 		StopTest(KErrNotFound);
  6771 		return;
  6777 		return;
  6772 		}
  6778 		}
  6773 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  6779 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  6774 		{
  6780 		{
  6775 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  6781 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  6776 		StopTest(KErrNotFound);
  6782 		StopTest(KErrNotFound);
  6777 		return;
  6783 		return;
  6778 		}
  6784 		}
  6914 /*
  6920 /*
  6915  *========================================================================================================
  6921  *========================================================================================================
  6916  * MM-A3F-DEVSOUND-CHRTZ-TONE-0049
  6922  * MM-A3F-DEVSOUND-CHRTZ-TONE-0049
  6917  */
  6923  */
  6918 RA3FDevSoundTonePlayDTMFStringOncePauseTest::RA3FDevSoundTonePlayDTMFStringOncePauseTest(const TDesC& aTestName)
  6924 RA3FDevSoundTonePlayDTMFStringOncePauseTest::RA3FDevSoundTonePlayDTMFStringOncePauseTest(const TDesC& aTestName)
  6919 	:	RA3FDevSoundTestBase(aTestName), 
  6925 	:	RA3FDevSoundTestBase(aTestName),
  6920 		iDTMFString(KNullDesC),iPaused(EFalse),
  6926 		iDTMFString(KNullDesC),iPaused(EFalse),
  6921 		iSamplesPlayedPaused(0),iDTMFPauses(0),
  6927 		iSamplesPlayedPaused(0),iDTMFPauses(0),
  6922 		iDTMFTones(0)
  6928 		iDTMFTones(0)
  6923 	{
  6929 	{
  6924 	}
  6930 	}
  6954 	}
  6960 	}
  6955 
  6961 
  6956 void RA3FDevSoundTonePlayDTMFStringOncePauseTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  6962 void RA3FDevSoundTonePlayDTMFStringOncePauseTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  6957 	{
  6963 	{
  6958 	switch (iDevSoundState)
  6964 	switch (iDevSoundState)
  6959 		{		
  6965 		{
  6960 		case EStateCreated:
  6966 		case EStateCreated:
  6961 			{
  6967 			{
  6962 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOncePauseTest"), EFsmIncorrectErrorPassed));
  6968 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOncePauseTest"), EFsmIncorrectErrorPassed));
  6963 			if (aDevSoundEvent == EEventInitialize)
  6969 			if (aDevSoundEvent == EEventInitialize)
  6964 				{
  6970 				{
  7133 			}
  7139 			}
  7134 		case EStateInitializing:
  7140 		case EStateInitializing:
  7135 			{
  7141 			{
  7136 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7142 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7137 				{
  7143 				{
  7138 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) ); 
  7144 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) );
  7139 				TPtrC8 KFixedSequenceData(tablePointer, sizeof(KFixedSequenceTestSequenceDataX));
  7145 				TPtrC8 KFixedSequenceData(tablePointer, sizeof(KFixedSequenceTestSequenceDataX));
  7140 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7146 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7141 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7147 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7142 				if (err != KErrNone)
  7148 				if (err != KErrNone)
  7143 					{
  7149 					{
  7150 				iDevSoundState = EStatePlaying;
  7156 				iDevSoundState = EStatePlaying;
  7151 				}
  7157 				}
  7152 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7158 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7153 				{
  7159 				{
  7154 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7160 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7155 				StopTest(aError);	
  7161 				StopTest(aError);
  7156 				}
  7162 				}
  7157 			else
  7163 			else
  7158 				{
  7164 				{
  7159 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  7165 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  7160 				StopTest(aError, EFail);
  7166 				StopTest(aError, EFail);
  7252 	return self;
  7258 	return self;
  7253 	}
  7259 	}
  7254 
  7260 
  7255 void RA3FDevSoundTonePlayToneOnceInitializedToPlayAudioTest::DoKickoffTestL()
  7261 void RA3FDevSoundTonePlayToneOnceInitializedToPlayAudioTest::DoKickoffTestL()
  7256 	{
  7262 	{
  7257 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  7263 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  7258 		{
  7264 		{
  7259 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7265 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7260 		StopTest(KErrNotFound);
  7266 		StopTest(KErrNotFound);
  7261 		return;
  7267 		return;
  7262 		}
  7268 		}
  7263 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  7269 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  7264 		{
  7270 		{
  7265 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7271 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7266 		StopTest(KErrNotFound);
  7272 		StopTest(KErrNotFound);
  7267 		return;
  7273 		return;
  7268 		}
  7274 		}
  7349 	return self;
  7355 	return self;
  7350 	}
  7356 	}
  7351 
  7357 
  7352 void RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest::DoKickoffTestL()
  7358 void RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest::DoKickoffTestL()
  7353 	{
  7359 	{
  7354 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  7360 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  7355 		{
  7361 		{
  7356 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7362 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7357 		StopTest(KErrNotFound);
  7363 		StopTest(KErrNotFound);
  7358 		return;
  7364 		return;
  7359 		}
  7365 		}
  7360 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  7366 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  7361 		{
  7367 		{
  7362 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7368 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7363 		StopTest(KErrNotFound);
  7369 		StopTest(KErrNotFound);
  7364 		return;
  7370 		return;
  7365 		}
  7371 		}
  7366 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  7372 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  7367 		{
  7373 		{
  7368 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  7374 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  7369 		StopTest(KErrNotFound);
  7375 		StopTest(KErrNotFound);
  7370 		return;
  7376 		return;
  7371 		}
  7377 		}
  7372 	}
  7378 	}
  7373 
  7379 
  7374 void RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7380 void RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7375 	{
  7381 	{
  7376 	switch(iDevSoundState)
  7382 	switch(iDevSoundState)
  7377 		{		
  7383 		{
  7378 		case EStateCreated:
  7384 		case EStateCreated:
  7379 			{
  7385 			{
  7380 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest"), EFsmIncorrectErrorPassed));
  7386 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDualToneOnceInitializedToPlayAudioTest"), EFsmIncorrectErrorPassed));
  7381 			if (aDevSoundEvent == EEventInitialize)
  7387 			if (aDevSoundEvent == EEventInitialize)
  7382 				{
  7388 				{
  7464 	}
  7470 	}
  7465 
  7471 
  7466 void RA3FDevSoundTonePlayDTMFStringOnceInitializedToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7472 void RA3FDevSoundTonePlayDTMFStringOnceInitializedToPlayAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7467 	{
  7473 	{
  7468 	switch(iDevSoundState)
  7474 	switch(iDevSoundState)
  7469 	{		
  7475 	{
  7470 		case EStateCreated:
  7476 		case EStateCreated:
  7471 			{
  7477 			{
  7472 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceInitializedToPlayAudioTest"), EFsmIncorrectErrorPassed));
  7478 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceInitializedToPlayAudioTest"), EFsmIncorrectErrorPassed));
  7473 			if (aDevSoundEvent == EEventInitialize)
  7479 			if (aDevSoundEvent == EEventInitialize)
  7474 				{
  7480 				{
  7575 			}
  7581 			}
  7576 		case EStateInitializing:
  7582 		case EStateInitializing:
  7577 			{
  7583 			{
  7578 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7584 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7579 				{
  7585 				{
  7580 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) ); 
  7586 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) );
  7581 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  7587 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  7582 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7588 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7583 				TRAPD(err,  iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7589 				TRAPD(err,  iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7584 				if (err == KErrNotSupported)
  7590 				if (err == KErrNotSupported)
  7585 					{
  7591 					{
  7590 					{
  7596 					{
  7591 					ERR_PRINTF2(_L("Play  dual tone failed with error = %d"),  err);
  7597 					ERR_PRINTF2(_L("Play  dual tone failed with error = %d"),  err);
  7592 					ERR_PRINTF2(_L("Expected error = %d"), KErrNotSupported);
  7598 					ERR_PRINTF2(_L("Expected error = %d"), KErrNotSupported);
  7593 					StopTest(err, EFail);
  7599 					StopTest(err, EFail);
  7594 					}
  7600 					}
  7595 				}	
  7601 				}
  7596 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7602 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7597 				{
  7603 				{
  7598 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7604 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7599 				StopTest(aError);
  7605 				StopTest(aError);
  7600 				}
  7606 				}
  7629 	return self;
  7635 	return self;
  7630 	}
  7636 	}
  7631 
  7637 
  7632 void RA3FDevSoundTonePlayToneOnceInitializedToRecordAudioTest::DoKickoffTestL()
  7638 void RA3FDevSoundTonePlayToneOnceInitializedToRecordAudioTest::DoKickoffTestL()
  7633 	{
  7639 	{
  7634 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  7640 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  7635 		{
  7641 		{
  7636 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7642 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7637 		StopTest(KErrNotFound);
  7643 		StopTest(KErrNotFound);
  7638 		return;
  7644 		return;
  7639 		}
  7645 		}
  7640 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  7646 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  7641 		{
  7647 		{
  7642 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7648 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7643 		StopTest(KErrNotFound);
  7649 		StopTest(KErrNotFound);
  7644 		return;
  7650 		return;
  7645 		}
  7651 		}
  7726 	return self;
  7732 	return self;
  7727 	}
  7733 	}
  7728 
  7734 
  7729 void RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest::DoKickoffTestL()
  7735 void RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest::DoKickoffTestL()
  7730 	{
  7736 	{
  7731 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  7737 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  7732 		{
  7738 		{
  7733 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7739 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  7734 		StopTest(KErrNotFound);
  7740 		StopTest(KErrNotFound);
  7735 		return;
  7741 		return;
  7736 		}
  7742 		}
  7737 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  7743 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  7738 		{
  7744 		{
  7739 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7745 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  7740 		StopTest(KErrNotFound);
  7746 		StopTest(KErrNotFound);
  7741 		return;
  7747 		return;
  7742 		}
  7748 		}
  7743 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  7749 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  7744 		{
  7750 		{
  7745 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  7751 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  7746 		StopTest(KErrNotFound);
  7752 		StopTest(KErrNotFound);
  7747 		return;
  7753 		return;
  7748 		}
  7754 		}
  7749 	}
  7755 	}
  7750 
  7756 
  7751 void RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7757 void RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7752 	{
  7758 	{
  7753 	switch(iDevSoundState)
  7759 	switch(iDevSoundState)
  7754 		{		
  7760 		{
  7755 		case EStateCreated:
  7761 		case EStateCreated:
  7756 			{
  7762 			{
  7757 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest"), EFsmIncorrectErrorPassed));
  7763 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDualToneOnceInitializedToRecordAudioTest"), EFsmIncorrectErrorPassed));
  7758 			if (aDevSoundEvent == EEventInitialize)
  7764 			if (aDevSoundEvent == EEventInitialize)
  7759 				{
  7765 				{
  7841 	}
  7847 	}
  7842 
  7848 
  7843 void RA3FDevSoundTonePlayDTMFStringOnceInitializedToRecordAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7849 void RA3FDevSoundTonePlayDTMFStringOnceInitializedToRecordAudioTest::Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError)
  7844 	{
  7850 	{
  7845 	switch(iDevSoundState)
  7851 	switch(iDevSoundState)
  7846 	{		
  7852 	{
  7847 		case EStateCreated:
  7853 		case EStateCreated:
  7848 			{
  7854 			{
  7849 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceInitializedToRecordAudioTest"), EFsmIncorrectErrorPassed));
  7855 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayDTMFStringOnceInitializedToRecordAudioTest"), EFsmIncorrectErrorPassed));
  7850 			if (aDevSoundEvent == EEventInitialize)
  7856 			if (aDevSoundEvent == EEventInitialize)
  7851 				{
  7857 				{
  7952 			}
  7958 			}
  7953 		case EStateInitializing:
  7959 		case EStateInitializing:
  7954 			{
  7960 			{
  7955 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7961 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  7956 				{
  7962 				{
  7957 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) ); 
  7963 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) );
  7958 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  7964 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  7959 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7965 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  7960 				TRAPD(err,  iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7966 				TRAPD(err,  iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  7961 				if (err == KErrNotSupported)
  7967 				if (err == KErrNotSupported)
  7962 					{
  7968 					{
  7967 					{
  7973 					{
  7968 					ERR_PRINTF2(_L("Play  dual tone failed with error = %d"),  err);
  7974 					ERR_PRINTF2(_L("Play  dual tone failed with error = %d"),  err);
  7969 					ERR_PRINTF2(_L("Expected error = %d"), KErrNotSupported);
  7975 					ERR_PRINTF2(_L("Expected error = %d"), KErrNotSupported);
  7970 					StopTest(err, EFail);
  7976 					StopTest(err, EFail);
  7971 					}
  7977 					}
  7972 				}	
  7978 				}
  7973 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7979 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  7974 				{
  7980 				{
  7975 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7981 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  7976 				StopTest(aError);
  7982 				StopTest(aError);
  7977 				}
  7983 				}
  8006 	return self;
  8012 	return self;
  8007 	}
  8013 	}
  8008 
  8014 
  8009 void RA3FDevSoundTonePlayToneWithoutCallingInitializeTest::DoKickoffTestL()
  8015 void RA3FDevSoundTonePlayToneWithoutCallingInitializeTest::DoKickoffTestL()
  8010 	{
  8016 	{
  8011 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  8017 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  8012 		{
  8018 		{
  8013 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  8019 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  8014 		StopTest(KErrNotFound);
  8020 		StopTest(KErrNotFound);
  8015 		return;
  8021 		return;
  8016 		}
  8022 		}
  8017 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  8023 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  8018 		{
  8024 		{
  8019 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  8025 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  8020 		StopTest(KErrNotFound);
  8026 		StopTest(KErrNotFound);
  8021 		return;
  8027 		return;
  8022 		}
  8028 		}
  8046 					}
  8052 					}
  8047 				}
  8053 				}
  8048 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8054 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8049 				{
  8055 				{
  8050 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8056 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8051 				StopTest(aError);	
  8057 				StopTest(aError);
  8052 				}
  8058 				}
  8053 			else
  8059 			else
  8054 				{
  8060 				{
  8055 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8061 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8056 				StopTest(aError, EFail);
  8062 				StopTest(aError, EFail);
  8081 	return self;
  8087 	return self;
  8082 	}
  8088 	}
  8083 
  8089 
  8084 void RA3FDevSoundTonePlayDualToneWithoutCallingInitializeTest::DoKickoffTestL()
  8090 void RA3FDevSoundTonePlayDualToneWithoutCallingInitializeTest::DoKickoffTestL()
  8085 	{
  8091 	{
  8086 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration)) 
  8092 	if (!GetIntFromConfig(iTestStepName, KDuration, iDuration))
  8087 		{
  8093 		{
  8088 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  8094 		ERR_PRINTF2(KMsgErrorGetParameter, &KDuration);
  8089 		StopTest(KErrNotFound);
  8095 		StopTest(KErrNotFound);
  8090 		return;
  8096 		return;
  8091 		}
  8097 		}
  8092 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1)) 
  8098 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone1, iFrequencyTone1))
  8093 		{
  8099 		{
  8094 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  8100 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone1);
  8095 		StopTest(KErrNotFound);
  8101 		StopTest(KErrNotFound);
  8096 		return;
  8102 		return;
  8097 		}
  8103 		}
  8098 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2)) 
  8104 	if (!GetIntFromConfig(iTestStepName, KFrequencyTone2, iFrequencyTone2))
  8099 		{
  8105 		{
  8100 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  8106 		ERR_PRINTF2(KMsgErrorGetParameter, &KFrequencyTone2);
  8101 		StopTest(KErrNotFound);
  8107 		StopTest(KErrNotFound);
  8102 		return;
  8108 		return;
  8103 		}
  8109 		}
  8127 					}
  8133 					}
  8128 				}
  8134 				}
  8129 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8135 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8130 				{
  8136 				{
  8131 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8137 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8132 				StopTest(aError);	
  8138 				StopTest(aError);
  8133 				}
  8139 				}
  8134 			else
  8140 			else
  8135 				{
  8141 				{
  8136 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8142 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8137 				StopTest(aError, EFail);
  8143 				StopTest(aError, EFail);
  8197 					}
  8203 					}
  8198 				}
  8204 				}
  8199 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8205 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8200 				{
  8206 				{
  8201 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8207 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8202 				StopTest(aError);	
  8208 				StopTest(aError);
  8203 				}
  8209 				}
  8204 			else
  8210 			else
  8205 				{
  8211 				{
  8206 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8212 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8207 				StopTest(aError, EFail);
  8213 				StopTest(aError, EFail);
  8242 		case EStateCreated:
  8248 		case EStateCreated:
  8243 			{
  8249 			{
  8244 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayToneSequenceWithoutCallingInitializeTest"), EFsmIncorrectErrorPassed));
  8250 			__ASSERT_ALWAYS((aError == KErrNone), Panic(_L("RA3FDevSoundTonePlayToneSequenceWithoutCallingInitializeTest"), EFsmIncorrectErrorPassed));
  8245 			if (aDevSoundEvent == EEventInitialize)
  8251 			if (aDevSoundEvent == EEventInitialize)
  8246 				{
  8252 				{
  8247 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) ); 
  8253 				TUint8* tablePointer = const_cast<TUint8*>( &(KFixedSequenceTestSequenceDataX[0] ) );
  8248 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  8254 				TPtrC8 KFixedSequenceData(tablePointer,  sizeof(KFixedSequenceTestSequenceDataX));
  8249 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  8255 				INFO_PRINTF1(_L("Calling CMMFDevSound::PlayToneSequenceL"));
  8250 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  8256 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(KFixedSequenceData));
  8251 				if (err == KErrNotReady)
  8257 				if (err == KErrNotReady)
  8252 					{
  8258 					{
  8261 					}
  8267 					}
  8262 				}
  8268 				}
  8263 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8269 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8264 				{
  8270 				{
  8265 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8271 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8266 				StopTest(aError);	
  8272 				StopTest(aError);
  8267 				}
  8273 				}
  8268 			else
  8274 			else
  8269 				{
  8275 				{
  8270 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8276 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8271 				StopTest(aError, EFail);
  8277 				StopTest(aError, EFail);
  8335 			break;
  8341 			break;
  8336 			}
  8342 			}
  8337 		case EStateInitializing:
  8343 		case EStateInitializing:
  8338 			{
  8344 			{
  8339 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  8345 			if (aDevSoundEvent == EEventInitComplete && aError == KErrNone)
  8340 				{				
  8346 				{
  8341 				INFO_PRINTF1(_L("Calling iMMFDevSound->PlayToneSequenceL with an invalid descriptor as argument"));
  8347 				INFO_PRINTF1(_L("Calling iMMFDevSound->PlayToneSequenceL with an invalid descriptor as argument"));
  8342 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(iInvalidToneSequence));
  8348 				TRAPD(err, iMMFDevSound->PlayToneSequenceL(iInvalidToneSequence));
  8343 				if (err != KErrNone)
  8349 				if (err != KErrNone)
  8344 					{
  8350 					{
  8345 					ERR_PRINTF2(_L("CMMFDevSound::PlayToneSequenceL left with error = %d and it should not leave"), err);
  8351 					ERR_PRINTF2(_L("CMMFDevSound::PlayToneSequenceL left with error = %d and it should not leave"), err);
  8347 					}
  8353 					}
  8348 				}
  8354 				}
  8349 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8355 			else if (aDevSoundEvent == EEventInitComplete && aError != KErrNone)
  8350 				{
  8356 				{
  8351 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8357 				ERR_PRINTF2(_L("DevSound called CMMFDevSound::InitializeComplete with error = %d"), aError);
  8352 				StopTest(aError);	
  8358 				StopTest(aError);
  8353 				}
  8359 				}
  8354 			else
  8360 			else
  8355 				{
  8361 				{
  8356 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8362 				ERR_PRINTF2(_L("DevSound EEventInitComplete not received as expected. Received event: %d"), aDevSoundEvent);
  8357 				StopTest(aError, EFail);
  8363 				StopTest(aError, EFail);