All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Yu <jack.yu@realtek.com>
To: Mark Brown <broonie@kernel.org>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"Flove(HsinFu)" <flove@realtek.com>,
	"Oder Chiou" <oder_chiou@realtek.com>,
	"Shuming [范書銘]" <shumingf@realtek.com>,
	"Derek [方德義]" <derek.fang@realtek.com>
Subject: RE: [PATCH] ASoC: rt721-sdca: Adjust blindwrite flow to fix type detection issue
Date: Wed, 30 Sep 2026 10:16:39 +0000	[thread overview]
Message-ID: <38bf7b59ef7f437581d8c18473724642@realtek.com> (raw)
In-Reply-To: <caf34e12-fcea-4814-abac-26674988bc0e@sirena.org.uk>


> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Wednesday, September 30, 2026 1:47 AM
> To: Jack Yu <jack.yu@realtek.com>
> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; lars@metafoo.de;
> Flove(HsinFu) <flove@realtek.com>; Oder Chiou <oder_chiou@realtek.com>;
> Shuming [范書銘] <shumingf@realtek.com>; Derek [方德義]
> <derek.fang@realtek.com>
> Subject: Re: [PATCH] ASoC: rt721-sdca: Adjust blindwrite flow to fix type
> detection issue
> 
> On Tue, Sep 29, 2026 at 07:17:09PM +0800, jack.yu@realtek.com wrote:
> > From: Jack Yu <jack.yu@realtek.com>
> >
> > Original blindwrite flow fail to support nokia type detection, but
> > it's works normally in iphone type detection.
> > We adjust the register settings to support both type detection.
> 
> >  static const struct reg_default rt721_sdca_mbq_defaults[] = {
> > +	{ 0x0900006, 0xe000 },
> >  	{ 0x0900007, 0xc004 },
> > +	{ 0x0910000, 0x00a1 },
> > +	{ 0x0910001, 0x1256 },
> > +	{ 0x0910002, 0x0000 },
> > +	{ 0x0910003, 0x0000 },
> > +	{ 0x0c00005, 0xf140 },
> 
> Is that register volatile?
Only 0x0c00005 is the volatile register, I'll modify this in v2 patch.

> 
> >  static void rt721_sdca_jack_detect_handler(struct work_struct *work)
> > {
> 
> > +		if ((rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) &&
> > +			!(rt721->scp_sdca_stat2 & SDW_SCP_SDCA_INT_SDCA_8) &&
> > +			real_JD == 0x1 && rt721->int_cnt == 0 &&
> > +			!rt721->imp_sensing_done && rt721->jack_type != 0) {
> > +			dev_info(&rt721->slave->dev,
> > +				"%s: resume with jack present, reuse jack_type=%d\n",
> > +				__func__, rt721->jack_type);
> 
> Does this do the right thing if the thing plugged into the jack changes over
> suspend (eg, close their laptop, unplug their headset, go home, plug in their
> headphones, open their laptop)?
> 
Thanks for pointing out, I'll address this issue in v2 patch.
> > +		if ((rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) &&
> > +			!(rt721->scp_sdca_stat2 & SDW_SCP_SDCA_INT_SDCA_8) &&
> > +			rt721->int_cnt == 0 && real_JD == 0x1 &&
> > +			!rt721->imp_sensing_done) {
> > +			dev_info(&rt721->slave->dev,
> > +				"%s: BRANCH impedance_sensing (SDCA_0 set, fresh
> pass)\n",
> > +				__func__);
> > +			rt721->imp_sensing_done = true;
> > +			rt721_impedance_sensing(rt721);
> > +			rt721->imp_sensing_ongoing = false;
> > +			return;
> 
> Does rt721_sdca_btn_check_handler() also need updates to reset all the state
> on removal?
Will fix in v2 patch.

      reply	other threads:[~2026-09-30 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 11:17 [PATCH] ASoC: rt721-sdca: Adjust blindwrite flow to fix type detection issue jack.yu
2026-09-29 17:46 ` Mark Brown
2026-09-30 10:16   ` Jack Yu [this message]

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=38bf7b59ef7f437581d8c18473724642@realtek.com \
    --to=jack.yu@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=derek.fang@realtek.com \
    --cc=flove@realtek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=shumingf@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.