diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2020-10-12 12:32:20 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-14 20:29:55 +0100 |
commit | 1d159edf19542793851a04202e5b0dd548a9415c (patch) | |
tree | d5e4b547191860cad1ea691262bf8824ba886ac6 /sound/soc | |
parent | 1849a3872f035494639201fdefb394425233647b (diff) | |
download | linux-1d159edf19542793851a04202e5b0dd548a9415c.tar.bz2 |
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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/intel/catpt/pcm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index f78018c857b8..ba653ebea7d1 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -667,7 +667,17 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm, break; } + /* see if this is a new configuration */ + if (!memcmp(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt))) + return 0; + + pm_runtime_get_sync(cdev->dev); + ret = catpt_ipc_set_device_format(cdev, &devfmt); + + pm_runtime_mark_last_busy(cdev->dev); + pm_runtime_put_autosuspend(cdev->dev); + if (ret) return CATPT_IPC_ERROR(ret); |