Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756199AbdCUDHr convert rfc822-to-8bit (ORCPT ); Mon, 20 Mar 2017 23:07:47 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:47517 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755307AbdCUDHq (ORCPT ); Mon, 20 Mar 2017 23:07:46 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.56 with qID v2L37Pb6028935, This message is accepted by code: ctloc85258 From: Bard Liao To: Kai-Heng Feng , "broonie@kernel.org" CC: "lgirdwood@gmail.com" , Oder Chiou , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] ASoC: rt286: fix headphone click/crack noise on Dell XPS 9343 I2S mode Thread-Topic: [PATCH v3] ASoC: rt286: fix headphone click/crack noise on Dell XPS 9343 I2S mode Thread-Index: AQHSoS5G+S9N2Bimuk2IJBa89nnBeaGekiiQ Date: Tue, 21 Mar 2017 03:07:25 +0000 Message-ID: References: <20170320035831.10762-1-kai.heng.feng@canonical.com> In-Reply-To: <20170320035831.10762-1-kai.heng.feng@canonical.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.85.154] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 30 > -----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 "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? Will HPO be unmuted before "HP Power" is powered up on your system? Or should the event be associated with "LDO1"? Which power will cause the click noise?