Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbdCWElz (ORCPT ); Thu, 23 Mar 2017 00:41:55 -0400 Received: from mail-yw0-f174.google.com ([209.85.161.174]:35180 "EHLO mail-yw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbdCWElr (ORCPT ); Thu, 23 Mar 2017 00:41:47 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170320035831.10762-1-kai.heng.feng@canonical.com> From: Kai-Heng Feng Date: Thu, 23 Mar 2017 12:41:45 +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: 2215 Lines: 69 [snip] > Let me explain it in more detail. rt5670 need to set a serious of > registers to prevent the pop noise of powering up/down muting/ > unmuting headphone. That's what rt5670_hp_event() does. But, > what rt286_hp_power_event do is only mute/unmute headphone > which is done by "HPO L" and "HPO R" widget. Thanks for the explanation. [snip] > If HPO is already muted as what we expected, it means "HPO L" and "HPO R" > work properly. And there is no reason we create an event to do the same > thing. Can you advise me how to do a simple check on HPO L&R mute status? > >> >> >> >> 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. >> > >> > Could you try only associated with "LDO2"? >> > It makes sense that will reduce the noise if a jack is plugged in/out >> > when HPO is already powered up. >> >> Does it also help to reduce noise at other power events? > > I don't know. In theory, you shouldn't hear any sound when HPO > is muted. If you need our help for debugging, please send a mail > to our FAE and cc me. Unfortunately it did happen. AMP mute did well for me and another user - please check the bug report link. > >> >> > >> > I have question about the code below >> > + /* Fix headphone click noise */ >> > + if (dmi_check_system(dmi_dell_dino)) >> > + regmap_write(rt286->regmap, >> > + RT286_MIC1_DET_CTRL, >> 0x0020); >> > + >> > >> > What does this for? How did you get the value 0x0020? >> > I just checked with Kailang, but he have no idea about that. >> >> It's PIN_VREFHIZ. It's from commit 3e1b0c4a9d56. > > snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); > 0x19 here means nid 0x19. But if you write 0x19 in rt286.c means > write a hidden register with index 0x19. It is totally different. > The corresponding code on rt286.c will be > rt286->regmap(rt286->regmap, > VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, 0x19, 0x20)); Understood, will use it instead. >> >> > >> >> >> >> > >> >> > >> >> >> >> ------Please consider the environment before printing this e-mail.