All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Mark Brown <broonie@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: hdegoede@redhat.com, alsa-devel@alsa-project.org,
	amadeuszx.slawinski@linux.intel.com, tiwai@suse.com
Subject: Re: [PATCH 2/3] ASoC: core: Inline resume work back to resume function
Date: Mon, 7 Nov 2022 10:26:14 +0100	[thread overview]
Message-ID: <3ebce110-1a76-e59b-2172-616a3c0f1984@intel.com> (raw)
In-Reply-To: <Y2WmRUBJ+7K5zBm7@sirena.org.uk>

On 2022-11-05 12:54 AM, Mark Brown wrote:
> On Fri, Nov 04, 2022 at 09:58:46AM -0400, Pierre-Louis Bossart wrote:

>> If I follow your logic, we should also remove the workqueue used for
>> probes for HDaudio devices, on the grounds that probe errors are not
>> propagated either.

(save)

>> Any time we have deferred processing to avoid blocking the rest of the
>> system, we incur the risk of not having errors propagated. It's a
>> compromise between having a system that's usable and a system that's
>> consistent.

> The other question is what we'd constructively do about a resume failure
> that we can't defer.  It feels like we should at least retain the
> ability to defer for devices where this is an issue (older components
> tend to be cheap and packaged in easier to assemble packaging and hence
> get used with lower end applications even well after they're no longer
> competitive at the high end), and if we are going to return some errors
> in line it'd be good to understand the benefits and tradeoffs.  I do see
> that it is a lot less useful for modern devices where we don't have to
> have any delays in startup, though like I say register I/O on slower
> buses like I2C could still be a concern.
> 
> I'm not keen on moving the support out of the core since there were
> originally a bunch of devices trying to open code and it wasn't good,
> both from a duplication/complexity point of view and from the point of
> view of integrating well with userspace APIs.

I believe that framework should be supporting both, the deferred and the 
instant resume options. 'void' in front of suspend/resume in ASoC 
hinders developer's options.

(load)
The HDAudio driver is actually a good example of how to do it right - we 
did not modify driver/base/ to have ->probe() return void. It remained 
as is, instead, a developer opt-ins for a delayed probe through a 
workqueue. This way, everyone is satisfied.
Cohesiveness is not to be forgotten too - keeping behavior and 
expectations of the standard set of functionalities aligned with the 
rest of the driver/base makes it easier to hop into ASoC.

We could provide some additional flags so that the ASoC core always 
defers PM-related work for certain components if they choose to.


Regards,
Czarek

  reply	other threads:[~2022-11-07  9:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 13:12 [PATCH 0/3] ASoC: core: Suspend/resume error propagation Cezary Rojewski
2022-11-04 13:12 ` [PATCH 1/3] ASoC: component: Propagate result of suspend and resume callbacks Cezary Rojewski
2022-11-04 14:00   ` Pierre-Louis Bossart
2022-11-07  8:51     ` Amadeusz Sławiński
2022-11-07 14:11       ` Pierre-Louis Bossart
2022-11-04 13:12 ` [PATCH 2/3] ASoC: core: Inline resume work back to resume function Cezary Rojewski
2022-11-04 13:58   ` Pierre-Louis Bossart
2022-11-04 23:54     ` Mark Brown
2022-11-07  9:26       ` Cezary Rojewski [this message]
2022-11-07 14:28         ` Mark Brown
2022-11-08 19:22           ` Cezary Rojewski
2022-11-04 13:12 ` [PATCH 3/3] ASoC: core: Propagate component suspend/resume errors Cezary Rojewski

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=3ebce110-1a76-e59b-2172-616a3c0f1984@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --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 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.