Lines Matching refs:pcm_data

75 	struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];  in sst_byt_pcm_hw_params()  local
81 dev_dbg(rtd->dev, "PCM: hw_params, pcm_data %p\n", pcm_data); in sst_byt_pcm_hw_params()
83 ret = sst_byt_stream_type(byt, pcm_data->stream, in sst_byt_pcm_hw_params()
91 ret = sst_byt_stream_set_rate(byt, pcm_data->stream, rate); in sst_byt_pcm_hw_params()
98 ret = sst_byt_stream_set_bits(byt, pcm_data->stream, bits); in sst_byt_pcm_hw_params()
106 ret = sst_byt_stream_set_channels(byt, pcm_data->stream, channels); in sst_byt_pcm_hw_params()
115 ret = sst_byt_stream_buffer(byt, pcm_data->stream, in sst_byt_pcm_hw_params()
123 ret = sst_byt_stream_commit(byt, pcm_data->stream); in sst_byt_pcm_hw_params()
147 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_restore_stream_context() local
152 ret = sst_byt_stream_commit(byt, pcm_data->stream); in sst_byt_pcm_restore_stream_context()
158 sst_byt_stream_start(byt, pcm_data->stream, pcm_data->hw_ptr); in sst_byt_pcm_restore_stream_context()
161 pcm_data->hw_ptr); in sst_byt_pcm_restore_stream_context()
168 struct sst_byt_pcm_data *pcm_data = in sst_byt_pcm_work() local
171 if (snd_pcm_running(pcm_data->substream)) in sst_byt_pcm_work()
172 sst_byt_pcm_restore_stream_context(pcm_data->substream); in sst_byt_pcm_work()
180 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_trigger() local
187 pcm_data->hw_ptr = 0; in sst_byt_pcm_trigger()
188 sst_byt_stream_start(byt, pcm_data->stream, 0); in sst_byt_pcm_trigger()
192 schedule_work(&pcm_data->work); in sst_byt_pcm_trigger()
194 sst_byt_stream_resume(byt, pcm_data->stream); in sst_byt_pcm_trigger()
197 sst_byt_stream_resume(byt, pcm_data->stream); in sst_byt_pcm_trigger()
200 sst_byt_stream_stop(byt, pcm_data->stream); in sst_byt_pcm_trigger()
205 sst_byt_stream_pause(byt, pcm_data->stream); in sst_byt_pcm_trigger()
216 struct sst_byt_pcm_data *pcm_data = data; in byt_notify_pointer() local
217 struct snd_pcm_substream *substream = pcm_data->substream; in byt_notify_pointer()
225 hw_pos = sst_byt_get_dsp_position(byt, pcm_data->stream, in byt_notify_pointer()
227 pcm_data->hw_ptr = hw_pos; in byt_notify_pointer()
244 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_pointer() local
246 dev_dbg(rtd->dev, "PCM: DMA pointer %u bytes\n", pcm_data->hw_ptr); in sst_byt_pcm_pointer()
248 return bytes_to_frames(runtime, pcm_data->hw_ptr); in sst_byt_pcm_pointer()
256 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_open() local
261 mutex_lock(&pcm_data->mutex); in sst_byt_pcm_open()
263 pcm_data->substream = substream; in sst_byt_pcm_open()
267 pcm_data->stream = sst_byt_stream_new(byt, substream->stream + 1, in sst_byt_pcm_open()
268 byt_notify_pointer, pcm_data); in sst_byt_pcm_open()
269 if (pcm_data->stream == NULL) { in sst_byt_pcm_open()
271 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_open()
275 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_open()
284 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_close() local
290 cancel_work_sync(&pcm_data->work); in sst_byt_pcm_close()
291 mutex_lock(&pcm_data->mutex); in sst_byt_pcm_close()
292 ret = sst_byt_stream_free(byt, pcm_data->stream); in sst_byt_pcm_close()
297 pcm_data->stream = NULL; in sst_byt_pcm_close()
300 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_close()