Lines Matching full:dpcm

434 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;  in snd_card_asihpi_pcm_hw_params()  local
446 hpi_handle_error(hpi_format_create(&dpcm->format, in snd_card_asihpi_pcm_hw_params()
451 if (hpi_instream_reset(dpcm->h_stream) != 0) in snd_card_asihpi_pcm_hw_params()
455 dpcm->h_stream, &dpcm->format) != 0) in snd_card_asihpi_pcm_hw_params()
459 dpcm->hpi_buffer_attached = 0; in snd_card_asihpi_pcm_hw_params()
461 err = hpi_stream_host_buffer_attach(dpcm->h_stream, in snd_card_asihpi_pcm_hw_params()
474 err = hpi_stream_get_info_ex(dpcm->h_stream, NULL, in snd_card_asihpi_pcm_hw_params()
475 &dpcm->hpi_buffer_attached, NULL, NULL, NULL); in snd_card_asihpi_pcm_hw_params()
484 dpcm->bytes_per_sec = bytes_per_sec; in snd_card_asihpi_pcm_hw_params()
485 dpcm->buffer_bytes = params_buffer_bytes(params); in snd_card_asihpi_pcm_hw_params()
486 dpcm->period_bytes = params_period_bytes(params); in snd_card_asihpi_pcm_hw_params()
495 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_hw_free() local
496 if (dpcm->hpi_buffer_attached) in snd_card_asihpi_hw_free()
497 hpi_stream_host_buffer_detach(dpcm->h_stream); in snd_card_asihpi_hw_free()
504 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_runtime_free() local
505 kfree(dpcm); in snd_card_asihpi_runtime_free()
512 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_start() local
518 mod_timer(&dpcm->timer, jiffies + expiry); in snd_card_asihpi_pcm_timer_start()
519 dpcm->respawn_timer = 1; in snd_card_asihpi_pcm_timer_start()
525 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_stop() local
527 dpcm->respawn_timer = 0; in snd_card_asihpi_pcm_timer_stop()
528 del_timer(&dpcm->timer); in snd_card_asihpi_pcm_timer_stop()
533 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_pcm_int_start() local
536 dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data; in snd_card_asihpi_pcm_int_start()
540 card->llmode_streampriv = dpcm; in snd_card_asihpi_pcm_int_start()
562 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_trigger() local
605 dpcm->h_stream, in snd_card_asihpi_trigger()
620 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
645 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
648 hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
651 hpi_handle_error(hpi_stream_group_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
657 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
662 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
719 struct snd_card_asihpi_pcm *dpcm = from_timer(dpcm, t, timer); in snd_card_asihpi_timer_function() local
720 struct snd_pcm_substream *substream = dpcm->substream; in snd_card_asihpi_timer_function()
811 remdata = newdata % dpcm->period_bytes; in snd_card_asihpi_timer_function()
817 if (xfercount && (on_card_bytes > dpcm->period_bytes)) in snd_card_asihpi_timer_function()
818 next_jiffies = ((on_card_bytes - dpcm->period_bytes) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
820 next_jiffies = ((dpcm->period_bytes - remdata) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
823 dpcm->timer.expires = jiffies + next_jiffies; in snd_card_asihpi_timer_function()
900 if (!card->hpi->interrupt_mode && dpcm->respawn_timer) in snd_card_asihpi_timer_function()
901 add_timer(&dpcm->timer); in snd_card_asihpi_timer_function()
920 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_prepare() local
924 hpi_handle_error(hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_playback_prepare()
925 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_playback_prepare()
926 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
927 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
935 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_pointer() local
940 ptr = bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_playback_pointer()
981 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_playback_open() local
986 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_playback_open()
987 if (dpcm == NULL) in snd_card_asihpi_playback_open()
991 substream->number, &dpcm->h_stream); in snd_card_asihpi_playback_open()
994 kfree(dpcm); in snd_card_asihpi_playback_open()
1005 timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0); in snd_card_asihpi_playback_open()
1006 dpcm->substream = substream; in snd_card_asihpi_playback_open()
1007 runtime->private_data = dpcm; in snd_card_asihpi_playback_open()
1031 snd_card_asihpi_playback_formats(card, dpcm->h_stream); in snd_card_asihpi_playback_open()
1071 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_close() local
1073 hpi_handle_error(hpi_outstream_close(dpcm->h_stream)); in snd_card_asihpi_playback_close()
1094 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_pointer() local
1098 snd_printddd("%s, pointer=%d\n", name, dpcm->pcm_buf_dma_ofs); in snd_card_asihpi_capture_pointer()
1103 return bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_capture_pointer()
1109 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_prepare() local
1111 hpi_handle_error(hpi_instream_reset(dpcm->h_stream)); in snd_card_asihpi_capture_prepare()
1112 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_capture_prepare()
1113 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1114 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1157 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_capture_open() local
1161 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_capture_open()
1162 if (dpcm == NULL) in snd_card_asihpi_capture_open()
1170 substream->number, &dpcm->h_stream)); in snd_card_asihpi_capture_open()
1172 kfree(dpcm); in snd_card_asihpi_capture_open()
1178 timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0); in snd_card_asihpi_capture_open()
1179 dpcm->substream = substream; in snd_card_asihpi_capture_open()
1180 runtime->private_data = dpcm; in snd_card_asihpi_capture_open()
1203 snd_card_asihpi_capture_formats(card, dpcm->h_stream); in snd_card_asihpi_capture_open()
1232 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_capture_close() local
1234 hpi_handle_error(hpi_instream_close(dpcm->h_stream)); in snd_card_asihpi_capture_close()