Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756226AbdCUFi7 (ORCPT ); Tue, 21 Mar 2017 01:38:59 -0400 Received: from mail-yw0-f173.google.com ([209.85.161.173]:35811 "EHLO mail-yw0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbdCUFi5 (ORCPT ); Tue, 21 Mar 2017 01:38:57 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170320035831.10762-1-kai.heng.feng@canonical.com> From: Kai-Heng Feng Date: Tue, 21 Mar 2017 13:38:55 +0800 Message-ID: Subject: Re: [PATCH v3] ASoC: rt286: fix headphone click/crack noise on Dell XPS 9343 I2S mode To: Bard Liao Cc: "broonie@kernel.org" , "lgirdwood@gmail.com" , Oder Chiou , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1844 Lines: 50 On Tue, Mar 21, 2017 at 11:07 AM, Bard Liao wrote: >> -----Original Message----- >> From: Kai-Heng Feng [mailto:kai.heng.feng@canonical.com] >> Sent: Monday, March 20, 2017 11:59 AM >> To: broonie@kernel.org >> Cc: lgirdwood@gmail.com; Bard Liao; Oder Chiou; >> alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; Kai-Heng Feng >> Subject: [PATCH v3] ASoC: rt286: fix headphone click/crack noise on Dell XPS >> 9343 I2S mode >> >> + 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; > > Besides Mark's comment, I have question here. It seems you want to mute > HPO before "HP Power" is powered up and after "HP Power" is powered down. > But "HPO L" and "HPO R" are autodisable. And "HP Power" is only connect to What I really want to do is something rt5670's rt5670_hp_event(), maybe autodisable is not enough sometimes? > "HPO L" and "HPO R". From my understanding, HPO will mute if "HP Power" > is powered down. Any specific reason for muting HPO again before "HP Power" > is powered up? You are right. Either one of them should be sufficient. > Will HPO be unmuted before "HP Power" is powered up on your system? Yes. I am no audio expert here - but from what I read from HDA, there's actually no AMP unmute counterpart to AMP mute. > Or should the event be associated with "LDO1"? Which power will > cause the click noise? I found that the effect is most noticeable if the mute callback is associated with "LDO2" and "HP Power". But again, this is just what I observed. > >