Lines Matching refs: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()
207 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_hw_free()
211 dev_dbg(component->dev, "pcm: free stream %d dir %d\n", in sof_pcm_hw_free()
221 ret = pcm_ops->hw_free(component, substream); in sof_pcm_hw_free()
232 dev_err(component->dev, "error: platform hw free failed\n"); in sof_pcm_hw_free()
246 static int sof_pcm_prepare(struct snd_soc_component *component, in sof_pcm_prepare() argument
257 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_prepare()
264 dev_dbg(component->dev, "pcm: prepare stream %d dir %d\n", in sof_pcm_prepare()
268 ret = sof_pcm_hw_params(component, in sof_pcm_prepare()
271 dev_err(component->dev, in sof_pcm_prepare()
283 static int sof_pcm_trigger(struct snd_soc_component *component, in sof_pcm_trigger() argument
287 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_trigger()
298 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_trigger()
302 dev_dbg(component->dev, "pcm: trigger stream %d dir %d cmd %d\n", in sof_pcm_trigger()
350 dev_err(component->dev, "Unhandled trigger cmd %d\n", cmd); in sof_pcm_trigger()
358 ret = pcm_ops->trigger(component, substream, cmd); in sof_pcm_trigger()
385 static snd_pcm_uframes_t sof_pcm_pointer(struct snd_soc_component *component, in sof_pcm_pointer() argument
389 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_pointer()
401 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_pointer()
416 static int sof_pcm_open(struct snd_soc_component *component, in sof_pcm_open() argument
421 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_open()
431 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_open()
435 dev_dbg(component->dev, "pcm: open stream %d dir %d\n", in sof_pcm_open()
457 dev_dbg(component->dev, "period min %zd max %zd bytes\n", in sof_pcm_open()
460 dev_dbg(component->dev, "period count %d max %d\n", in sof_pcm_open()
463 dev_dbg(component->dev, "buffer max %zd bytes\n", in sof_pcm_open()
476 dev_err(component->dev, "error: pcm open failed %d\n", ret); in sof_pcm_open()
481 static int sof_pcm_close(struct snd_soc_component *component, in sof_pcm_close() argument
485 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_close()
493 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_close()
497 dev_dbg(component->dev, "pcm: close stream %d dir %d\n", in sof_pcm_close()
502 dev_err(component->dev, "error: pcm close failed %d\n", in sof_pcm_close()
518 static int sof_pcm_new(struct snd_soc_component *component, in sof_pcm_new() argument
521 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_new()
528 spcm = snd_sof_find_spcm_dai(component, rtd); in sof_pcm_new()
530 dev_warn(component->dev, "warn: can't find PCM with DAI ID %d\n", in sof_pcm_new()
535 dev_dbg(component->dev, "creating new PCM %s\n", spcm->pcm.pcm_name); in sof_pcm_new()
544 dev_dbg(component->dev, in sof_pcm_new()
549 dev_err(component->dev, "error: NULL playback substream!\n"); in sof_pcm_new()
566 dev_dbg(component->dev, in sof_pcm_new()
571 dev_err(component->dev, "error: NULL capture substream!\n"); in sof_pcm_new()
590 struct snd_soc_component *component = in sof_pcm_dai_link_fixup() local
593 snd_sof_find_dai(component, (char *)rtd->dai_link->name); in sof_pcm_dai_link_fixup()
594 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_dai_link_fixup()
599 dev_warn(component->dev, in sof_pcm_dai_link_fixup()
623 static int sof_pcm_probe(struct snd_soc_component *component) in sof_pcm_probe() argument
625 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_probe()
634 ret = pm_runtime_resume_and_get(component->dev); in sof_pcm_probe()
639 sdev->component = component; in sof_pcm_probe()
650 ret = snd_sof_load_topology(component, tplg_filename); in sof_pcm_probe()
652 dev_err(component->dev, "error: failed to load DSP topology %d\n", in sof_pcm_probe()
656 pm_runtime_mark_last_busy(component->dev); in sof_pcm_probe()
657 pm_runtime_put_autosuspend(component->dev); in sof_pcm_probe()
662 static void sof_pcm_remove(struct snd_soc_component *component) in sof_pcm_remove() argument
665 snd_soc_tplg_component_remove(component); in sof_pcm_remove()
668 static int sof_pcm_ack(struct snd_soc_component *component, in sof_pcm_ack() argument
671 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_ack()
676 static snd_pcm_sframes_t sof_pcm_delay(struct snd_soc_component *component, in sof_pcm_delay() argument
679 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); in sof_pcm_delay()
683 return pcm_ops->delay(component, substream); in sof_pcm_delay()