Re: [PATCH v3] ASoC: rt286: fix headphone click/crack noise on Dell XPS 9343 I2S mode

From: Kai-Heng Feng
Date: Thu Mar 23 2017 - 00:41:58 EST


[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.