Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: add set_power_state() to dsp_ops for power state update

D0i3 is a platform-defined substate of D0, so we need a
platform-specific callback in dsp_ops to handle the relevant
configurations.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191025224122.7718-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Keyon Jie and committed by
Mark Brown
e8f112d8 09fe6b52

+11
+9
sound/soc/sof/ops.h
··· 193 193 return 0; 194 194 } 195 195 196 + static inline int snd_sof_dsp_set_power_state(struct snd_sof_dev *sdev, 197 + enum sof_d0_substate substate) 198 + { 199 + if (sof_ops(sdev)->set_power_state) 200 + return sof_ops(sdev)->set_power_state(sdev, substate); 201 + 202 + return 0; 203 + } 204 + 196 205 /* debug */ 197 206 static inline void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, u32 flags) 198 207 {
+2
sound/soc/sof/sof-priv.h
··· 189 189 int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */ 190 190 int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */ 191 191 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */ 192 + int (*set_power_state)(struct snd_sof_dev *sdev, 193 + enum sof_d0_substate d0_substate); /* optional */ 192 194 193 195 /* DSP clocking */ 194 196 int (*set_clk)(struct snd_sof_dev *sof_dev, u32 freq); /* optional */