Lines Matching defs:sdev

721 	struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
754 list_for_each_entry(scontrol, &sdev->kcontrol_list, list) {
1302 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1327 if (sdev->mclk_id_override) {
1329 config[i].ssp.mclk_id, sdev->mclk_id_quirk);
1330 config[i].ssp.mclk_id = sdev->mclk_id_quirk;
1375 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1377 struct sof_ipc_fw_ready *ready = &sdev->fw_ready;
1473 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1517 list_for_each_entry(slink, &sdev->dai_link_list, list) {
1629 static int sof_ipc3_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *sroute)
1639 dev_dbg(sdev->dev, "setting up route %s -> %s\n",
1644 ret = sof_ipc_tx_message_no_reply(sdev->ipc, &connect, sizeof(connect));
1646 dev_err(sdev->dev, "%s: route %s -> %s failed\n", __func__,
1652 static int sof_ipc3_control_load_bytes(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol)
1659 dev_err(sdev->dev, "%s: insufficient size for a bytes control: %zu.\n",
1665 dev_err(sdev->dev,
1687 dev_err(sdev->dev, "Wrong ABI magic 0x%08x.\n", cdata->data->magic);
1693 dev_err(sdev->dev, "Incompatible ABI version 0x%08x.\n",
1701 dev_err(sdev->dev, "Conflict in bytes (%zu) vs. priv size (%zu).\n",
1715 static int sof_ipc3_control_load_volume(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol)
1747 static int sof_ipc3_control_load_enum(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol)
1765 static int sof_ipc3_control_setup(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol)
1771 return sof_ipc3_control_load_volume(sdev, scontrol);
1773 return sof_ipc3_control_load_bytes(sdev, scontrol);
1776 return sof_ipc3_control_load_enum(sdev, scontrol);
1784 static int sof_ipc3_control_free(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol)
1793 return sof_ipc_tx_message_no_reply(sdev->ipc, &fcomp, sizeof(fcomp));
1800 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1844 ret = sof_ipc_tx_message_no_reply(sdev->ipc, &pcm, sizeof(pcm));
1856 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1866 ret = sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
1980 static int sof_ipc3_complete_pipeline(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
1985 dev_dbg(sdev->dev, "tplg: complete pipeline %s id %d\n",
1993 ret = sof_ipc_tx_message_no_reply(sdev->ipc, &ready, sizeof(ready));
2000 static int sof_ipc3_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
2028 ret = sof_ipc_tx_message_no_reply(sdev->ipc, &ipc_free, sizeof(ipc_free));
2030 dev_err(sdev->dev, "failed to free widget %s\n", swidget->widget->name);
2035 static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget,
2038 struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
2045 dev_err(sdev->dev, "No private data for DAI %s\n", swidget->widget->name);
2051 dev_err(sdev->dev, "No config for DAI %s\n", dai->name);
2057 dev_err(sdev->dev, "Invalid current config for DAI %s\n", dai->name);
2118 ret = sof_ipc_tx_message_no_reply(sdev->ipc, config, config->hdr.size);
2120 dev_err(sdev->dev, "Failed to set dai config for %s\n", dai->name);
2129 static int sof_ipc3_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
2144 ret = sof_ipc_tx_message_no_reply(sdev->ipc, dai_data->comp_dai, comp->hdr.size);
2152 ret = sof_ipc_tx_message_no_reply(sdev->ipc, pipeline, sizeof(*pipeline));
2160 ret = sof_ipc_tx_message_no_reply(sdev->ipc, swidget->private, hdr->size);
2165 dev_err(sdev->dev, "Failed to setup widget %s\n", swidget->widget->name);
2170 static int sof_ipc3_set_up_all_pipelines(struct snd_sof_dev *sdev, bool verify)
2172 struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
2178 list_for_each_entry(swidget, &sdev->widget_list, list) {
2214 ret = sof_widget_setup(sdev, swidget);
2220 list_for_each_entry(sroute, &sdev->route_list, list) {
2234 ret = sof_route_setup(sdev, sroute->src_widget->widget,
2237 dev_err(sdev->dev, "%s: route set up failed\n", __func__);
2243 list_for_each_entry(swidget, &sdev->widget_list, list) {
2251 ret = sof_widget_setup(sdev, swidget);
2256 swidget->spipe->complete = sof_ipc3_complete_pipeline(sdev, swidget);
2272 static int sof_tear_down_left_over_pipelines(struct snd_sof_dev *sdev)
2283 list_for_each_entry(spcm, &sdev->pcm_list, list) {
2291 ret = sof_pcm_stream_free(sdev, substream, spcm, dir, true);
2302 list_for_each_entry(swidget, &sdev->widget_list, list)
2304 ret = sof_widget_free(sdev, swidget);
2312 static int sof_ipc3_free_widgets_in_list(struct snd_sof_dev *sdev, bool include_scheduler,
2315 struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
2319 list_for_each_entry(swidget, &sdev->widget_list, list) {
2342 ret = sof_widget_free(sdev, swidget);
2354 static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verify)
2356 struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
2370 ret = sof_ipc3_free_widgets_in_list(sdev, false, &dyn_widgets, verify);
2375 ret = sof_ipc3_free_widgets_in_list(sdev, true, &dyn_widgets, verify);
2387 ret = sof_tear_down_left_over_pipelines(sdev);
2389 dev_err(sdev->dev, "failed to tear down paused pipelines\n");
2394 list_for_each_entry(sroute, &sdev->route_list, list)
2402 list_for_each_entry(swidget, &sdev->widget_list, list) {
2404 dev_err(sdev->dev, "%s: widget %s is still in use: count %d\n",
2412 static int sof_ipc3_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type)
2429 dev_err(sdev->dev, "fail to get SSP clk %d rate\n", clk_type);
2433 dev_err(sdev->dev, "DAI type %d not supported yet!\n", private->dai_config->type);
2479 static int sof_ipc3_link_setup(struct snd_sof_dev *sdev, struct snd_soc_dai_link *link)