[alsa-devel] [PATCH v2] ASoC: rt286: fix headphone click/crack noise on Dell XPS 9343 I2S mode

Mark Brown broonie at kernel.org
Thu Mar 16 15:09:46 CET 2017


On Thu, Mar 16, 2017 at 04:39:51PM +0800, Kai-Heng Feng wrote:

> +	switch (event) {
> +	case SND_SOC_DAPM_PRE_PMD:
> +	case SND_SOC_DAPM_POST_PMD:
> +	case SND_SOC_DAPM_POST_PMU:
> +		snd_soc_write(codec, RT286_SET_AMP_GAIN_HPO, AMP_OUT_MUTE);
> +		break;
> +	case SND_SOC_DAPM_PRE_PMU:
> +		snd_soc_write(codec, RT286_SET_AMP_GAIN_HPO, AMP_OUT_UNMUTE);
> +		break;

After power up we mute the amplifier?  That's worthy of a comment...

> +	rt286->is_dell_dino = dmi_check_system(dmi_dell_dino) ? true : false;
> +

Just directly assign the boolean value, the ternery operator is just
making thins harder to read here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170316/0126134f/attachment.sig>


More information about the Alsa-devel mailing list