Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"David Rhodes" <david.rhodes@cirrus.com>,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>,
	"Shenghao Ding" <shenghao-ding@ti.com>,
	"Kevin Lu" <kevin-lu@ti.com>, "Baojun Xu" <baojun.xu@ti.com>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Cezary Rojewski" <cezary.rojewski@intel.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Chen Ni" <nichen@iscas.ac.cn>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH 69/80] ALSA: hda: Remove redundant pm_runtime_mark_last_busy() calls
Date: Fri, 04 Jul 2025 13:47:26 +0200	[thread overview]
Message-ID: <87tt3snpo1.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250704075455.3222438-1-sakari.ailus@linux.intel.com>

On Fri, 04 Jul 2025 09:54:55 +0200,
Sakari Ailus wrote:
> 
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  sound/hda/hdac_device.c         | 1 -
>  sound/pci/hda/cs35l41_hda.c     | 4 ----
>  sound/pci/hda/cs35l56_hda.c     | 1 -
>  sound/pci/hda/tas2781_hda_i2c.c | 3 ---
>  sound/pci/hda/tas2781_hda_spi.c | 4 ----
>  5 files changed, 13 deletions(-)
> 
> diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
> index 0053831eed2d..a02dce5f6a88 100644
> --- a/sound/hda/hdac_device.c
> +++ b/sound/hda/hdac_device.c
> @@ -581,7 +581,6 @@ int snd_hdac_power_down(struct hdac_device *codec)
>  {
>  	struct device *dev = &codec->dev;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	return pm_runtime_put_autosuspend(dev);
>  }
>  EXPORT_SYMBOL_GPL(snd_hdac_power_down);
> diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
> index c2cf3813872a..fc3f9ed3be13 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -836,7 +836,6 @@ static void cs35l41_hda_playback_hook(struct device *dev, int action)
>  		 * Playback must be finished for all amps before we start runtime suspend.
>  		 * This ensures no amps are playing back when we start putting them to sleep.
>  		 */
> -		pm_runtime_mark_last_busy(dev);
>  		pm_runtime_put_autosuspend(dev);
>  		break;
>  	default:
> @@ -1284,7 +1283,6 @@ static void cs35l41_fw_load_work(struct work_struct *work)
>  	cs35l41->fw_request_ongoing = false;
>  	mutex_unlock(&cs35l41->fw_mutex);
>  
> -	pm_runtime_mark_last_busy(cs35l41->dev);
>  	pm_runtime_put_autosuspend(cs35l41->dev);
>  }
>  
> @@ -1515,7 +1513,6 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
>  		dev_warn(dev, "Unable to create device link\n");
>  	unlock_system_sleep(sleep_flags);
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	dev_info(cs35l41->dev,
> @@ -2036,7 +2033,6 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
>  
>  	pm_runtime_set_autosuspend_delay(cs35l41->dev, 3000);
>  	pm_runtime_use_autosuspend(cs35l41->dev);
> -	pm_runtime_mark_last_busy(cs35l41->dev);
>  	pm_runtime_set_active(cs35l41->dev);
>  	pm_runtime_get_noresume(cs35l41->dev);
>  	pm_runtime_enable(cs35l41->dev);
> diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
> index 3f2fd32f4ad9..0391bbffed7d 100644
> --- a/sound/pci/hda/cs35l56_hda.c
> +++ b/sound/pci/hda/cs35l56_hda.c
> @@ -89,7 +89,6 @@ static void cs35l56_hda_pause(struct cs35l56_hda *cs35l56)
>  			  BIT(CS35L56_ASP_TX1_EN_SHIFT) | BIT(CS35L56_ASP_TX2_EN_SHIFT) |
>  			  BIT(CS35L56_ASP_TX3_EN_SHIFT) | BIT(CS35L56_ASP_TX4_EN_SHIFT));
>  
> -	pm_runtime_mark_last_busy(cs35l56->base.dev);
>  	pm_runtime_put_autosuspend(cs35l56->base.dev);
>  }
>  
> diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
> index b9cdbca951e4..8a461acbc3b9 100644
> --- a/sound/pci/hda/tas2781_hda_i2c.c
> +++ b/sound/pci/hda/tas2781_hda_i2c.c
> @@ -157,7 +157,6 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
>  		tas_hda->priv->playback_started = false;
>  		mutex_unlock(&tas_hda->priv->codec_lock);
>  
> -		pm_runtime_mark_last_busy(dev);
>  		pm_runtime_put_autosuspend(dev);
>  		break;
>  	default:
> @@ -483,7 +482,6 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
>  out:
>  	mutex_unlock(&tas_hda->priv->codec_lock);
>  	release_firmware(fmw);
> -	pm_runtime_mark_last_busy(tas_hda->dev);
>  	pm_runtime_put_autosuspend(tas_hda->dev);
>  }
>  
> @@ -526,7 +524,6 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
>  	if (!ret)
>  		comp->playback_hook = tas2781_hda_playback_hook;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
> diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c
> index 5c03e9d2283a..c4b9a3c1a7f0 100644
> --- a/sound/pci/hda/tas2781_hda_spi.c
> +++ b/sound/pci/hda/tas2781_hda_spi.c
> @@ -400,7 +400,6 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
>  		guard(mutex)(&tas_priv->codec_lock);
>  		if (tas_priv->fw_state == TASDEVICE_DSP_FW_ALL_OK)
>  			tasdevice_tuning_switch(tas_priv, 1);
> -		pm_runtime_mark_last_busy(dev);
>  		pm_runtime_put_autosuspend(dev);
>  	}
>  }
> @@ -698,7 +697,6 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
>  	tas2781_save_calibration(tas_hda);
>  out:
>  	release_firmware(fmw);
> -	pm_runtime_mark_last_busy(tas_hda->priv->dev);
>  	pm_runtime_put_autosuspend(tas_hda->priv->dev);
>  }
>  
> @@ -731,7 +729,6 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
>  	if (!ret)
>  		comp->playback_hook = tas2781_hda_playback_hook;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
> @@ -816,7 +813,6 @@ static int tas2781_hda_spi_probe(struct spi_device *spi)
>  
>  	pm_runtime_set_autosuspend_delay(tas_priv->dev, 3000);
>  	pm_runtime_use_autosuspend(tas_priv->dev);
> -	pm_runtime_mark_last_busy(tas_priv->dev);
>  	pm_runtime_set_active(tas_priv->dev);
>  	pm_runtime_get_noresume(tas_priv->dev);
>  	pm_runtime_enable(tas_priv->dev);
> -- 
> 2.39.5
> 

  reply	other threads:[~2025-07-04 11:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
2025-07-04  7:54 ` [PATCH 42/80] mfd: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-07  8:47   ` Charles Keepax
2025-07-23  8:42   ` (subset) " Lee Jones
2025-07-04  7:54 ` [PATCH 60/80] soundwire: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 59/80] slimbus: " Sakari Ailus
2025-07-09  6:41   ` Srinivas Kandagatla
2025-07-04  7:54 ` [PATCH 70/80] ASoC: atmel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 69/80] ALSA: hda: " Sakari Ailus
2025-07-04 11:47   ` Takashi Iwai [this message]
2025-07-04 11:52     ` Mark Brown
2025-07-04 11:58       ` Takashi Iwai
2025-07-06  8:27         ` Takashi Iwai
2025-07-04  7:54 ` [PATCH 71/80] ASoC: codecs: " Sakari Ailus
2025-07-07  9:16   ` Charles Keepax
2025-07-04  7:54 ` [PATCH 72/80] ASoC: Intel: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 73/80] ASoC: component: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 74/80] ASoC: SOF: " Sakari Ailus
2025-07-04  8:26   ` Péter Ujfalusi
2025-07-04  7:55 ` [PATCH 75/80] ALSA: intel_hdmi: " Sakari Ailus
2025-07-04 11:45   ` Takashi Iwai
2025-07-06  8:26     ` Takashi Iwai

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=87tt3snpo1.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=david.rhodes@cirrus.com \
    --cc=kevin-lu@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shenghao-ding@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox