2 * imx-ssi.c -- ALSA Soc Audio Layer
4 * Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
6 * This code is based on code copyrighted by Freescale,
7 * Liam Girdwood, Javier Martin and probably others.
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
15 * The i.MX SSI core has some nasty limitations in AC97 mode. While most
16 * sane processor vendors have a FIFO per AC97 slot, the i.MX has only
17 * one FIFO which combines all valid receive slots. We cannot even select
18 * which slots we want to receive. The WM9712 with which this driver
19 * was developped with always sends GPIO status data in slot 12 which
20 * we receive in our (PCM-) data stream. The only chance we have is to
21 * manually skip this data in the FIQ handler. With sampling rates different
22 * from 48000Hz not every frame has valid receive data, so the ratio
23 * between pcm data and GPIO status data changes. Our FIQ handler is not
24 * able to handle this, hence this driver only works with 48000Hz sampling
26 * Reading and writing AC97 registers is another challange. The core
27 * provides us status bits when the read register is updated with *another*
28 * value. When we read the same register two times (and the register still
29 * contains the same value) these status bits are not set. We work
30 * around this by not polling these bits but only wait a fixed delay.
34 #include <linux/clk.h>
35 #include <linux/delay.h>
36 #include <linux/device.h>
37 #include <linux/dma-mapping.h>
38 #include <linux/init.h>
39 #include <linux/interrupt.h>
40 #include <linux/module.h>
41 #include <linux/platform_device.h>
42 #include <linux/slab.h>
44 #include <sound/core.h>
45 #include <sound/initval.h>
46 #include <sound/pcm.h>
47 #include <sound/pcm_params.h>
48 #include <sound/soc.h>
51 #include <mach/hardware.h>
55 #define SSI_SACNT_DEFAULT (SSI_SACNT_AC97EN | SSI_SACNT_FV)
58 * SSI Network Mode or TDM slots configuration.
59 * Should only be called when port is inactive (i.e. SSIEN = 0).
61 static int imx_ssi_set_dai_tdm_slot(struct snd_soc_dai
*cpu_dai
,
62 unsigned int tx_mask
, unsigned int rx_mask
, int slots
, int slot_width
)
64 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
67 sccr
= readl(ssi
->base
+ SSI_STCCR
);
68 sccr
&= ~SSI_STCCR_DC_MASK
;
69 sccr
|= SSI_STCCR_DC(slots
- 1);
70 writel(sccr
, ssi
->base
+ SSI_STCCR
);
72 sccr
= readl(ssi
->base
+ SSI_SRCCR
);
73 sccr
&= ~SSI_STCCR_DC_MASK
;
74 sccr
|= SSI_STCCR_DC(slots
- 1);
75 writel(sccr
, ssi
->base
+ SSI_SRCCR
);
77 writel(tx_mask
, ssi
->base
+ SSI_STMSK
);
78 writel(rx_mask
, ssi
->base
+ SSI_SRMSK
);
84 * SSI DAI format configuration.
85 * Should only be called when port is inactive (i.e. SSIEN = 0).
86 * Note: We don't use the I2S modes but instead manually configure the
87 * SSI for I2S because the I2S mode is only a register preset.
89 static int imx_ssi_set_dai_fmt(struct snd_soc_dai
*cpu_dai
, unsigned int fmt
)
91 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
94 scr
= readl(ssi
->base
+ SSI_SCR
) & ~(SSI_SCR_SYN
| SSI_SCR_NET
);
97 switch (fmt
& SND_SOC_DAIFMT_FORMAT_MASK
) {
98 case SND_SOC_DAIFMT_I2S
:
99 /* data on rising edge of bclk, frame low 1clk before data */
100 strcr
|= SSI_STCR_TFSI
| SSI_STCR_TEFS
| SSI_STCR_TXBIT0
;
103 case SND_SOC_DAIFMT_LEFT_J
:
104 /* data on rising edge of bclk, frame high with data */
105 strcr
|= SSI_STCR_TXBIT0
;
107 case SND_SOC_DAIFMT_DSP_B
:
108 /* data on rising edge of bclk, frame high with data */
109 strcr
|= SSI_STCR_TFSL
;
111 case SND_SOC_DAIFMT_DSP_A
:
112 /* data on rising edge of bclk, frame high 1clk before data */
113 strcr
|= SSI_STCR_TFSL
| SSI_STCR_TEFS
;
117 /* DAI clock inversion */
118 switch (fmt
& SND_SOC_DAIFMT_INV_MASK
) {
119 case SND_SOC_DAIFMT_IB_IF
:
120 strcr
|= SSI_STCR_TFSI
;
121 strcr
&= ~SSI_STCR_TSCKP
;
123 case SND_SOC_DAIFMT_IB_NF
:
124 strcr
&= ~(SSI_STCR_TSCKP
| SSI_STCR_TFSI
);
126 case SND_SOC_DAIFMT_NB_IF
:
127 strcr
|= SSI_STCR_TFSI
| SSI_STCR_TSCKP
;
129 case SND_SOC_DAIFMT_NB_NF
:
130 strcr
&= ~SSI_STCR_TFSI
;
131 strcr
|= SSI_STCR_TSCKP
;
135 /* DAI clock master masks */
136 switch (fmt
& SND_SOC_DAIFMT_MASTER_MASK
) {
137 case SND_SOC_DAIFMT_CBM_CFM
:
140 /* Master mode not implemented, needs handling of clocks. */
144 strcr
|= SSI_STCR_TFEN0
;
146 writel(strcr
, ssi
->base
+ SSI_STCR
);
147 writel(strcr
, ssi
->base
+ SSI_SRCR
);
148 writel(scr
, ssi
->base
+ SSI_SCR
);
154 * SSI system clock configuration.
155 * Should only be called when port is inactive (i.e. SSIEN = 0).
157 static int imx_ssi_set_dai_sysclk(struct snd_soc_dai
*cpu_dai
,
158 int clk_id
, unsigned int freq
, int dir
)
160 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
163 scr
= readl(ssi
->base
+ SSI_SCR
);
166 case IMX_SSP_SYS_CLK
:
167 if (dir
== SND_SOC_CLOCK_OUT
)
168 scr
|= SSI_SCR_SYS_CLK_EN
;
170 scr
&= ~SSI_SCR_SYS_CLK_EN
;
176 writel(scr
, ssi
->base
+ SSI_SCR
);
183 * Should only be called when port is inactive (i.e. SSIEN = 0).
185 static int imx_ssi_set_dai_clkdiv(struct snd_soc_dai
*cpu_dai
,
188 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
191 stccr
= readl(ssi
->base
+ SSI_STCCR
);
192 srccr
= readl(ssi
->base
+ SSI_SRCCR
);
195 case IMX_SSI_TX_DIV_2
:
196 stccr
&= ~SSI_STCCR_DIV2
;
199 case IMX_SSI_TX_DIV_PSR
:
200 stccr
&= ~SSI_STCCR_PSR
;
203 case IMX_SSI_TX_DIV_PM
:
205 stccr
|= SSI_STCCR_PM(div
);
207 case IMX_SSI_RX_DIV_2
:
208 stccr
&= ~SSI_STCCR_DIV2
;
211 case IMX_SSI_RX_DIV_PSR
:
212 stccr
&= ~SSI_STCCR_PSR
;
215 case IMX_SSI_RX_DIV_PM
:
217 stccr
|= SSI_STCCR_PM(div
);
223 writel(stccr
, ssi
->base
+ SSI_STCCR
);
224 writel(srccr
, ssi
->base
+ SSI_SRCCR
);
230 * Should only be called when port is inactive (i.e. SSIEN = 0),
231 * although can be called multiple times by upper layers.
233 static int imx_ssi_hw_params(struct snd_pcm_substream
*substream
,
234 struct snd_pcm_hw_params
*params
,
235 struct snd_soc_dai
*cpu_dai
)
237 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
238 struct imx_pcm_dma_params
*dma_data
;
242 if (substream
->stream
== SNDRV_PCM_STREAM_PLAYBACK
) {
244 dma_data
= &ssi
->dma_params_tx
;
247 dma_data
= &ssi
->dma_params_rx
;
250 snd_soc_dai_set_dma_data(cpu_dai
, substream
, dma_data
);
252 sccr
= readl(ssi
->base
+ reg
) & ~SSI_STCCR_WL_MASK
;
254 /* DAI data (word) size */
255 switch (params_format(params
)) {
256 case SNDRV_PCM_FORMAT_S16_LE
:
257 sccr
|= SSI_SRCCR_WL(16);
259 case SNDRV_PCM_FORMAT_S20_3LE
:
260 sccr
|= SSI_SRCCR_WL(20);
262 case SNDRV_PCM_FORMAT_S24_LE
:
263 sccr
|= SSI_SRCCR_WL(24);
267 writel(sccr
, ssi
->base
+ reg
);
272 static int imx_ssi_trigger(struct snd_pcm_substream
*substream
, int cmd
,
273 struct snd_soc_dai
*dai
)
275 struct snd_soc_pcm_runtime
*rtd
= substream
->private_data
;
276 struct snd_soc_dai
*cpu_dai
= rtd
->dai
->cpu_dai
;
277 struct imx_ssi
*ssi
= cpu_dai
->private_data
;
278 unsigned int sier_bits
, sier
;
281 scr
= readl(ssi
->base
+ SSI_SCR
);
282 sier
= readl(ssi
->base
+ SSI_SIER
);
284 if (substream
->stream
== SNDRV_PCM_STREAM_PLAYBACK
) {
285 if (ssi
->flags
& IMX_SSI_DMA
)
286 sier_bits
= SSI_SIER_TDMAE
;
288 sier_bits
= SSI_SIER_TIE
| SSI_SIER_TFE0_EN
;
290 if (ssi
->flags
& IMX_SSI_DMA
)
291 sier_bits
= SSI_SIER_RDMAE
;
293 sier_bits
= SSI_SIER_RIE
| SSI_SIER_RFF0_EN
;
297 case SNDRV_PCM_TRIGGER_START
:
298 case SNDRV_PCM_TRIGGER_RESUME
:
299 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
300 if (substream
->stream
== SNDRV_PCM_STREAM_PLAYBACK
)
306 if (++ssi
->enabled
== 1)
307 scr
|= SSI_SCR_SSIEN
;
311 case SNDRV_PCM_TRIGGER_STOP
:
312 case SNDRV_PCM_TRIGGER_SUSPEND
:
313 case SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
314 if (substream
->stream
== SNDRV_PCM_STREAM_PLAYBACK
)
320 if (--ssi
->enabled
== 0)
321 scr
&= ~SSI_SCR_SSIEN
;
328 if (!(ssi
->flags
& IMX_SSI_USE_AC97
))
329 /* rx/tx are always enabled to access ac97 registers */
330 writel(scr
, ssi
->base
+ SSI_SCR
);
332 writel(sier
, ssi
->base
+ SSI_SIER
);
337 static struct snd_soc_dai_ops imx_ssi_pcm_dai_ops
= {
338 .hw_params
= imx_ssi_hw_params
,
339 .set_fmt
= imx_ssi_set_dai_fmt
,
340 .set_clkdiv
= imx_ssi_set_dai_clkdiv
,
341 .set_sysclk
= imx_ssi_set_dai_sysclk
,
342 .set_tdm_slot
= imx_ssi_set_dai_tdm_slot
,
343 .trigger
= imx_ssi_trigger
,
346 static struct snd_soc_dai imx_ssi_dai
= {
350 .rates
= SNDRV_PCM_RATE_8000_96000
,
351 .formats
= SNDRV_PCM_FMTBIT_S16_LE
,
356 .rates
= SNDRV_PCM_RATE_8000_96000
,
357 .formats
= SNDRV_PCM_FMTBIT_S16_LE
,
359 .ops
= &imx_ssi_pcm_dai_ops
,
362 int snd_imx_pcm_mmap(struct snd_pcm_substream
*substream
,
363 struct vm_area_struct
*vma
)
365 struct snd_pcm_runtime
*runtime
= substream
->runtime
;
368 ret
= dma_mmap_coherent(NULL
, vma
, runtime
->dma_area
,
369 runtime
->dma_addr
, runtime
->dma_bytes
);
371 pr_debug("%s: ret: %d %p 0x%08x 0x%08x\n", __func__
, ret
,
378 static int imx_pcm_preallocate_dma_buffer(struct snd_pcm
*pcm
, int stream
)
380 struct snd_pcm_substream
*substream
= pcm
->streams
[stream
].substream
;
381 struct snd_dma_buffer
*buf
= &substream
->dma_buffer
;
382 size_t size
= IMX_SSI_DMABUF_SIZE
;
384 buf
->dev
.type
= SNDRV_DMA_TYPE_DEV
;
385 buf
->dev
.dev
= pcm
->card
->dev
;
386 buf
->private_data
= NULL
;
387 buf
->area
= dma_alloc_writecombine(pcm
->card
->dev
, size
,
388 &buf
->addr
, GFP_KERNEL
);
396 static u64 imx_pcm_dmamask
= DMA_BIT_MASK(32);
398 int imx_pcm_new(struct snd_card
*card
, struct snd_soc_dai
*dai
,
404 if (!card
->dev
->dma_mask
)
405 card
->dev
->dma_mask
= &imx_pcm_dmamask
;
406 if (!card
->dev
->coherent_dma_mask
)
407 card
->dev
->coherent_dma_mask
= DMA_BIT_MASK(32);
408 if (dai
->playback
.channels_min
) {
409 ret
= imx_pcm_preallocate_dma_buffer(pcm
,
410 SNDRV_PCM_STREAM_PLAYBACK
);
415 if (dai
->capture
.channels_min
) {
416 ret
= imx_pcm_preallocate_dma_buffer(pcm
,
417 SNDRV_PCM_STREAM_CAPTURE
);
426 void imx_pcm_free(struct snd_pcm
*pcm
)
428 struct snd_pcm_substream
*substream
;
429 struct snd_dma_buffer
*buf
;
432 for (stream
= 0; stream
< 2; stream
++) {
433 substream
= pcm
->streams
[stream
].substream
;
437 buf
= &substream
->dma_buffer
;
441 dma_free_writecombine(pcm
->card
->dev
, buf
->bytes
,
442 buf
->area
, buf
->addr
);
447 struct snd_soc_platform imx_soc_platform
= {
450 EXPORT_SYMBOL_GPL(imx_soc_platform
);
452 static struct snd_soc_dai imx_ac97_dai
= {
456 .stream_name
= "AC97 Playback",
459 .rates
= SNDRV_PCM_RATE_48000
,
460 .formats
= SNDRV_PCM_FMTBIT_S16_LE
,
463 .stream_name
= "AC97 Capture",
466 .rates
= SNDRV_PCM_RATE_48000
,
467 .formats
= SNDRV_PCM_FMTBIT_S16_LE
,
469 .ops
= &imx_ssi_pcm_dai_ops
,
472 static void setup_channel_to_ac97(struct imx_ssi
*imx_ssi
)
474 void __iomem
*base
= imx_ssi
->base
;
476 writel(0x0, base
+ SSI_SCR
);
477 writel(0x0, base
+ SSI_STCR
);
478 writel(0x0, base
+ SSI_SRCR
);
480 writel(SSI_SCR_SYN
| SSI_SCR_NET
, base
+ SSI_SCR
);
482 writel(SSI_SFCSR_RFWM0(8) |
485 SSI_SFCSR_TFWM1(8), base
+ SSI_SFCSR
);
487 writel(SSI_STCCR_WL(16) | SSI_STCCR_DC(12), base
+ SSI_STCCR
);
488 writel(SSI_STCCR_WL(16) | SSI_STCCR_DC(12), base
+ SSI_SRCCR
);
490 writel(SSI_SCR_SYN
| SSI_SCR_NET
| SSI_SCR_SSIEN
, base
+ SSI_SCR
);
491 writel(SSI_SOR_WAIT(3), base
+ SSI_SOR
);
493 writel(SSI_SCR_SYN
| SSI_SCR_NET
| SSI_SCR_SSIEN
|
494 SSI_SCR_TE
| SSI_SCR_RE
,
497 writel(SSI_SACNT_DEFAULT
, base
+ SSI_SACNT
);
498 writel(0xff, base
+ SSI_SACCDIS
);
499 writel(0x300, base
+ SSI_SACCEN
);
502 static struct imx_ssi
*ac97_ssi
;
504 static void imx_ssi_ac97_write(struct snd_ac97
*ac97
, unsigned short reg
,
507 struct imx_ssi
*imx_ssi
= ac97_ssi
;
508 void __iomem
*base
= imx_ssi
->base
;
515 pr_debug("%s: 0x%02x 0x%04x\n", __func__
, reg
, val
);
518 writel(lreg
, base
+ SSI_SACADD
);
521 writel(lval
, base
+ SSI_SACDAT
);
523 writel(SSI_SACNT_DEFAULT
| SSI_SACNT_WR
, base
+ SSI_SACNT
);
527 static unsigned short imx_ssi_ac97_read(struct snd_ac97
*ac97
,
530 struct imx_ssi
*imx_ssi
= ac97_ssi
;
531 void __iomem
*base
= imx_ssi
->base
;
533 unsigned short val
= -1;
536 lreg
= (reg
& 0x7f) << 12 ;
537 writel(lreg
, base
+ SSI_SACADD
);
538 writel(SSI_SACNT_DEFAULT
| SSI_SACNT_RD
, base
+ SSI_SACNT
);
542 val
= (readl(base
+ SSI_SACDAT
) >> 4) & 0xffff;
544 pr_debug("%s: 0x%02x 0x%04x\n", __func__
, reg
, val
);
549 static void imx_ssi_ac97_reset(struct snd_ac97
*ac97
)
551 struct imx_ssi
*imx_ssi
= ac97_ssi
;
553 if (imx_ssi
->ac97_reset
)
554 imx_ssi
->ac97_reset(ac97
);
557 static void imx_ssi_ac97_warm_reset(struct snd_ac97
*ac97
)
559 struct imx_ssi
*imx_ssi
= ac97_ssi
;
561 if (imx_ssi
->ac97_warm_reset
)
562 imx_ssi
->ac97_warm_reset(ac97
);
565 struct snd_ac97_bus_ops soc_ac97_ops
= {
566 .read
= imx_ssi_ac97_read
,
567 .write
= imx_ssi_ac97_write
,
568 .reset
= imx_ssi_ac97_reset
,
569 .warm_reset
= imx_ssi_ac97_warm_reset
571 EXPORT_SYMBOL_GPL(soc_ac97_ops
);
573 struct snd_soc_dai imx_ssi_pcm_dai
[2];
574 EXPORT_SYMBOL_GPL(imx_ssi_pcm_dai
);
576 static int imx_ssi_probe(struct platform_device
*pdev
)
578 struct resource
*res
;
580 struct imx_ssi_platform_data
*pdata
= pdev
->dev
.platform_data
;
581 struct snd_soc_platform
*platform
;
584 struct snd_soc_dai
*dai
= &imx_ssi_pcm_dai
[pdev
->id
];
586 if (dai
->id
>= ARRAY_SIZE(imx_ssi_pcm_dai
))
589 ssi
= kzalloc(sizeof(*ssi
), GFP_KERNEL
);
594 ssi
->ac97_reset
= pdata
->ac97_reset
;
595 ssi
->ac97_warm_reset
= pdata
->ac97_warm_reset
;
596 ssi
->flags
= pdata
->flags
;
599 ssi
->irq
= platform_get_irq(pdev
, 0);
601 ssi
->clk
= clk_get(&pdev
->dev
, NULL
);
602 if (IS_ERR(ssi
->clk
)) {
603 ret
= PTR_ERR(ssi
->clk
);
604 dev_err(&pdev
->dev
, "Cannot get the clock: %d\n",
608 clk_enable(ssi
->clk
);
610 res
= platform_get_resource(pdev
, IORESOURCE_MEM
, 0);
613 goto failed_get_resource
;
616 if (!request_mem_region(res
->start
, resource_size(res
), DRV_NAME
)) {
617 dev_err(&pdev
->dev
, "request_mem_region failed\n");
619 goto failed_get_resource
;
622 ssi
->base
= ioremap(res
->start
, resource_size(res
));
624 dev_err(&pdev
->dev
, "ioremap failed\n");
629 if (ssi
->flags
& IMX_SSI_USE_AC97
) {
635 setup_channel_to_ac97(ssi
);
636 memcpy(dai
, &imx_ac97_dai
, sizeof(imx_ac97_dai
));
638 memcpy(dai
, &imx_ssi_dai
, sizeof(imx_ssi_dai
));
640 writel(0x0, ssi
->base
+ SSI_SIER
);
642 ssi
->dma_params_rx
.dma_addr
= res
->start
+ SSI_SRX0
;
643 ssi
->dma_params_tx
.dma_addr
= res
->start
+ SSI_STX0
;
645 res
= platform_get_resource_byname(pdev
, IORESOURCE_DMA
, "tx0");
647 ssi
->dma_params_tx
.dma
= res
->start
;
649 res
= platform_get_resource_byname(pdev
, IORESOURCE_DMA
, "rx0");
651 ssi
->dma_params_rx
.dma
= res
->start
;
654 dai
->dev
= &pdev
->dev
;
655 dai
->name
= kasprintf(GFP_KERNEL
, "imx-ssi.%d", pdev
->id
);
656 dai
->private_data
= ssi
;
658 if ((cpu_is_mx27() || cpu_is_mx21()) &&
659 !(ssi
->flags
& IMX_SSI_USE_AC97
) &&
660 (ssi
->flags
& IMX_SSI_DMA
)) {
661 ssi
->flags
|= IMX_SSI_DMA
;
662 platform
= imx_ssi_dma_mx2_init(pdev
, ssi
);
664 platform
= imx_ssi_fiq_init(pdev
, ssi
);
666 imx_soc_platform
.pcm_ops
= platform
->pcm_ops
;
667 imx_soc_platform
.pcm_new
= platform
->pcm_new
;
668 imx_soc_platform
.pcm_free
= platform
->pcm_free
;
670 val
= SSI_SFCSR_TFWM0(ssi
->dma_params_tx
.burstsize
) |
671 SSI_SFCSR_RFWM0(ssi
->dma_params_rx
.burstsize
);
672 writel(val
, ssi
->base
+ SSI_SFCSR
);
674 ret
= snd_soc_register_dai(dai
);
676 dev_err(&pdev
->dev
, "register DAI failed\n");
677 goto failed_register
;
680 platform_set_drvdata(pdev
, ssi
);
688 release_mem_region(res
->start
, resource_size(res
));
690 clk_disable(ssi
->clk
);
698 static int __devexit
imx_ssi_remove(struct platform_device
*pdev
)
700 struct resource
*res
= platform_get_resource(pdev
, IORESOURCE_MEM
, 0);
701 struct imx_ssi
*ssi
= platform_get_drvdata(pdev
);
702 struct snd_soc_dai
*dai
= &imx_ssi_pcm_dai
[pdev
->id
];
704 snd_soc_unregister_dai(dai
);
706 if (ssi
->flags
& IMX_SSI_USE_AC97
)
709 if (!(ssi
->flags
& IMX_SSI_DMA
))
710 imx_ssi_fiq_exit(pdev
, ssi
);
713 release_mem_region(res
->start
, resource_size(res
));
714 clk_disable(ssi
->clk
);
721 static struct platform_driver imx_ssi_driver
= {
722 .probe
= imx_ssi_probe
,
723 .remove
= __devexit_p(imx_ssi_remove
),
727 .owner
= THIS_MODULE
,
731 static int __init
imx_ssi_init(void)
735 ret
= snd_soc_register_platform(&imx_soc_platform
);
737 pr_err("failed to register soc platform: %d\n", ret
);
741 ret
= platform_driver_register(&imx_ssi_driver
);
743 snd_soc_unregister_platform(&imx_soc_platform
);
750 static void __exit
imx_ssi_exit(void)
752 platform_driver_unregister(&imx_ssi_driver
);
753 snd_soc_unregister_platform(&imx_soc_platform
);
756 module_init(imx_ssi_init
);
757 module_exit(imx_ssi_exit
);
759 /* Module information */
760 MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>");
761 MODULE_DESCRIPTION("i.MX I2S/ac97 SoC Interface");
762 MODULE_LICENSE("GPL");