comparison src/ui/mfw/mfw_aud.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
comparison
equal deleted inserted replaced
187:a33dd8a5dcc9 188:92abb46dc1ba
11 PURPOSE : This module contains Audio Riveria Interface functions. 11 PURPOSE : This module contains Audio Riveria Interface functions.
12 12
13 HISTORY: 13 HISTORY:
14 14
15 Mar 28, 2007 DR: OMAPS00122762 x0039928 15 Mar 28, 2007 DR: OMAPS00122762 x0039928
16 Description: MM: Deleting a PCM Voice Memo message in one particular memory, 16 Description: MM: Deleting a PCM Voice Memo message in one particular memory,
17 delete them in all memories 17 delete them in all memories
18 Solution: voice memo position and pcm voice memo position is provided for all the devices. 18 Solution: voice memo position and pcm voice memo position is provided for all the devices.
19 19
20 July 03,2006 REF :OMAPS00083150 x0047075 20 July 03,2006 REF :OMAPS00083150 x0047075
21 Description :Audio muted on call swap / hold 21 Description :Audio muted on call swap / hold
22 Solution :Function call hl_drv_enable_vocoder() and hl_drv_disable_vocoder() are replaced with hl_drv_set_vocoder_state() 22 Solution :Function call hl_drv_enable_vocoder() and hl_drv_disable_vocoder() are replaced with hl_drv_set_vocoder_state()
23 Mar 15, 2006 ER: OMAPS00067709 x0pleela 23 Mar 15, 2006 ER: OMAPS00067709 x0pleela
24 Description: Voice Buffering implementation on C+ for PTT via PCM API 24 Description: Voice Buffering implementation on C+ for PTT via PCM API
25 Solution: Defined new macros of folder and file names for PCM voice memo and Voice buffering 25 Solution: Defined new macros of folder and file names for PCM voice memo and Voice buffering
26 Defined new macros for Microphone and network gain of PCM VM and Voice buffering 26 Defined new macros for Microphone and network gain of PCM VM and Voice buffering
27 Defined new functions set_voice_memo_type, get_voice_memo_type, set_voice_buffering_rec_stop_reason 27 Defined new functions set_voice_memo_type, get_voice_memo_type, set_voice_buffering_rec_stop_reason
28 Function: mfw_aud_vm_delete_file 28 Function: mfw_aud_vm_delete_file
29 Changes:Handling file deletion forPCM voice memo also 29 Changes:Handling file deletion forPCM voice memo also
31 Function: mfw_aud_vm_start_playback, mfw_aud_vm_stop_playback, mfw_aud_vm_start_record, 31 Function: mfw_aud_vm_start_playback, mfw_aud_vm_stop_playback, mfw_aud_vm_start_record,
32 mfw_aud_vm_stop_record, mfw_aud_vm_get_duration, mfw_aud_vm_set_duration 32 mfw_aud_vm_stop_record, mfw_aud_vm_get_duration, mfw_aud_vm_set_duration
33 Changes: Added code to call respective audio APIs for PCM voice memo and voice buffering 33 Changes: Added code to call respective audio APIs for PCM voice memo and voice buffering
34 34
35 Feb 24, 2006 ER: OMAPS00067709 x0pleela 35 Feb 24, 2006 ER: OMAPS00067709 x0pleela
36 Description: Voice Buffering implementation on C+ for PTT via PCM API 36 Description: Voice Buffering implementation on C+ for PTT via PCM API
37 Solution: Defined a global variable gPcm_voice_Memo which indicates which Voice memo is active 37 Solution: Defined a global variable gPcm_voice_Memo which indicates which Voice memo is active
38 and corresponding audio APIs will be invoked and duplication of code is avoided 38 and corresponding audio APIs will be invoked and duplication of code is avoided
39 39
40 Feb 24, 2006 ER: OMAPS00067709 x0pleela 40 Feb 24, 2006 ER: OMAPS00067709 x0pleela
41 Description: Voice Buffering implementation on C+ for PTT via PCM API 41 Description: Voice Buffering implementation on C+ for PTT via PCM API
42 Solution: Adding new macros PCM_VM_FILE_NAME, PCM_VM_FOLDER to define new files for PCM voice memo 42 Solution: Adding new macros PCM_VM_FILE_NAME, PCM_VM_FOLDER to define new files for PCM voice memo
43 Following functions are implemented to support PCM voice memo feature 43 Following functions are implemented to support PCM voice memo feature
44 mfw_aud_vm_pcm_delete_file: Delete the file which held the PCM Voice Memo 44 mfw_aud_vm_pcm_delete_file: Delete the file which held the PCM Voice Memo
45 mfw_aud_vm_pcm_start_playback: Start playback of a previously recorded PCM Voice Memo 45 mfw_aud_vm_pcm_start_playback: Start playback of a previously recorded PCM Voice Memo
46 mfw_aud_vm_pcm_stop_playback: Stop playback of a previously recorded PCM Voice Memo 46 mfw_aud_vm_pcm_stop_playback: Stop playback of a previously recorded PCM Voice Memo
47 mfw_aud_vm_pcm_start_record: Configure Riviera and start recording a PCM Voice Memo 47 mfw_aud_vm_pcm_start_record: Configure Riviera and start recording a PCM Voice Memo
48 mfw_aud_vm_pcm_stop_record: Stop recording a PCM Voice Memo 48 mfw_aud_vm_pcm_stop_record: Stop recording a PCM Voice Memo
49 mfw_aud_vm_pcm_get_duration: Get the duration of the previously recorded PCM Voice Memo 49 mfw_aud_vm_pcm_get_duration: Get the duration of the previously recorded PCM Voice Memo
50 mfw_aud_vm_pcm_set_duration: Set the duration of the previously recorded PCM Voice Memo 50 mfw_aud_vm_pcm_set_duration: Set the duration of the previously recorded PCM Voice Memo
51 51
52 Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth) 52 Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth)
53 Description: Need to reduce flash foot-print for Locosto Lite 53 Description: Need to reduce flash foot-print for Locosto Lite
54 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile 54 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile
55 out voice memo feature if the above flag is enabled. 55 out voice memo feature if the above flag is enabled.
56 56
57 Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar 57 Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
58 Description: RE: Vocoder interface change 58 Description: RE: Vocoder interface change
59 Solution: Function call 'enable_tch_vocoder()' is replaced with new functions 'hl_drv_enable_vocoder()' 59 Solution: Function call 'enable_tch_vocoder()' is replaced with new functions 'hl_drv_enable_vocoder()'
60 and 'hl_drv_disable_vocoder()' 60 and 'hl_drv_disable_vocoder()'
61 61
62 Aug 25, 2004 REF: CRR 20655 xnkulkar 62 Aug 25, 2004 REF: CRR 20655 xnkulkar
63 Description: Voice Memo functionality not working 63 Description: Voice Memo functionality not working
64 Solution: The voice recording functionality was failing because 64 Solution: The voice recording functionality was failing because
65 " mmi" folder is not present. As a solution, we create the 65 " mmi" folder is not present. As a solution, we create the
66 "mmi" folder and then proceed with recording. 66 "mmi" folder and then proceed with recording.
67 */ 67 */
68 68
69 69
70 /* 70 /*
100 100
101 //x0pleela 06 Jul, 2006 DR: OMAPS00067709 101 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
102 //fix from AS team 102 //fix from AS team
103 #ifdef FF_PCM_VM_VB 103 #ifdef FF_PCM_VM_VB
104 #include "l1audio_cust.h" 104 #include "l1audio_cust.h"
105 #endif 105 #endif
106 /* 106 /*
107 ** Local Variable Definitions 107 ** Local Variable Definitions
108 */ 108 */
109 109
110 #ifndef FF_NO_VOICE_MEMO 110 #ifndef FF_NO_VOICE_MEMO
140 #define VM_TONE_INTERVAL (50) 140 #define VM_TONE_INTERVAL (50)
141 #define VM_TONE_AMPLITUDE (-24) // Default Amplitude of -24dB 141 #define VM_TONE_AMPLITUDE (-24) // Default Amplitude of -24dB
142 142
143 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 143 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
144 #ifdef FF_PCM_VM_VB 144 #ifdef FF_PCM_VM_VB
145 static T_VOICEMEMO VoiceMemoType; /* Voice memo type*/ 145 static T_VOICEMEMO VoiceMemoType; /* Voice memo type*/
146 146
147 //x0pleela 09 Mar, 2006 ER OMAPS00067709 147 //x0pleela 09 Mar, 2006 ER OMAPS00067709
148 GLOBAL T_voice_buffering voice_buffering_data; /* Voice buffering data */ 148 GLOBAL T_voice_buffering voice_buffering_data; /* Voice buffering data */
149 #endif 149 #endif
150 150
237 memset(tmpFile, 0x00, AUDIO_PATH_NAME_MAX_SIZE); 237 memset(tmpFile, 0x00, AUDIO_PATH_NAME_MAX_SIZE);
238 #ifdef FF_PCM_VM_VB 238 #ifdef FF_PCM_VM_VB
239 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 239 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
240 //deleting PCM Voice memo file 240 //deleting PCM Voice memo file
241 if( get_voice_memo_type() EQ PCM_VOICE_MEMO) 241 if( get_voice_memo_type() EQ PCM_VOICE_MEMO)
242 #ifdef FF_MMI_FILEMANAGER 242 #ifdef FF_MMI_FILEMANAGER
243 { 243 {
244 switch(FFS_flashData.PCM_voicememo_storage) 244 switch(FFS_flashData.PCM_voicememo_storage)
245 { 245 {
246 case SNAP_STG_FFS: 246 case SNAP_STG_FFS:
247 strcpy(path, "/FFS"); 247 strcpy(path, "/FFS");
248 break; 248 break;
249 249
250 case SNAP_STG_NORMS: 250 case SNAP_STG_NORMS:
251 strcpy(path, "/NOR"); 251 strcpy(path, "/NOR");
252 break; 252 break;
253 253
254 case SNAP_STG_NAND: 254 case SNAP_STG_NAND:
255 strcpy(path, "/NAND"); 255 strcpy(path, "/NAND");
256 break; 256 break;
257 257
258 case SNAP_STG_MMC: 258 case SNAP_STG_MMC:
260 break; 260 break;
261 } 261 }
262 262
263 strcat(path, PCM_VM_FOLDER); 263 strcat(path, PCM_VM_FOLDER);
264 configure_vm_filename(tmpFile, path, PCM_VM_FILE_NAME, 0); 264 configure_vm_filename(tmpFile, path, PCM_VM_FILE_NAME, 0);
265 } 265 }
266 #else 266 #else
267 configure_vm_filename(tmpFile, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0); 267 configure_vm_filename(tmpFile, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
268 #endif 268 #endif
269 else 269 else
270 { 270 {
271 if (get_voice_memo_type() EQ AMR_VOICE_MEMO) 271 if (get_voice_memo_type() EQ AMR_VOICE_MEMO)
272 #endif 272 #endif
273 #ifdef FF_MMI_FILEMANAGER 273 #ifdef FF_MMI_FILEMANAGER
274 { 274 {
275 switch(FFS_flashData.voicememo_storage) 275 switch(FFS_flashData.voicememo_storage)
276 { 276 {
277 case SNAP_STG_FFS: 277 case SNAP_STG_FFS:
278 strcpy(path, "/FFS"); 278 strcpy(path, "/FFS");
279 break; 279 break;
280 280
281 case SNAP_STG_NORMS: 281 case SNAP_STG_NORMS:
282 strcpy(path, "/NOR"); 282 strcpy(path, "/NOR");
283 break; 283 break;
284 284
285 case SNAP_STG_NAND: 285 case SNAP_STG_NAND:
286 strcpy(path, "/NAND"); 286 strcpy(path, "/NAND");
287 break; 287 break;
288 288
289 case SNAP_STG_MMC: 289 case SNAP_STG_MMC:
291 break; 291 break;
292 } 292 }
293 293
294 strcat(path, VM_FOLDER); 294 strcat(path, VM_FOLDER);
295 configure_vm_filename(tmpFile, path, VM_FILE_NAME, 0); 295 configure_vm_filename(tmpFile, path, VM_FILE_NAME, 0);
296 } 296 }
297 #else 297 #else
298 configure_vm_filename(tmpFile, VM_FOLDER, VM_FILE_NAME, 0); 298 configure_vm_filename(tmpFile, VM_FOLDER, VM_FILE_NAME, 0);
299 #endif 299 #endif
300 300
301 #ifdef FF_PCM_VM_VB 301 #ifdef FF_PCM_VM_VB
324 SHORT mfw_aud_vm_start_playback(void (*callback_fn)(void *)) 324 SHORT mfw_aud_vm_start_playback(void (*callback_fn)(void *))
325 { 325 {
326 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR; 326 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
327 T_AUDIO_VM_PLAY_PARAMETER mfw_vm_play_param; 327 T_AUDIO_VM_PLAY_PARAMETER mfw_vm_play_param;
328 328
329 #ifdef FF_MMI_FILEMANAGER 329 #ifdef FF_MMI_FILEMANAGER
330 char path[AUDIO_PATH_NAME_MAX_SIZE]; 330 char path[AUDIO_PATH_NAME_MAX_SIZE];
331 T_RFS_STAT fstat; /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */ 331 T_RFS_STAT fstat; /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
332 #endif 332 #endif
333 //x0pleela 01 Mar, 2006 ER:OMAPS00067709 333 //x0pleela 01 Mar, 2006 ER:OMAPS00067709
334 #ifdef FF_PCM_VM_VB 334 #ifdef FF_PCM_VM_VB
335 T_AUDIO_VM_PCM_PLAY_PARAMETER mfw_vm_pcm_play_param; /* Defined new variable for pcm VM */ 335 T_AUDIO_VM_PCM_PLAY_PARAMETER mfw_vm_pcm_play_param; /* Defined new variable for pcm VM */
336 T_AUDIO_VBUF_PCM_PLAY_PARAMETER mfw_vbuf_pcm_play_param; /* Defined new variable for voice buffering*/ 336 T_AUDIO_VBUF_PCM_PLAY_PARAMETER mfw_vbuf_pcm_play_param; /* Defined new variable for voice buffering*/
337 UBYTE vm_type; /*to store voice memo type */ 337 UBYTE vm_type; /*to store voice memo type */
338 #endif 338 #endif
339 339
340 TRACE_FUNCTION("mfw_aud_vm_start_playback"); 340 TRACE_FUNCTION("mfw_aud_vm_start_playback");
341 #ifndef FF_MMI_FILEMANAGER /* Mar 28, 2007 DR: OMAPS00122762 x0039928*/ 341 #ifndef FF_MMI_FILEMANAGER /* Mar 28, 2007 DR: OMAPS00122762 x0039928*/
347 #endif /* FF_PCM_VM_VB */ 347 #endif /* FF_PCM_VM_VB */
348 if (FFS_flashData.voice_memo_position EQ 0) 348 if (FFS_flashData.voice_memo_position EQ 0)
349 { 349 {
350 return MFW_AUD_VM_MEM_EMPTY; 350 return MFW_AUD_VM_MEM_EMPTY;
351 } 351 }
352 #ifdef FF_PCM_VM_VB 352 #ifdef FF_PCM_VM_VB
353 break; 353 break;
354 354
355 case PCM_VOICE_MEMO: 355 case PCM_VOICE_MEMO:
356 if (FFS_flashData.pcm_voice_memo_position EQ 0) 356 if (FFS_flashData.pcm_voice_memo_position EQ 0)
357 { 357 {
361 default: 361 default:
362 break; 362 break;
363 } 363 }
364 #endif /* FF_PCM_VM_VB */ 364 #endif /* FF_PCM_VM_VB */
365 #endif 365 #endif
366 366
367 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 367 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
368 //Set up the PCM Voice Memo filename in FFS 368 //Set up the PCM Voice Memo filename in FFS
369 #ifdef FF_PCM_VM_VB 369 #ifdef FF_PCM_VM_VB
370 //get the voice memo type 370 //get the voice memo type
371 vm_type = get_voice_memo_type(); 371 vm_type = get_voice_memo_type();
372 if( vm_type EQ PCM_VOICE_MEMO ) 372 if( vm_type EQ PCM_VOICE_MEMO )
373 #ifdef FF_MMI_FILEMANAGER 373 #ifdef FF_MMI_FILEMANAGER
374 { 374 {
375 switch(FFS_flashData.PCM_voicememo_storage) 375 switch(FFS_flashData.PCM_voicememo_storage)
376 { 376 {
377 case SNAP_STG_FFS: 377 case SNAP_STG_FFS:
378 strcpy(path, "/FFS"); 378 strcpy(path, "/FFS");
398 #ifdef FF_MMI_FILEMANAGER 398 #ifdef FF_MMI_FILEMANAGER
399 if(rfs_stat(mfw_vm_pcm_play_param.memo_name,&fstat) != RFS_EOK) 399 if(rfs_stat(mfw_vm_pcm_play_param.memo_name,&fstat) != RFS_EOK)
400 { 400 {
401 return MFW_AUD_VM_MEM_EMPTY; 401 return MFW_AUD_VM_MEM_EMPTY;
402 } 402 }
403 #endif 403 #endif
404 } 404 }
405 #else 405 #else
406 configure_vm_filename(mfw_vm_pcm_play_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0); 406 configure_vm_filename(mfw_vm_pcm_play_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
407 #endif 407 #endif
408 //x0pleela 09 Mar, 2006 ER:OMAPS00067709 408 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
409 //Set up the Voice buffering filename in FFS 409 //Set up the Voice buffering filename in FFS
410 else if (vm_type EQ VOICE_BUFFERING ) 410 else if (vm_type EQ VOICE_BUFFERING )
411 #ifdef FF_MMI_FILEMANAGER 411 #ifdef FF_MMI_FILEMANAGER
412 { 412 {
413 switch(FFS_flashData.voicebuffer_storage) 413 switch(FFS_flashData.voicebuffer_storage)
414 { 414 {
415 case SNAP_STG_FFS: 415 case SNAP_STG_FFS:
416 strcpy(path, "/FFS"); 416 strcpy(path, "/FFS");
417 break; 417 break;
418 418
419 case SNAP_STG_NORMS: 419 case SNAP_STG_NORMS:
420 strcpy(path, "/NOR"); 420 strcpy(path, "/NOR");
421 break; 421 break;
422 422
423 case SNAP_STG_NAND: 423 case SNAP_STG_NAND:
424 strcpy(path, "/NAND"); 424 strcpy(path, "/NAND");
425 break; 425 break;
426 426
427 case SNAP_STG_MMC: 427 case SNAP_STG_MMC:
429 break; 429 break;
430 } 430 }
431 431
432 strcat(path, VOICE_BUFF_FOLDER); 432 strcat(path, VOICE_BUFF_FOLDER);
433 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0); 433 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0);
434 } 434 }
435 #else 435 #else
436 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0); 436 configure_vm_filename(mfw_vbuf_pcm_play_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
437 #endif 437 #endif
438 else 438 else
439 { 439 {
440 if (vm_type EQ AMR_VOICE_MEMO) 440 if (vm_type EQ AMR_VOICE_MEMO)
441 #endif 441 #endif
442 #ifdef FF_MMI_FILEMANAGER 442 #ifdef FF_MMI_FILEMANAGER
443 { 443 {
444 switch(FFS_flashData.voicememo_storage) 444 switch(FFS_flashData.voicememo_storage)
445 { 445 {
446 case SNAP_STG_FFS: 446 case SNAP_STG_FFS:
447 strcpy(path, "/FFS"); 447 strcpy(path, "/FFS");
448 break; 448 break;
449 449
450 case SNAP_STG_NORMS: 450 case SNAP_STG_NORMS:
451 strcpy(path, "/NOR"); 451 strcpy(path, "/NOR");
452 break; 452 break;
453 453
454 case SNAP_STG_NAND: 454 case SNAP_STG_NAND:
455 strcpy(path, "/NAND"); 455 strcpy(path, "/NAND");
456 break; 456 break;
457 457
458 case SNAP_STG_MMC: 458 case SNAP_STG_MMC:
468 if(rfs_stat(mfw_vm_play_param.memo_name,&fstat) != RFS_EOK) 468 if(rfs_stat(mfw_vm_play_param.memo_name,&fstat) != RFS_EOK)
469 { 469 {
470 return MFW_AUD_VM_MEM_EMPTY; 470 return MFW_AUD_VM_MEM_EMPTY;
471 } 471 }
472 #endif 472 #endif
473 } 473 }
474 #else 474 #else
475 //Set up the Voice Memo filename in FFS 475 //Set up the Voice Memo filename in FFS
476 configure_vm_filename(mfw_vm_play_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0); 476 configure_vm_filename(mfw_vm_play_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0);
477 #endif 477 #endif
478 #ifdef FF_PCM_VM_VB 478 #ifdef FF_PCM_VM_VB
488 if( vm_type EQ PCM_VOICE_MEMO ) 488 if( vm_type EQ PCM_VOICE_MEMO )
489 { 489 {
490 //update mfw_vm_pcm_play_param 490 //update mfw_vm_pcm_play_param
491 mfw_vm_pcm_play_param.memo_duration = mfw_aud_vm_get_duration(); 491 mfw_vm_pcm_play_param.memo_duration = mfw_aud_vm_get_duration();
492 mfw_vm_pcm_play_param.speaker_gain = PCM_VM_MICROPHONE_GAIN; 492 mfw_vm_pcm_play_param.speaker_gain = PCM_VM_MICROPHONE_GAIN;
493 mfw_vm_pcm_play_param.network_gain= 0; 493 mfw_vm_pcm_play_param.network_gain= 0;
494 494
495 //Start playing PCM Voice memo 495 //Start playing PCM Voice memo
496 audio_riv_retVal = audio_vm_pcm_play_start(&mfw_vm_pcm_play_param, 496 audio_riv_retVal = audio_vm_pcm_play_start(&mfw_vm_pcm_play_param,
497 voice_memo_return_path); 497 voice_memo_return_path);
498 } 498 }
499 else if ( vm_type EQ VOICE_BUFFERING ) 499 else if ( vm_type EQ VOICE_BUFFERING )
500 { 500 {
501 //update mfw_vbuf_pcm_play_param 501 //update mfw_vbuf_pcm_play_param
502 mfw_vbuf_pcm_play_param.memo_duration = PCM_VOICE_MEMO_MAX_DURATION; 502 mfw_vbuf_pcm_play_param.memo_duration = PCM_VOICE_MEMO_MAX_DURATION;
503 mfw_vbuf_pcm_play_param.speaker_gain = 0; 503 mfw_vbuf_pcm_play_param.speaker_gain = 0;
504 mfw_vbuf_pcm_play_param.network_gain= PCM_VM_NETWORK_GAIN; 504 mfw_vbuf_pcm_play_param.network_gain= PCM_VM_NETWORK_GAIN;
505 505
506 //x0pleela 06 Jul, 2006 DR: OMAPS00067709 506 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
507 //Fix from AS team 507 //Fix from AS team
508 vocoder_mute_ul(1); 508 vocoder_mute_ul(1);
509 509
540 */ 540 */
541 SHORT mfw_aud_vm_stop_playback(void (*callback_fn)(void *)) 541 SHORT mfw_aud_vm_stop_playback(void (*callback_fn)(void *))
542 { 542 {
543 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR; 543 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
544 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 544 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
545 #ifdef FF_PCM_VM_VB 545 #ifdef FF_PCM_VM_VB
546 UBYTE vm_type; //to store voice memo type 546 UBYTE vm_type; //to store voice memo type
547 #endif 547 #endif
548 548
549 TRACE_FUNCTION("mfw_aud_vm_stop_playback"); 549 TRACE_FUNCTION("mfw_aud_vm_stop_playback");
550 configure_callback_fn(callback_fn); 550 configure_callback_fn(callback_fn);
557 557
558 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 558 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
559 //Stop playing PCM Voice memo 559 //Stop playing PCM Voice memo
560 if( vm_type EQ PCM_VOICE_MEMO ) 560 if( vm_type EQ PCM_VOICE_MEMO )
561 audio_riv_retVal = audio_vm_pcm_play_stop(voice_memo_return_path); 561 audio_riv_retVal = audio_vm_pcm_play_stop(voice_memo_return_path);
562 //Stop playing 562 //Stop playing
563 else if ( vm_type EQ VOICE_BUFFERING ) 563 else if ( vm_type EQ VOICE_BUFFERING )
564 { 564 {
565 audio_riv_retVal = audio_voice_buffering_pcm_play_stop (voice_memo_return_path); 565 audio_riv_retVal = audio_voice_buffering_pcm_play_stop (voice_memo_return_path);
566 //x0pleela 06 Jul, 2006 DR: OMAPS00067709 566 //x0pleela 06 Jul, 2006 DR: OMAPS00067709
567 //Fix from AS team 567 //Fix from AS team
568 vocoder_mute_ul(0); 568 vocoder_mute_ul(0);
569 } 569 }
570 else 570 else
571 { 571 {
572 if (vm_type EQ AMR_VOICE_MEMO) 572 if (vm_type EQ AMR_VOICE_MEMO)
573 #endif 573 #endif
590 { 590 {
591 T_RFS_RET ffsResult; 591 T_RFS_RET ffsResult;
592 T_RFS_DIR f_dir, f_dir1; 592 T_RFS_DIR f_dir, f_dir1;
593 char dir_path[FM_MAX_DIR_PATH_LENGTH]; 593 char dir_path[FM_MAX_DIR_PATH_LENGTH];
594 UINT16 dir_path_uc[FM_MAX_DIR_PATH_LENGTH]; 594 UINT16 dir_path_uc[FM_MAX_DIR_PATH_LENGTH];
595 595
596 memset(dir_path, 0, FM_MAX_DIR_PATH_LENGTH); 596 memset(dir_path, 0, FM_MAX_DIR_PATH_LENGTH);
597 switch(vmtype) 597 switch(vmtype)
598 { 598 {
599 case AMR_VOICE_MEMO: 599 case AMR_VOICE_MEMO:
600 switch(FFS_flashData.voicememo_storage) 600 switch(FFS_flashData.voicememo_storage)
604 break; 604 break;
605 605
606 case SNAP_STG_NORMS: 606 case SNAP_STG_NORMS:
607 strcpy(dir_path, "/NOR/mmi"); 607 strcpy(dir_path, "/NOR/mmi");
608 break; 608 break;
609 609
610 case SNAP_STG_NAND: 610 case SNAP_STG_NAND:
611 strcpy(dir_path, "/NAND/mmi"); 611 strcpy(dir_path, "/NAND/mmi");
612 break; 612 break;
613 613
614 case SNAP_STG_MMC: 614 case SNAP_STG_MMC:
615 strcpy(dir_path, "/MMC/mmi"); 615 strcpy(dir_path, "/MMC/mmi");
616 break; 616 break;
617 } 617 }
618 convert_u8_to_unicode(dir_path, dir_path_uc); 618 convert_u8_to_unicode(dir_path, dir_path_uc);
619 ffsResult = rfs_opendir(dir_path_uc,&f_dir); 619 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
620 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 620 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
621 621
622 if(RFS_ENOENT == ffsResult) 622 if(RFS_ENOENT == ffsResult)
623 { 623 {
624 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 624 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
633 } 633 }
634 else if(ffsResult > 0) 634 else if(ffsResult > 0)
635 { 635 {
636 strcat(dir_path, "/vm"); 636 strcat(dir_path, "/vm");
637 convert_u8_to_unicode(dir_path, dir_path_uc); 637 convert_u8_to_unicode(dir_path, dir_path_uc);
638 ffsResult = rfs_opendir(dir_path_uc,&f_dir1); 638 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
639 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 639 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
640 640
641 if(RFS_ENOENT == ffsResult) 641 if(RFS_ENOENT == ffsResult)
642 { 642 {
643 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 643 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
644 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path); 644 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
645 } 645 }
646 else if (ffsResult > 0) 646 else if (ffsResult > 0)
647 rfs_closedir(&f_dir1); 647 rfs_closedir(&f_dir1);
648 648
649 rfs_closedir(&f_dir); 649 rfs_closedir(&f_dir);
650 } 650 }
651 break; 651 break;
652 652
653 case PCM_VOICE_MEMO: 653 case PCM_VOICE_MEMO:
654 switch(FFS_flashData.PCM_voicememo_storage) 654 switch(FFS_flashData.PCM_voicememo_storage)
658 break; 658 break;
659 659
660 case SNAP_STG_NORMS: 660 case SNAP_STG_NORMS:
661 strcpy(dir_path, "/NOR/mmi"); 661 strcpy(dir_path, "/NOR/mmi");
662 break; 662 break;
663 663
664 case SNAP_STG_NAND: 664 case SNAP_STG_NAND:
665 strcpy(dir_path, "/NAND/mmi"); 665 strcpy(dir_path, "/NAND/mmi");
666 break; 666 break;
667 667
668 case SNAP_STG_MMC: 668 case SNAP_STG_MMC:
669 strcpy(dir_path, "/MMC/mmi"); 669 strcpy(dir_path, "/MMC/mmi");
670 break; 670 break;
671 } 671 }
672 convert_u8_to_unicode(dir_path, dir_path_uc); 672 convert_u8_to_unicode(dir_path, dir_path_uc);
673 ffsResult = rfs_opendir(dir_path_uc,&f_dir); 673 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
674 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 674 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
675 675
676 if(RFS_ENOENT == ffsResult) 676 if(RFS_ENOENT == ffsResult)
677 { 677 {
678 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 678 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
679 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path); 679 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
680 if(ffsResult == 0) 680 if(ffsResult == 0)
681 { 681 {
682 strcat(dir_path, "/pcmvm"); 682 strcat(dir_path, "/pcmvm");
683 convert_u8_to_unicode(dir_path, dir_path_uc); 683 convert_u8_to_unicode(dir_path, dir_path_uc);
684 ffsResult = rfs_opendir(dir_path_uc,&f_dir1); 684 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
685 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 685 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
686 686
687 if(RFS_ENOENT == ffsResult) 687 if(RFS_ENOENT == ffsResult)
688 { 688 {
689 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 689 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
690 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path); 690 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
691 } 691 }
692 else if (ffsResult > 0) 692 else if (ffsResult > 0)
693 rfs_closedir(&f_dir1); 693 rfs_closedir(&f_dir1);
694 694
695 rfs_closedir(&f_dir); 695 rfs_closedir(&f_dir);
696 } 696 }
697 697
698 } 698 }
699 else if(ffsResult > 0) 699 else if(ffsResult > 0)
700 { 700 {
701 strcat(dir_path, "/pcmvm"); 701 strcat(dir_path, "/pcmvm");
702 convert_u8_to_unicode(dir_path, dir_path_uc); 702 convert_u8_to_unicode(dir_path, dir_path_uc);
703 ffsResult = rfs_opendir(dir_path_uc,&f_dir1); 703 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
704 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 704 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
705 705
706 if(RFS_ENOENT == ffsResult) 706 if(RFS_ENOENT == ffsResult)
707 { 707 {
708 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 708 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
709 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path); 709 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
710 } 710 }
711 } 711 }
712 712
713 break; 713 break;
714 714
715 case VOICE_BUFFERING: 715 case VOICE_BUFFERING:
716 switch(FFS_flashData.voicebuffer_storage) 716 switch(FFS_flashData.voicebuffer_storage)
717 { 717 {
720 break; 720 break;
721 721
722 case SNAP_STG_NORMS: 722 case SNAP_STG_NORMS:
723 strcpy(dir_path, "/NOR/mmi"); 723 strcpy(dir_path, "/NOR/mmi");
724 break; 724 break;
725 725
726 case SNAP_STG_NAND: 726 case SNAP_STG_NAND:
727 strcpy(dir_path, "/NAND/mmi"); 727 strcpy(dir_path, "/NAND/mmi");
728 break; 728 break;
729 729
730 case SNAP_STG_MMC: 730 case SNAP_STG_MMC:
731 strcpy(dir_path, "/MMC/mmi"); 731 strcpy(dir_path, "/MMC/mmi");
732 break; 732 break;
733 } 733 }
734 convert_u8_to_unicode(dir_path, dir_path_uc); 734 convert_u8_to_unicode(dir_path, dir_path_uc);
735 ffsResult = rfs_opendir(dir_path_uc,&f_dir); 735 ffsResult = rfs_opendir(dir_path_uc,&f_dir);
736 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 736 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
737 737
738 if(RFS_ENOENT == ffsResult) 738 if(RFS_ENOENT == ffsResult)
739 { 739 {
740 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 740 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
742 742
743 if(ffsResult == 0) 743 if(ffsResult == 0)
744 { 744 {
745 strcat(dir_path, "/vb"); 745 strcat(dir_path, "/vb");
746 convert_u8_to_unicode(dir_path, dir_path_uc); 746 convert_u8_to_unicode(dir_path, dir_path_uc);
747 ffsResult = rfs_opendir(dir_path_uc,&f_dir1); 747 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
748 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 748 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
749 749
750 if(RFS_ENOENT == ffsResult) 750 if(RFS_ENOENT == ffsResult)
751 { 751 {
752 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 752 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
756 } 756 }
757 else if(ffsResult > 0) 757 else if(ffsResult > 0)
758 { 758 {
759 strcat(dir_path, "/vb"); 759 strcat(dir_path, "/vb");
760 convert_u8_to_unicode(dir_path, dir_path_uc); 760 convert_u8_to_unicode(dir_path, dir_path_uc);
761 ffsResult = rfs_opendir(dir_path_uc,&f_dir1); 761 ffsResult = rfs_opendir(dir_path_uc,&f_dir1);
762 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path); 762 TRACE_EVENT_P2("Opendir - ffsResult %d Dir path %s", ffsResult,dir_path);
763 763
764 if(RFS_ENOENT == ffsResult) 764 if(RFS_ENOENT == ffsResult)
765 { 765 {
766 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU); 766 ffsResult = rfs_mkdir(dir_path_uc, RFS_IRWXU);
767 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path); 767 TRACE_EVENT_P2("Makedir - ffsResult %d Dir path %s", ffsResult,dir_path);
768 } 768 }
769 else if (ffsResult > 0) 769 else if (ffsResult > 0)
770 rfs_closedir(&f_dir1); 770 rfs_closedir(&f_dir1);
771 771
772 rfs_closedir(&f_dir); 772 rfs_closedir(&f_dir);
773 } 773 }
774 break; 774 break;
775 } 775 }
776 } 776 }
777 #endif 777 #endif
790 { 790 {
791 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR; 791 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
792 T_AUDIO_VM_RECORD_PARAMETER mfw_vm_record_param; 792 T_AUDIO_VM_RECORD_PARAMETER mfw_vm_record_param;
793 T_AUDIO_TONES_PARAMETER mfw_vm_tones_param; 793 T_AUDIO_TONES_PARAMETER mfw_vm_tones_param;
794 794
795 #ifdef FF_MMI_FILEMANAGER 795 #ifdef FF_MMI_FILEMANAGER
796 char path[FM_MAX_DIR_PATH_LENGTH]; 796 char path[FM_MAX_DIR_PATH_LENGTH];
797 #else 797 #else
798 char * mmiDir = "/mmi"; // Aug 25, 2004 REF: CRR 20655 xnkulkar 798 char * mmiDir = "/mmi"; // Aug 25, 2004 REF: CRR 20655 xnkulkar
799 #endif 799 #endif
800 800
801 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 801 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
802 //defining new variable for PCM recording 802 //defining new variable for PCM recording
803 #ifdef FF_PCM_VM_VB 803 #ifdef FF_PCM_VM_VB
804 T_AUDIO_VM_PCM_RECORD_PARAMETER mfw_vm_pcm_record_param; 804 T_AUDIO_VM_PCM_RECORD_PARAMETER mfw_vm_pcm_record_param;
805 T_AUDIO_VBUF_PCM_RECORD_PARAMETER mfw_vbuf_pcm_record_param; 805 T_AUDIO_VBUF_PCM_RECORD_PARAMETER mfw_vbuf_pcm_record_param;
806 UBYTE vm_type; //to store voice memo type 806 UBYTE vm_type; //to store voice memo type
807 #endif 807 #endif
808 TRACE_FUNCTION("mfw_aud_vm_start_record"); 808 TRACE_FUNCTION("mfw_aud_vm_start_record");
809 configure_callback_fn(callback_fn); 809 configure_callback_fn(callback_fn);
810 810
811 #ifdef FF_MMI_FILEMANAGER 811 #ifdef FF_MMI_FILEMANAGER
812 memset(path, 0, FM_MAX_DIR_PATH_LENGTH); 812 memset(path, 0, FM_MAX_DIR_PATH_LENGTH);
813 #endif 813 #endif
814 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 814 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
815 #ifdef FF_PCM_VM_VB 815 #ifdef FF_PCM_VM_VB
816 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 816 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
817 //get the voice memo type 817 //get the voice memo type
818 vm_type = get_voice_memo_type(); 818 vm_type = get_voice_memo_type();
819 819
820 // We now create the "mmi" folder and then proceed with recording. 820 // We now create the "mmi" folder and then proceed with recording.
821 #ifdef FF_MMI_FILEMANAGER 821 #ifdef FF_MMI_FILEMANAGER
822 path_init(vm_type); 822 path_init(vm_type);
823 #else 823 #else
824 flash_makedir(mmiDir); 824 flash_makedir(mmiDir);
825 #endif 825 #endif
826 826
827 if( vm_type EQ PCM_VOICE_MEMO ) 827 if( vm_type EQ PCM_VOICE_MEMO )
828 #ifdef FF_MMI_FILEMANAGER 828 #ifdef FF_MMI_FILEMANAGER
829 { 829 {
830 switch(FFS_flashData.PCM_voicememo_storage) 830 switch(FFS_flashData.PCM_voicememo_storage)
831 { 831 {
832 case SNAP_STG_FFS: 832 case SNAP_STG_FFS:
833 strcpy(path, "/FFS"); 833 strcpy(path, "/FFS");
834 break; 834 break;
835 835
836 case SNAP_STG_NORMS: 836 case SNAP_STG_NORMS:
837 strcpy(path, "/NOR"); 837 strcpy(path, "/NOR");
838 break; 838 break;
839 839
840 case SNAP_STG_NAND: 840 case SNAP_STG_NAND:
841 strcpy(path, "/NAND"); 841 strcpy(path, "/NAND");
842 break; 842 break;
843 843
844 case SNAP_STG_MMC: 844 case SNAP_STG_MMC:
845 strcpy(path, "/MMC"); 845 strcpy(path, "/MMC");
846 break; 846 break;
847 } 847 }
848 strcat(path, PCM_VM_FOLDER); 848 strcat(path, PCM_VM_FOLDER);
849 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, path, PCM_VM_FILE_NAME, 0); 849 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, path, PCM_VM_FILE_NAME, 0);
850 } 850 }
851 #else 851 #else
852 //Set up, and create, the PCM Voice Memo filename in FFS 852 //Set up, and create, the PCM Voice Memo filename in FFS
853 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0); 853 configure_vm_filename(mfw_vm_pcm_record_param.memo_name, PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
854 #endif 854 #endif
855 //x0pleela 09 Mar, 2006 ER:OMAPS00067709 855 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
856 else if( vm_type EQ VOICE_BUFFERING) 856 else if( vm_type EQ VOICE_BUFFERING)
857 #ifdef FF_MMI_FILEMANAGER 857 #ifdef FF_MMI_FILEMANAGER
858 { 858 {
859 switch(FFS_flashData.voicebuffer_storage) 859 switch(FFS_flashData.voicebuffer_storage)
860 { 860 {
861 case SNAP_STG_FFS: 861 case SNAP_STG_FFS:
862 strcpy(path, "/FFS"); 862 strcpy(path, "/FFS");
875 break; 875 break;
876 } 876 }
877 877
878 strcat(path, VOICE_BUFF_FOLDER); 878 strcat(path, VOICE_BUFF_FOLDER);
879 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0); 879 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, path, VOICE_BUFF_FILE_NAME, 0);
880 } 880 }
881 #else 881 #else
882 //Set up, and create, the Voice Buffering filename in FFS 882 //Set up, and create, the Voice Buffering filename in FFS
883 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0); 883 configure_vm_filename(mfw_vbuf_pcm_record_param.memo_name, VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
884 #endif 884 #endif
885 else 885 else
886 { 886 {
887 if (vm_type EQ AMR_VOICE_MEMO) 887 if (vm_type EQ AMR_VOICE_MEMO)
888 #endif /* FF_PCM_VM_VB */ 888 #endif /* FF_PCM_VM_VB */
889 #ifdef FF_MMI_FILEMANAGER 889 #ifdef FF_MMI_FILEMANAGER
890 { 890 {
891 switch(FFS_flashData.voicememo_storage) 891 switch(FFS_flashData.voicememo_storage)
892 { 892 {
893 case SNAP_STG_FFS: 893 case SNAP_STG_FFS:
894 strcpy(path, "/FFS"); 894 strcpy(path, "/FFS");
907 break; 907 break;
908 } 908 }
909 909
910 strcat(path, VM_FOLDER); 910 strcat(path, VM_FOLDER);
911 configure_vm_filename(mfw_vm_record_param.memo_name, path, VM_FILE_NAME, 0); 911 configure_vm_filename(mfw_vm_record_param.memo_name, path, VM_FILE_NAME, 0);
912 } 912 }
913 #else 913 #else
914 //Set up, and create, the Voice Memo filename in FFS 914 //Set up, and create, the Voice Memo filename in FFS
915 configure_vm_filename(mfw_vm_record_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0); 915 configure_vm_filename(mfw_vm_record_param.memo_name, VM_FOLDER, VM_FILE_NAME, 0);
916 #endif 916 #endif
917 #ifdef FF_PCM_VM_VB 917 #ifdef FF_PCM_VM_VB
918 } 918 }
919 #endif /* FF_PCM_VM_VB */ 919 #endif /* FF_PCM_VM_VB */
920 //Aug 25, 2004 REF: CRR 20655 xnkulkar 920 //Aug 25, 2004 REF: CRR 20655 xnkulkar
921 921
922 922
923 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 923 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
924 #ifdef FF_PCM_VM_VB 924 #ifdef FF_PCM_VM_VB
925 if( vm_type EQ PCM_VOICE_MEMO ) 925 if( vm_type EQ PCM_VOICE_MEMO )
926 //create PCM Voice memo file 926 //create PCM Voice memo file
927 #ifdef FF_MMI_FILEMANAGER 927 #ifdef FF_MMI_FILEMANAGER
928 mfw_aud_vm_create_file(path, PCM_VM_FILE_NAME, 0); 928 mfw_aud_vm_create_file(path, PCM_VM_FILE_NAME, 0);
929 #else 929 #else
930 mfw_aud_vm_create_file(PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0); 930 mfw_aud_vm_create_file(PCM_VM_FOLDER, PCM_VM_FILE_NAME, 0);
931 #endif 931 #endif
932 //x0pleela 09 Mar, 2006 ER:OMAPS00067709 932 //x0pleela 09 Mar, 2006 ER:OMAPS00067709
935 #ifdef FF_MMI_FILEMANAGER 935 #ifdef FF_MMI_FILEMANAGER
936 mfw_aud_vm_create_file(path, VOICE_BUFF_FILE_NAME, 0); 936 mfw_aud_vm_create_file(path, VOICE_BUFF_FILE_NAME, 0);
937 #else 937 #else
938 mfw_aud_vm_create_file(VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0); 938 mfw_aud_vm_create_file(VOICE_BUFF_FOLDER, VOICE_BUFF_FILE_NAME, 0);
939 #endif 939 #endif
940 else 940 else
941 { 941 {
942 if (vm_type EQ AMR_VOICE_MEMO) 942 if (vm_type EQ AMR_VOICE_MEMO)
943 #endif /* FF_PCM_VM_VB */ 943 #endif /* FF_PCM_VM_VB */
944 #ifdef FF_MMI_FILEMANAGER 944 #ifdef FF_MMI_FILEMANAGER
945 mfw_aud_vm_create_file(path, VM_FILE_NAME, 0); 945 mfw_aud_vm_create_file(path, VM_FILE_NAME, 0);
958 { 958 {
959 mfw_vm_pcm_record_param.memo_duration = (UINT32)max_duration; 959 mfw_vm_pcm_record_param.memo_duration = (UINT32)max_duration;
960 mfw_vm_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN; 960 mfw_vm_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN;
961 mfw_vm_pcm_record_param.network_gain = 0; 961 mfw_vm_pcm_record_param.network_gain = 0;
962 962
963 audio_riv_retVal = audio_vm_pcm_record_start(&mfw_vm_pcm_record_param, 963 audio_riv_retVal = audio_vm_pcm_record_start(&mfw_vm_pcm_record_param,
964 voice_memo_return_path); 964 voice_memo_return_path);
965 } 965 }
966 else if( vm_type EQ VOICE_BUFFERING ) 966 else if( vm_type EQ VOICE_BUFFERING )
967 { 967 {
968 mfw_vbuf_pcm_record_param.memo_duration = (UINT32)max_duration; 968 mfw_vbuf_pcm_record_param.memo_duration = (UINT32)max_duration;
969 mfw_vbuf_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN; 969 mfw_vbuf_pcm_record_param.microphone_gain = PCM_VM_MICROPHONE_GAIN;
970 mfw_vbuf_pcm_record_param.network_gain = 0; 970 mfw_vbuf_pcm_record_param.network_gain = 0;
971 971
972 audio_riv_retVal = audio_voice_buffering_pcm_record_start( &mfw_vbuf_pcm_record_param, 972 audio_riv_retVal = audio_voice_buffering_pcm_record_start( &mfw_vbuf_pcm_record_param,
973 voice_memo_return_path); 973 voice_memo_return_path);
974 } 974 }
975 else 975 else
976 { 976 {
977 if (vm_type EQ AMR_VOICE_MEMO ) 977 if (vm_type EQ AMR_VOICE_MEMO )
978 { 978 {
979 #endif /* FF_PCM_VM_VB */ 979 #endif /* FF_PCM_VM_VB */
980 980
981 // Setup the Voice Memo Tones 981 // Setup the Voice Memo Tones
982 mfw_vm_record_param.memo_duration = (UINT32)max_duration; 982 mfw_vm_record_param.memo_duration = (UINT32)max_duration;
1012 } 1012 }
1013 } 1013 }
1014 #endif /* FF_PCM_VM_VB */ 1014 #endif /* FF_PCM_VM_VB */
1015 if (audio_riv_retVal != RV_OK) 1015 if (audio_riv_retVal != RV_OK)
1016 return MFW_AUD_VM_RIVIERA_FAILED; 1016 return MFW_AUD_VM_RIVIERA_FAILED;
1017 1017
1018 #endif 1018 #endif
1019 1019
1020 return MFW_AUD_VM_OK; 1020 return MFW_AUD_VM_OK;
1021 } 1021 }
1022 1022
1034 SHORT mfw_aud_vm_stop_record(void (*callback_fn)(void *)) 1034 SHORT mfw_aud_vm_stop_record(void (*callback_fn)(void *))
1035 { 1035 {
1036 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR; 1036 T_AUDIO_RET audio_riv_retVal=AUDIO_ERROR;
1037 1037
1038 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 1038 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
1039 #ifdef FF_PCM_VM_VB 1039 #ifdef FF_PCM_VM_VB
1040 UBYTE vm_type; //to store voice memo type 1040 UBYTE vm_type; //to store voice memo type
1041 #endif 1041 #endif
1042 TRACE_FUNCTION("mfw_aud_vm_stop_record"); 1042 TRACE_FUNCTION("mfw_aud_vm_stop_record");
1043 configure_callback_fn(callback_fn); 1043 configure_callback_fn(callback_fn);
1044 1044
1083 */ 1083 */
1084 UBYTE mfw_aud_vm_get_duration(void) 1084 UBYTE mfw_aud_vm_get_duration(void)
1085 { 1085 {
1086 TRACE_FUNCTION("mfw_aud_vm_get_duration"); 1086 TRACE_FUNCTION("mfw_aud_vm_get_duration");
1087 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 1087 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
1088 #ifdef FF_PCM_VM_VB 1088 #ifdef FF_PCM_VM_VB
1089 //x0pleela 27 Feb, 2006 ER:OMAPS00067709 1089 //x0pleela 27 Feb, 2006 ER:OMAPS00067709
1090 if( get_voice_memo_type() EQ PCM_VOICE_MEMO ) 1090 if( get_voice_memo_type() EQ PCM_VOICE_MEMO )
1091 //get PCM Voice memo recorded duration 1091 //get PCM Voice memo recorded duration
1092 #ifdef FF_MMI_FILEMANAGER 1092 #ifdef FF_MMI_FILEMANAGER
1093 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */ 1093 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
1106 return FFS_flashData.voice_memo_position; 1106 return FFS_flashData.voice_memo_position;
1107 #endif 1107 #endif
1108 #ifdef FF_PCM_VM_VB 1108 #ifdef FF_PCM_VM_VB
1109 } 1109 }
1110 return 0; 1110 return 0;
1111 #endif 1111 #endif
1112 } 1112 }
1113 1113
1114 1114
1115 /* 1115 /*
1116 +--------------------------------------------------------------------+ 1116 +--------------------------------------------------------------------+
1124 */ 1124 */
1125 void mfw_aud_vm_set_duration(UBYTE duration) 1125 void mfw_aud_vm_set_duration(UBYTE duration)
1126 { 1126 {
1127 TRACE_FUNCTION("mfw_aud_vm_set_duration"); 1127 TRACE_FUNCTION("mfw_aud_vm_set_duration");
1128 //x0pleela 06 Mar, 2006 ER:OMAPS00067709 1128 //x0pleela 06 Mar, 2006 ER:OMAPS00067709
1129 #ifdef FF_PCM_VM_VB 1129 #ifdef FF_PCM_VM_VB
1130 if( get_voice_memo_type() EQ PCM_VOICE_MEMO ) 1130 if( get_voice_memo_type() EQ PCM_VOICE_MEMO )
1131 //Set PCM Voice memo recorded duration 1131 //Set PCM Voice memo recorded duration
1132 #ifdef FF_MMI_FILEMANAGER 1132 #ifdef FF_MMI_FILEMANAGER
1133 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */ 1133 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */
1134 FFS_flashData.pcm_voice_memo_position[FFS_flashData.PCM_voicememo_storage] = duration; 1134 FFS_flashData.pcm_voice_memo_position[FFS_flashData.PCM_voicememo_storage] = duration;
1169 1169
1170 rfs_close(fd); 1170 rfs_close(fd);
1171 return; 1171 return;
1172 } 1172 }
1173 #endif 1173 #endif
1174 1174
1175 /* 1175 /*
1176 ** Local Function Definitions 1176 ** Local Function Definitions
1177 */ 1177 */
1178 1178
1179 /* 1179 /*
1250 TRACE_FUNCTION("configure_vm_filename"); 1250 TRACE_FUNCTION("configure_vm_filename");
1251 memset(vm_filename, 0x00, AUDIO_PATH_NAME_MAX_SIZE); 1251 memset(vm_filename, 0x00, AUDIO_PATH_NAME_MAX_SIZE);
1252 strcpy(vm_filename, folder); 1252 strcpy(vm_filename, folder);
1253 strcat(vm_filename, "/"); 1253 strcat(vm_filename, "/");
1254 strcat(vm_filename, fname); 1254 strcat(vm_filename, fname);
1255 #endif 1255 #endif
1256 return; 1256 return;
1257 } 1257 }
1258 #endif 1258 #endif
1259 1259
1260 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar 1260 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
1275 { 1275 {
1276 #ifndef _SIMULATION_ 1276 #ifndef _SIMULATION_
1277 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar 1277 // Mar 03, 2005 REF: CRR MMI-ENH-28950 xnkulkar
1278 // Call 'hl_drv_enable_vocoder()' instead of 'enable_tch_vocoder(TRUE)' 1278 // Call 'hl_drv_enable_vocoder()' instead of 'enable_tch_vocoder(TRUE)'
1279 // enable_tch_vocoder(TRUE); 1279 // enable_tch_vocoder(TRUE);
1280 1280
1281 // July 03, 2006 REF:DR OMAPS00083150 x0047075 1281 // July 03, 2006 REF:DR OMAPS00083150 x0047075
1282 //Fix:Use hl_drv_set_vocoder_state(TRUE) function instead of hl_drv_enable_vocoder() to enable the vocoder 1282 //Fix:Use hl_drv_set_vocoder_state(TRUE) function instead of hl_drv_enable_vocoder() to enable the vocoder
1283 hl_drv_set_vocoder_state(TRUE); 1283 hl_drv_set_vocoder_state(TRUE);
1284 #endif 1284 #endif
1285 return; 1285 return;