Lines Matching refs:scomp

370 static void sof_dbg_comp_config(struct snd_soc_component *scomp, struct sof_ipc_comp_config *config)  in sof_dbg_comp_config()  argument
372 dev_dbg(scomp->dev, " config: periods snk %d src %d fmt %d\n", in sof_dbg_comp_config()
379 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_host() local
399 ret = sof_update_ipc_object(scomp, host, SOF_PCM_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_host()
405 ret = sof_update_ipc_object(scomp, &host->config, SOF_COMP_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_host()
410 dev_dbg(scomp->dev, "loaded host %s\n", swidget->widget->name); in sof_ipc3_widget_setup_comp_host()
411 sof_dbg_comp_config(scomp, &host->config); in sof_ipc3_widget_setup_comp_host()
428 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_tone() local
444 ret = sof_update_ipc_object(scomp, &tone->config, SOF_COMP_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_tone()
452 dev_dbg(scomp->dev, "tone %s: frequency %d amplitude %d\n", in sof_ipc3_widget_setup_comp_tone()
454 sof_dbg_comp_config(scomp, &tone->config); in sof_ipc3_widget_setup_comp_tone()
461 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_mixer() local
477 ret = sof_update_ipc_object(scomp, &mixer->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_mixer()
487 dev_dbg(scomp->dev, "loaded mixer %s\n", swidget->widget->name); in sof_ipc3_widget_setup_comp_mixer()
488 sof_dbg_comp_config(scomp, &mixer->config); in sof_ipc3_widget_setup_comp_mixer()
495 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_pipeline() local
514 comp_swidget = snd_sof_find_swidget(scomp, swidget->widget->sname); in sof_ipc3_widget_setup_comp_pipeline()
516 dev_err(scomp->dev, "scheduler %s refers to non existent widget %s\n", in sof_ipc3_widget_setup_comp_pipeline()
525 ret = sof_update_ipc_object(scomp, pipeline, SOF_SCHED_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_pipeline()
531 ret = sof_update_ipc_object(scomp, swidget, SOF_PIPELINE_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_pipeline()
543 dev_dbg(scomp->dev, "pipeline %s: period %d pri %d mips %d core %d frames %d dynamic %d\n", in sof_ipc3_widget_setup_comp_pipeline()
562 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_buffer() local
581 ret = sof_update_ipc_object(scomp, buffer, SOF_BUFFER_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_buffer()
589 dev_dbg(scomp->dev, "buffer %s: size %d caps 0x%x\n", in sof_ipc3_widget_setup_comp_buffer()
597 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_src() local
613 ret = sof_update_ipc_object(scomp, src, SOF_SRC_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_src()
619 ret = sof_update_ipc_object(scomp, &src->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_src()
624 dev_dbg(scomp->dev, "src %s: source rate %d sink rate %d\n", in sof_ipc3_widget_setup_comp_src()
626 sof_dbg_comp_config(scomp, &src->config); in sof_ipc3_widget_setup_comp_src()
638 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_asrc() local
654 ret = sof_update_ipc_object(scomp, asrc, SOF_ASRC_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_asrc()
660 ret = sof_update_ipc_object(scomp, &asrc->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_asrc()
665 dev_dbg(scomp->dev, "asrc %s: source rate %d sink rate %d asynch %d operation %d\n", in sof_ipc3_widget_setup_comp_asrc()
669 sof_dbg_comp_config(scomp, &asrc->config); in sof_ipc3_widget_setup_comp_asrc()
684 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_mux() local
700 ret = sof_update_ipc_object(scomp, &mux->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_mux()
708 dev_dbg(scomp->dev, "loaded mux %s\n", swidget->widget->name); in sof_ipc3_widget_setup_comp_mux()
709 sof_dbg_comp_config(scomp, &mux->config); in sof_ipc3_widget_setup_comp_mux()
720 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_pga() local
721 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_ipc3_widget_setup_comp_pga()
739 ret = sof_update_ipc_object(scomp, volume, SOF_VOLUME_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_pga()
745 ret = sof_update_ipc_object(scomp, &volume->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_pga()
751 dev_dbg(scomp->dev, "loaded PGA %s\n", swidget->widget->name); in sof_ipc3_widget_setup_comp_pga()
752 sof_dbg_comp_config(scomp, &volume->config); in sof_ipc3_widget_setup_comp_pga()
774 static int sof_get_control_data(struct snd_soc_component *scomp, in sof_get_control_data() argument
804 dev_err(scomp->dev, "Unknown kcontrol type %u in widget %s\n", in sof_get_control_data()
810 dev_err(scomp->dev, "No scontrol for widget %s\n", widget->name); in sof_get_control_data()
856 static int sof_process_load(struct snd_soc_component *scomp, in sof_process_load() argument
875 ret = sof_get_control_data(scomp, widget, wdata, &ipc_data_size); in sof_process_load()
901 ret = sof_update_ipc_object(scomp, &process->config, SOF_COMP_TOKENS, in sof_process_load()
907 dev_dbg(scomp->dev, "loaded process %s\n", swidget->widget->name); in sof_process_load()
908 sof_dbg_comp_config(scomp, &process->config); in sof_process_load()
958 struct snd_soc_component *scomp = swidget->scomp; in sof_widget_update_ipc_comp_process() local
966 ret = sof_update_ipc_object(scomp, &config, SOF_PROCESS_TOKENS, swidget->tuples, in sof_widget_update_ipc_comp_process()
972 return sof_process_load(scomp, swidget, find_process_comp_type(config.type)); in sof_widget_update_ipc_comp_process()
975 static int sof_link_hda_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_hda_load() argument
987 ret = sof_update_ipc_object(scomp, &config->hda, SOF_HDA_TOKENS, slink->tuples, in sof_link_hda_load()
992 dev_dbg(scomp->dev, "HDA config rate %d channels %d\n", in sof_link_hda_load()
1040 static int sof_link_sai_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_sai_load() argument
1056 ret = sof_update_ipc_object(scomp, &config->sai, SOF_SAI_TOKENS, slink->tuples, in sof_link_sai_load()
1071 dev_info(scomp->dev, in sof_link_sai_load()
1078 dev_err(scomp->dev, "Invalid channel count for SAI%d\n", config->dai_index); in sof_link_sai_load()
1091 static int sof_link_esai_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_esai_load() argument
1107 ret = sof_update_ipc_object(scomp, &config->esai, SOF_ESAI_TOKENS, slink->tuples, in sof_link_esai_load()
1121 dev_info(scomp->dev, in sof_link_esai_load()
1128 dev_err(scomp->dev, "Invalid channel count for ESAI%d\n", config->dai_index); in sof_link_esai_load()
1141 static int sof_link_acp_dmic_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_acp_dmic_load() argument
1155 ret = sof_update_ipc_object(scomp, &config->acpdmic, SOF_ACPDMIC_TOKENS, slink->tuples, in sof_link_acp_dmic_load()
1160 dev_info(scomp->dev, "ACP_DMIC config ACP%d channel %d rate %d\n", in sof_link_acp_dmic_load()
1173 static int sof_link_acp_bt_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_acp_bt_load() argument
1190 dev_info(scomp->dev, "ACP_BT config ACP%d channel %d rate %d\n", in sof_link_acp_bt_load()
1203 static int sof_link_acp_sp_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_acp_sp_load() argument
1218 ret = sof_update_ipc_object(scomp, &config->acpsp, SOF_ACPI2S_TOKENS, slink->tuples, in sof_link_acp_sp_load()
1224 dev_info(scomp->dev, "ACP_SP config ACP%d channel %d rate %d tdm_mode %d\n", in sof_link_acp_sp_load()
1237 static int sof_link_acp_hs_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_acp_hs_load() argument
1252 ret = sof_update_ipc_object(scomp, &config->acphs, SOF_ACPI2S_TOKENS, slink->tuples, in sof_link_acp_hs_load()
1257 dev_info(scomp->dev, "ACP_HS config ACP%d channel %d rate %d tdm_mode %d\n", in sof_link_acp_hs_load()
1270 static int sof_link_afe_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_afe_load() argument
1280 ret = sof_update_ipc_object(scomp, &config->afe, SOF_AFE_TOKENS, slink->tuples, in sof_link_afe_load()
1285 dev_dbg(scomp->dev, "AFE config rate %d channels %d format:%d\n", in sof_link_afe_load()
1299 static int sof_link_ssp_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_ssp_load() argument
1302 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_link_ssp_load()
1312 ret = sof_update_ipc_object(scomp, &config->ssp, SOF_SSP_TOKENS, slink->tuples, in sof_link_ssp_load()
1328 dev_dbg(scomp->dev, "tplg: overriding topology mclk_id %d by quirk %d\n", in sof_link_ssp_load()
1343 …dev_dbg(scomp->dev, "tplg: config SSP%d fmt %#x mclk %d bclk %d fclk %d width (%d)%d slots %d mclk… in sof_link_ssp_load()
1352 dev_err(scomp->dev, "Invalid fsync rate for SSP%d\n", config[i].dai_index); in sof_link_ssp_load()
1357 dev_err(scomp->dev, "Invalid channel count for SSP%d\n", in sof_link_ssp_load()
1372 static int sof_link_dmic_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_dmic_load() argument
1375 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_link_dmic_load()
1386 ret = sof_update_ipc_object(scomp, &config->dmic, SOF_DMIC_TOKENS, slink->tuples, in sof_link_dmic_load()
1392 ret = sof_update_ipc_object(scomp, &config->dmic.pdm[0], SOF_DMIC_PDM_TOKENS, in sof_link_dmic_load()
1403 dev_dbg(scomp->dev, "tplg: config DMIC%d driver version %d\n", in sof_link_dmic_load()
1405 dev_dbg(scomp->dev, "pdmclk_min %d pdm_clkmax %d duty_min %d\n", in sof_link_dmic_load()
1408 dev_dbg(scomp->dev, "duty_max %d fifo_fs %d num_pdms active %d\n", in sof_link_dmic_load()
1411 dev_dbg(scomp->dev, "fifo word length %d\n", config->dmic.fifo_bits); in sof_link_dmic_load()
1414 dev_dbg(scomp->dev, "pdm %d mic a %d mic b %d\n", in sof_link_dmic_load()
1418 dev_dbg(scomp->dev, "pdm %d polarity a %d polarity b %d\n", in sof_link_dmic_load()
1422 dev_dbg(scomp->dev, "pdm %d clk_edge %d skew %d\n", in sof_link_dmic_load()
1444 static int sof_link_alh_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink, in sof_link_alh_load() argument
1452 ret = sof_update_ipc_object(scomp, &config->alh, SOF_ALH_TOKENS, slink->tuples, in sof_link_alh_load()
1472 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_widget_setup_comp_dai() local
1473 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_ipc3_widget_setup_comp_dai()
1500 ret = sof_update_ipc_object(scomp, comp_dai, SOF_DAI_TOKENS, swidget->tuples, in sof_ipc3_widget_setup_comp_dai()
1506 ret = sof_update_ipc_object(scomp, &comp_dai->config, SOF_COMP_TOKENS, in sof_ipc3_widget_setup_comp_dai()
1512 dev_dbg(scomp->dev, "dai %s: type %d index %d\n", in sof_ipc3_widget_setup_comp_dai()
1514 sof_dbg_comp_config(scomp, &comp_dai->config); in sof_ipc3_widget_setup_comp_dai()
1532 ret = sof_update_ipc_object(scomp, &common_config, SOF_DAI_LINK_TOKENS, in sof_ipc3_widget_setup_comp_dai()
1547 ret = sof_link_ssp_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1550 ret = sof_link_dmic_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1553 ret = sof_link_hda_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1556 ret = sof_link_alh_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1559 ret = sof_link_sai_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1562 ret = sof_link_esai_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1565 ret = sof_link_acp_bt_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1569 ret = sof_link_acp_sp_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1573 ret = sof_link_acp_hs_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1576 ret = sof_link_acp_dmic_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1579 ret = sof_link_afe_load(scomp, slink, config, dai); in sof_ipc3_widget_setup_comp_dai()
1585 dev_err(scomp->dev, "failed to load config for dai %s\n", dai->name); in sof_ipc3_widget_setup_comp_dai()
1799 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_keyword_detect_pcm_params() local
1800 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_ipc3_keyword_detect_pcm_params()
1807 spcm = snd_sof_find_spcm_name(scomp, swidget->widget->sname); in sof_ipc3_keyword_detect_pcm_params()
1809 dev_err(scomp->dev, "Cannot find PCM for %s\n", swidget->widget->name); in sof_ipc3_keyword_detect_pcm_params()
1846 dev_err(scomp->dev, "%s: PCM params failed for %s\n", __func__, in sof_ipc3_keyword_detect_pcm_params()
1855 struct snd_soc_component *scomp = swidget->scomp; in sof_ipc3_keyword_detect_trigger() local
1856 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); in sof_ipc3_keyword_detect_trigger()
1868 dev_err(scomp->dev, "%s: Failed to trigger %s\n", __func__, swidget->widget->name); in sof_ipc3_keyword_detect_trigger()
1877 struct snd_soc_component *scomp; in sof_ipc3_keyword_dapm_event() local
1885 scomp = swidget->scomp; in sof_ipc3_keyword_dapm_event()
1887 dev_dbg(scomp->dev, "received event %d for widget %s\n", in sof_ipc3_keyword_dapm_event()
1891 spcm = snd_sof_find_spcm_name(scomp, swidget->widget->sname); in sof_ipc3_keyword_dapm_event()
1893 dev_err(scomp->dev, "%s: Cannot find PCM for %s\n", __func__, in sof_ipc3_keyword_dapm_event()
1902 dev_dbg(scomp->dev, "PRE_PMU event ignored, KWD pipeline is already RUNNING\n"); in sof_ipc3_keyword_dapm_event()
1909 dev_err(scomp->dev, "%s: Failed to set pcm params for widget %s\n", in sof_ipc3_keyword_dapm_event()
1917 dev_err(scomp->dev, "%s: Failed to trigger widget %s\n", __func__, in sof_ipc3_keyword_dapm_event()
1922 dev_dbg(scomp->dev, in sof_ipc3_keyword_dapm_event()
1930 dev_err(scomp->dev, "%s: Failed to trigger widget %s\n", __func__, in sof_ipc3_keyword_dapm_event()
1936 dev_err(scomp->dev, "%s: Failed to free PCM for widget %s\n", __func__, in sof_ipc3_keyword_dapm_event()
1951 static int sof_ipc3_widget_bind_event(struct snd_soc_component *scomp, in sof_ipc3_widget_bind_event() argument
1974 dev_err(scomp->dev, "Invalid event type %d for widget %s\n", event_type, in sof_ipc3_widget_bind_event()
2440 static int sof_ipc3_parse_manifest(struct snd_soc_component *scomp, int index, in sof_ipc3_parse_manifest() argument
2448 dev_dbg(scomp->dev, "No topology ABI info\n"); in sof_ipc3_parse_manifest()
2453 dev_err(scomp->dev, "%s: Invalid topology ABI size: %u\n", in sof_ipc3_parse_manifest()
2458 dev_info(scomp->dev, in sof_ipc3_parse_manifest()
2466 dev_err(scomp->dev, "%s: Incompatible topology ABI version\n", __func__); in sof_ipc3_parse_manifest()
2472 dev_err(scomp->dev, "%s: Topology ABI is more recent than kernel\n", __func__); in sof_ipc3_parse_manifest()