[Linux Audio Driver] Solve line-out output is unstable

Recently i experience some thing and want to improve my English, so i will try to use English to write the new document completely.

0. background

OK, let’s go straight to the topic. We will found the line-out output singal is not stable, while the hardware engineer test the speaker power.

The problem is confused and unbelievable.

在这里插入图片描述

1. Solution

The key problem that causes this problem is the HW delay. Qualcomm design is adapted to their own wsa pa. When we use the third party PA, we need to change to HW delay to stabilize the singal .

code path as sample:

./kernel/msm-3.18/sound/soc/codecs/msm8x16-wcd.c

static int msm8x16_wcd_lo_dac_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_codec *codec = w->codec;

	dev_dbg(codec->dev, "%s %s %d\n", __func__, w->name, event);

	switch (event) {
	case SND_SOC_DAPM_PRE_PMU:
        ...
		msleep(5);
		break;
	case SND_SOC_DAPM_POST_PMU:
		snd_soc_update_bits(codec,
			MSM8X16_WCD_A_ANALOG_RX_LO_DAC_CTL, 0x80, 0x80);
		snd_soc_update_bits(codec,
			MSM8X16_WCD_A_ANALOG_RX_LO_DAC_CTL, 0x08, 0x00);
		snd_soc_update_bits(codec,
			MSM8X16_WCD_A_ANALOG_RX_LO_EN_CTL, 0x40, 0x40);
		msleep(20);//value is adjustable
		break;
	case SND_SOC_DAPM_POST_PMD:
        ...
		break;
	}
	return 0;
}

2. Author Note

/******
@article{Linux Audio Driver,
Author = { 1byte ≠ 8bit},
Year = { 2021},
}
******/
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值