Lines Matching refs:ipc4_copier
469 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_widget_setup_pcm() local
474 ipc4_copier = kzalloc(sizeof(*ipc4_copier), GFP_KERNEL); in sof_ipc4_widget_setup_pcm()
475 if (!ipc4_copier) in sof_ipc4_widget_setup_pcm()
478 swidget->private = ipc4_copier; in sof_ipc4_widget_setup_pcm()
479 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_pcm()
484 &ipc4_copier->data.base_config); in sof_ipc4_widget_setup_pcm()
530 ipc4_copier->gtw_attr = kzalloc(sizeof(*ipc4_copier->gtw_attr), GFP_KERNEL); in sof_ipc4_widget_setup_pcm()
531 if (!ipc4_copier->gtw_attr) { in sof_ipc4_widget_setup_pcm()
536 ipc4_copier->copier_config = (uint32_t *)ipc4_copier->gtw_attr; in sof_ipc4_widget_setup_pcm()
537 ipc4_copier->data.gtw_cfg.config_length = in sof_ipc4_widget_setup_pcm()
543 ipc4_copier->data.gtw_cfg.node_id = SOF_IPC4_NODE_TYPE(node_type); in sof_ipc4_widget_setup_pcm()
546 ipc4_copier->data.gtw_cfg.node_id = SOF_IPC4_INVALID_NODE_ID; in sof_ipc4_widget_setup_pcm()
547 ipc4_copier->ipc_config_size = 0; in sof_ipc4_widget_setup_pcm()
556 ret = sof_ipc4_widget_setup_msg(swidget, &ipc4_copier->msg); in sof_ipc4_widget_setup_pcm()
563 kfree(ipc4_copier->gtw_attr); in sof_ipc4_widget_setup_pcm()
567 kfree(ipc4_copier); in sof_ipc4_widget_setup_pcm()
574 struct sof_ipc4_copier *ipc4_copier = swidget->private; in sof_ipc4_widget_free_comp_pcm() local
577 if (!ipc4_copier) in sof_ipc4_widget_free_comp_pcm()
580 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_pcm()
582 kfree(ipc4_copier->gtw_attr); in sof_ipc4_widget_free_comp_pcm()
583 kfree(ipc4_copier); in sof_ipc4_widget_free_comp_pcm()
593 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_widget_setup_comp_dai() local
599 ipc4_copier = kzalloc(sizeof(*ipc4_copier), GFP_KERNEL); in sof_ipc4_widget_setup_comp_dai()
600 if (!ipc4_copier) in sof_ipc4_widget_setup_comp_dai()
603 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_comp_dai()
608 &ipc4_copier->data.base_config); in sof_ipc4_widget_setup_comp_dai()
620 ret = sof_update_ipc_object(scomp, ipc4_copier, in sof_ipc4_widget_setup_comp_dai()
629 node_type, ipc4_copier->dai_type, ipc4_copier->dai_index); in sof_ipc4_widget_setup_comp_dai()
631 dai->type = ipc4_copier->dai_type; in sof_ipc4_widget_setup_comp_dai()
632 ipc4_copier->data.gtw_cfg.node_id = SOF_IPC4_NODE_TYPE(node_type); in sof_ipc4_widget_setup_comp_dai()
638 !snd_sof_is_chain_dma_supported(sdev, ipc4_copier->dai_type)) { in sof_ipc4_widget_setup_comp_dai()
640 ipc4_copier->dai_type); in sof_ipc4_widget_setup_comp_dai()
645 switch (ipc4_copier->dai_type) { in sof_ipc4_widget_setup_comp_dai()
681 ipc4_copier->copier_config = (uint32_t *)blob; in sof_ipc4_widget_setup_comp_dai()
683 ipc4_copier->data.gtw_cfg.config_length = (sizeof(blob->gw_attr) + in sof_ipc4_widget_setup_comp_dai()
691 ipc4_copier->data.gtw_cfg.node_id |= in sof_ipc4_widget_setup_comp_dai()
692 SOF_IPC4_NODE_INDEX_INTEL_SSP(ipc4_copier->dai_index); in sof_ipc4_widget_setup_comp_dai()
696 ipc4_copier->data.gtw_cfg.node_id |= in sof_ipc4_widget_setup_comp_dai()
697 SOF_IPC4_NODE_INDEX_INTEL_DMIC(ipc4_copier->dai_index); in sof_ipc4_widget_setup_comp_dai()
700 ipc4_copier->gtw_attr = kzalloc(sizeof(*ipc4_copier->gtw_attr), GFP_KERNEL); in sof_ipc4_widget_setup_comp_dai()
701 if (!ipc4_copier->gtw_attr) { in sof_ipc4_widget_setup_comp_dai()
706 ipc4_copier->copier_config = (uint32_t *)ipc4_copier->gtw_attr; in sof_ipc4_widget_setup_comp_dai()
707 ipc4_copier->data.gtw_cfg.config_length = in sof_ipc4_widget_setup_comp_dai()
713 dai->private = ipc4_copier; in sof_ipc4_widget_setup_comp_dai()
716 ret = sof_ipc4_widget_setup_msg(swidget, &ipc4_copier->msg); in sof_ipc4_widget_setup_comp_dai()
723 kfree(ipc4_copier->copier_config); in sof_ipc4_widget_setup_comp_dai()
727 kfree(ipc4_copier); in sof_ipc4_widget_setup_comp_dai()
737 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_widget_free_comp_dai() local
748 ipc4_copier = dai->private; in sof_ipc4_widget_free_comp_dai()
749 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_dai()
752 if (ipc4_copier->dai_type != SOF_DAI_INTEL_SSP && in sof_ipc4_widget_free_comp_dai()
753 ipc4_copier->dai_type != SOF_DAI_INTEL_DMIC) in sof_ipc4_widget_free_comp_dai()
754 kfree(ipc4_copier->copier_config); in sof_ipc4_widget_free_comp_dai()
1340 struct sof_ipc4_copier *ipc4_copier = NULL; in sof_ipc4_unprepare_copier_module() local
1354 ipc4_copier = swidget->private; in sof_ipc4_unprepare_copier_module()
1358 ipc4_copier = dai->private; in sof_ipc4_unprepare_copier_module()
1371 if (ipc4_copier->dai_type == SOF_DAI_INTEL_ALH) { in sof_ipc4_unprepare_copier_module()
1375 blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config; in sof_ipc4_unprepare_copier_module()
1377 group_id = SOF_IPC4_NODE_INDEX(ipc4_copier->data.gtw_cfg.node_id) - in sof_ipc4_unprepare_copier_module()
1384 if (ipc4_copier) { in sof_ipc4_unprepare_copier_module()
1385 kfree(ipc4_copier->ipc_config_data); in sof_ipc4_unprepare_copier_module()
1386 ipc4_copier->ipc_config_data = NULL; in sof_ipc4_unprepare_copier_module()
1387 ipc4_copier->ipc_config_size = 0; in sof_ipc4_unprepare_copier_module()
1657 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_prepare_dai_copier() local
1662 ipc4_copier = dai->private; in sof_ipc4_prepare_dai_copier()
1663 copier_data = &ipc4_copier->data; in sof_ipc4_prepare_dai_copier()
1664 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_dai_copier()
1688 ipc4_copier->dai_index, in sof_ipc4_prepare_dai_copier()
1689 ipc4_copier->dai_type, dir, in sof_ipc4_prepare_dai_copier()
1690 &ipc4_copier->copier_config, in sof_ipc4_prepare_dai_copier()
1710 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_prepare_copier_module() local
1744 ipc4_copier = (struct sof_ipc4_copier *)swidget->private; in sof_ipc4_prepare_copier_module()
1745 gtw_attr = ipc4_copier->gtw_attr; in sof_ipc4_prepare_copier_module()
1746 copier_data = &ipc4_copier->data; in sof_ipc4_prepare_copier_module()
1747 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1810 ipc4_copier = (struct sof_ipc4_copier *)dai->private; in sof_ipc4_prepare_copier_module()
1811 copier_data = &ipc4_copier->data; in sof_ipc4_prepare_copier_module()
1812 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1838 ipc4_copier = (struct sof_ipc4_copier *)swidget->private; in sof_ipc4_prepare_copier_module()
1839 copier_data = &ipc4_copier->data; in sof_ipc4_prepare_copier_module()
1840 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1940 if (ipc4_copier->dai_type == SOF_DAI_INTEL_ALH) { in sof_ipc4_prepare_copier_module()
1952 blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config; in sof_ipc4_prepare_copier_module()
1993 if (ipc4_copier->dma_config_tlv[i].length) { in sof_ipc4_prepare_copier_module()
1994 dma_config = &ipc4_copier->dma_config_tlv[i].dma_config; in sof_ipc4_prepare_copier_module()
2073 data = &ipc4_copier->copier_config; in sof_ipc4_prepare_copier_module()
2074 ipc_config_size = &ipc4_copier->ipc_config_size; in sof_ipc4_prepare_copier_module()
2075 ipc_config_data = &ipc4_copier->ipc_config_data; in sof_ipc4_prepare_copier_module()
2083 if (ipc4_copier->dma_config_tlv[i].type != SOF_IPC4_GTW_DMA_CONFIG_ID) in sof_ipc4_prepare_copier_module()
2085 dma_config_tlv_size += ipc4_copier->dma_config_tlv[i].length; in sof_ipc4_prepare_copier_module()
2087 ipc4_copier->dma_config_tlv[i].dma_config.dma_priv_config_size; in sof_ipc4_prepare_copier_module()
2088 dma_config_tlv_size += (sizeof(ipc4_copier->dma_config_tlv[i]) - in sof_ipc4_prepare_copier_module()
2089 sizeof(ipc4_copier->dma_config_tlv[i].dma_config)); in sof_ipc4_prepare_copier_module()
2120 &ipc4_copier->dma_config_tlv, dma_config_tlv_size); in sof_ipc4_prepare_copier_module()
2617 struct sof_ipc4_copier *ipc4_copier = swidget->private; in sof_ipc4_widget_setup() local
2623 ipc_size = ipc4_copier->ipc_config_size; in sof_ipc4_widget_setup()
2624 ipc_data = ipc4_copier->ipc_config_data; in sof_ipc4_widget_setup()
2626 msg = &ipc4_copier->msg; in sof_ipc4_widget_setup()
2633 struct sof_ipc4_copier *ipc4_copier = dai->private; in sof_ipc4_widget_setup() local
2639 ipc_size = ipc4_copier->ipc_config_size; in sof_ipc4_widget_setup()
2640 ipc_data = ipc4_copier->ipc_config_data; in sof_ipc4_widget_setup()
2642 msg = &ipc4_copier->msg; in sof_ipc4_widget_setup()
3089 struct sof_ipc4_copier *ipc4_copier; in sof_ipc4_dai_config() local
3097 ipc4_copier = (struct sof_ipc4_copier *)dai->private; in sof_ipc4_dai_config()
3098 copier_data = &ipc4_copier->data; in sof_ipc4_dai_config()
3115 switch (ipc4_copier->dai_type) { in sof_ipc4_dai_config()
3117 gtw_attr = ipc4_copier->gtw_attr; in sof_ipc4_dai_config()
3134 blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config; in sof_ipc4_dai_config()
3135 ipc4_copier->dai_index = data->dai_node_id; in sof_ipc4_dai_config()
3155 ipc4_copier->dai_type); in sof_ipc4_dai_config()
3225 struct sof_ipc4_copier *ipc4_copier = dai->private; in sof_ipc4_dai_get_param() local
3232 if (!ipc4_copier) in sof_ipc4_dai_get_param()
3260 switch (ipc4_copier->dai_type) { in sof_ipc4_dai_get_param()
3275 dev_err(sdev->dev, "DAI type %d not supported yet!\n", ipc4_copier->dai_type); in sof_ipc4_dai_get_param()