os/mm/devsound/a3fintegrationtest/scripts/tsi_a3f_devsound_pcm_play4.script
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
LOAD_SUITE tsi_a3f_devsound.dll
sl@0
    17
sl@0
    18
sl@0
    19
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0028
sl@0
    20
//! @SYMTestCaseDesc			Negative: Initialize DevSound in Record mode and play (-ve)
sl@0
    21
//! @SYMTestPriority			High
sl@0
    22
//! @SYMTestType				CIT
sl@0
    23
//! @SYMREQ
sl@0
    24
//! @SYMPREQ					1540
sl@0
    25
//! @SYMTestActions				1. Initialise DevSound in Recording state
sl@0
    26
//!								2. Call PlayInitL
sl@0
    27
//!								3. Error code should be received
sl@0
    28
//! @SYMTestExpectedResults		PlayInitL must return with KErrNotReady
sl@0
    29
sl@0
    30
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0028 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
    31
TEST_COMPLETE
sl@0
    32
sl@0
    33
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0029
sl@0
    34
//! @SYMTestCaseDesc			Negative: Empty buffers during playback (-ve)
sl@0
    35
//! @SYMTestPriority			High
sl@0
    36
//! @SYMTestType				CIT
sl@0
    37
//! @SYMREQ
sl@0
    38
//! @SYMPREQ					1540
sl@0
    39
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
sl@0
    40
//!								2. Start playing and read recorded data from file.
sl@0
    41
//!								3. Call EmptyBuffers after the first BTBF state
sl@0
    42
//! @SYMTestExpectedResults		EmptyBuffers while playing should return with KErrNone
sl@0
    43
sl@0
    44
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0029 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
    45
TEST_COMPLETE
sl@0
    46
sl@0
    47
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0030
sl@0
    48
//! @SYMTestCaseDesc			Negative: Call InitializeL while playback is in progress (-ve)
sl@0
    49
//! @SYMTestPriority			High
sl@0
    50
//! @SYMTestType				CIT
sl@0
    51
//! @SYMREQ 					7927
sl@0
    52
//! @SYMPREQ					1540
sl@0
    53
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
sl@0
    54
//!								2. Start playing and read recorded data from file.
sl@0
    55
//!								3. After 10 seconds have passed, and playback is still in progress, initialise DevSound again
sl@0
    56
//!								4. Error code should be received
sl@0
    57
//! @SYMTestExpectedResults		Second call to InitializeL must return with KErrNotReady
sl@0
    58
sl@0
    59
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0030 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
    60
TEST_COMPLETE
sl@0
    61
sl@0
    62
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0031
sl@0
    63
//! @SYMTestCaseDesc			Negative: Initialize DevSound HwDeviceUID (-ve)
sl@0
    64
//! @SYMTestPriority			High
sl@0
    65
//! @SYMTestType				CIT
sl@0
    66
//! @SYMREQ
sl@0
    67
//! @SYMPREQ					1540
sl@0
    68
//! @SYMTestActions				1. Initialise DevSound using a HwDeviceUID instead of a FourCC code
sl@0
    69
//!								2. Error code should be received
sl@0
    70
//! @SYMTestExpectedResults		InitializeL must return with KErrNotSupported
sl@0
    71
sl@0
    72
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0031 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
    73
TEST_COMPLETE
sl@0
    74
sl@0
    75
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0032
sl@0
    76
//! @SYMTestCaseDesc			Positive: Set Play balance during playback and get it to confirm balance set correctly (+ve)
sl@0
    77
//! @SYMTestPriority			High
sl@0
    78
//! @SYMTestType				CIT
sl@0
    79
//! @SYMREQ
sl@0
    80
//! @SYMPREQ					1540
sl@0
    81
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
sl@0
    82
//!								2. Start playing and read recorded data from file.
sl@0
    83
//!								3. In the BuffertoBeFilled callback set the playback balance
sl@0
    84
//!								4. Get the balance and check that it's the same as the one that was set
sl@0
    85
//! @SYMTestExpectedResults		SetPlayBalanceL returns with KErrNone
sl@0
    86
//!								GetPlayBalanceL returns with KErrNone and the left and right balance values match the ones previously set
sl@0
    87
sl@0
    88
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0032 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
    89
TEST_COMPLETE
sl@0
    90
sl@0
    91
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0033
sl@0
    92
//! @SYMTestCaseDesc			Positive: Get the number of samples played after stopping the playback (+ve)
sl@0
    93
//! @SYMTestPriority			High
sl@0
    94
//! @SYMTestType				CIT
sl@0
    95
//! @SYMREQ
sl@0
    96
//! @SYMPREQ					1540
sl@0
    97
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
sl@0
    98
//!								2. Start playing and read recorded data from file.
sl@0
    99
