sl@0: // sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: // sl@0: //! @file sl@0: //! @SYMTestSuiteName multimedia-mmf-devsoundext-validation-automated-r sl@0: //! @SYMScriptTestEnvironment This test script requires a basic ROM. sl@0: // sl@0: // Tests all public elements of the CMMFDevSound sl@0: // classes as a means of confidence that the APIs work as expected. sl@0: // sl@0: // The purpose is to provide a regression test suite of PublishedAll sl@0: // APIs for: CMMFDevSound sl@0: // The tests are fully automated. sl@0: // sl@0: sl@0: sl@0: sl@0: LOAD_SUITE t_devsoundext sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001 sl@0: sl@0: //!@SYMTestCaseID MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001 sl@0: //!@SYMAPI sl@0: //! void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState ); sl@0: //! CMMFAudioInput::SetAudioInputL(TAudioInputArray) sl@0: //!@SYMAuthor jpacho sl@0: //!@SYMCreationDate 8/11/2008 sl@0: //!@SYMTestCaseDesc HW limitation - Radio recording without radio playback sl@0: //!@SYMTestActions sl@0: //! 1. Create DevSound instance sl@0: //! 2. Create AudioInput instance (DevSoundInstanceName = devsound1) sl@0: //! 3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecWithoutRadioPlay.pcm) sl@0: //! 4. Initialize DevSound (Mode = EMMFStateRecording; FourCC ={SpecialFourCC,RAW}) sl@0: //! 5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording) sl@0: //! 6. Capabilities sl@0: //! 7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 8. Set audio Input (AudioInput = Input_FMRadio) sl@0: //! 9.Start record (ExpectedRecordError = -21) sl@0: //! 10.Close file sl@0: //! 11.Destroy AudioInput instance sl@0: //! 12.Destroy DevSound instance sl@0: //!@SYMTestStatus Verified sl@0: //!@SYMTestPriority High sl@0: //!@SYMTestExpectedResults in step 9, record return the expected error -21. sl@0: //!@SYMTestType CIT sl@0: sl@0: START_TEST_BLOCK 90 t_devsoundext \multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: CREATE_OBJECT CAudioInput audioinput1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND audioinput1 NewL MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-NewL_command02 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-ReplaceFile_command03 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-InitializeL_command04 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetPrioritySettings_command05 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetConfigL_command07 sl@0: COMMAND audioinput1 SetAudioInput MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetAudioInput_command08 sl@0: COMMAND !AsyncError=-21 devsound1 RecordInitL sl@0: ASYNC_DELAY 10000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND audioinput1 ~ sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001 sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002 sl@0: sl@0: //!@SYMTestCaseID MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002 sl@0: //!@SYMAPI sl@0: //! void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState ); sl@0: //! CMMFAudioInput::SetAudioInputL(TAudioInputArray) sl@0: //!@SYMAuthor jpacho sl@0: //!@SYMCreationDate 8/11/2008 sl@0: //!@SYMTestCaseDesc HW limitation - Voice call recording without any input source sl@0: //!@SYMTestActions sl@0: //! 1. Create DevSound instance sl@0: //! 2. Create AudioInput instance (DevSoundInstanceName = devsound1) sl@0: //! 3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecWithoutRadioPlay.pcm) sl@0: //! 4. Initialize DevSound (Mode = EMMFStateRecording; FourCC ={SpecialFourCC,RAW}) sl@0: //! 5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording) sl@0: //! 6. Capabilities sl@0: //! 7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 8. Set audio Input (AudioInput = Input_VoiceCall) sl@0: //! 9.Start record (ExpectedRecordError = -21) sl@0: //! 10.Close file sl@0: //! 11.Destroy AudioInput instance sl@0: //! 12.Destroy DevSound instance sl@0: //!@SYMTestStatus Verified sl@0: //!@SYMTestPriority High sl@0: //!@SYMTestExpectedResults in step 9, record return the expected error -21. sl@0: //!@SYMTestType CIT sl@0: sl@0: START_TEST_BLOCK 90 t_devsoundext \multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: CREATE_OBJECT CAudioInput audioinput1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND audioinput1 NewL MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-NewL_command02 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-ReplaceFile_command03 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-InitializeL_command04 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetPrioritySettings_command05 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetConfigL_command07 sl@0: COMMAND audioinput1 SetAudioInput MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetAudioInput_command08 sl@0: COMMAND !AsyncError=-21 devsound1 RecordInitL sl@0: ASYNC_DELAY 10000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND audioinput1 ~ sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002 sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003 sl@0: sl@0: //!@SYMTestCaseID MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003 sl@0: //!@SYMAPI sl@0: //! void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState ); sl@0: //! CMMFAudioInput::SetAudioInputL(TAudioInputArray) sl@0: //!@SYMAuthor jpacho sl@0: //!@SYMCreationDate 8/11/2008 sl@0: //!@SYMTestCaseDesc Audio routing - 8k mono recording from line in sl@0: //!@SYMTestActions sl@0: //! 1. Create DevSound instance sl@0: //! 2. Create AudioInput instance (DevSoundInstanceName = devsound1) sl@0: //! 3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\RoutingRecLinein.amr) sl@0: //! 4. Initialize DevSound (Mode = EMMFStateRecording; FourCC = AMR) sl@0: //! 5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording) sl@0: //! 6. Capabilities sl@0: //! 7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 8. Set audio Input (AudioInput = Input_LineIn) sl@0: //! 9.Start record 10s sl@0: //! 10.Stop 5s sl@0: //! 11. Initialize DevSound (Mode = EMMFStateRecording; FourCC = AMR) sl@0: //! 12.Capabilities sl@0: //! 13.Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz) sl@0: //! 14. Set Priority (Priority = {Priority,PriorityAudioPlayback}; Preference = {PriorityPreference,PriorityPreferenceAudioPlayback};PriorityState=EMMFStatePlaying) sl@0: //! 15. FileStartPosition sl@0: //! 16.Star play sl@0: //! 17.Close file sl@0: //! 18.Destroy AudioInput instance sl@0: //! 19.Destroy DevSound instance sl@0: //!@SYMTestStatus Verified sl@0: //!@SYMTestPriority High sl@0: //!@SYMTestExpectedResults in step 9, record successfully. sl@0: //! in step 16, play successfully. sl@0: //!@SYMTestType CIT sl@0: sl@0: START_TEST_BLOCK 90 t_devsoundext \multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini sl@0: CREATE_OBJECT CMMFDevSound devsound1 sl@0: CREATE_OBJECT CAudioInput audioinput1 sl@0: COMMAND devsound1 NewL sl@0: COMMAND audioinput1 NewL MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-NewL_command02 sl@0: COMMAND devsound1 ReplaceFile MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-ReplaceFile_command03 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-InitializeL_command04 sl@0: OUTSTANDING sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetPrioritySettings_command05 sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetConfigL_command07 sl@0: COMMAND audioinput1 SetAudioInput MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetAudioInput_command08 sl@0: COMMAND devsound1 RecordInitL sl@0: ASYNC_DELAY 10000000 sl@0: COMMAND devsound1 Stop sl@0: DELAY 5000000 sl@0: COMMAND devsound1 InitializeL MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-InitializeL_command11 sl@0: OUTSTANDING sl@0: COMMAND devsound1 Capabilities sl@0: COMMAND devsound1 SetConfigL MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetConfigL_command13 sl@0: COMMAND devsound1 SetPrioritySettings MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetPrioritySettings_command14 sl@0: COMMAND devsound1 FileStartPosition sl@0: COMMAND devsound1 PlayInitL sl@0: ASYNC_DELAY 10000000 sl@0: COMMAND devsound1 CloseFile sl@0: COMMAND audioinput1 ~ sl@0: COMMAND devsound1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003