FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/L1/audio_cfile/l1audio_stereo.c @ 607:262fcce10859
gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 29 Aug 2014 03:34:44 +0000 |
parents | c5286d24539e |
children |
comparison
equal
deleted
inserted
replaced
606:c5286d24539e | 607:262fcce10859 |
---|---|
161 #endif | 161 #endif |
162 | 162 |
163 #include "l1audio_macro.h" | 163 #include "l1audio_macro.h" |
164 | 164 |
165 //add the extern reference of abb_write_done | 165 //add the extern reference of abb_write_done |
166 #if (ANLG_FAM == 11) | 166 #if (ANALOG == 11) |
167 #include "bspTwl3029_I2c.h" | 167 #include "bspTwl3029_I2c.h" |
168 #include "bspTwl3029_Aud_Map.h" | 168 #include "bspTwl3029_Aud_Map.h" |
169 #endif | 169 #endif |
170 | 170 |
171 #if (ANLG_FAM == 11) | 171 #if (ANALOG == 11) |
172 Bsp_Twl3029_I2cTransReqArray l1audio_i2cTransArray; | 172 Bsp_Twl3029_I2cTransReqArray l1audio_i2cTransArray; |
173 #endif | 173 #endif |
174 | 174 |
175 #if (L1_STEREOPATH == 1) && (CODE_VERSION == NOT_SIMULATION) | 175 #if (L1_STEREOPATH == 1) && (CODE_VERSION == NOT_SIMULATION) |
176 | 176 |
177 #if (ANLG_FAM == 11) | 177 #if (ANALOG == 11) |
178 #include "bspTwl3029_Int_Map.h" | 178 #include "bspTwl3029_Int_Map.h" |
179 | 179 |
180 | 180 |
181 //Add the call back function of the stereo path. | 181 //Add the call back function of the stereo path. |
182 void l1s_stereopath_callback(UWORD8 cbvalue) | 182 void l1s_stereopath_callback(UWORD8 cbvalue) |
324 /* Description : ABB configuration function */ | 324 /* Description : ABB configuration function */ |
325 /* */ | 325 /* */ |
326 /*-------------------------------------------------------*/ | 326 /*-------------------------------------------------------*/ |
327 void l1s_stereopath_drv_config_ABB(UWORD8 mono_stereo,UWORD8 sampling_frequency) | 327 void l1s_stereopath_drv_config_ABB(UWORD8 mono_stereo,UWORD8 sampling_frequency) |
328 { | 328 { |
329 #if (ANLG_FAM == 3) | 329 #if (ANALOG == 3) |
330 UWORD16 regist; | 330 UWORD16 regist; |
331 | 331 |
332 // Get the VAUDCTRL register | 332 // Get the VAUDCTRL register |
333 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_cfg >> 6; | 333 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_cfg >> 6; |
334 | 334 |
369 // update DSP API | 369 // update DSP API |
370 l1s_dsp_com.dsp_ndb_ptr->d_vbpop = ABB_L1_WRITE(VBPOP, regist); | 370 l1s_dsp_com.dsp_ndb_ptr->d_vbpop = ABB_L1_WRITE(VBPOP, regist); |
371 | 371 |
372 #endif | 372 #endif |
373 | 373 |
374 #if (ANLG_FAM == 11) | 374 #if (ANALOG == 11) |
375 // Call to the Triton API which would configure the Audio path. | 375 // Call to the Triton API which would configure the Audio path. |
376 UWORD8 monostereo; | 376 UWORD8 monostereo; |
377 UWORD8 pll; | 377 UWORD8 pll; |
378 //Call back function | 378 //Call back function |
379 BspTwl3029_I2C_Callback stereo_callbackFunc; | 379 BspTwl3029_I2C_Callback stereo_callbackFunc; |
417 /* Description : ABB start function */ | 417 /* Description : ABB start function */ |
418 /* */ | 418 /* */ |
419 /*-------------------------------------------------------*/ | 419 /*-------------------------------------------------------*/ |
420 void l1s_stereopath_drv_start_ABB(void) | 420 void l1s_stereopath_drv_start_ABB(void) |
421 { | 421 { |
422 #if (ANLG_FAM == 3) | 422 #if (ANALOG == 3) |
423 // Get VAUDPLL register | 423 // Get VAUDPLL register |
424 UWORD16 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll >> 6; | 424 UWORD16 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll >> 6; |
425 | 425 |
426 // Reset I2S | 426 // Reset I2S |
427 regist &= 0x2ff; | 427 regist &= 0x2ff; |
434 // Set AUDON bit of the PWRDNRG register | 434 // Set AUDON bit of the PWRDNRG register |
435 regist = 0x100; | 435 regist = 0x100; |
436 // update DSP API | 436 // update DSP API |
437 l1s_dsp_com.dsp_ndb_ptr->d_togbr2 = ABB_L1_WRITE(TOGBR2, regist); | 437 l1s_dsp_com.dsp_ndb_ptr->d_togbr2 = ABB_L1_WRITE(TOGBR2, regist); |
438 #endif | 438 #endif |
439 #if (ANLG_FAM == 11) | 439 #if (ANALOG == 11) |
440 //Call back function | 440 //Call back function |
441 BspTwl3029_I2C_Callback stereo_callbackFunc; | 441 BspTwl3029_I2C_Callback stereo_callbackFunc; |
442 //Set the call back function to be called after the Audio start | 442 //Set the call back function to be called after the Audio start |
443 stereo_callbackFunc.callbackFunc = l1s_stereopath_callback ; | 443 stereo_callbackFunc.callbackFunc = l1s_stereopath_callback ; |
444 stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_CONFIG; | 444 stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_CONFIG; |
464 /* Description : ABB stop function */ | 464 /* Description : ABB stop function */ |
465 /* */ | 465 /* */ |
466 /*-------------------------------------------------------*/ | 466 /*-------------------------------------------------------*/ |
467 void l1s_stereopath_drv_stop_ABB(void) | 467 void l1s_stereopath_drv_stop_ABB(void) |
468 { | 468 { |
469 #if (ANLG_FAM == 3) | 469 #if (ANALOG == 3) |
470 UWORD16 regist; | 470 UWORD16 regist; |
471 | 471 |
472 // Reset AUDON bit of the PWRDNRG register | 472 // Reset AUDON bit of the PWRDNRG register |
473 regist = 0x80; | 473 regist = 0x80; |
474 // update DSP API | 474 // update DSP API |
480 regist &= 0x2fd; | 480 regist &= 0x2fd; |
481 ABB_Write_Register_on_page(PAGE1, VAUDPLL, regist); | 481 ABB_Write_Register_on_page(PAGE1, VAUDPLL, regist); |
482 // update DSP API | 482 // update DSP API |
483 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE(VAUDPLL, regist); | 483 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE(VAUDPLL, regist); |
484 #endif | 484 #endif |
485 #if (ANLG_FAM == 11) | 485 #if (ANALOG == 11) |
486 //Call back function | 486 //Call back function |
487 BspTwl3029_I2C_Callback stereo_callbackFunc; | 487 BspTwl3029_I2C_Callback stereo_callbackFunc; |
488 | 488 |
489 UWORD8 dl_control = 1; // OUTEN_DISABLE | 489 UWORD8 dl_control = 1; // OUTEN_DISABLE |
490 | 490 |