Lines Matching refs:spcm

48 	struct snd_sof_pcm *spcm;
50 spcm = snd_sof_find_spcm_dai(component, rtd);
51 if (!spcm) {
65 schedule_work(&spcm->stream[substream->stream].period_elapsed_work);
71 struct snd_sof_pcm *spcm, struct snd_pcm_hw_params *params,
84 spcm_err(spcm, dir, "dai %s has no valid %s path\n",
89 spcm->stream[dir].list = list;
91 ret = sof_widget_list_prepare(sdev, spcm, params, platform_params, dir);
93 spcm_err(spcm, dir, "widget list prepare failed\n");
94 spcm->stream[dir].list = NULL;
127 struct snd_sof_pcm *spcm;
134 spcm = snd_sof_find_spcm_dai(component, rtd);
135 if (!spcm)
138 spcm_dbg(spcm, substream->stream, "Entry: hw_params\n");
154 if (spcm->prepared[substream->stream] && pcm_ops && pcm_ops->hw_free) {
159 spcm->prepared[substream->stream] = false;
162 platform_params = &spcm->platform_params[substream->stream];
165 spcm_err(spcm, substream->stream, "platform hw params failed\n");
170 if (!spcm->stream[substream->stream].list) {
171 ret = sof_pcm_setup_connected_widgets(sdev, rtd, spcm, params, platform_params,
178 int host_comp_id = spcm->stream[substream->stream].comp_id;
182 spcm_err(spcm, substream->stream,
197 spcm->stream[substream->stream].page_table.area,
204 memcpy(&spcm->params[substream->stream], params, sizeof(*params));
211 struct snd_sof_pcm *spcm, int dir,
218 if (spcm->prepared[substream->stream]) {
228 spcm_err(spcm, substream->stream,
234 spcm->prepared[substream->stream] = false;
235 spcm->pending_stop[substream->stream] = false;
241 spcm_err(spcm, substream->stream,
249 ret = sof_widget_list_free(sdev, spcm, dir);
251 spcm_err(spcm, substream->stream,
264 struct snd_sof_pcm *spcm;
267 list_for_each_entry(spcm, &sdev->pcm_list, list) {
269 substream = spcm->stream[dir].substream;
272 spcm->stream[dir].suspend_ignored)
275 if (spcm->stream[dir].list) {
276 ret = sof_pcm_stream_free(sdev, substream, spcm,
292 struct snd_sof_pcm *spcm;
299 spcm = snd_sof_find_spcm_dai(component, rtd);
300 if (!spcm)
303 spcm_dbg(spcm, substream->stream, "Entry: hw_free\n");
305 ret = sof_pcm_stream_free(sdev, substream, spcm, substream->stream, true);
308 sof_widget_list_unprepare(sdev, spcm, substream->stream);
310 cancel_work_sync(&spcm->stream[substream->stream].period_elapsed_work);
324 struct snd_sof_pcm *spcm;
332 spcm = snd_sof_find_spcm_dai(component, rtd);
333 if (!spcm)
336 spcm_dbg(spcm, substream->stream, "Entry: prepare\n");
338 if (spcm->prepared[substream->stream]) {
339 if (!spcm->pending_stop[substream->stream])
346 ret = sof_pcm_stream_free(sdev, substream, spcm, substream->stream, true);
351 ret = sof_pcm_hw_params(component, substream, &spcm->params[substream->stream]);
353 spcm_err(spcm, substream->stream,
358 list = spcm->stream[dir].list;
359 params = &spcm->params[substream->stream];
360 platform_params = &spcm->platform_params[substream->stream];
361 ret = sof_widget_list_setup(sdev, spcm, params, platform_params, dir);
364 spcm->pcm.pcm_id, dir);
365 spcm->stream[dir].list = NULL;
376 spcm->prepared[substream->stream] = true;
391 struct snd_sof_pcm *spcm;
400 spcm = snd_sof_find_spcm_dai(component, rtd);
401 if (!spcm)
404 spcm_dbg(spcm, substream->stream, "Entry: trigger (cmd: %d)\n", cmd);
406 spcm->pending_stop[substream->stream] = false;
417 if (spcm->stream[substream->stream].suspend_ignored) {
423 spcm->stream[substream->stream].suspend_ignored = false;
437 spcm->stream[substream->stream].d0i3_compatible) {
438 spcm->stream[substream->stream].suspend_ignored = true;
453 spcm_err(spcm, substream->stream, "Unhandled trigger cmd %d\n", cmd);
484 spcm->pending_stop[substream->stream] = true;
492 ret = sof_pcm_stream_free(sdev, substream, spcm, substream->stream, false);
503 struct snd_sof_pcm *spcm;
521 spcm = snd_sof_find_spcm_dai(component, rtd);
522 if (!spcm)
527 spcm->stream[substream->stream].posn.host_posn);
529 spcm->stream[substream->stream].posn.dai_posn);
531 trace_sof_pcm_pointer_position(sdev, spcm, substream, host, dai);
543 struct snd_sof_pcm *spcm;
551 spcm = snd_sof_find_spcm_dai(component, rtd);
552 if (!spcm)
555 spcm_dbg(spcm, substream->stream, "Entry: open\n");
557 caps = &spcm->pcm.caps[substream->stream];
578 spcm->stream[substream->stream].posn.host_posn = 0;
579 spcm->stream[substream->stream].posn.dai_posn = 0;
580 spcm->stream[substream->stream].substream = substream;
581 spcm->prepared[substream->stream] = false;
585 spcm_err(spcm, substream->stream,
590 spcm_dbg(spcm, substream->stream, "period bytes min %zd, max %zd\n",
592 spcm_dbg(spcm, substream->stream, "period count min %d, max %d\n",
594 spcm_dbg(spcm, substream->stream, "buffer bytes max %zd\n", runtime->hw.buffer_bytes_max);
604 struct snd_sof_pcm *spcm;
611 spcm = snd_sof_find_spcm_dai(component, rtd);
612 if (!spcm)
615 spcm_dbg(spcm, substream->stream, "Entry: close\n");
619 spcm_err(spcm, substream->stream,
627 spcm->stream[substream->stream].substream = NULL;
641 struct snd_sof_pcm *spcm;
647 spcm = snd_sof_find_spcm_dai(component, rtd);
648 if (!spcm) {
654 dev_dbg(spcm->scomp->dev, "pcm%u (%s): Entry: pcm_construct\n",
655 spcm->pcm.pcm_id, spcm->pcm.pcm_name);
658 if (!spcm->pcm.playback)
661 caps = &spcm->pcm.caps[stream];
664 spcm_err(spcm, stream, "NULL playback substream!\n");
669 spcm_dbg(spcm, stream, "allocate %s playback DMA buffer size 0x%x max 0x%x\n",
697 if (!spcm->pcm.capture)
700 caps = &spcm->pcm.caps[stream];
703 spcm_err(spcm, stream, "NULL capture substream!\n");
708 spcm_dbg(spcm, stream, "allocate %s capture DMA buffer size 0x%x max 0x%x\n",