Lines Matching refs:iprtd

46 	struct imx_pcm_runtime_data *iprtd =  in snd_hrtimer_callback()  local
48 struct snd_pcm_substream *substream = iprtd->substream; in snd_hrtimer_callback()
51 if (!atomic_read(&iprtd->playing) && !atomic_read(&iprtd->capturing)) in snd_hrtimer_callback()
57 iprtd->offset = regs.ARM_r8 & 0xffff; in snd_hrtimer_callback()
59 iprtd->offset = regs.ARM_r9 & 0xffff; in snd_hrtimer_callback()
63 hrtimer_forward_now(hrt, ns_to_ktime(iprtd->poll_time_ns)); in snd_hrtimer_callback()
77 struct imx_pcm_runtime_data *iprtd = runtime->private_data; in snd_imx_pcm_hw_params() local
79 iprtd->periods = params_periods(params); in snd_imx_pcm_hw_params()
80 iprtd->period = params_period_bytes(params); in snd_imx_pcm_hw_params()
81 iprtd->offset = 0; in snd_imx_pcm_hw_params()
82 iprtd->poll_time_ns = 1000000000 / params_rate(params) * in snd_imx_pcm_hw_params()
92 struct imx_pcm_runtime_data *iprtd = runtime->private_data; in snd_imx_pcm_prepare() local
97 regs.ARM_r8 = (iprtd->period * iprtd->periods - 1) << 16; in snd_imx_pcm_prepare()
99 regs.ARM_r9 = (iprtd->period * iprtd->periods - 1) << 16; in snd_imx_pcm_prepare()
112 struct imx_pcm_runtime_data *iprtd = runtime->private_data; in snd_imx_pcm_trigger() local
119 atomic_set(&iprtd->playing, 1); in snd_imx_pcm_trigger()
121 atomic_set(&iprtd->capturing, 1); in snd_imx_pcm_trigger()
122 hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns), in snd_imx_pcm_trigger()
131 atomic_set(&iprtd->playing, 0); in snd_imx_pcm_trigger()
133 atomic_set(&iprtd->capturing, 0); in snd_imx_pcm_trigger()
134 if (!atomic_read(&iprtd->playing) && in snd_imx_pcm_trigger()
135 !atomic_read(&iprtd->capturing)) in snd_imx_pcm_trigger()
151 struct imx_pcm_runtime_data *iprtd = runtime->private_data; in snd_imx_pcm_pointer() local
153 return bytes_to_frames(substream->runtime, iprtd->offset); in snd_imx_pcm_pointer()
176 struct imx_pcm_runtime_data *iprtd; in snd_imx_open() local
179 iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); in snd_imx_open()
180 if (iprtd == NULL) in snd_imx_open()
182 runtime->private_data = iprtd; in snd_imx_open()
184 iprtd->substream = substream; in snd_imx_open()
186 atomic_set(&iprtd->playing, 0); in snd_imx_open()
187 atomic_set(&iprtd->capturing, 0); in snd_imx_open()
188 hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in snd_imx_open()
189 iprtd->hrt.function = snd_hrtimer_callback; in snd_imx_open()
194 kfree(iprtd); in snd_imx_open()
206 struct imx_pcm_runtime_data *iprtd = runtime->private_data; in snd_imx_close() local
208 hrtimer_cancel(&iprtd->hrt); in snd_imx_close()
210 kfree(iprtd); in snd_imx_close()