//!								3. Stop playback after 10 seconds and get the number of samples played
sl@0
   100
//!								4. Samples Played should be more than 0
sl@0
   101
//! @SYMTestExpectedResults		SamplesPlayed should return a value greater than 0
sl@0
   102
sl@0
   103
RUN_TEST_STEP 600000 TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0033 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   104
TEST_COMPLETE
sl@0
   105
sl@0
   106
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0034
sl@0
   107
//! @SYMTestCaseDesc			Negative: Call second InitializeL before the first InitializeL has completed (-ve)
sl@0
   108
//! @SYMTestPriority			High
sl@0
   109
//! @SYMTestType				CIT
sl@0
   110
//! @SYMREQ 					7927
sl@0
   111
//! @SYMPREQ					1540
sl@0
   112
//! @SYMTestActions				1. Initialise DevSound for playback
sl@0
   113
//!								2. Initialise DevSound again without waiting for the InitializeComplete callback
sl@0
   114
//! @SYMTestExpectedResults		The first initialisation should complete correctly, the second one should fail with KErrNotReady
sl@0
   115
sl@0
   116
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0034 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   117
TEST_COMPLETE
sl@0
   118
sl@0
   119
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0035
sl@0
   120
//! @SYMTestCaseDesc			Negative: Call second PlayInitL before the first PlayInitL has completed (-ve)
sl@0
   121
//! @SYMTestPriority			High
sl@0
   122
//! @SYMTestType				CIT
sl@0
   123
//! @SYMREQ 					7927
sl@0
   124
//! @SYMPREQ					1540
sl@0
   125
//! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
sl@0
   126
//!								2. Call PlayInitL twice.
sl@0
   127
//!								3. In the BufferToBeFilled callback check the error codes of both PlayInitL calls
sl@0
   128
//! @SYMTestExpectedResults		The first PlayInitL should complete correctly, the second one should fail with KErrNotReady
sl@0
   129
sl@0
   130
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0035 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   131
TEST_COMPLETE
sl@0
   132
sl@0
   133
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0036
sl@0
   134
//! @SYMTestCaseDesc			Negative: Set the volume beyond the maximum and minimum supported values and get the set volume to check if volume is cropped (-ve)
sl@0
   135
//! @SYMTestPriority			High
sl@0
   136
//! @SYMTestType				CIT
sl@0
   137
//! @SYMREQ 					7927
sl@0
   138
//! @SYMPREQ					1540
sl@0
   139
//! @SYMTestActions				1. Initialise DevSound for playback
sl@0
   140
//!								2. Get the Max Volume supported
sl@0
   141
//!								3. Set the volume higher than the Max Volume
sl@0
   142
//!								4. Verify the volume was cropped to the Max Volume
sl@0
   143
//!								5. Set the volume lower than zero
sl@0
   144
//!								6. Verify the volume was cropped to zero
sl@0
   145
//! @SYMTestExpectedResults		Setting the volume to a value beyond the maximum supported volume will crop it to the maximum supported volume.
sl@0
   146
//!								Setting the volume to a value below the minimum supported volume will crop ot to the minimum supported volume
sl@0
   147
sl@0
   148
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0036 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   149
TEST_COMPLETE
sl@0
   150
sl@0
   151
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0037
sl@0
   152
//! @SYMTestCaseDesc			Negative: Initialize the DevSound in TMMFState EMMFStateConverting (-ve)
sl@0
   153
//! @SYMTestPriority			High
sl@0
   154
//! @SYMTestType				CIT
sl@0
   155
//! @SYMREQ 					7927
sl@0
   156
//! @SYMPREQ					1540
sl@0
   157
//! @SYMTestActions				1. Initialise DevSound in converting state
sl@0
   158
//! @SYMTestExpectedResults		InitializeL must return with KErrNotSupported. DevSound is not initialised
sl@0
   159
sl@0
   160
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0037 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   161
TEST_COMPLETE
sl@0
   162
sl@0
   163
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0038
sl@0
   164
//! @SYMTestCaseDesc			Positive: Call CMMFDevSound::CancelInitialize before the InitializeComplete callback. (+ve)
sl@0
   165
//! 							
sl@0
   166
//! @SYMTestPriority			High
sl@0
   167
//! @SYMTestType				CIT
sl@0
   168
//! @SYMREQ 					????
sl@0
   169
//! @SYMPREQ					1540
sl@0
   170
//! @SYMTestActions 			1.	Configure DevSound to play PCM16 raw audio data.
sl@0
   171
//! 							2.	Initialize DevSound via CMMFDevSound::InitializeL in play mode using TMMFState::EMMFStatePlaying.
sl@0
   172
//! 							3.	Call CMMFDevSound::CancelInitialize before the InitializeComplete callback is received
sl@0
   173
