summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2026-03-09 12:16:04 +0300
committerMark Brown <broonie@kernel.org>2026-03-11 16:34:12 +0300
commit150badf73e9a10cf646d07353b41117ea90f67ae (patch)
treef0be8d13c7764b12c8c146e66fee81dd2ba1b5a0
parent2464febd81e4c98f78466462da938ed2f8c37e17 (diff)
downloadlinux-150badf73e9a10cf646d07353b41117ea90f67ae.tar.xz
ASoC: Intel: catpt: Do not wake DSP just for volume setup
With the new control-operations in place, the controls no longer wake the DSP just for the sake of updating volume (or mute) settings on the firmware side. The values are cached and actual update occurs only when streams are being opened for streaming or are already running. In those cases the DSP must already be woken up and we avoid unnecessary power consumption. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260309091605.896307-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/catpt/pcm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index 3074b6c958fa..2ed9df7bc434 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -388,6 +388,15 @@ static int catpt_apply_mute(struct catpt_dev *cdev, struct snd_soc_card *card)
static int catpt_apply_controls(struct catpt_dev *cdev, struct snd_soc_card *card,
struct catpt_stream_runtime *stream)
{
+ int ret;
+
+ /* Update the master volume when the first stream is opened. */
+ if (list_empty(&cdev->stream_list)) {
+ ret = catpt_apply_volume(cdev, card, "Master Playback Volume");
+ if (ret)
+ return ret;
+ }
+
/* Only selected streams have individual controls. */
switch (stream->info.stream_hw_id) {
case CATPT_PIN_ID_OFFLOAD1: