Lines Matching full:component

24 static int create_page_table(struct snd_soc_component *component,  in create_page_table()  argument
33 spcm = snd_sof_find_spcm_dai(component, rtd); in create_page_table()
37 return snd_sof_create_page_table(component->dev, dmab, in create_page_table()
64 struct snd_soc_component *component = in snd_sof_pcm_period_elapsed() local
68 spcm = snd_sof_find_spcm_dai(component, rtd); in snd_sof_pcm_period_elapsed()
70 dev_err(component->dev, in snd_sof_pcm_period_elapsed()
122 static int sof_pcm_hw_params(struct snd_soc_component *component, in sof_pcm_hw_params() argument
126 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_hw_params()
138 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_hw_params()
147 ret = pcm_ops->hw_free(component, substream); in sof_pcm_hw_params()
154 dev_dbg(component->dev, "pcm: hw params stream %d dir %d\n", in sof_pcm_hw_params()
159 dev_err(component->dev, "platform hw params failed\n"); in sof_pcm_hw_params()
173 ret = create_page_table(component, substream, runtime->dma_area, in sof_pcm_hw_params()
181 ret = pcm_ops->hw_params(component, substream, params, &platform_params); in sof_pcm_hw_params()
194 static int sof_pcm_hw_free(struct snd_soc_component *component, in sof_pcm_hw_free() argument
198 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_hw_free()
206 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_hw_free()
210 dev_dbg(component->dev, "pcm: free stream %d dir %d\n", in sof_pcm_hw_free()
220 static int sof_pcm_prepare(struct snd_soc_component *component, in sof_pcm_prepare() argument
224 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_prepare()
232 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_prepare()
249 dev_dbg(component->dev, "pcm: prepare stream %d dir %d\n", in sof_pcm_prepare()
253 ret = sof_pcm_hw_params(component, in sof_pcm_prepare()
256 dev_err(component->dev, in sof_pcm_prepare()
268 static int sof_pcm_trigger(struct snd_soc_component *component, in sof_pcm_trigger() argument
272 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_trigger()
283 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_trigger()
287 dev_dbg(component->dev, "pcm: trigger stream %d dir %d cmd %d\n", in sof_pcm_trigger()
337 dev_err(component->dev, "Unhandled trigger cmd %d\n", cmd); in sof_pcm_trigger()
345 ret = pcm_ops->trigger(component, substream, cmd); in sof_pcm_trigger()
381 static snd_pcm_uframes_t sof_pcm_pointer(struct snd_soc_component *component, in sof_pcm_pointer() argument
385 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_pointer()
396 ret = pcm_ops->pointer(component, substream, &host); in sof_pcm_pointer()
405 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_pointer()
420 static int sof_pcm_open(struct snd_soc_component *component, in sof_pcm_open() argument
425 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_open()
435 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_open()
439 dev_dbg(component->dev, "pcm: open stream %d dir %d\n", in sof_pcm_open()
461 dev_dbg(component->dev, "period min %zd max %zd bytes\n", in sof_pcm_open()
464 dev_dbg(component->dev, "period count %d max %d\n", in sof_pcm_open()
467 dev_dbg(component->dev, "buffer max %zd bytes\n", in sof_pcm_open()
480 dev_err(component->dev, "error: pcm open failed %d\n", ret); in sof_pcm_open()
485 static int sof_pcm_close(struct snd_soc_component *component, in sof_pcm_close() argument
489 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_close()
497 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_close()
501 dev_dbg(component->dev, "pcm: close stream %d dir %d\n", in sof_pcm_close()
506 dev_err(component->dev, "error: pcm close failed %d\n", in sof_pcm_close()
522 static int sof_pcm_new(struct snd_soc_component *component, in sof_pcm_new() argument
525 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_new()
532 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_new()
534 dev_warn(component->dev, "warn: can't find PCM with DAI ID %d\n", in sof_pcm_new()
539 dev_dbg(component->dev, "creating new PCM %s\n", spcm->pcm.pcm_name); in sof_pcm_new()
548 dev_dbg(component->dev, in sof_pcm_new()
553 dev_err(component->dev, "error: NULL playback substream!\n"); in sof_pcm_new()
570 dev_dbg(component->dev, in sof_pcm_new()
575 dev_err(component->dev, "error: NULL capture substream!\n"); in sof_pcm_new()
594 struct snd_soc_component *component = in sof_pcm_dai_link_fixup() local
597 snd_sof_find_dai(component, (char *)rtd->dai_link->name); in sof_pcm_dai_link_fixup()
598 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_dai_link_fixup()
603 dev_warn(component->dev, in sof_pcm_dai_link_fixup()
627 static int sof_pcm_probe(struct snd_soc_component *component) in sof_pcm_probe() argument
629 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_probe()
638 ret = pm_runtime_resume_and_get(component->dev); in sof_pcm_probe()
643 sdev->component = component; in sof_pcm_probe()
654 ret = snd_sof_load_topology(component, tplg_filename); in sof_pcm_probe()
656 dev_err(component->dev, "error: failed to load DSP topology %d\n", in sof_pcm_probe()
660 pm_runtime_mark_last_busy(component->dev); in sof_pcm_probe()
661 pm_runtime_put_autosuspend(component->dev); in sof_pcm_probe()
666 static void sof_pcm_remove(struct snd_soc_component *component) in sof_pcm_remove() argument
669 snd_soc_tplg_component_remove(component); in sof_pcm_remove()
672 static int sof_pcm_ack(struct snd_soc_component *component, in sof_pcm_ack() argument
675 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_ack()
680 static snd_pcm_sframes_t sof_pcm_delay(struct snd_soc_component *component, in sof_pcm_delay() argument
683 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_delay()
687 return pcm_ops->delay(component, substream); in sof_pcm_delay()
705 pd->name = "sof-audio-component"; in snd_sof_new_platform_drv()