16 #include <linux/device.h>
20 #include <linux/module.h>
22 #include <linux/slab.h>
32 #include <mach/irqs.h>
64 iprtd->
offset = regs.ARM_r8 & 0xffff;
66 iprtd->
offset = regs.ARM_r9 & 0xffff;
77 if (delta >= iprtd->
period) {
82 hrtimer_forward_now(hrt, ns_to_ktime(iprtd->
poll_time_ns));
99 iprtd->
period = params_period_bytes(params) ;
104 snd_pcm_set_runtime_buffer(substream, &substream->
dma_buffer);
126 static int fiq_enable;
127 static int imx_pcm_fiq;
141 if (++fiq_enable == 1)
151 if (--fiq_enable == 0)
182 .period_bytes_min = 128,
183 .period_bytes_max = 16 * 1024,
204 iprtd->
hrt.function = snd_hrtimer_callback;
230 .open = snd_imx_open,
231 .close = snd_imx_close,
233 .hw_params = snd_imx_pcm_hw_params,
234 .prepare = snd_imx_pcm_prepare,
235 .trigger = snd_imx_pcm_trigger,
236 .pointer = snd_imx_pcm_pointer,
240 static int ssi_irq = 0;
267 &imx_ssi_fiq_end - &imx_ssi_fiq_start);
272 static void imx_pcm_fiq_free(
struct snd_pcm *pcm)
281 .pcm_new = imx_pcm_fiq_new,
282 .pcm_free = imx_pcm_fiq_free,
287 struct imx_ssi *
ssi = platform_get_drvdata(pdev);
292 dev_err(&pdev->
dev,
"failed to claim fiq: %d", ret);
299 imx_pcm_fiq = ssi->
irq;
308 goto failed_register;
327 .name =
"imx-fiq-pcm-audio",
331 .probe = imx_soc_platform_probe,