Lines Matching refs:mconfig
383 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_set_module_params() local
389 if (mconfig->formats_config.caps_size > 0 && in skl_tplg_set_module_params()
390 mconfig->formats_config.set_params == SKL_PARAM_SET) { in skl_tplg_set_module_params()
391 sp_cfg = &mconfig->formats_config; in skl_tplg_set_module_params()
394 sp_cfg->param_id, mconfig); in skl_tplg_set_module_params()
408 bc->param_id, mconfig); in skl_tplg_set_module_params()
429 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_set_module_init_data() local
441 mconfig->formats_config.caps = (u32 *)bc->params; in skl_tplg_set_module_init_data()
442 mconfig->formats_config.caps_size = bc->size; in skl_tplg_set_module_init_data()
475 struct skl_module_cfg *mconfig; in skl_tplg_init_pipe_modules() local
482 mconfig = w->priv; in skl_tplg_init_pipe_modules()
485 if (mconfig->id.module_id < 0) { in skl_tplg_init_pipe_modules()
488 (guid_t *)mconfig->guid); in skl_tplg_init_pipe_modules()
492 cfg_idx = mconfig->pipe->cur_config_idx; in skl_tplg_init_pipe_modules()
493 mconfig->fmt_idx = mconfig->mod_cfg[cfg_idx].fmt_idx; in skl_tplg_init_pipe_modules()
494 mconfig->res_idx = mconfig->mod_cfg[cfg_idx].res_idx; in skl_tplg_init_pipe_modules()
496 if (mconfig->module->loadable && skl->dsp->fw_ops.load_mod) { in skl_tplg_init_pipe_modules()
498 mconfig->id.module_id, mconfig->guid); in skl_tplg_init_pipe_modules()
502 mconfig->m_state = SKL_MODULE_LOADED; in skl_tplg_init_pipe_modules()
506 ret = skl_tplg_module_prepare(skl, pipe, w, mconfig); in skl_tplg_init_pipe_modules()
518 uuid_mod = (guid_t *)mconfig->guid; in skl_tplg_init_pipe_modules()
519 mconfig->id.pvt_id = skl_get_pvt_id(skl, uuid_mod, in skl_tplg_init_pipe_modules()
520 mconfig->id.instance_id); in skl_tplg_init_pipe_modules()
521 if (mconfig->id.pvt_id < 0) in skl_tplg_init_pipe_modules()
525 ret = skl_dsp_get_core(skl->dsp, mconfig->core_id); in skl_tplg_init_pipe_modules()
528 mconfig->core_id, ret); in skl_tplg_init_pipe_modules()
532 ret = skl_init_module(skl, mconfig); in skl_tplg_init_pipe_modules()
534 skl_put_pvt_id(skl, uuid_mod, &mconfig->id.pvt_id); in skl_tplg_init_pipe_modules()
545 skl_dsp_put_core(skl->dsp, mconfig->core_id); in skl_tplg_init_pipe_modules()
554 struct skl_module_cfg *mconfig; in skl_tplg_unload_pipe_modules() local
558 mconfig = w_module->w->priv; in skl_tplg_unload_pipe_modules()
559 uuid_mod = (guid_t *)mconfig->guid; in skl_tplg_unload_pipe_modules()
561 if (mconfig->module->loadable && skl->dsp->fw_ops.unload_mod && in skl_tplg_unload_pipe_modules()
562 mconfig->m_state > SKL_MODULE_UNINIT) { in skl_tplg_unload_pipe_modules()
564 mconfig->id.module_id); in skl_tplg_unload_pipe_modules()
568 skl_put_pvt_id(skl, uuid_mod, &mconfig->id.pvt_id); in skl_tplg_unload_pipe_modules()
570 ret = skl_dsp_put_core(skl->dsp, mconfig->core_id); in skl_tplg_unload_pipe_modules()
574 mconfig->core_id, ret); in skl_tplg_unload_pipe_modules()
622 skl_tplg_get_pipe_config(struct skl_dev *skl, struct skl_module_cfg *mconfig) in skl_tplg_get_pipe_config() argument
624 struct skl_pipe *pipe = mconfig->pipe; in skl_tplg_get_pipe_config()
691 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_mixer_dapm_pre_pmu_event() local
693 struct skl_pipe *s_pipe = mconfig->pipe; in skl_tplg_mixer_dapm_pre_pmu_event()
697 ret = skl_tplg_get_pipe_config(skl, mconfig); in skl_tplg_mixer_dapm_pre_pmu_event()
705 ret = skl_create_pipeline(skl, mconfig->pipe); in skl_tplg_mixer_dapm_pre_pmu_event()
783 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_set_module_bind_params() local
804 if (mconfig->formats_config.caps_size > 0 && in skl_tplg_set_module_bind_params()
805 mconfig->formats_config.set_params == SKL_PARAM_BIND) { in skl_tplg_set_module_bind_params()
806 sp_cfg = &mconfig->formats_config; in skl_tplg_set_module_bind_params()
809 sp_cfg->param_id, mconfig); in skl_tplg_set_module_bind_params()
826 mconfig); in skl_tplg_set_module_bind_params()
829 bc->max, bc->param_id, mconfig); in skl_tplg_set_module_bind_params()
900 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_add_moduleid_in_bind_params() local
908 if (mconfig->m_type != SKL_MODULE_TYPE_KPB) in skl_tplg_add_moduleid_in_bind_params()
1210 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_mixer_dapm_post_pmd_event() local
1213 struct skl_pipe *s_pipe = mconfig->pipe; in skl_tplg_mixer_dapm_post_pmd_event()
1260 skl_delete_pipe(skl, mconfig->pipe); in skl_tplg_mixer_dapm_post_pmd_event()
1427 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_tlv_control_get() local
1432 bc->size, bc->param_id, mconfig); in skl_tplg_tlv_control_get()
1459 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_tlv_control_set() local
1482 ac->param_id, mconfig); in skl_tplg_tlv_control_set()
1492 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_mic_control_get() local
1496 if (mconfig->dmic_ch_type == ch_type) in skl_tplg_mic_control_get()
1498 mconfig->dmic_ch_combo_index; in skl_tplg_mic_control_get()
1505 static int skl_fill_mic_sel_params(struct skl_module_cfg *mconfig, in skl_fill_mic_sel_params() argument
1508 struct skl_specific_cfg *sp_cfg = &mconfig->formats_config; in skl_fill_mic_sel_params()
1530 struct skl_module_cfg *mconfig = w->priv; in skl_tplg_mic_control_set() local
1537 mconfig->dmic_ch_type = ch_type; in skl_tplg_mic_control_set()
1538 mconfig->dmic_ch_combo_index = ucontrol->value.enumerated.item[0]; in skl_tplg_mic_control_set()
1541 if (mconfig->dmic_ch_combo_index == 0) in skl_tplg_mic_control_set()
1545 index = mconfig->dmic_ch_combo_index - 1; in skl_tplg_mic_control_set()
1549 if (mconfig->dmic_ch_combo_index > ARRAY_SIZE(mic_mono_list)) in skl_tplg_mic_control_set()
1556 if (mconfig->dmic_ch_combo_index > ARRAY_SIZE(mic_stereo_list)) in skl_tplg_mic_control_set()
1563 if (mconfig->dmic_ch_combo_index > ARRAY_SIZE(mic_trio_list)) in skl_tplg_mic_control_set()
1570 if (mconfig->dmic_ch_combo_index > ARRAY_SIZE(mic_quatro_list)) in skl_tplg_mic_control_set()
1590 return skl_fill_mic_sel_params(mconfig, &mic_cfg, w->dapm->dev); in skl_tplg_mic_control_set()
1637 struct skl_module_cfg *mconfig, in skl_tplg_update_pipe_params() argument
1640 struct skl_module_res *res = &mconfig->module->resources[0]; in skl_tplg_update_pipe_params()
1643 u8 cfg_idx = mconfig->pipe->cur_config_idx; in skl_tplg_update_pipe_params()
1645 skl_tplg_fill_dma_id(mconfig, params); in skl_tplg_update_pipe_params()
1646 mconfig->fmt_idx = mconfig->mod_cfg[cfg_idx].fmt_idx; in skl_tplg_update_pipe_params()
1647 mconfig->res_idx = mconfig->mod_cfg[cfg_idx].res_idx; in skl_tplg_update_pipe_params()
1653 format = &mconfig->module->formats[0].inputs[0].fmt; in skl_tplg_update_pipe_params()
1655 format = &mconfig->module->formats[0].outputs[0].fmt; in skl_tplg_update_pipe_params()
1741 struct skl_module_cfg *mconfig = NULL; in skl_get_mconfig_pb_cpr() local
1748 mconfig = p->source->priv; in skl_get_mconfig_pb_cpr()
1749 return mconfig; in skl_get_mconfig_pb_cpr()
1751 mconfig = skl_get_mconfig_pb_cpr(dai, p->source); in skl_get_mconfig_pb_cpr()
1752 if (mconfig) in skl_get_mconfig_pb_cpr()
1753 return mconfig; in skl_get_mconfig_pb_cpr()
1756 return mconfig; in skl_get_mconfig_pb_cpr()
1763 struct skl_module_cfg *mconfig = NULL; in skl_get_mconfig_cap_cpr() local
1770 mconfig = p->sink->priv; in skl_get_mconfig_cap_cpr()
1771 return mconfig; in skl_get_mconfig_cap_cpr()
1773 mconfig = skl_get_mconfig_cap_cpr(dai, p->sink); in skl_get_mconfig_cap_cpr()
1774 if (mconfig) in skl_get_mconfig_cap_cpr()
1775 return mconfig; in skl_get_mconfig_cap_cpr()
1778 return mconfig; in skl_get_mconfig_cap_cpr()
1785 struct skl_module_cfg *mconfig; in skl_tplg_be_get_cpr_module() local
1789 mconfig = skl_get_mconfig_pb_cpr(dai, w); in skl_tplg_be_get_cpr_module()
1792 mconfig = skl_get_mconfig_cap_cpr(dai, w); in skl_tplg_be_get_cpr_module()
1794 return mconfig; in skl_tplg_be_get_cpr_module()
1834 struct skl_module_cfg *mconfig, in skl_tplg_be_fill_pipe_params() argument
1839 int link_type = skl_tplg_be_link_type(mconfig->dev_type); in skl_tplg_be_fill_pipe_params()
1840 u8 dev_type = skl_tplg_be_dev_type(mconfig->dev_type); in skl_tplg_be_fill_pipe_params()
1842 skl_tplg_fill_dma_id(mconfig, params); in skl_tplg_be_fill_pipe_params()
1848 cfg = skl_get_ep_blob(skl, mconfig->vbus_id, link_type, in skl_tplg_be_fill_pipe_params()
1853 mconfig->formats_config.caps_size = cfg->size; in skl_tplg_be_fill_pipe_params()
1854 mconfig->formats_config.caps = (u32 *) &cfg->caps; in skl_tplg_be_fill_pipe_params()
1857 mconfig->vbus_id, link_type, in skl_tplg_be_fill_pipe_params()
2062 struct skl_module_cfg *mconfig, struct skl_dev *skl, in skl_tplg_add_pipe() argument
2071 mconfig->pipe = ppl->pipe; in skl_tplg_add_pipe()
2095 mconfig->pipe = pipe; in skl_tplg_add_pipe()
2096 mconfig->pipe->state = SKL_PIPE_INVALID; in skl_tplg_add_pipe()
2151 struct skl_module_cfg *mconfig, in skl_tplg_fill_pins_info() argument
2160 m_pin = mconfig->m_in_pin; in skl_tplg_fill_pins_info()
2164 m_pin = mconfig->m_out_pin; in skl_tplg_fill_pins_info()
2370 struct skl_dev *skl, struct skl_module_cfg *mconfig) in skl_tplg_get_token() argument
2378 int res_idx = mconfig->res_idx; in skl_tplg_get_token()
2379 int fmt_idx = mconfig->fmt_idx; in skl_tplg_get_token()
2387 res = &mconfig->module->resources[res_idx]; in skl_tplg_get_token()
2388 iface = &mconfig->module->formats[fmt_idx]; in skl_tplg_get_token()
2396 mconfig->module->max_input_pins = tkn_elem->value; in skl_tplg_get_token()
2400 mconfig->module->max_output_pins = tkn_elem->value; in skl_tplg_get_token()
2404 if (!mconfig->m_in_pin) in skl_tplg_get_token()
2405 mconfig->m_in_pin = in skl_tplg_get_token()
2407 sizeof(*mconfig->m_in_pin), in skl_tplg_get_token()
2409 if (!mconfig->m_in_pin) in skl_tplg_get_token()
2412 skl_tplg_fill_pin_dynamic_val(mconfig->m_in_pin, MAX_IN_QUEUE, in skl_tplg_get_token()
2417 if (!mconfig->m_out_pin) in skl_tplg_get_token()
2418 mconfig->m_out_pin = in skl_tplg_get_token()
2420 sizeof(*mconfig->m_in_pin), in skl_tplg_get_token()
2422 if (!mconfig->m_out_pin) in skl_tplg_get_token()
2425 skl_tplg_fill_pin_dynamic_val(mconfig->m_out_pin, MAX_OUT_QUEUE, in skl_tplg_get_token()
2430 mconfig->time_slot = tkn_elem->value; in skl_tplg_get_token()
2434 mconfig->core_id = tkn_elem->value; in skl_tplg_get_token()
2438 mconfig->m_type = tkn_elem->value; in skl_tplg_get_token()
2442 mconfig->dev_type = tkn_elem->value; in skl_tplg_get_token()
2446 mconfig->hw_conn_type = tkn_elem->value; in skl_tplg_get_token()
2450 mconfig->id.instance_id = in skl_tplg_get_token()
2465 mconfig->vbus_id = tkn_elem->value; in skl_tplg_get_token()
2469 mconfig->params_fixup = tkn_elem->value; in skl_tplg_get_token()
2473 mconfig->converter = tkn_elem->value; in skl_tplg_get_token()
2477 mconfig->d0i3_caps = tkn_elem->value; in skl_tplg_get_token()
2482 mconfig, skl, tkn_elem); in skl_tplg_get_token()
2505 ret = skl_tplg_fill_pipe_tkn(dev, mconfig->pipe, in skl_tplg_get_token()
2517 if (mconfig->pipe->nr_cfgs) { in skl_tplg_get_token()
2518 ret = skl_tplg_fill_pipe_cfg(dev, mconfig->pipe, in skl_tplg_get_token()
2527 mconfig->mod_cfg[conf_idx].res_idx = tkn_elem->value; in skl_tplg_get_token()
2531 mconfig->mod_cfg[conf_idx].fmt_idx = tkn_elem->value; in skl_tplg_get_token()
2566 mconfig, tkn_elem, dir, in skl_tplg_get_token()
2574 mconfig->formats_config.caps_size = in skl_tplg_get_token()
2580 mconfig->formats_config.set_params = in skl_tplg_get_token()
2585 mconfig->formats_config.param_id = in skl_tplg_get_token()
2590 mconfig->domain = in skl_tplg_get_token()
2596 mconfig->dma_buffer_size = tkn_elem->value; in skl_tplg_get_token()
2621 struct skl_module_cfg *mconfig, int block_size) in skl_tplg_get_tokens() argument
2644 ret = skl_tplg_get_uuid(dev, (guid_t *)mconfig->guid, in skl_tplg_get_tokens()
2649 mconfig); in skl_tplg_get_tokens()
2667 skl, mconfig); in skl_tplg_get_tokens()
2716 struct skl_module_cfg *mconfig, struct skl_dev *skl, in skl_tplg_add_pipe_v4() argument
2725 mconfig->pipe = ppl->pipe; in skl_tplg_add_pipe_v4()
2753 mconfig->pipe = pipe; in skl_tplg_add_pipe_v4()
2794 struct skl_module_cfg *mconfig) in skl_tplg_get_pvt_data_v4() argument
2802 ret = guid_parse(dfw->uuid, (guid_t *)mconfig->guid); in skl_tplg_get_pvt_data_v4()
2805 mconfig->id.module_id = -1; in skl_tplg_get_pvt_data_v4()
2806 mconfig->id.instance_id = dfw->instance_id; in skl_tplg_get_pvt_data_v4()
2807 mconfig->module->resources[0].cpc = dfw->max_mcps / 1000; in skl_tplg_get_pvt_data_v4()
2808 mconfig->module->resources[0].ibs = dfw->ibs; in skl_tplg_get_pvt_data_v4()
2809 mconfig->module->resources[0].obs = dfw->obs; in skl_tplg_get_pvt_data_v4()
2810 mconfig->core_id = dfw->core_id; in skl_tplg_get_pvt_data_v4()
2811 mconfig->module->max_input_pins = dfw->max_in_queue; in skl_tplg_get_pvt_data_v4()
2812 mconfig->module->max_output_pins = dfw->max_out_queue; in skl_tplg_get_pvt_data_v4()
2813 mconfig->module->loadable = dfw->is_loadable; in skl_tplg_get_pvt_data_v4()
2814 skl_tplg_fill_fmt_v4(mconfig->module->formats[0].inputs, dfw->in_fmt, in skl_tplg_get_pvt_data_v4()
2816 skl_tplg_fill_fmt_v4(mconfig->module->formats[0].outputs, dfw->out_fmt, in skl_tplg_get_pvt_data_v4()
2819 mconfig->params_fixup = dfw->params_fixup; in skl_tplg_get_pvt_data_v4()
2820 mconfig->converter = dfw->converter; in skl_tplg_get_pvt_data_v4()
2821 mconfig->m_type = dfw->module_type; in skl_tplg_get_pvt_data_v4()
2822 mconfig->vbus_id = dfw->vbus_id; in skl_tplg_get_pvt_data_v4()
2823 mconfig->module->resources[0].is_pages = dfw->mem_pages; in skl_tplg_get_pvt_data_v4()
2825 ret = skl_tplg_add_pipe_v4(dev, mconfig, skl, &dfw->pipe); in skl_tplg_get_pvt_data_v4()
2829 mconfig->dev_type = dfw->dev_type; in skl_tplg_get_pvt_data_v4()
2830 mconfig->hw_conn_type = dfw->hw_conn_type; in skl_tplg_get_pvt_data_v4()
2831 mconfig->time_slot = dfw->time_slot; in skl_tplg_get_pvt_data_v4()
2832 mconfig->formats_config.caps_size = dfw->caps.caps_size; in skl_tplg_get_pvt_data_v4()
2834 mconfig->m_in_pin = devm_kcalloc(dev, in skl_tplg_get_pvt_data_v4()
2835 MAX_IN_QUEUE, sizeof(*mconfig->m_in_pin), in skl_tplg_get_pvt_data_v4()
2837 if (!mconfig->m_in_pin) in skl_tplg_get_pvt_data_v4()
2840 mconfig->m_out_pin = devm_kcalloc(dev, in skl_tplg_get_pvt_data_v4()
2841 MAX_OUT_QUEUE, sizeof(*mconfig->m_out_pin), in skl_tplg_get_pvt_data_v4()
2843 if (!mconfig->m_out_pin) in skl_tplg_get_pvt_data_v4()
2846 skl_fill_module_pin_info_v4(dfw->in_pin, mconfig->m_in_pin, in skl_tplg_get_pvt_data_v4()
2848 mconfig->module->max_input_pins); in skl_tplg_get_pvt_data_v4()
2849 skl_fill_module_pin_info_v4(dfw->out_pin, mconfig->m_out_pin, in skl_tplg_get_pvt_data_v4()
2851 mconfig->module->max_output_pins); in skl_tplg_get_pvt_data_v4()
2853 if (mconfig->formats_config.caps_size) { in skl_tplg_get_pvt_data_v4()
2854 mconfig->formats_config.set_params = dfw->caps.set_params; in skl_tplg_get_pvt_data_v4()
2855 mconfig->formats_config.param_id = dfw->caps.param_id; in skl_tplg_get_pvt_data_v4()
2856 mconfig->formats_config.caps = in skl_tplg_get_pvt_data_v4()
2857 devm_kzalloc(dev, mconfig->formats_config.caps_size, in skl_tplg_get_pvt_data_v4()
2859 if (!mconfig->formats_config.caps) in skl_tplg_get_pvt_data_v4()
2861 memcpy(mconfig->formats_config.caps, dfw->caps.caps, in skl_tplg_get_pvt_data_v4()
2876 struct skl_module_cfg *mconfig) in skl_tplg_get_pvt_data() argument
2888 return skl_tplg_get_pvt_data_v4(tplg_w, skl, dev, mconfig); in skl_tplg_get_pvt_data()
2927 skl, mconfig, block_size); in skl_tplg_get_pvt_data()
2934 if (mconfig->formats_config.caps_size > 0) in skl_tplg_get_pvt_data()
2935 memcpy(mconfig->formats_config.caps, data, in skl_tplg_get_pvt_data()
2936 mconfig->formats_config.caps_size); in skl_tplg_get_pvt_data()
2938 ret = mconfig->formats_config.caps_size; in skl_tplg_get_pvt_data()
2950 struct skl_module_cfg *mconfig; in skl_clear_pin_config() local
2955 mconfig = w->priv; in skl_clear_pin_config()
2956 pipe = mconfig->pipe; in skl_clear_pin_config()
2957 for (i = 0; i < mconfig->module->max_input_pins; i++) { in skl_clear_pin_config()
2958 mconfig->m_in_pin[i].in_use = false; in skl_clear_pin_config()
2959 mconfig->m_in_pin[i].pin_state = SKL_PIN_UNBIND; in skl_clear_pin_config()
2961 for (i = 0; i < mconfig->module->max_output_pins; i++) { in skl_clear_pin_config()
2962 mconfig->m_out_pin[i].in_use = false; in skl_clear_pin_config()
2963 mconfig->m_out_pin[i].pin_state = SKL_PIN_UNBIND; in skl_clear_pin_config()
2966 mconfig->m_state = SKL_MODULE_UNINIT; in skl_clear_pin_config()
3005 struct skl_module_cfg *mconfig; in skl_tplg_widget_load() local
3010 mconfig = devm_kzalloc(bus->dev, sizeof(*mconfig), GFP_KERNEL); in skl_tplg_widget_load()
3012 if (!mconfig) in skl_tplg_widget_load()
3016 mconfig->module = devm_kzalloc(bus->dev, in skl_tplg_widget_load()
3017 sizeof(*mconfig->module), GFP_KERNEL); in skl_tplg_widget_load()
3018 if (!mconfig->module) in skl_tplg_widget_load()
3022 w->priv = mconfig; in skl_tplg_widget_load()
3028 mconfig->id.module_id = -1; in skl_tplg_widget_load()
3031 ret = skl_tplg_get_pvt_data(tplg_w, skl, bus->dev, mconfig); in skl_tplg_widget_load()
3035 skl_debug_init_module(skl->debugfs, w, mconfig); in skl_tplg_widget_load()
3691 struct skl_module_cfg *mconfig; in skl_tplg_set_pipe_type() local
3696 mconfig = w->priv; in skl_tplg_set_pipe_type()
3698 if (mconfig->dev_type == SKL_DEVICE_HDAHOST) in skl_tplg_set_pipe_type()
3700 else if (mconfig->dev_type != SKL_DEVICE_NONE) in skl_tplg_set_pipe_type()