alps/mediatek/custom/simcom72_wet_jb3/hal/audioflinger/audio/audio_custom_exp.h
alps/mediatek/custom/common/kernel/sound/amp_6323pmic_spk/yusu_android_speaker.c
alps/mediatek/custom/common/kernel/sound/amp_yad/yusu_android_speaker.c
alps/mediatek/custom/common/kernel/sound/amp_aw8733/yusu_android_speaker.c
void Sound_Speaker_Turnon(int channel)
{
PRINTK("Sound_Speaker_Turnon channel = %d\n",channel);
if(gsk_on)
return;
mt_set_gpio_dir(GPIO_SPEAKER_EN_PIN,GPIO_DIR_OUT); // output
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ONE); // high //mode2
udelay(2);
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ZERO); // low //mode2
udelay(2);
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ONE); // high //mode2
msleep(SPK_WARM_UP_TIME);
gsk_on = true;
}
void Sound_Speaker_Turnoff(int channel)
{
PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel);
if(!gsk_on)
return;
mt_set_gpio_dir(GPIO_SPEAKER_EN_PIN,GPIO_DIR_OUT); // output
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ZERO); // high
gsk_on = false;
}
{
PRINTK("Sound_Speaker_Turnon channel = %d\n",channel);
if(gsk_on)
return;
mt_set_gpio_dir(GPIO_SPEAKER_EN_PIN,GPIO_DIR_OUT); // output
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ONE); // high //mode2
udelay(2);
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ZERO); // low //mode2
udelay(2);
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ONE); // high //mode2
msleep(SPK_WARM_UP_TIME);
gsk_on = true;
}
void Sound_Speaker_Turnoff(int channel)
{
PRINTK("Sound_Speaker_Turnoff channel = %d\n",channel);
if(!gsk_on)
return;
mt_set_gpio_dir(GPIO_SPEAKER_EN_PIN,GPIO_DIR_OUT); // output
mt_set_gpio_out(GPIO_SPEAKER_EN_PIN,GPIO_OUT_ZERO); // high
gsk_on = false;
}
======================================
ubuntu@ZZ:alps$ grep -nr yusu_android_speaker.h *
bootable/bootloader/lk/platform/mediatek/mt6572/kernel/drivers/sound/AudDrv_Kernel.c:105:#include "yusu_android_speaker.h"
bootable/bootloader/lk/custom/simcom72_wet_jb3/kernel/sound/inc/yusu_android_speaker.h:30: * [ALPS00102848] [Need Patch] [Volunteer Patch] build waring in yusu_android_speaker.h
bootable/bootloader/lk/custom/simcom72_wet_jb3/kernel/sound/yusu_android_speaker.c:22:#include "yusu_android_speaker.h"

本文详细探讨了MTK平台上的PA(功率放大器)控制,涉及相关文件如audioflinger/audio/audio_custom_exp.h和sound/yusu_android_speaker.c。文中展示了如何通过Sound_Speaker_Turnon和Sound_Speaker_Turnoff函数切换喇叭状态,并提及在Ubuntu环境下grep命令的使用。此外,还介绍了在AudDrv_ioctl函数中如何通过SET_SPEAKER_ON/OFF命令控制PA,并在AudioMachineDevice.cpp中针对音量控制关闭PA以消除底噪的修改方法。
最低0.47元/天 解锁文章
667

被折叠的 条评论
为什么被折叠?



