aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMoyster <oysterized@gmail.com>2017-09-23 03:10:48 +0200
committerMoyster <oysterized@gmail.com>2017-09-23 03:10:48 +0200
commitb8d1e07edc8d57883bf4b6ca70228b5a9e6b98b2 (patch)
treeb9c284cc99fc24d884b4dedc7100e5881a35011f /sound
parentfa4d1db09a4946ad8ba42514687c6b8a3603d623 (diff)
misc: replace __FUNCTION__ by __function__
result of : git grep -l '__FUNCTION__' | xargs sed -i 's/__FUNCTION__/__func__/g'
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_lib.c2
-rw-r--r--sound/soc/mediatek/mt_soc_audio_6580/mt_soc_afe_control.c46
-rw-r--r--sound/soc/mediatek/mt_soc_audio_8163/mt_soc_afe_control.c42
-rw-r--r--sound/soc/mediatek/mt_soc_audio_v1/mt_soc_afe_control.c48
-rw-r--r--sound/soc/mediatek/mt_soc_audio_v2/mt_soc_afe_control.c42
-rw-r--r--sound/soc/mediatek/mt_soc_audio_v3/mt_soc_afe_control.c42
6 files changed, 111 insertions, 111 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 0cbd24575..45c114c24 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -375,7 +375,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
crossed_boundary++;
}
new_hw_ptr = hw_base + pos;
- printk("%s, overflow? new_hw_ptr=%ld, hw_base=%ld\n",__FUNCTION__,new_hw_ptr,hw_base);
+ printk("%s, overflow? new_hw_ptr=%ld, hw_base=%ld\n",__func__,new_hw_ptr,hw_base);
goto __delta;
}
}
diff --git a/sound/soc/mediatek/mt_soc_audio_6580/mt_soc_afe_control.c b/sound/soc/mediatek/mt_soc_audio_6580/mt_soc_afe_control.c
index 576963fdf..287454805 100644
--- a/sound/soc/mediatek/mt_soc_audio_6580/mt_soc_afe_control.c
+++ b/sound/soc/mediatek/mt_soc_audio_6580/mt_soc_afe_control.c
@@ -1068,7 +1068,7 @@ bool SetChannels(uint32 Memory_Interface, uint32 channel)
bool Set2ndI2SOutAttribute(uint32_t sampleRate)
{
- printk("+%s(), sampleRate = %d\n", __FUNCTION__, sampleRate);
+ printk("+%s(), sampleRate = %d\n", __func__, sampleRate);
m2ndI2Sout->mLR_SWAP = Soc_Aud_LR_SWAP_NO_SWAP;
m2ndI2Sout->mI2S_SLAVE = Soc_Aud_I2S_SRC_MASTER_MODE;
m2ndI2Sout->mINV_LRCK = Soc_Aud_INV_LRCK_NO_INVERSE;
@@ -1295,7 +1295,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1303,7 +1303,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
{
- printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __FUNCTION__, connection, direction, Enable);
+ printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __func__, connection, direction, Enable);
if (Enable && direction)
{
switch (connection)
@@ -1337,7 +1337,7 @@ bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
Afe_Set_Reg(AFE_SGEN_CON0, 0x64662662, 0xffffffff);
break;
default:
- printk("+%s(), no corresponding input SGEN\n", __FUNCTION__);
+ printk("+%s(), no corresponding input SGEN\n", __func__);
break;
}
}
@@ -1388,7 +1388,7 @@ bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
}
break;
default:
- printk("+%s(), no corresponding output SGEN\n", __FUNCTION__);
+ printk("+%s(), no corresponding output SGEN\n", __func__);
break;
}
}
@@ -1406,7 +1406,7 @@ bool SetSideGenSampleRate(uint32 SampleRate)
uint32 sine_mode_ch1 = 0;
uint32 sine_mode_ch2 = 0;
- printk("+%s(), SampleRate = %d\n", __FUNCTION__, SampleRate);
+ printk("+%s(), SampleRate = %d\n", __func__, SampleRate);
sine_mode_ch1 = SGENSampleRateTransform(SampleRate) << 8;
sine_mode_ch2 = SGENSampleRateTransform(SampleRate) << 20;
@@ -1446,7 +1446,7 @@ bool Set2ndI2SEnable(bool bEnable)
bool CleanPreDistortion()
{
- //printk("%s \n", __FUNCTION__);
+ //printk("%s \n", __func__);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON0, 0, MASK_ALL);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON1, 0, MASK_ALL);
return true;
@@ -1553,7 +1553,7 @@ bool SetHwDigitalGainMode(uint32 GainType, uint32 SampleRate, uint32 SamplePerSt
bool SetHwDigitalGainEnable(int GainType, bool Enable)
{
- printk("+%s(), GainType = %d, Enable = %d\n", __FUNCTION__, GainType, Enable);
+ printk("+%s(), GainType = %d, Enable = %d\n", __func__, GainType, Enable);
switch (GainType)
{
case Soc_Aud_Hw_Digital_Gain_HW_DIGITAL_GAIN1:
@@ -1609,7 +1609,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmWordLength & 0x1) << 5;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x3) << 3;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmFormat & 0x3) << 1;
- printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __FUNCTION__, PCM2_INTF_CON, reg_pcm2_intf_con);
+ printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __func__, PCM2_INTF_CON, reg_pcm2_intf_con);
Afe_Set_Reg(PCM2_INTF_CON, reg_pcm2_intf_con, MASK_ALL);
if (p_modem_pcm_attribute.mPcmModeWidebandSel == Soc_Aud_PCM_MODE_PCM_MODE_8K)
{
@@ -1718,7 +1718,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x03) << 3;
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmFormat & 0x03) << 1;
- printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __FUNCTION__, PCM_INTF_CON, reg_pcm_intf_con1);
+ printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __func__, PCM_INTF_CON, reg_pcm_intf_con1);
Afe_Set_Reg(PCM_INTF_CON, reg_pcm_intf_con1, MASK_ALL);
}
@@ -1728,7 +1728,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
uint32 dNeedDisableASM = 0, mPcm1AsyncFifo;
- printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __FUNCTION__, modem_index, modem_pcm_on);
+ printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __func__, modem_index, modem_pcm_on);
if (modem_index == MODEM_1) // MODEM_1 use PCM2_INTF_CON (0x53C) !!!
{
@@ -1770,7 +1770,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
}
else
{
- printk("%s(), no such modem_index: %d!!", __FUNCTION__, modem_index);
+ printk("%s(), no such modem_index: %d!!", __func__, modem_index);
return false;
}
return true;
@@ -1791,11 +1791,11 @@ bool EnableSideToneFilter(bool stf_on)
const bool bypass_stf_on = true;
uint32_t reg_value = (bypass_stf_on << 31) | (stf_on << 8);
Afe_Set_Reg(AFE_SIDETONE_CON1, reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, reg_value);
// set side tone gain = 0
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
}
else
{
@@ -1810,11 +1810,11 @@ bool EnableSideToneFilter(bool stf_on)
uint32_t read_reg_value = Afe_Get_Reg(AFE_SIDETONE_CON0);
size_t coef_addr = 0;
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
// set side tone gain
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
Afe_Set_Reg(AFE_SIDETONE_CON1, write_reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, write_reg_value);
#if 0 // no need to set sidetone coeffecient. spend too much time during incall
for (coef_addr = 0; coef_addr < kSideToneHalfTapNum; coef_addr++)
@@ -1828,7 +1828,7 @@ bool EnableSideToneFilter(bool stf_on)
coef_addr << 16 |
kSideToneCoefficientTable16k[coef_addr];
Afe_Set_Reg(AFE_SIDETONE_CON0, write_reg_value, 0x39FFFFF);
- printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON0, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON0, write_reg_value);
// wait until flag write_ready changed (means write done)
for (try_cnt = 0; try_cnt < 10; try_cnt++) // max try 10 times
@@ -1850,7 +1850,7 @@ bool EnableSideToneFilter(bool stf_on)
#endif
}
AudDrv_Clk_Off();
- printk("-%s(), stf_on = %d\n", __FUNCTION__, stf_on);
+ printk("-%s(), stf_on = %d\n", __func__, stf_on);
return true;
}
@@ -1979,7 +1979,7 @@ bool SetConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
bool SetIrqEnable(uint32 Irqmode, bool bEnable)
{
- //printk("+%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("+%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
switch (Irqmode)
{
case Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE:
@@ -2014,7 +2014,7 @@ bool SetIrqEnable(uint32 Irqmode, bool bEnable)
default:
break;
}
- //printk("-%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("-%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
return true;
}
@@ -2168,7 +2168,7 @@ bool Set2ndI2SInEnable(bool bEnable)
bool SetI2SASRCConfig(bool bIsUseASRC, unsigned int dToSampleRate)
{
- printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __FUNCTION__, bIsUseASRC, dToSampleRate);
+ printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __func__, bIsUseASRC, dToSampleRate);
if (true == bIsUseASRC)
{
BUG_ON(!(dToSampleRate == 44100 || dToSampleRate == 48000));
@@ -2216,7 +2216,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
{
mAudioMEMIF[InterfaceType]->mFetchFormatPerSample = eFetchFormat;
/*
- printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __FUNCTION__
+ printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __func__
, InterfaceType, eFetchFormat, mAudioMEMIF[InterfaceType]->mFetchFormatPerSample);*/
#if 0 //Sammodi 82 no
switch (InterfaceType)
@@ -2282,7 +2282,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
bool SetoutputConnectionFormat(uint32 ConnectionFormat, uint32 Output)
{
#if 0 //Sammodi 82 no
- //printk("+%s(), Data Format = %d, Output = %d\n", __FUNCTION__, ConnectionFormat, Output);
+ //printk("+%s(), Data Format = %d, Output = %d\n", __func__, ConnectionFormat, Output);
Afe_Set_Reg(AFE_CONN_24BIT, (ConnectionFormat << Output), (1 << Output));
#endif
return true;
diff --git a/sound/soc/mediatek/mt_soc_audio_8163/mt_soc_afe_control.c b/sound/soc/mediatek/mt_soc_audio_8163/mt_soc_afe_control.c
index 10b7e3742..a668b28ce 100644
--- a/sound/soc/mediatek/mt_soc_audio_8163/mt_soc_afe_control.c
+++ b/sound/soc/mediatek/mt_soc_audio_8163/mt_soc_afe_control.c
@@ -1288,7 +1288,7 @@ bool SetChannels(uint32 Memory_Interface, uint32 channel)
bool Set2ndI2SOutAttribute(uint32_t sampleRate)
{
- printk("+%s(), sampleRate = %d\n", __FUNCTION__, sampleRate);
+ printk("+%s(), sampleRate = %d\n", __func__, sampleRate);
m2ndI2Sout->mLR_SWAP = Soc_Aud_LR_SWAP_NO_SWAP;
m2ndI2Sout->mI2S_SLAVE = Soc_Aud_I2S_SRC_MASTER_MODE;
m2ndI2Sout->mINV_LRCK = Soc_Aud_INV_LRCK_NO_INVERSE;
@@ -1512,7 +1512,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1520,7 +1520,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
{
- printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __FUNCTION__, connection, direction, Enable);
+ printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __func__, connection, direction, Enable);
if (Enable && direction)
{
switch (connection)
@@ -1665,7 +1665,7 @@ bool SetSideGenSampleRate(uint32 SampleRate)
uint32 sine_mode_ch1 = 0;
uint32 sine_mode_ch2 = 0;
- printk("+%s(), SampleRate = %d\n", __FUNCTION__, SampleRate);
+ printk("+%s(), SampleRate = %d\n", __func__, SampleRate);
sine_mode_ch1 = SampleRateTransform(SampleRate) << 8;
sine_mode_ch2 = SampleRateTransform(SampleRate) << 20;
@@ -1706,7 +1706,7 @@ bool Set2ndI2SEnable(bool bEnable)
bool CleanPreDistortion()
{
- //printk("%s \n", __FUNCTION__);
+ //printk("%s \n", __func__);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON0, 0, MASK_ALL);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON1, 0, MASK_ALL);
return true;
@@ -1811,7 +1811,7 @@ bool SetHwDigitalGainMode(uint32 GainType, uint32 SampleRate, uint32 SamplePerSt
bool SetHwDigitalGainEnable(int GainType, bool Enable)
{
- printk("+%s(), GainType = %d, Enable = %d\n", __FUNCTION__, GainType, Enable);
+ printk("+%s(), GainType = %d, Enable = %d\n", __func__, GainType, Enable);
switch (GainType)
{
case Soc_Aud_Hw_Digital_Gain_HW_DIGITAL_GAIN1:
@@ -1867,7 +1867,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmWordLength & 0x1) << 5;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x3) << 3;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmFormat & 0x3) << 1;
- printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __FUNCTION__, PCM2_INTF_CON, reg_pcm2_intf_con);
+ printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __func__, PCM2_INTF_CON, reg_pcm2_intf_con);
Afe_Set_Reg(PCM2_INTF_CON, reg_pcm2_intf_con, MASK_ALL);
if (p_modem_pcm_attribute.mPcmModeWidebandSel == Soc_Aud_PCM_MODE_PCM_MODE_8K)
{
@@ -1973,7 +1973,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x03) << 3;
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmFormat & 0x03) << 1;
- printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __FUNCTION__, PCM_INTF_CON, reg_pcm_intf_con1);
+ printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __func__, PCM_INTF_CON, reg_pcm_intf_con1);
Afe_Set_Reg(PCM_INTF_CON, reg_pcm_intf_con1, MASK_ALL);
}
@@ -1983,7 +1983,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
uint32 dNeedDisableASM = 0, mPcm1AsyncFifo;
- printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __FUNCTION__, modem_index, modem_pcm_on);
+ printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __func__, modem_index, modem_pcm_on);
if (modem_index == MODEM_1) // MODEM_1 use PCM2_INTF_CON (0x53C) !!!
{
@@ -2022,7 +2022,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
}
else
{
- printk("%s(), no such modem_index: %d!!", __FUNCTION__, modem_index);
+ printk("%s(), no such modem_index: %d!!", __func__, modem_index);
return false;
}
return true;
@@ -2043,11 +2043,11 @@ bool EnableSideToneFilter(bool stf_on)
const bool bypass_stf_on = true;
uint32_t reg_value = (bypass_stf_on << 31) | (stf_on << 8);
Afe_Set_Reg(AFE_SIDETONE_CON1, reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, reg_value);
// set side tone gain = 0
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
}
else
{
@@ -2062,11 +2062,11 @@ bool EnableSideToneFilter(bool stf_on)
uint32_t read_reg_value = Afe_Get_Reg(AFE_SIDETONE_CON0);
size_t coef_addr = 0;
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
// set side tone gain
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
Afe_Set_Reg(AFE_SIDETONE_CON1, write_reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, write_reg_value);
#if 0 // no need to set sidetone coeffecient. spend too much time during incall
for (coef_addr = 0; coef_addr < kSideToneHalfTapNum; coef_addr++)
@@ -2080,7 +2080,7 @@ bool EnableSideToneFilter(bool stf_on)
coef_addr << 16 |
kSideToneCoefficientTable16k[coef_addr];
Afe_Set_Reg(AFE_SIDETONE_CON0, write_reg_value, 0x39FFFFF);
- printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON0, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON0, write_reg_value);
// wait until flag write_ready changed (means write done)
for (try_cnt = 0; try_cnt < 10; try_cnt++) // max try 10 times
@@ -2102,7 +2102,7 @@ bool EnableSideToneFilter(bool stf_on)
#endif
}
AudDrv_Clk_Off();
- printk("-%s(), stf_on = %d\n", __FUNCTION__, stf_on);
+ printk("-%s(), stf_on = %d\n", __func__, stf_on);
return true;
}
@@ -2263,7 +2263,7 @@ bool SetConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
bool SetIrqEnable(uint32 Irqmode, bool bEnable)
{
- //printk("+%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("+%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
switch (Irqmode)
{
case Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE:
@@ -2303,7 +2303,7 @@ bool SetIrqEnable(uint32 Irqmode, bool bEnable)
default:
break;
}
- //printk("-%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("-%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
return true;
}
@@ -2463,7 +2463,7 @@ bool Set2ndI2SInEnable(bool bEnable)
bool SetI2SASRCConfig(bool bIsUseASRC, unsigned int dToSampleRate)
{
- printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __FUNCTION__, bIsUseASRC, dToSampleRate);
+ printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __func__, bIsUseASRC, dToSampleRate);
if (true == bIsUseASRC)
{
BUG_ON(!(dToSampleRate == 44100 || dToSampleRate == 48000));
@@ -2511,7 +2511,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
{
mAudioMEMIF[InterfaceType]->mFetchFormatPerSample = eFetchFormat;
/*
- printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __FUNCTION__
+ printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __func__
, InterfaceType, eFetchFormat, mAudioMEMIF[InterfaceType]->mFetchFormatPerSample);*/
switch (InterfaceType)
{
@@ -2574,7 +2574,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
bool SetoutputConnectionFormat(uint32 ConnectionFormat, uint32 Output)
{
- //printk("+%s(), Data Format = %d, Output = %d\n", __FUNCTION__, ConnectionFormat, Output);
+ //printk("+%s(), Data Format = %d, Output = %d\n", __func__, ConnectionFormat, Output);
Afe_Set_Reg(AFE_CONN_24BIT, (ConnectionFormat << Output), (1 << Output));
return true;
}
diff --git a/sound/soc/mediatek/mt_soc_audio_v1/mt_soc_afe_control.c b/sound/soc/mediatek/mt_soc_audio_v1/mt_soc_afe_control.c
index e0ee3c14e..0e2f46b94 100644
--- a/sound/soc/mediatek/mt_soc_audio_v1/mt_soc_afe_control.c
+++ b/sound/soc/mediatek/mt_soc_audio_v1/mt_soc_afe_control.c
@@ -1099,7 +1099,7 @@ bool SetChannels(uint32 Memory_Interface, uint32 channel)
bool Set2ndI2SOutAttribute(uint32_t sampleRate)
{
- printk("+%s(), sampleRate = %d\n", __FUNCTION__, sampleRate);
+ printk("+%s(), sampleRate = %d\n", __func__, sampleRate);
m2ndI2Sout->mLR_SWAP = Soc_Aud_LR_SWAP_NO_SWAP;
m2ndI2Sout->mI2S_SLAVE = Soc_Aud_I2S_SRC_MASTER_MODE;
m2ndI2Sout->mINV_LRCK = Soc_Aud_INV_LRCK_NO_INVERSE;
@@ -1321,7 +1321,7 @@ bool Set2ndI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1372,7 +1372,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1395,7 +1395,7 @@ bool Audio_ModemPcm2_ASRC_Set(bool Enable)
bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
{
- printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __FUNCTION__, connection, direction, Enable);
+ printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __func__, connection, direction, Enable);
if (Enable && direction)
{
switch (connection)
@@ -1577,7 +1577,7 @@ bool Set2ndI2SEnable(bool bEnable)
bool CleanPreDistortion()
{
- //printk("%s \n", __FUNCTION__);
+ //printk("%s \n", __func__);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON0, 0, MASK_ALL);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON1, 0, MASK_ALL);
return true;
@@ -1699,7 +1699,7 @@ bool SetHwDigitalGainMode(uint32 GainType, uint32 SampleRate, uint32 SamplePerSt
bool SetHwDigitalGainEnable(int GainType, bool Enable)
{
- printk("+%s(), GainType = %d, Enable = %d\n", __FUNCTION__, GainType, Enable);
+ printk("+%s(), GainType = %d, Enable = %d\n", __func__, GainType, Enable);
switch (GainType)
{
case Soc_Aud_Hw_Digital_Gain_HW_DIGITAL_GAIN1:
@@ -1756,7 +1756,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmWordLength & 0x1) << 4;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x1) << 3;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmFormat & 0x3) << 1;
- printk("%s(), PCM2_INTF_CON(0x%x) = 0x%x\n", __FUNCTION__, PCM2_INTF_CON, reg_pcm2_intf_con);
+ printk("%s(), PCM2_INTF_CON(0x%x) = 0x%x\n", __func__, PCM2_INTF_CON, reg_pcm2_intf_con);
Afe_Set_Reg(PCM2_INTF_CON, reg_pcm2_intf_con, MASK_ALL);
if (p_modem_pcm_attribute.mPcmModeWidebandSel == Soc_Aud_PCM_MODE_PCM_MODE_8K)
{
@@ -1839,7 +1839,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x01) << 3;
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmFormat & 0x03) << 1;
- printk("%s(), PCM_INTF_CON1(0x%x) = 0x%x", __FUNCTION__, PCM_INTF_CON, reg_pcm_intf_con1);
+ printk("%s(), PCM_INTF_CON1(0x%x) = 0x%x", __func__, PCM_INTF_CON, reg_pcm_intf_con1);
Afe_Set_Reg(PCM_INTF_CON, reg_pcm_intf_con1, MASK_ALL);
}
@@ -1849,13 +1849,13 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
uint32 dNeedDisableASM = 0;
- printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __FUNCTION__, modem_index, modem_pcm_on);
+ printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __func__, modem_index, modem_pcm_on);
if (modem_index == MODEM_1) // MODEM_1 use PCM2_INTF_CON (0x53C) !!!
{
if (modem_pcm_on == true)
{
- printk("%s(), modem_index(%d), modem_pcm_on = %d, mPcm2AsyncFifoSel = %d\n", __FUNCTION__, modem_index, modem_pcm_on, mPcm2AsyncFifoSel);
+ printk("%s(), modem_index(%d), modem_pcm_on = %d, mPcm2AsyncFifoSel = %d\n", __func__, modem_index, modem_pcm_on, mPcm2AsyncFifoSel);
if (mPcm2AsyncFifoSel == false) // turn on ASRC before Modem PCM on
{
Afe_Set_Reg(AFE_ASRC2_CON6, 0x00bf188f, MASK_ALL);
@@ -1869,7 +1869,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
Afe_Set_Reg(PCM2_INTF_CON, modem_pcm_on, 0x1);
dNeedDisableASM = Afe_Get_Reg(AFE_ASRC2_CON0) & 0x1;
- printk("%s(), modem_index(%d), modem_pcm_on = %d, dNeedDisableASM=%d\n", __FUNCTION__, modem_index, modem_pcm_on, dNeedDisableASM);
+ printk("%s(), modem_index(%d), modem_pcm_on = %d, dNeedDisableASM=%d\n", __func__, modem_index, modem_pcm_on, dNeedDisableASM);
if (dNeedDisableASM) // turn off ASRC after Modem PCM off
{
Afe_Set_Reg(AFE_ASRC2_CON6, 0x00000000, MASK_ALL);
@@ -1901,7 +1901,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
}
else
{
- printk("%s(), no such modem_index: %d!!", __FUNCTION__, modem_index);
+ printk("%s(), no such modem_index: %d!!", __func__, modem_index);
return false;
}
return true;
@@ -1922,11 +1922,11 @@ bool EnableSideToneFilter(bool stf_on)
const bool bypass_stf_on = true;
uint32_t reg_value = (bypass_stf_on << 31) | (stf_on << 8);
Afe_Set_Reg(AFE_SIDETONE_CON1, reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%x] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%x] = 0x%x\n", __func__, AFE_SIDETONE_CON1, reg_value);
// set side tone gain = 0
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
- printk("%s(), AFE_SIDETONE_GAIN[0x%x] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%x] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
}
else
{
@@ -1941,11 +1941,11 @@ bool EnableSideToneFilter(bool stf_on)
uint32_t read_reg_value = Afe_Get_Reg(AFE_SIDETONE_CON0);
size_t coef_addr = 0;
- printk("%s(), AFE_SIDETONE_GAIN[0x%x] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%x] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
// set side tone gain
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
Afe_Set_Reg(AFE_SIDETONE_CON1, write_reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%x] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%x] = 0x%x\n", __func__, AFE_SIDETONE_CON1, write_reg_value);
#if 0 // no need to set sidetone coeffecient. spend too much time during incall
for (coef_addr = 0; coef_addr < kSideToneHalfTapNum; coef_addr++)
@@ -1959,7 +1959,7 @@ bool EnableSideToneFilter(bool stf_on)
coef_addr << 16 |
kSideToneCoefficientTable16k[coef_addr];
Afe_Set_Reg(AFE_SIDETONE_CON0, write_reg_value, 0x39FFFFF);
- printk("%s(), AFE_SIDETONE_CON0[0x%x] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON0, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON0[0x%x] = 0x%x\n", __func__, AFE_SIDETONE_CON0, write_reg_value);
// wait until flag write_ready changed (means write done)
for (try_cnt = 0; try_cnt < 10; try_cnt++) // max try 10 times
@@ -1981,7 +1981,7 @@ bool EnableSideToneFilter(bool stf_on)
#endif
}
AudDrv_Clk_Off();
- printk("-%s(), stf_on = %d\n", __FUNCTION__, stf_on);
+ printk("-%s(), stf_on = %d\n", __func__, stf_on);
return true;
}
@@ -2106,7 +2106,7 @@ bool SetHDMIEnable(bool bEnable)
bool SetHDMIConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
{
- printk("+%s(), Input = %d, Output = %d\n", __FUNCTION__, Input, Output);
+ printk("+%s(), Input = %d, Output = %d\n", __func__, Input, Output);
switch (Output)
{
case Soc_Aud_InterConnectionOutput_O30:
@@ -2146,7 +2146,7 @@ bool SetConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
bool SetIrqEnable(uint32 Irqmode, bool bEnable)
{
- //printk("+%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("+%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
switch (Irqmode)
{
case Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE:
@@ -2179,7 +2179,7 @@ bool SetIrqEnable(uint32 Irqmode, bool bEnable)
default:
break;
}
- //printk("-%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("-%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
return true;
}
@@ -2330,7 +2330,7 @@ bool Set2ndI2SInEnable(bool bEnable)
bool SetI2SASRCConfig(bool bIsUseASRC, unsigned int dToSampleRate)
{
- printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __FUNCTION__, bIsUseASRC, dToSampleRate);
+ printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __func__, bIsUseASRC, dToSampleRate);
if (true == bIsUseASRC)
{
BUG_ON(!(dToSampleRate == 44100 || dToSampleRate == 48000));
@@ -2378,7 +2378,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
{
mAudioMEMIF[InterfaceType]->mFetchFormatPerSample = eFetchFormat;
/*
- printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __FUNCTION__
+ printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __func__
, InterfaceType, eFetchFormat, mAudioMEMIF[InterfaceType]->mFetchFormatPerSample);*/
switch (InterfaceType)
{
@@ -2441,7 +2441,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
bool SetoutputConnectionFormat(uint32 ConnectionFormat, uint32 Output)
{
- //printk("+%s(), Data Format = %d, Output = %d\n", __FUNCTION__, ConnectionFormat, Output);
+ //printk("+%s(), Data Format = %d, Output = %d\n", __func__, ConnectionFormat, Output);
Afe_Set_Reg(AFE_CONN_24BIT, (ConnectionFormat << Output), (1 << Output));
return true;
}
diff --git a/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_afe_control.c b/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_afe_control.c
index 954717df3..a456ecf97 100644
--- a/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_afe_control.c
+++ b/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_afe_control.c
@@ -1167,7 +1167,7 @@ bool SetChannels(uint32 Memory_Interface, uint32 channel)
bool Set2ndI2SOutAttribute(uint32_t sampleRate)
{
- printk("+%s(), sampleRate = %d\n", __FUNCTION__, sampleRate);
+ printk("+%s(), sampleRate = %d\n", __func__, sampleRate);
m2ndI2Sout->mLR_SWAP = Soc_Aud_LR_SWAP_NO_SWAP;
m2ndI2Sout->mI2S_SLAVE = Soc_Aud_I2S_SRC_MASTER_MODE;
m2ndI2Sout->mINV_LRCK = Soc_Aud_INV_LRCK_NO_INVERSE;
@@ -1390,7 +1390,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1398,7 +1398,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
{
- printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __FUNCTION__, connection, direction, Enable);
+ printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __func__, connection, direction, Enable);
if (Enable && direction)
{
switch (connection)
@@ -1543,7 +1543,7 @@ bool SetSideGenSampleRate(uint32 SampleRate)
uint32 sine_mode_ch1 = 0;
uint32 sine_mode_ch2 = 0;
- printk("+%s(), SampleRate = %d\n", __FUNCTION__, SampleRate);
+ printk("+%s(), SampleRate = %d\n", __func__, SampleRate);
sine_mode_ch1 = SampleRateTransform(SampleRate) << 8;
sine_mode_ch2 = SampleRateTransform(SampleRate) << 20;
@@ -1583,7 +1583,7 @@ bool Set2ndI2SEnable(bool bEnable)
bool CleanPreDistortion()
{
- //printk("%s \n", __FUNCTION__);
+ //printk("%s \n", __func__);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON0, 0, MASK_ALL);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON1, 0, MASK_ALL);
return true;
@@ -1688,7 +1688,7 @@ bool SetHwDigitalGainMode(uint32 GainType, uint32 SampleRate, uint32 SamplePerSt
bool SetHwDigitalGainEnable(int GainType, bool Enable)
{
- printk("+%s(), GainType = %d, Enable = %d\n", __FUNCTION__, GainType, Enable);
+ printk("+%s(), GainType = %d, Enable = %d\n", __func__, GainType, Enable);
switch (GainType)
{
case Soc_Aud_Hw_Digital_Gain_HW_DIGITAL_GAIN1:
@@ -1744,7 +1744,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmWordLength & 0x1) << 5;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x3) << 3;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmFormat & 0x3) << 1;
- printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __FUNCTION__, PCM2_INTF_CON, reg_pcm2_intf_con);
+ printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __func__, PCM2_INTF_CON, reg_pcm2_intf_con);
Afe_Set_Reg(PCM2_INTF_CON, reg_pcm2_intf_con, MASK_ALL);
if (p_modem_pcm_attribute.mPcmModeWidebandSel == Soc_Aud_PCM_MODE_PCM_MODE_8K)
{
@@ -1844,7 +1844,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x03) << 3;
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmFormat & 0x03) << 1;
- printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __FUNCTION__, PCM_INTF_CON, reg_pcm_intf_con1);
+ printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __func__, PCM_INTF_CON, reg_pcm_intf_con1);
Afe_Set_Reg(PCM_INTF_CON, reg_pcm_intf_con1, MASK_ALL);
}
@@ -1854,7 +1854,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
uint32 dNeedDisableASM = 0, mPcm1AsyncFifo;
- printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __FUNCTION__, modem_index, modem_pcm_on);
+ printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __func__, modem_index, modem_pcm_on);
if (modem_index == MODEM_1) // MODEM_1 use PCM2_INTF_CON (0x53C) !!!
{
@@ -1894,7 +1894,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
}
else
{
- printk("%s(), no such modem_index: %d!!", __FUNCTION__, modem_index);
+ printk("%s(), no such modem_index: %d!!", __func__, modem_index);
return false;
}
return true;
@@ -1915,11 +1915,11 @@ bool EnableSideToneFilter(bool stf_on)
const bool bypass_stf_on = true;
uint32_t reg_value = (bypass_stf_on << 31) | (stf_on << 8);
Afe_Set_Reg(AFE_SIDETONE_CON1, reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, reg_value);
// set side tone gain = 0
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
}
else
{
@@ -1934,11 +1934,11 @@ bool EnableSideToneFilter(bool stf_on)
uint32_t read_reg_value = Afe_Get_Reg(AFE_SIDETONE_CON0);
size_t coef_addr = 0;
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
// set side tone gain
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
Afe_Set_Reg(AFE_SIDETONE_CON1, write_reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, write_reg_value);
#if 0 // no need to set sidetone coeffecient. spend too much time during incall
for (coef_addr = 0; coef_addr < kSideToneHalfTapNum; coef_addr++)
@@ -1952,7 +1952,7 @@ bool EnableSideToneFilter(bool stf_on)
coef_addr << 16 |
kSideToneCoefficientTable16k[coef_addr];
Afe_Set_Reg(AFE_SIDETONE_CON0, write_reg_value, 0x39FFFFF);
- printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON0, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON0, write_reg_value);
// wait until flag write_ready changed (means write done)
for (try_cnt = 0; try_cnt < 10; try_cnt++) // max try 10 times
@@ -1974,7 +1974,7 @@ bool EnableSideToneFilter(bool stf_on)
#endif
}
AudDrv_Clk_Off();
- printk("-%s(), stf_on = %d\n", __FUNCTION__, stf_on);
+ printk("-%s(), stf_on = %d\n", __func__, stf_on);
return true;
}
@@ -2103,7 +2103,7 @@ bool SetConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
bool SetIrqEnable(uint32 Irqmode, bool bEnable)
{
- //printk("+%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("+%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
switch (Irqmode)
{
case Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE:
@@ -2136,7 +2136,7 @@ bool SetIrqEnable(uint32 Irqmode, bool bEnable)
default:
break;
}
- //printk("-%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("-%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
return true;
}
@@ -2285,7 +2285,7 @@ bool Set2ndI2SInEnable(bool bEnable)
bool SetI2SASRCConfig(bool bIsUseASRC, unsigned int dToSampleRate)
{
- printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __FUNCTION__, bIsUseASRC, dToSampleRate);
+ printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __func__, bIsUseASRC, dToSampleRate);
if (true == bIsUseASRC)
{
BUG_ON(!(dToSampleRate == 44100 || dToSampleRate == 48000));
@@ -2333,7 +2333,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
{
mAudioMEMIF[InterfaceType]->mFetchFormatPerSample = eFetchFormat;
/*
- printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __FUNCTION__
+ printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __func__
, InterfaceType, eFetchFormat, mAudioMEMIF[InterfaceType]->mFetchFormatPerSample);*/
switch (InterfaceType)
{
@@ -2396,7 +2396,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
bool SetoutputConnectionFormat(uint32 ConnectionFormat, uint32 Output)
{
- //printk("+%s(), Data Format = %d, Output = %d\n", __FUNCTION__, ConnectionFormat, Output);
+ //printk("+%s(), Data Format = %d, Output = %d\n", __func__, ConnectionFormat, Output);
Afe_Set_Reg(AFE_CONN_24BIT, (ConnectionFormat << Output), (1 << Output));
return true;
}
diff --git a/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_afe_control.c b/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_afe_control.c
index b097b3828..914a5ee8f 100644
--- a/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_afe_control.c
+++ b/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_afe_control.c
@@ -1144,7 +1144,7 @@ bool SetChannels(uint32 Memory_Interface, uint32 channel)
bool Set2ndI2SOutAttribute(uint32_t sampleRate)
{
- printk("+%s(), sampleRate = %d\n", __FUNCTION__, sampleRate);
+ printk("+%s(), sampleRate = %d\n", __func__, sampleRate);
m2ndI2Sout->mLR_SWAP = Soc_Aud_LR_SWAP_NO_SWAP;
m2ndI2Sout->mI2S_SLAVE = Soc_Aud_I2S_SRC_MASTER_MODE;
m2ndI2Sout->mINV_LRCK = Soc_Aud_INV_LRCK_NO_INVERSE;
@@ -1368,7 +1368,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
Audio_I2S_Adc |= (SampleRateTransform(AudioAdcI2S->mI2S_SAMPLERATE) << 8);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_FMT << 3);
Audio_I2S_Adc |= (AudioAdcI2S->mI2S_WLEN << 1);
- printk("%s Audio_I2S_Adc = 0x%x", __FUNCTION__, Audio_I2S_Adc);
+ printk("%s Audio_I2S_Adc = 0x%x", __func__, Audio_I2S_Adc);
Afe_Set_Reg(AFE_I2S_CON2, Audio_I2S_Adc, MASK_ALL);
}
return true;
@@ -1376,7 +1376,7 @@ bool SetI2SAdcIn(AudioDigtalI2S *DigtalI2S)
bool EnableSideGenHw(uint32 connection , bool direction , bool Enable)
{
- printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __FUNCTION__, connection, direction, Enable);
+ printk("+%s(), connection = %d, direction = %d, Enable= %d\n", __func__, connection, direction, Enable);
if (Enable && direction)
{
switch (connection)
@@ -1521,7 +1521,7 @@ bool SetSideGenSampleRate(uint32 SampleRate)
uint32 sine_mode_ch1 = 0;
uint32 sine_mode_ch2 = 0;
- printk("+%s(), SampleRate = %d\n", __FUNCTION__, SampleRate);
+ printk("+%s(), SampleRate = %d\n", __func__, SampleRate);
sine_mode_ch1 = SampleRateTransform(SampleRate) << 8;
sine_mode_ch2 = SampleRateTransform(SampleRate) << 20;
@@ -1562,7 +1562,7 @@ bool Set2ndI2SEnable(bool bEnable)
bool CleanPreDistortion()
{
- //printk("%s \n", __FUNCTION__);
+ //printk("%s \n", __func__);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON0, 0, MASK_ALL);
Afe_Set_Reg(AFE_ADDA_PREDIS_CON1, 0, MASK_ALL);
return true;
@@ -1667,7 +1667,7 @@ bool SetHwDigitalGainMode(uint32 GainType, uint32 SampleRate, uint32 SamplePerSt
bool SetHwDigitalGainEnable(int GainType, bool Enable)
{
- printk("+%s(), GainType = %d, Enable = %d\n", __FUNCTION__, GainType, Enable);
+ printk("+%s(), GainType = %d, Enable = %d\n", __func__, GainType, Enable);
switch (GainType)
{
case Soc_Aud_Hw_Digital_Gain_HW_DIGITAL_GAIN1:
@@ -1723,7 +1723,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmWordLength & 0x1) << 5;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x3) << 3;
reg_pcm2_intf_con |= (p_modem_pcm_attribute.mPcmFormat & 0x3) << 1;
- printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __FUNCTION__, PCM2_INTF_CON, reg_pcm2_intf_con);
+ printk("%s(), PCM2_INTF_CON(0x%lx) = 0x%x\n", __func__, PCM2_INTF_CON, reg_pcm2_intf_con);
Afe_Set_Reg(PCM2_INTF_CON, reg_pcm2_intf_con, MASK_ALL);
if (p_modem_pcm_attribute.mPcmModeWidebandSel == Soc_Aud_PCM_MODE_PCM_MODE_8K)
{
@@ -1829,7 +1829,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmModeWidebandSel & 0x03) << 3;
reg_pcm_intf_con1 |= (p_modem_pcm_attribute.mPcmFormat & 0x03) << 1;
- printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __FUNCTION__, PCM_INTF_CON, reg_pcm_intf_con1);
+ printk("%s(), PCM_INTF_CON1(0x%lx) = 0x%x", __func__, PCM_INTF_CON, reg_pcm_intf_con1);
Afe_Set_Reg(PCM_INTF_CON, reg_pcm_intf_con1, MASK_ALL);
}
@@ -1839,7 +1839,7 @@ bool SetModemPcmConfig(int modem_index , AudioDigitalPCM p_modem_pcm_attribute)
bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
{
uint32 dNeedDisableASM = 0, mPcm1AsyncFifo;
- printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __FUNCTION__, modem_index, modem_pcm_on);
+ printk("+%s(), modem_index = %d, modem_pcm_on = %d\n", __func__, modem_index, modem_pcm_on);
if (modem_index == MODEM_1) // MODEM_1 use PCM2_INTF_CON (0x53C) !!!
{
@@ -1881,7 +1881,7 @@ bool SetModemPcmEnable(int modem_index, bool modem_pcm_on)
}
else
{
- printk("%s(), no such modem_index: %d!!", __FUNCTION__, modem_index);
+ printk("%s(), no such modem_index: %d!!", __func__, modem_index);
return false;
}
return true;
@@ -1902,11 +1902,11 @@ bool EnableSideToneFilter(bool stf_on)
const bool bypass_stf_on = true;
uint32_t reg_value = (bypass_stf_on << 31) | (stf_on << 8);
Afe_Set_Reg(AFE_SIDETONE_CON1, reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, reg_value);
// set side tone gain = 0
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
}
else
{
@@ -1921,11 +1921,11 @@ bool EnableSideToneFilter(bool stf_on)
uint32_t read_reg_value = Afe_Get_Reg(AFE_SIDETONE_CON0);
size_t coef_addr = 0;
- printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_GAIN, 0);
+ printk("%s(), AFE_SIDETONE_GAIN[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_GAIN, 0);
// set side tone gain
Afe_Set_Reg(AFE_SIDETONE_GAIN, 0, MASK_ALL);
Afe_Set_Reg(AFE_SIDETONE_CON1, write_reg_value, MASK_ALL);
- printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON1, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON1[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON1, write_reg_value);
#if 0 // no need to set sidetone coeffecient. spend too much time during incall
for (coef_addr = 0; coef_addr < kSideToneHalfTapNum; coef_addr++)
@@ -1939,7 +1939,7 @@ bool EnableSideToneFilter(bool stf_on)
coef_addr << 16 |
kSideToneCoefficientTable16k[coef_addr];
Afe_Set_Reg(AFE_SIDETONE_CON0, write_reg_value, 0x39FFFFF);
- printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __FUNCTION__, AFE_SIDETONE_CON0, write_reg_value);
+ printk("%s(), AFE_SIDETONE_CON0[0x%lx] = 0x%x\n", __func__, AFE_SIDETONE_CON0, write_reg_value);
// wait until flag write_ready changed (means write done)
for (try_cnt = 0; try_cnt < 10; try_cnt++) // max try 10 times
@@ -1961,7 +1961,7 @@ bool EnableSideToneFilter(bool stf_on)
#endif
}
AudDrv_Clk_Off();
- printk("-%s(), stf_on = %d\n", __FUNCTION__, stf_on);
+ printk("-%s(), stf_on = %d\n", __func__, stf_on);
return true;
}
@@ -2093,7 +2093,7 @@ bool SetConnection(uint32 ConnectionState, uint32 Input , uint32 Output)
bool SetIrqEnable(uint32 Irqmode, bool bEnable)
{
- //printk("+%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("+%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
switch (Irqmode)
{
case Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE:
@@ -2133,7 +2133,7 @@ bool SetIrqEnable(uint32 Irqmode, bool bEnable)
default:
break;
}
- //printk("-%s(), Irqmode = %d, bEnable = %d\n", __FUNCTION__, Irqmode, bEnable);
+ //printk("-%s(), Irqmode = %d, bEnable = %d\n", __func__, Irqmode, bEnable);
return true;
}
@@ -2293,7 +2293,7 @@ bool Set2ndI2SInEnable(bool bEnable)
bool SetI2SASRCConfig(bool bIsUseASRC, unsigned int dToSampleRate)
{
- printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __FUNCTION__, bIsUseASRC, dToSampleRate);
+ printk("+%s() bIsUseASRC [%d] dToSampleRate [%d]\n", __func__, bIsUseASRC, dToSampleRate);
if (true == bIsUseASRC)
{
BUG_ON(!(dToSampleRate == 44100 || dToSampleRate == 48000));
@@ -2341,7 +2341,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
{
mAudioMEMIF[InterfaceType]->mFetchFormatPerSample = eFetchFormat;
/*
- printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __FUNCTION__
+ printk("+%s(), InterfaceType = %d, eFetchFormat = %d, mAudioMEMIF[InterfaceType].mFetchFormatPerSample = %d\n", __func__
, InterfaceType, eFetchFormat, mAudioMEMIF[InterfaceType]->mFetchFormatPerSample);*/
switch (InterfaceType)
{
@@ -2404,7 +2404,7 @@ bool SetMemIfFetchFormatPerSample(uint32 InterfaceType, uint32 eFetchFormat)
bool SetoutputConnectionFormat(uint32 ConnectionFormat, uint32 Output)
{
- //printk("+%s(), Data Format = %d, Output = %d\n", __FUNCTION__, ConnectionFormat, Output);
+ //printk("+%s(), Data Format = %d, Output = %d\n", __func__, ConnectionFormat, Output);
Afe_Set_Reg(AFE_CONN_24BIT, (ConnectionFormat << Output), (1 << Output));
return true;
}