FreeCalypso > hg > tcs211-l1-reconst
changeset 172:3aa97c515334
l1audio_abb.c fully reconstructed, matches TCS211 object
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 07 Jun 2016 19:24:20 +0000 |
parents | b6b3bda101c0 |
children | ea9a8b16374d |
files | chipsetsw/layer1/audio_cfile/l1audio_abb.c |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/audio_cfile/l1audio_abb.c Tue Jun 07 19:08:50 2016 +0000 +++ b/chipsetsw/layer1/audio_cfile/l1audio_abb.c Tue Jun 07 19:24:20 2016 +0000 @@ -157,6 +157,16 @@ 0x05, 0x03, 0x04, 0x00, 0x06, 0x02 }; +/* + * FreeCalypso: ABB_Read_DLGain() functions and the ABB_DL_volume_read_gain + * and ABB_DL_PGA_read_gain constant tables it uses are new in the LoCosto + * version of this module (even though the code seems to support classic + * ABBs, not LoCosto/Triton) and do not appear in our TCS211 binary object. + */ + +#define INCLUDE_ABB_READ_DLGAIN 0 + +#if INCLUDE_ABB_READ_DLGAIN // Downlink volume gain read in unsigned Q15 (in VBDCTRL) const WORD16 ABB_DL_volume_read_gain[] = { @@ -190,7 +200,7 @@ 0x4026 , // 14: - 6 dB 0x4026 , // 15: - 6 dB }; - +#endif /* INCLUDE_ABB_READ_DLGAIN */ // Downlink PGA gain is coded on 4 bits, corresponding to -6dB to 6dB in 1dB steps const UWORD8 ABB_downlink_PGA_gain[] = @@ -503,6 +513,7 @@ (ABB_sidetone_gain[side_tone] << 5)); } +#if INCLUDE_ABB_READ_DLGAIN /* * ABB_Read_DLVolume * @@ -517,16 +528,14 @@ UWORD16 pga_index; // Read last programmed volume - //Sundi: change for Triton - #if (ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) volume_index = (API)((l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl >> 10) & 0x7); pga_index = (API)((l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl >> 6) & 0xF); - #endif // Convert volume into gain (dB) return((ABB_DL_volume_read_gain[volume_index] * ABB_DL_PGA_read_gain[pga_index]) >> 15); } -#endif // ANLG_FAM == 3 +#endif /* INCLUDE_ABB_READ_DLGAIN */ +#endif /* classic ABBs */ #if (ANLG_FAM == 11) // Downlink volume gain read in unsigned Q15 (in VBDCTRL)