Lines Matching full:dpcm

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