mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Verbovoy <ivanverbovoy@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: codecs: wcd934x: drop the MCLK on every disable
Date: Thu, 19 Nov 2026 16:51:11 +0200	[thread overview]
Message-ID: <20261119-wcd934x-mclk-re-ba7379da5f2f@gmail.com> (raw)
In-Reply-To: <179509724666.116416.15851195764740977182.b4-review@b4>

On Thu, Nov 19, 2026 at 02:07:26PM +0000, Mark Brown wrote:
> Are you absolutely sure there are no other paths that could do this, for
> example take a look at wcd_mbhc_adc_detect_plug_type() and the rest of
> the jack detection code?

No, and you are right to point there: the jack detection does not
balance its calls.

wcd_mbhc_adc_detect_plug_type() requests the micbias once per insertion,
and wcd934x_mbhc_request_micbias() takes an MCLK reference with it. The
releases are more: wcd_correct_swch_plug() releases at its exit, once
more for a headphone or when the work is stopped, and
wcd_mbhc_report_plug_removal() releases again on every removal. micb_ref
is clamped at zero, but the MCLK reference next to it is dropped every
time.

So with this patch alone, a removal while SoundWire is running would
drop a reference the jack detection does not hold. The early return is
what hides that today.

I will send a v2 that first makes the jack detection drop only the
references it took, and then removes the check. The board I test on has
no jack, so that part will be build-tested only; I will say so there.

      reply	other threads:[~2026-11-19 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 22:33 Ivan Verbovoy via B4 Relay
2026-11-19 14:07 ` Mark Brown
2026-11-19 14:51   ` Ivan Verbovoy [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=20261119-wcd934x-mclk-re-ba7379da5f2f@gmail.com \
    --to=ivanverbovoy@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®