Lines Matching full:dpcm

427 	struct snd_card_asihpi_pcm *dpcm = runtime->private_data;  in snd_card_asihpi_pcm_hw_params()  local
439 hpi_handle_error(hpi_format_create(&dpcm->format, in snd_card_asihpi_pcm_hw_params()
444 if (hpi_instream_reset(dpcm->h_stream) != 0) in snd_card_asihpi_pcm_hw_params()
448 dpcm->h_stream, &dpcm->format) != 0) in snd_card_asihpi_pcm_hw_params()
452 dpcm->hpi_buffer_attached = 0; in snd_card_asihpi_pcm_hw_params()
454 err = hpi_stream_host_buffer_attach(dpcm->h_stream, in snd_card_asihpi_pcm_hw_params()
467 err = hpi_stream_get_info_ex(dpcm->h_stream, NULL, in snd_card_asihpi_pcm_hw_params()
468 &dpcm->hpi_buffer_attached, NULL, NULL, NULL); in snd_card_asihpi_pcm_hw_params()
477 dpcm->bytes_per_sec = bytes_per_sec; in snd_card_asihpi_pcm_hw_params()
478 dpcm->buffer_bytes = params_buffer_bytes(params); in snd_card_asihpi_pcm_hw_params()
479 dpcm->period_bytes = params_period_bytes(params); in snd_card_asihpi_pcm_hw_params()
488 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_hw_free() local
489 if (dpcm->hpi_buffer_attached) in snd_card_asihpi_hw_free()
490 hpi_stream_host_buffer_detach(dpcm->h_stream); in snd_card_asihpi_hw_free()
497 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_runtime_free() local
498 kfree(dpcm); in snd_card_asihpi_runtime_free()
505 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_start() local
511 mod_timer(&dpcm->timer, jiffies + expiry); in snd_card_asihpi_pcm_timer_start()
512 dpcm->respawn_timer = 1; in snd_card_asihpi_pcm_timer_start()
518 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_stop() local
520 dpcm->respawn_timer = 0; in snd_card_asihpi_pcm_timer_stop()
521 del_timer(&dpcm->timer); in snd_card_asihpi_pcm_timer_stop()
526 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_pcm_int_start() local
529 dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data; in snd_card_asihpi_pcm_int_start()
533 card->llmode_streampriv = dpcm; in snd_card_asihpi_pcm_int_start()
555 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_trigger() local
598 dpcm->h_stream, in snd_card_asihpi_trigger()
613 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
638 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
641 hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
644 hpi_handle_error(hpi_stream_group_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
650 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
655 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
712 struct snd_card_asihpi_pcm *dpcm = from_timer(dpcm, t, timer); in snd_card_asihpi_timer_function() local
713 struct snd_pcm_substream *substream = dpcm->substream; in snd_card_asihpi_timer_function()
805 remdata = newdata % dpcm->period_bytes; in snd_card_asihpi_timer_function()
811 if (xfercount && (on_card_bytes > dpcm->period_bytes)) in snd_card_asihpi_timer_function()
812 next_jiffies = ((on_card_bytes - dpcm->period_bytes) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
814 next_jiffies = ((dpcm->period_bytes - remdata) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
817 dpcm->timer.expires = jiffies + next_jiffies; in snd_card_asihpi_timer_function()
894 if (!card->hpi->interrupt_mode && dpcm->respawn_timer) in snd_card_asihpi_timer_function()
895 add_timer(&dpcm->timer); in snd_card_asihpi_timer_function()
914 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_prepare() local
916 hpi_handle_error(hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_playback_prepare()
917 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_playback_prepare()
918 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
919 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
927 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_pointer() local
932 ptr = bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_playback_pointer()
973 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_playback_open() local
978 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_playback_open()
979 if (dpcm == NULL) in snd_card_asihpi_playback_open()
983 substream->number, &dpcm->h_stream); in snd_card_asihpi_playback_open()
986 kfree(dpcm); in snd_card_asihpi_playback_open()
997 timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0); in snd_card_asihpi_playback_open()
998 dpcm->substream = substream; in snd_card_asihpi_playback_open()
999 runtime->private_data = dpcm; in snd_card_asihpi_playback_open()
1023 snd_card_asihpi_playback_formats(card, dpcm->h_stream); in snd_card_asihpi_playback_open()
1061 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_close() local
1063 hpi_handle_error(hpi_outstream_close(dpcm->h_stream)); in snd_card_asihpi_playback_close()
1082 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_pointer() local
1086 asihpi_dbg("%s, pointer=%d\n", name, dpcm->pcm_buf_dma_ofs); in snd_card_asihpi_capture_pointer()
1091 return bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_capture_pointer()
1097 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_prepare() local
1099 hpi_handle_error(hpi_instream_reset(dpcm->h_stream)); in snd_card_asihpi_capture_prepare()
1100 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_capture_prepare()
1101 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1102 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1144 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_capture_open() local
1148 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_capture_open()
1149 if (dpcm == NULL) in snd_card_asihpi_capture_open()
1158 substream->number, &dpcm->h_stream)); in snd_card_asihpi_capture_open()
1160 kfree(dpcm); in snd_card_asihpi_capture_open()
1166 timer_setup(&dpcm->timer, snd_card_asihpi_timer_function, 0); in snd_card_asihpi_capture_open()
1167 dpcm->substream = substream; in snd_card_asihpi_capture_open()
1168 runtime->private_data = dpcm; in snd_card_asihpi_capture_open()
1191 snd_card_asihpi_capture_formats(card, dpcm->h_stream); in snd_card_asihpi_capture_open()
1220 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_capture_close() local
1222 hpi_handle_error(hpi_instream_close(dpcm->h_stream)); in snd_card_asihpi_capture_close()