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