Lines Matching refs:dpcm
455 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_hw_params() local
470 hpi_handle_error(hpi_format_create(&dpcm->format, in snd_card_asihpi_pcm_hw_params()
475 if (hpi_instream_reset(dpcm->h_stream) != 0) in snd_card_asihpi_pcm_hw_params()
479 dpcm->h_stream, &dpcm->format) != 0) in snd_card_asihpi_pcm_hw_params()
483 dpcm->hpi_buffer_attached = 0; in snd_card_asihpi_pcm_hw_params()
485 err = hpi_stream_host_buffer_attach(dpcm->h_stream, in snd_card_asihpi_pcm_hw_params()
498 err = hpi_stream_get_info_ex(dpcm->h_stream, NULL, in snd_card_asihpi_pcm_hw_params()
499 &dpcm->hpi_buffer_attached, NULL, NULL, NULL); in snd_card_asihpi_pcm_hw_params()
508 dpcm->bytes_per_sec = bytes_per_sec; in snd_card_asihpi_pcm_hw_params()
509 dpcm->buffer_bytes = params_buffer_bytes(params); in snd_card_asihpi_pcm_hw_params()
510 dpcm->period_bytes = params_period_bytes(params); in snd_card_asihpi_pcm_hw_params()
519 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_hw_free() local
520 if (dpcm->hpi_buffer_attached) in snd_card_asihpi_hw_free()
521 hpi_stream_host_buffer_detach(dpcm->h_stream); in snd_card_asihpi_hw_free()
529 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_runtime_free() local
530 kfree(dpcm); in snd_card_asihpi_runtime_free()
537 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_start() local
543 mod_timer(&dpcm->timer, jiffies + expiry); in snd_card_asihpi_pcm_timer_start()
544 dpcm->respawn_timer = 1; in snd_card_asihpi_pcm_timer_start()
550 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_pcm_timer_stop() local
552 dpcm->respawn_timer = 0; in snd_card_asihpi_pcm_timer_stop()
553 del_timer(&dpcm->timer); in snd_card_asihpi_pcm_timer_stop()
558 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_pcm_int_start() local
563 dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data; in snd_card_asihpi_pcm_int_start()
568 card->llmode_streampriv = dpcm; in snd_card_asihpi_pcm_int_start()
578 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_pcm_int_stop() local
583 dpcm = (struct snd_card_asihpi_pcm *)substream->runtime->private_data; in snd_card_asihpi_pcm_int_stop()
601 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_trigger() local
644 dpcm->h_stream, in snd_card_asihpi_trigger()
659 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
684 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
687 hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
690 hpi_handle_error(hpi_stream_group_reset(dpcm->h_stream)); in snd_card_asihpi_trigger()
696 hpi_handle_error(hpi_stream_start(dpcm->h_stream)); in snd_card_asihpi_trigger()
701 hpi_handle_error(hpi_stream_stop(dpcm->h_stream)); in snd_card_asihpi_trigger()
758 struct snd_card_asihpi_pcm *dpcm = (struct snd_card_asihpi_pcm *)data; in snd_card_asihpi_timer_function() local
759 struct snd_pcm_substream *substream = dpcm->substream; in snd_card_asihpi_timer_function()
852 remdata = newdata % dpcm->period_bytes; in snd_card_asihpi_timer_function()
858 if (xfercount && (on_card_bytes > dpcm->period_bytes)) in snd_card_asihpi_timer_function()
859 next_jiffies = ((on_card_bytes - dpcm->period_bytes) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
861 next_jiffies = ((dpcm->period_bytes - remdata) * HZ / dpcm->bytes_per_sec); in snd_card_asihpi_timer_function()
864 dpcm->timer.expires = jiffies + next_jiffies; in snd_card_asihpi_timer_function()
942 if (!card->hpi->interrupt_mode && dpcm->respawn_timer) in snd_card_asihpi_timer_function()
943 add_timer(&dpcm->timer); in snd_card_asihpi_timer_function()
981 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_prepare() local
985 hpi_handle_error(hpi_outstream_reset(dpcm->h_stream)); in snd_card_asihpi_playback_prepare()
986 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_playback_prepare()
987 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
988 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_playback_prepare()
996 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_pointer() local
1001 ptr = bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_playback_pointer()
1042 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_playback_open() local
1047 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_playback_open()
1048 if (dpcm == NULL) in snd_card_asihpi_playback_open()
1052 substream->number, &dpcm->h_stream); in snd_card_asihpi_playback_open()
1055 kfree(dpcm); in snd_card_asihpi_playback_open()
1066 setup_timer(&dpcm->timer, snd_card_asihpi_timer_function, in snd_card_asihpi_playback_open()
1067 (unsigned long) dpcm); in snd_card_asihpi_playback_open()
1068 dpcm->substream = substream; in snd_card_asihpi_playback_open()
1069 runtime->private_data = dpcm; in snd_card_asihpi_playback_open()
1093 snd_card_asihpi_playback_formats(card, dpcm->h_stream); in snd_card_asihpi_playback_open()
1133 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_playback_close() local
1135 hpi_handle_error(hpi_outstream_close(dpcm->h_stream)); in snd_card_asihpi_playback_close()
1157 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_pointer() local
1161 snd_printddd("%s, pointer=%d\n", name, dpcm->pcm_buf_dma_ofs); in snd_card_asihpi_capture_pointer()
1166 return bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes); in snd_card_asihpi_capture_pointer()
1178 struct snd_card_asihpi_pcm *dpcm = runtime->private_data; in snd_card_asihpi_capture_prepare() local
1180 hpi_handle_error(hpi_instream_reset(dpcm->h_stream)); in snd_card_asihpi_capture_prepare()
1181 dpcm->pcm_buf_host_rw_ofs = 0; in snd_card_asihpi_capture_prepare()
1182 dpcm->pcm_buf_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1183 dpcm->pcm_buf_elapsed_dma_ofs = 0; in snd_card_asihpi_capture_prepare()
1226 struct snd_card_asihpi_pcm *dpcm; in snd_card_asihpi_capture_open() local
1230 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); in snd_card_asihpi_capture_open()
1231 if (dpcm == NULL) in snd_card_asihpi_capture_open()
1239 substream->number, &dpcm->h_stream)); in snd_card_asihpi_capture_open()
1241 kfree(dpcm); in snd_card_asihpi_capture_open()
1247 setup_timer(&dpcm->timer, snd_card_asihpi_timer_function, in snd_card_asihpi_capture_open()
1248 (unsigned long) dpcm); in snd_card_asihpi_capture_open()
1249 dpcm->substream = substream; in snd_card_asihpi_capture_open()
1250 runtime->private_data = dpcm; in snd_card_asihpi_capture_open()
1273 snd_card_asihpi_capture_formats(card, dpcm->h_stream); in snd_card_asihpi_capture_open()
1302 struct snd_card_asihpi_pcm *dpcm = substream->runtime->private_data; in snd_card_asihpi_capture_close() local
1304 hpi_handle_error(hpi_instream_close(dpcm->h_stream)); in snd_card_asihpi_capture_close()