Lines Matching refs:spcm

1121 static int spcm_bind(struct snd_soc_component *scomp, struct snd_sof_pcm *spcm,  in spcm_bind()  argument
1127 spcm->pcm.caps[dir].name, in spcm_bind()
1134 spcm->stream[dir].comp_id = host_widget->comp_id; in spcm_bind()
1495 struct snd_sof_pcm *spcm; in sof_dai_load() local
1503 spcm = kzalloc(sizeof(*spcm), GFP_KERNEL); in sof_dai_load()
1504 if (!spcm) in sof_dai_load()
1507 spcm->scomp = scomp; in sof_dai_load()
1510 spcm->stream[stream].comp_id = COMP_ID_UNASSIGNED; in sof_dai_load()
1512 snd_sof_compr_init_elapsed_work(&spcm->stream[stream].period_elapsed_work); in sof_dai_load()
1514 snd_sof_pcm_init_elapsed_work(&spcm->stream[stream].period_elapsed_work); in sof_dai_load()
1517 spcm->pcm = *pcm; in sof_dai_load()
1520 dai_drv->dobj.private = spcm; in sof_dai_load()
1521 list_add(&spcm->list, &sdev->pcm_list); in sof_dai_load()
1523 ret = sof_parse_tokens(scomp, spcm, stream_tokens, in sof_dai_load()
1533 if (!spcm->pcm.playback) in sof_dai_load()
1538 caps = &spcm->pcm.caps[stream]; in sof_dai_load()
1542 PAGE_SIZE, &spcm->stream[stream].page_table); in sof_dai_load()
1551 ret = spcm_bind(scomp, spcm, stream); in sof_dai_load()
1562 if (!spcm->pcm.capture) in sof_dai_load()
1565 caps = &spcm->pcm.caps[stream]; in sof_dai_load()
1569 PAGE_SIZE, &spcm->stream[stream].page_table); in sof_dai_load()
1577 ret = spcm_bind(scomp, spcm, stream); in sof_dai_load()
1581 snd_dma_free_pages(&spcm->stream[stream].page_table); in sof_dai_load()
1588 if (spcm->pcm.playback) in sof_dai_load()
1589 snd_dma_free_pages(&spcm->stream[SNDRV_PCM_STREAM_PLAYBACK].page_table); in sof_dai_load()
1597 struct snd_sof_pcm *spcm = dobj->private; in sof_dai_unload() local
1600 if (spcm->pcm.playback) in sof_dai_unload()
1601 snd_dma_free_pages(&spcm->stream[SNDRV_PCM_STREAM_PLAYBACK].page_table); in sof_dai_unload()
1603 if (spcm->pcm.capture) in sof_dai_unload()
1604 snd_dma_free_pages(&spcm->stream[SNDRV_PCM_STREAM_CAPTURE].page_table); in sof_dai_unload()
1607 list_del(&spcm->list); in sof_dai_unload()
1608 kfree(spcm); in sof_dai_unload()