Qcom audio spk protection

系统起来的时候,会起一个线程,进行校准。
有一个系统属性回去设定校准时间。
static int spkr_calibrate(int t0_spk_1, int t0_spk_2)
{
	pcm_dev_rx_id = platform_get_pcm_device_id(uc_info_rx->id, PCM_PLAYBACK);
}

static void* spkr_calibration_thread()
{
	status = spkr_calibrate(t0_spk_1, t0_spk_2);
}


void audio_extn_spkr_prot_init(void *adev)
{
	(void)pthread_create(&handle.spkr_calibration_thread, 
				(const pthread_attr_t *) NULL, 	
				spkr_calibration_thread, &handle);

}

void *platform_init(struct audio_device *adev)
{
	 audio_extn_spkr_prot_init(adev);
}

static int adev_open(const hw_module_t *module, const char *name,
                     hw_device_t **device)
{
	  adev->platform = platform_init(adev);
}

static struct hw_module_methods_t hal_module_methods = {
    .open = adev_open,
};

struct audio_module HAL_MODULE_INFO_SYM = {
    .common = {
        .tag = HARDWARE_MODULE_TAG,
        .module_api_version = AUDIO_MODULE_API_VERSION_0_1,
        .hal_api_version = HARDWARE_HAL_API_VERSION,
        .id = AUDIO_HARDWARE_MODULE_ID,
        .name = "QCOM Audio HAL",
        .author = "The Linux Foundation",
        .methods = &hal_module_methods,
    },
};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值