Lines Matching defs:component

16 #include <sound/soc-component.h>
719 struct snd_soc_component *component = file->private_data;
720 struct snd_soc_card *card = component->card;
725 len = scnprintf(buf, sizeof(buf), "%s/%s\n", component->driver->topology_name_prefix,
770 static int avs_component_probe(struct snd_soc_component *component)
772 struct snd_soc_card *card = component->card;
779 dev_dbg(card->dev, "probing %s card %s\n", component->name, card->name);
781 acomp = to_avs_soc_component(component);
782 adev = to_avs_dev(component->dev);
784 acomp->tplg = avs_tplg_new(component);
792 filename = kasprintf(GFP_KERNEL, "%s/%s", component->driver->topology_name_prefix,
797 ret = avs_load_topology(component, filename);
812 filename = kasprintf(GFP_KERNEL, "%s/%s", component->driver->topology_name_prefix,
818 ret = avs_load_topology(component, filename);
831 debugfs_create_file("topology_name", 0444, component->debugfs_root, component,
841 avs_remove_topology(component);
845 static void avs_component_remove(struct snd_soc_component *component)
847 struct avs_soc_component *acomp = to_avs_soc_component(component);
849 struct avs_dev *adev = to_avs_dev(component->dev);
852 mach = dev_get_platdata(component->card->dev);
859 ret = avs_remove_topology(component);
861 dev_err(component->dev, "unload topology failed: %d\n", ret);
956 static int avs_component_pm_op(struct snd_soc_component *component, bool be,
964 for_each_component_dais(component, dai) {
995 static int avs_component_resume_hw_params(struct snd_soc_component *component, bool be)
997 return avs_component_pm_op(component, be, &avs_dai_resume_hw_params);
1000 static int avs_component_resume_prepare(struct snd_soc_component *component, bool be)
1009 return avs_component_pm_op(component, be, prepare_cb);
1012 static int avs_component_suspend_hw_free(struct snd_soc_component *component, bool be)
1021 return avs_component_pm_op(component, be, hw_free_cb);
1024 static int avs_component_suspend(struct snd_soc_component *component)
1032 ret = avs_component_suspend_hw_free(component, false);
1036 return avs_component_suspend_hw_free(component, true);
1039 static int avs_component_resume(struct snd_soc_component *component)
1047 ret = avs_component_resume_hw_params(component, true);
1051 ret = avs_component_resume_hw_params(component, false);
1056 ret = avs_component_resume_prepare(component, true);
1060 return avs_component_resume_prepare(component, false);
1081 static int avs_component_open(struct snd_soc_component *component,
1100 avs_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream)
1120 static int avs_component_mmap(struct snd_soc_component *component,
1129 static int avs_component_construct(struct snd_soc_component *component,
1137 SNDRV_DMA_TYPE_DEV_SG, component->dev, 0,
1142 SNDRV_DMA_TYPE_DEV_SG, component->dev, 0,
1315 static void avs_component_hda_unregister_dais(struct snd_soc_component *component)
1322 mach = dev_get_platdata(component->card->dev);
1326 for_each_component_dais_safe(component, dai, save) {
1339 static int avs_component_hda_probe(struct snd_soc_component *component)
1349 mach = dev_get_platdata(component->card->dev);
1359 dais = devm_kcalloc(component->dev, pcm_count, sizeof(*dais),
1365 dapm = snd_soc_component_get_dapm(component);
1373 dais[i].name = devm_kasprintf(component->dev, GFP_KERNEL,
1382 devm_kasprintf(component->dev, GFP_KERNEL,
1392 devm_kasprintf(component->dev, GFP_KERNEL,
1400 dai = snd_soc_register_dai(component, &dais[i], false);
1402 dev_err(component->dev, "register dai for %s failed\n",
1410 dev_err(component->dev, "create widgets failed: %d\n",
1416 ret = avs_component_probe(component);
1419 avs_component_hda_unregister_dais(component);
1424 static void avs_component_hda_remove(struct snd_soc_component *component)
1426 avs_component_hda_unregister_dais(component);
1427 avs_component_remove(component);
1430 static int avs_component_hda_open(struct snd_soc_component *component,
1477 static int avs_component_hda_close(struct snd_soc_component *component,
1506 * hda platform component's probe() is dependent on
1508 * component. remove_order is here for completeness sake