//! 							4.	Wait 10 seconds to ensure the InitializeComplete callback is not received.
sl@0
   174
//! 							5.	Call SetConfig to verify DevSound is not initialized.
sl@0
   175
//!
sl@0
   176
//! @SYMTestExpectedResults 	The CMMFDevSound::CancelInitialize call cancels the InitializeComplete callback. DevSound is not Initialized
sl@0
   177
sl@0
   178
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0038 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   179
TEST_COMPLETE
sl@0
   180
sl@0
   181
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0039
sl@0
   182
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::CancelInitialize after the InitializeComplete callback. (-ve)
sl@0
   183
//! 							
sl@0
   184
//! @SYMTestPriority			High
sl@0
   185
//! @SYMTestType				CIT
sl@0
   186
//! @SYMREQ 					????
sl@0
   187
//! @SYMPREQ					1540
sl@0
   188
//! @SYMTestActions 			1.	Configure DevSound to play PCM16 raw audio data.
sl@0
   189
//! 							2.	Initialize DevSound via CMMFDevSound::InitializeL in record mode using TMMFState::EMMFStateRecording.
sl@0
   190
//! 							3.	Call CMMFDevSound::CancelInitialize after the InitializeComplete callback is received
sl@0
   191
//!
sl@0
   192
//! @SYMTestExpectedResults 	The CMMFDevSound::CancelInitialize call returns with KErrNotReady. DevSound is Initialized
sl@0
   193
sl@0
   194
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0039 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   195
TEST_COMPLETE
sl@0
   196
sl@0
   197
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0040
sl@0
   198
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::EmptyBuffers after creating the DevSound object. (-ve)
sl@0
   199
//! 							
sl@0
   200
//! @SYMTestPriority			High
sl@0
   201
//! @SYMTestType				CIT
sl@0
   202
//! @SYMREQ 					????
sl@0
   203
//! @SYMPREQ					1540
sl@0
   204
//! @SYMTestActions 			1.	Create the DevSound object
sl@0
   205
//! 							2.	Call CMMFDevSound::EmptyBuffers
sl@0
   206
//!
sl@0
   207
//! @SYMTestExpectedResults 	The CMMFDevSound::EmptyBuffers call returns with KErrNotReady.
sl@0
   208
sl@0
   209
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0040
sl@0
   210
TEST_COMPLETE
sl@0
   211
sl@0
   212
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0041
sl@0
   213
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::EmptyBuffers after the InitializeComplete callback. (-ve)
sl@0
   214
//! 							
sl@0
   215
//! @SYMTestPriority			High
sl@0
   216
//! @SYMTestType				CIT
sl@0
   217
//! @SYMREQ 					????
sl@0
   218
//! @SYMPREQ					1540
sl@0
   219
//! @SYMTestActions 			1.	Configure DevSound to play PCM16 raw audio data.
sl@0
   220
//! 							2.	Initialize DevSound via CMMFDevSound::InitializeL in play mode using TMMFState::EMMFStatePlaying.
sl@0
   221
//! 							3.	Call CMMFDevSound::EmptyBuffers after the InitializeComplete callback is received
sl@0
   222
//!
sl@0
   223
//! @SYMTestExpectedResults 	The CMMFDevSound::EmptyBuffers call returns with KErrNotReady.
sl@0
   224
sl@0
   225
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0041 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   226
TEST_COMPLETE
sl@0
   227
sl@0
   228
//! @SYMTestCaseID				MM-A3F-DEVSOUND-PLAY-PCM-I-0042
sl@0
   229
//! @SYMTestCaseDesc			Negative: Call CMMFDevSound::EmptyBuffers before the InitializeComplete callback. (-ve)
sl@0
   230
//! 							
sl@0
   231
//! @SYMTestPriority			High
sl@0
   232
//! @SYMTestType				CIT
sl@0
   233
//! @SYMREQ 					????
sl@0
   234
//! @SYMPREQ					1540
sl@0
   235
//! @SYMTestActions 			1.	Configure DevSound to play PCM16 raw audio data.
sl@0
   236
//! 							2.	Initialize DevSound via CMMFDevSound::InitializeL in play mode using TMMFState::EMMFStatePlaying.
sl@0
   237
//! 							3.	Call CMMFDevSound::EmptyBuffers before the InitializeComplete callback is received
sl@0
   238
//!
sl@0
   239
//! @SYMTestExpectedResults 	The CMMFDevSound::EmptyBuffers call returns with KErrNotReady.
sl@0
   240
sl@0
   241
RUN_TEST_STEP 600000  TSI_A3F_DEVSOUND MM-A3F-DEVSOUND-PLAY-PCM-I-0042 \tsi_a3f_devsound\tsi_a3f_devsound_play.ini
sl@0
   242
TEST_COMPLETE