Skip to content

Commit 150badf

Browse files
crojewsk-intelbroonie
authored andcommitted
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>
1 parent 2464feb commit 150badf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/pcm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,15 @@ static int catpt_apply_mute(struct catpt_dev *cdev, struct snd_soc_card *card)
388388
static int catpt_apply_controls(struct catpt_dev *cdev, struct snd_soc_card *card,
389389
struct catpt_stream_runtime *stream)
390390
{
391+
int ret;
392+
393+
/* Update the master volume when the first stream is opened. */
394+
if (list_empty(&cdev->stream_list)) {
395+
ret = catpt_apply_volume(cdev, card, "Master Playback Volume");
396+
if (ret)
397+
return ret;
398+
}
399+
391400
/* Only selected streams have individual controls. */
392401
switch (stream->info.stream_hw_id) {
393402
case CATPT_PIN_ID_OFFLOAD1:

0 commit comments

Comments
 (0)