Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: lgirdwood@gmail.com, broonie@kernel.org, david.rhodes@cirrus.com,
	rf@opensource.cirrus.com, linux-sound@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] ASoC: cs42l43-jack: Remove manual pm_runtime get/put from tip_sense_work
Date: Tue, 17 Mar 2026 14:07:29 +0200	[thread overview]
Message-ID: <f6a22c54-1b91-4013-a774-b56d921cdb67@linux.intel.com> (raw)
In-Reply-To: <abk+o6ZpLRt86K+M@opensource.cirrus.com>



On 17/03/2026 13:44, Charles Keepax wrote:
> On Tue, Mar 17, 2026 at 08:21:12AM +0200, Péter Ujfalusi wrote:
>> On 16/03/2026 18:40, Charles Keepax wrote:
>>> On Mon, Mar 16, 2026 at 04:37:28PM +0200, Péter Ujfalusi wrote:
>>>> On 16/03/2026 16:27, Charles Keepax wrote:
>>>>> On Mon, Mar 16, 2026 at 02:49:24PM +0200, Peter Ujfalusi wrote:
>>>  1) The one already in the code.
>>>  2) Stop the host from reseting the codec.
>>
>> The issue with 1 (how it is atm) is that it is done in a completely
>> wrong place. I think the cs42l43 can be used with other than Intel MTL,
>> let's say Qualcomm or AMD?
>> If there is a workaround needed for something on the platform, it has to
>> be done in the platform code.
> 
> There is probably a discussion to be had here, its far from clear
> to me this is the wrong place to do this. Generally the codec
> controls when the codec wants to mark itself as runtime active.
> For example on our phone devices where far more of the chip
> powered down in runtime suspend having a jack in would always
> keep the device powered up so the button detect could run,
> as the lowest power states disabled that.

I see, what about this:
if the inserted accessory is CS42L43_JACK_HEADSET (SND_JACK_HEADSET)
then do one more pm_runtime_get() to allow the button presses to be handled?
This would allow the laptop to hit lower power state if a headphone is
connected, headphones do not have buttons as they don't have mic ring.

The jack_plugged would be renamed as jack_is_headset or something and
drop the rpm on jack removal for headset ( and on module remove).

> It is also appears the specification doesn't prohibit issuing
> a bus reset when coming out of a mode 0 clock stop (which seems
> bonkers to me, given literally the only difference between that
> and a mode 1 clock stop is that the mode 1 clock stop resets the
> device). But without the specification prohibiting this then
> the device can't rely on the host not to do it, so doing this
> could be required on any platform.
> 
> I can however see the argument that it would be nice to only
> force the codec out of runtime suspend on platforms where this is
> necessary but its not obvious to me what the sensible mechanism
> would be.
> 
> Thanks,
> Charles

-- 
Péter


  reply	other threads:[~2026-03-17 12:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 12:49 [PATCH] ASoC: cs42l43-jack: Remove manual pm_runtime get/put from tip_sense_work Peter Ujfalusi
2026-03-16 14:27 ` Charles Keepax
2026-03-16 14:37   ` Péter Ujfalusi
2026-03-16 16:40     ` Charles Keepax
2026-03-17  6:21       ` Péter Ujfalusi
2026-03-17  9:11         ` Péter Ujfalusi
2026-03-17  9:36           ` Péter Ujfalusi
2026-03-17 11:36             ` Charles Keepax
2026-03-17 11:44         ` Charles Keepax
2026-03-17 12:07           ` Péter Ujfalusi [this message]
2026-03-17 13:25             ` Charles Keepax
2026-03-16 14:58   ` Charles Keepax

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=f6a22c54-1b91-4013-a774-b56d921cdb67@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=rf@opensource.cirrus.com \
    --cc=stable@vger.kernel.org \
    /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