Lines Matching refs:pcm_data
74 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_hw_params() local
80 dev_dbg(rtd->dev, "PCM: hw_params, pcm_data %p\n", pcm_data); in sst_byt_pcm_hw_params()
82 ret = sst_byt_stream_type(byt, pcm_data->stream, in sst_byt_pcm_hw_params()
90 ret = sst_byt_stream_set_rate(byt, pcm_data->stream, rate); in sst_byt_pcm_hw_params()
97 ret = sst_byt_stream_set_bits(byt, pcm_data->stream, bits); in sst_byt_pcm_hw_params()
105 ret = sst_byt_stream_set_channels(byt, pcm_data->stream, channels); in sst_byt_pcm_hw_params()
114 ret = sst_byt_stream_buffer(byt, pcm_data->stream, in sst_byt_pcm_hw_params()
122 ret = sst_byt_stream_commit(byt, pcm_data->stream); in sst_byt_pcm_hw_params()
146 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_restore_stream_context() local
151 ret = sst_byt_stream_commit(byt, pcm_data->stream); in sst_byt_pcm_restore_stream_context()
157 sst_byt_stream_start(byt, pcm_data->stream, pcm_data->hw_ptr); in sst_byt_pcm_restore_stream_context()
160 pcm_data->hw_ptr); in sst_byt_pcm_restore_stream_context()
167 struct sst_byt_pcm_data *pcm_data = in sst_byt_pcm_work() local
170 if (snd_pcm_running(pcm_data->substream)) in sst_byt_pcm_work()
171 sst_byt_pcm_restore_stream_context(pcm_data->substream); in sst_byt_pcm_work()
179 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_trigger() local
186 pcm_data->hw_ptr = 0; in sst_byt_pcm_trigger()
187 sst_byt_stream_start(byt, pcm_data->stream, 0); in sst_byt_pcm_trigger()
191 schedule_work(&pcm_data->work); in sst_byt_pcm_trigger()
193 sst_byt_stream_resume(byt, pcm_data->stream); in sst_byt_pcm_trigger()
196 sst_byt_stream_resume(byt, pcm_data->stream); in sst_byt_pcm_trigger()
199 sst_byt_stream_stop(byt, pcm_data->stream); in sst_byt_pcm_trigger()
204 sst_byt_stream_pause(byt, pcm_data->stream); in sst_byt_pcm_trigger()
215 struct sst_byt_pcm_data *pcm_data = data; in byt_notify_pointer() local
216 struct snd_pcm_substream *substream = pcm_data->substream; in byt_notify_pointer()
224 hw_pos = sst_byt_get_dsp_position(byt, pcm_data->stream, in byt_notify_pointer()
226 pcm_data->hw_ptr = hw_pos; in byt_notify_pointer()
243 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_pointer() local
245 dev_dbg(rtd->dev, "PCM: DMA pointer %u bytes\n", pcm_data->hw_ptr); in sst_byt_pcm_pointer()
247 return bytes_to_frames(runtime, pcm_data->hw_ptr); in sst_byt_pcm_pointer()
255 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_open() local
260 mutex_lock(&pcm_data->mutex); in sst_byt_pcm_open()
262 pcm_data->substream = substream; in sst_byt_pcm_open()
266 pcm_data->stream = sst_byt_stream_new(byt, substream->stream + 1, in sst_byt_pcm_open()
267 byt_notify_pointer, pcm_data); in sst_byt_pcm_open()
268 if (pcm_data->stream == NULL) { in sst_byt_pcm_open()
270 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_open()
274 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_open()
283 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_close() local
289 cancel_work_sync(&pcm_data->work); in sst_byt_pcm_close()
290 mutex_lock(&pcm_data->mutex); in sst_byt_pcm_close()
291 ret = sst_byt_stream_free(byt, pcm_data->stream); in sst_byt_pcm_close()
296 pcm_data->stream = NULL; in sst_byt_pcm_close()
299 mutex_unlock(&pcm_data->mutex); in sst_byt_pcm_close()