From: Zhu Ning <zhuning0077@gmail.com>
To: pierre-louis.bossart@linux.intel.com
Cc: alsa-devel@alsa-project.org, zhuning0077@gmail.com,
tiwai@suse.com, broonie@kernel.org, zhuning@everest-semi.com,
yangxiaohua@everest-semi.com
Subject: Re: [PATCH 1/2] ASoC: codecs: add support for ES8326
Date: Thu, 14 Jul 2022 10:26:17 +0800 [thread overview]
Message-ID: <20220714022617.6345-1-zhuning0077@gmail.com> (raw)
In-Reply-To: <f88ec5f9-b46b-e72d-1fc3-668b834ed105@linux.intel.com>
>> + snd_soc_component_write(comp, ES8326_ADC1_SRC_2A, es8326->mic2_src);
>> + snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x70);
>> + } else if ((iface & ES8326_HPINSERT_FLAG) == ES8326_HPINSERT_FLAG) {
>
>> +
>> +static irqreturn_t es8326_irq(int irq, void *dev_id)
>> +{
>> + struct es8326_priv *es8326 = dev_id;
>> + struct snd_soc_component *comp = es8326->component;
>> +
>> + snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x7c);
>
>this ES8326_ANA_MICBIAS_1B register is also modified in the workqueue,
>could this lead to invalid configurations?
In es8326_irq, MICBIAS is turned on to detect headphone from headset. When an unpluged
event is detected, MICBIAS is turned off to minimize pop noise. Maybe a comment/macro for this?
>> + dev_dbg(comp->dev, "gpio flag %#04x", iface);
>> + if ((iface & ES8326_HPINSERT_FLAG) == 0) {
>> + dev_dbg(comp->dev, "No headset detected");
>> + snd_soc_jack_report(es8326->jack, 0, SND_JACK_HEADSET);
>
>should you check if es8326->jack is set?
>in the 8316 driver you have a check for a spurious interrupt before
>set_jack() is called
I haven't seen other codecs (rt5640) handle spurious irq.
>it's rather odd that there's a resume but no suspend?
Since the codec loses power on suspend. It's also odd to write to the registers when they
are going to be cleared during suspend. The lost registers need to be written during
resume though.
next prev parent reply other threads:[~2022-07-14 2:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 14:41 [PATCH 1/2] ASoC: codecs: add support for ES8326 Zhu Ning
2022-07-12 14:41 ` [PATCH 2/2] dt-bindings: sound: es8326: Add dtbindings documentation Zhu Ning
2022-07-12 15:17 ` [PATCH 1/2] ASoC: codecs: add support for ES8326 Pierre-Louis Bossart
2022-07-14 2:26 ` Zhu Ning [this message]
2022-07-14 11:53 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2022-07-14 2:42 Zhu Ning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220714022617.6345-1-zhuning0077@gmail.com \
--to=zhuning0077@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yangxiaohua@everest-semi.com \
--cc=zhuning@everest-semi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox