/* * Default settings for STM32H7x socs and STM32MP1x. * These default settings will be overridden if the soc provides * support of hardware configuration registers. * - STM32H7: rely on default settings * - STM32MP1: retrieve settings from registers
*/ staticconststruct stm32_sai_conf stm32_sai_conf_h7 = {
.version = STM_SAI_STM32H7,
.fifo_size = 8,
.has_spdif_pdm = true,
.get_sai_ck_parent = stm32_sai_get_parent_clk,
};
/* * STM32MP2x: * - do not use SAI parent clock source selection * - do not use DMA burst mode
*/ staticconststruct stm32_sai_conf stm32_sai_conf_mp25 = {
.no_dma_burst = true,
};
staticint stm32_sai_set_sync(struct stm32_sai_data *sai_client, struct device_node *np_provider, int synco, int synci)
{ struct platform_device *pdev = of_find_device_by_node(np_provider); struct stm32_sai_data *sai_provider; int ret;
if (!pdev) {
dev_err(&sai_client->pdev->dev, "Device not found for node %pOFn\n", np_provider);
of_node_put(np_provider); return -ENODEV;
}
sai_provider = platform_get_drvdata(pdev); if (!sai_provider) {
dev_err(&sai_client->pdev->dev, "SAI sync provider data not found\n");
ret = -EINVAL; goto error;
}
/* Configure sync client */
ret = stm32_sai_sync_conf_client(sai_client, synci); if (ret < 0) goto error;
/* Configure sync provider */
ret = stm32_sai_sync_conf_provider(sai_provider, synco);
/* * When pins are shared by two sai sub instances, pins have to be defined * in sai parent node. In this case, pins state is not managed by alsa fw. * These pins are managed in suspend/resume callbacks.
*/ staticint stm32_sai_suspend(struct device *dev)
{ struct stm32_sai_data *sai = dev_get_drvdata(dev); int ret;
ret = stm32_sai_pclk_enable(dev); if (ret) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.