Skip to content

Commit 1d159ed

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Wake up device before configuring SSP port
catpt_dai_pcm_new() invoked during new PCM runtime creation configures SSP by sending IPC to DSP firmware. For that to succeed device needs to be up and running. While components default probing behavior - snd_soc_catpt causing machine board module to load just after it - needs no changes, machine board's module may be unloaded and re-loaded at a different time e.g.: when catpt is already asleep. Wake device explicitly in catpt_dai_pcm_new() to ensure communication is established before sending any IPCs, enabling those advanced scenarios in the process. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1849a38 commit 1d159ed

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • sound/soc/intel/catpt

sound/soc/intel/catpt/pcm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,17 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
667667
break;
668668
}
669669

670+
/* see if this is a new configuration */
671+
if (!memcmp(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt)))
672+
return 0;
673+
674+
pm_runtime_get_sync(cdev->dev);
675+
670676
ret = catpt_ipc_set_device_format(cdev, &devfmt);
677+
678+
pm_runtime_mark_last_busy(cdev->dev);
679+
pm_runtime_put_autosuspend(cdev->dev);
680+
671681
if (ret)
672682
return CATPT_IPC_ERROR(ret);
673683

0 commit comments

Comments
 (0)