Searched refs:iprtd (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/sound/soc/fsl/
H A Dimx-pcm-fiq.c51 struct imx_pcm_runtime_data *iprtd = snd_hrtimer_callback() local
53 struct snd_pcm_substream *substream = iprtd->substream; snd_hrtimer_callback()
56 if (!atomic_read(&iprtd->playing) && !atomic_read(&iprtd->capturing)) snd_hrtimer_callback()
62 iprtd->offset = regs.ARM_r8 & 0xffff; snd_hrtimer_callback()
64 iprtd->offset = regs.ARM_r9 & 0xffff; snd_hrtimer_callback()
68 hrtimer_forward_now(hrt, ns_to_ktime(iprtd->poll_time_ns)); snd_hrtimer_callback()
81 struct imx_pcm_runtime_data *iprtd = runtime->private_data; snd_imx_pcm_hw_params() local
83 iprtd->periods = params_periods(params); snd_imx_pcm_hw_params()
84 iprtd->period = params_period_bytes(params); snd_imx_pcm_hw_params()
85 iprtd->offset = 0; snd_imx_pcm_hw_params()
86 iprtd->poll_time_ns = 1000000000 / params_rate(params) * snd_imx_pcm_hw_params()
96 struct imx_pcm_runtime_data *iprtd = runtime->private_data; snd_imx_pcm_prepare() local
101 regs.ARM_r8 = (iprtd->period * iprtd->periods - 1) << 16; snd_imx_pcm_prepare()
103 regs.ARM_r9 = (iprtd->period * iprtd->periods - 1) << 16; snd_imx_pcm_prepare()
115 struct imx_pcm_runtime_data *iprtd = runtime->private_data; snd_imx_pcm_trigger() local
122 atomic_set(&iprtd->playing, 1); snd_imx_pcm_trigger()
124 atomic_set(&iprtd->capturing, 1); snd_imx_pcm_trigger()
125 hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns), snd_imx_pcm_trigger()
134 atomic_set(&iprtd->playing, 0); snd_imx_pcm_trigger()
136 atomic_set(&iprtd->capturing, 0); snd_imx_pcm_trigger()
137 if (!atomic_read(&iprtd->playing) && snd_imx_pcm_trigger()
138 !atomic_read(&iprtd->capturing)) snd_imx_pcm_trigger()
152 struct imx_pcm_runtime_data *iprtd = runtime->private_data; snd_imx_pcm_pointer() local
154 return bytes_to_frames(substream->runtime, iprtd->offset); snd_imx_pcm_pointer()
176 struct imx_pcm_runtime_data *iprtd; snd_imx_open() local
179 iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); snd_imx_open()
180 if (iprtd == NULL) snd_imx_open()
182 runtime->private_data = iprtd; snd_imx_open()
184 iprtd->substream = substream; snd_imx_open()
186 atomic_set(&iprtd->playing, 0); snd_imx_open()
187 atomic_set(&iprtd->capturing, 0); snd_imx_open()
188 hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); snd_imx_open()
189 iprtd->hrt.function = snd_hrtimer_callback; snd_imx_open()
194 kfree(iprtd); snd_imx_open()
205 struct imx_pcm_runtime_data *iprtd = runtime->private_data; snd_imx_close() local
207 hrtimer_cancel(&iprtd->hrt); snd_imx_close()
209 kfree(iprtd); snd_imx_close()

Completed in 74 milliseconds