• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/sound/soc/imx/

Lines Matching refs:iprtd

50 	struct imx_pcm_runtime_data *iprtd =
52 struct snd_pcm_substream *substream = iprtd->substream;
57 if (!atomic_read(&iprtd->running))
63 iprtd->offset = regs.ARM_r8 & 0xffff;
65 iprtd->offset = regs.ARM_r9 & 0xffff;
68 if (iprtd->offset >= iprtd->last_offset)
69 delta = iprtd->offset - iprtd->last_offset;
71 delta = runtime->buffer_size + iprtd->offset
72 - iprtd->last_offset;
76 if (delta >= iprtd->period) {
78 iprtd->last_offset = iprtd->offset;
81 hrtimer_forward_now(hrt, ns_to_ktime(iprtd->poll_time_ns));
94 struct imx_pcm_runtime_data *iprtd = runtime->private_data;
96 iprtd->size = params_buffer_bytes(params);
97 iprtd->periods = params_periods(params);
98 iprtd->period = params_period_bytes(params) ;
99 iprtd->offset = 0;
100 iprtd->last_offset = 0;
101 iprtd->poll_time_ns = 1000000000 / params_rate(params) *
111 struct imx_pcm_runtime_data *iprtd = runtime->private_data;
116 regs.ARM_r8 = (iprtd->period * iprtd->periods - 1) << 16;
118 regs.ARM_r9 = (iprtd->period * iprtd->periods - 1) << 16;
131 struct imx_pcm_runtime_data *iprtd = runtime->private_data;
137 atomic_set(&iprtd->running, 1);
138 hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns),
148 atomic_set(&iprtd->running, 0);
164 struct imx_pcm_runtime_data *iprtd = runtime->private_data;
166 return bytes_to_frames(substream->runtime, iprtd->offset);
191 struct imx_pcm_runtime_data *iprtd;
194 iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL);
195 if (iprtd == NULL)
197 runtime->private_data = iprtd;
199 iprtd->substream = substream;
201 atomic_set(&iprtd->running, 0);
202 hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
203 iprtd->hrt.function = snd_hrtimer_callback;
208 kfree(iprtd);
219 struct imx_pcm_runtime_data *iprtd = runtime->private_data;
221 hrtimer_cancel(&iprtd->hrt);
223 kfree(iprtd);