Lines Matching full:pcm
74 /* use the same workqueue-based solution as for PCM, cf. snd_sof_pcm_elapsed */ in snd_sof_compr_fragment_elapsed()
172 struct sof_ipc_pcm_params *pcm; in sof_compr_set_params() local
195 if (sizeof(*pcm) + ext_data_size > sdev->ipc->max_payload_size) in sof_compr_set_params()
198 pcm = kzalloc(sizeof(*pcm) + ext_data_size, GFP_KERNEL); in sof_compr_set_params()
199 if (!pcm) in sof_compr_set_params()
212 pcm->params.buffer.pages = PFN_UP(crtd->dma_bytes); in sof_compr_set_params()
213 pcm->hdr.size = sizeof(*pcm) + ext_data_size; in sof_compr_set_params()
214 pcm->hdr.cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_PCM_PARAMS; in sof_compr_set_params()
216 pcm->comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_set_params()
217 pcm->params.hdr.size = sizeof(pcm->params) + ext_data_size; in sof_compr_set_params()
218 pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; in sof_compr_set_params()
219 pcm->params.buffer.size = crtd->dma_bytes; in sof_compr_set_params()
220 pcm->params.direction = cstream->direction; in sof_compr_set_params()
221 pcm->params.channels = params->codec.ch_out; in sof_compr_set_params()
222 pcm->params.rate = params->codec.sample_rate; in sof_compr_set_params()
223 pcm->params.buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED; in sof_compr_set_params()
224 pcm->params.frame_fmt = SOF_IPC_FRAME_S32_LE; in sof_compr_set_params()
225 pcm->params.sample_container_bytes = in sof_compr_set_params()
227 pcm->params.host_period_bytes = params->buffer.fragment_size; in sof_compr_set_params()
228 pcm->params.ext_data_length = ext_data_size; in sof_compr_set_params()
230 memcpy((u8 *)pcm->params.ext_data, ¶ms->codec, ext_data_size); in sof_compr_set_params()
232 ret = sof_ipc_tx_message(sdev->ipc, pcm, sizeof(*pcm) + ext_data_size, in sof_compr_set_params()
243 spcm->pcm.pcm_id); in sof_compr_set_params()
249 sstream->sample_container_bytes = pcm->params.sample_container_bytes; in sof_compr_set_params()
254 kfree(pcm); in sof_compr_set_params()