Skip to content

Commit 16e1773

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Fix probing order of driver components
catpt_dai_pcm_new() is called during the bring up sequence of the machine board device which is a different device to the parent (DSP) device yet utilizes pm_runtime_xxx() against it in order to send IPCs. If the parent's pm_runtime is not configured before that happens, errors will occur. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251126095523.3925364-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 86a5b62 commit 16e1773

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

sound/soc/intel/catpt/device.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,25 @@ static int catpt_probe_components(struct catpt_dev *cdev)
184184
goto err_boot_fw;
185185
}
186186

187-
ret = catpt_register_board(cdev);
188-
if (ret) {
189-
dev_err(cdev->dev, "register board failed: %d\n", ret);
190-
goto err_reg_board;
191-
}
192-
193187
/* reflect actual ADSP state in pm_runtime */
194188
pm_runtime_set_active(cdev->dev);
195189

196190
pm_runtime_set_autosuspend_delay(cdev->dev, 2000);
197191
pm_runtime_use_autosuspend(cdev->dev);
198192
pm_runtime_mark_last_busy(cdev->dev);
193+
/* Enable PM before spawning child device. See catpt_dai_pcm_new(). */
199194
pm_runtime_enable(cdev->dev);
195+
196+
ret = catpt_register_board(cdev);
197+
if (ret) {
198+
dev_err(cdev->dev, "register board failed: %d\n", ret);
199+
goto err_reg_board;
200+
}
201+
200202
return 0;
201203

202204
err_reg_board:
205+
pm_runtime_disable(cdev->dev);
203206
snd_soc_unregister_component(cdev->dev);
204207
err_boot_fw:
205208
catpt_dmac_remove(cdev);

0 commit comments

Comments
 (0)