Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Au12x0/Au1550 PSC ALSA ASoC audio support. |
| 3 | * |
| 4 | * (c) 2007-2008 MSC Vertriebsges.m.b.H., |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 5 | * Manuel Lauss <manuel.lauss@gmail.com> |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | * |
| 11 | * DMA glue for Au1x-PSC audio. |
| 12 | * |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/init.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/slab.h> |
| 20 | #include <linux/dma-mapping.h> |
| 21 | |
| 22 | #include <sound/core.h> |
| 23 | #include <sound/pcm.h> |
| 24 | #include <sound/pcm_params.h> |
| 25 | #include <sound/soc.h> |
| 26 | |
| 27 | #include <asm/mach-au1x00/au1000.h> |
| 28 | #include <asm/mach-au1x00/au1xxx_dbdma.h> |
| 29 | #include <asm/mach-au1x00/au1xxx_psc.h> |
| 30 | |
| 31 | #include "psc.h" |
| 32 | |
| 33 | /*#define PCM_DEBUG*/ |
| 34 | |
Kuninori Morimoto | abf33c7 | 2018-01-29 02:50:37 +0000 | [diff] [blame] | 35 | #define DRV_NAME "dbdma2" |
| 36 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 37 | #define MSG(x...) printk(KERN_INFO "au1xpsc_pcm: " x) |
| 38 | #ifdef PCM_DEBUG |
| 39 | #define DBG MSG |
| 40 | #else |
| 41 | #define DBG(x...) do {} while (0) |
| 42 | #endif |
| 43 | |
| 44 | struct au1xpsc_audio_dmadata { |
| 45 | /* DDMA control data */ |
| 46 | unsigned int ddma_id; /* DDMA direction ID for this PSC */ |
| 47 | u32 ddma_chan; /* DDMA context */ |
| 48 | |
| 49 | /* PCM context (for irq handlers) */ |
| 50 | struct snd_pcm_substream *substream; |
| 51 | unsigned long curr_period; /* current segment DDMA is working on */ |
| 52 | unsigned long q_period; /* queue period(s) */ |
Manuel Lauss | 963accb | 2009-10-13 20:22:35 +0200 | [diff] [blame] | 53 | dma_addr_t dma_area; /* address of queued DMA area */ |
| 54 | dma_addr_t dma_area_s; /* start address of DMA area */ |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 55 | unsigned long pos; /* current byte position being played */ |
| 56 | unsigned long periods; /* number of SG segments in total */ |
| 57 | unsigned long period_bytes; /* size in bytes of one SG segment */ |
| 58 | |
| 59 | /* runtime data */ |
| 60 | int msbits; |
| 61 | }; |
| 62 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 63 | /* |
| 64 | * These settings are somewhat okay, at least on my machine audio plays |
| 65 | * almost skip-free. Especially the 64kB buffer seems to help a LOT. |
| 66 | */ |
| 67 | #define AU1XPSC_PERIOD_MIN_BYTES 1024 |
| 68 | #define AU1XPSC_BUFFER_MIN_BYTES 65536 |
| 69 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 70 | /* PCM hardware DMA capabilities - platform specific */ |
| 71 | static const struct snd_pcm_hardware au1xpsc_pcm_hardware = { |
| 72 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | |
Takashi Iwai | 2008f13 | 2009-04-28 12:25:59 +0200 | [diff] [blame] | 73 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BATCH, |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 74 | .period_bytes_min = AU1XPSC_PERIOD_MIN_BYTES, |
| 75 | .period_bytes_max = 4096 * 1024 - 1, |
| 76 | .periods_min = 2, |
| 77 | .periods_max = 4096, /* 2 to as-much-as-you-like */ |
| 78 | .buffer_bytes_max = 4096 * 1024 - 1, |
| 79 | .fifo_size = 16, /* fifo entries of AC97/I2S PSC */ |
| 80 | }; |
| 81 | |
| 82 | static void au1x_pcm_queue_tx(struct au1xpsc_audio_dmadata *cd) |
| 83 | { |
Manuel Lauss | 963accb | 2009-10-13 20:22:35 +0200 | [diff] [blame] | 84 | au1xxx_dbdma_put_source(cd->ddma_chan, cd->dma_area, |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 85 | cd->period_bytes, DDMA_FLAGS_IE); |
| 86 | |
| 87 | /* update next-to-queue period */ |
| 88 | ++cd->q_period; |
| 89 | cd->dma_area += cd->period_bytes; |
| 90 | if (cd->q_period >= cd->periods) { |
| 91 | cd->q_period = 0; |
| 92 | cd->dma_area = cd->dma_area_s; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | static void au1x_pcm_queue_rx(struct au1xpsc_audio_dmadata *cd) |
| 97 | { |
Manuel Lauss | 963accb | 2009-10-13 20:22:35 +0200 | [diff] [blame] | 98 | au1xxx_dbdma_put_dest(cd->ddma_chan, cd->dma_area, |
Manuel Lauss | ea071cc | 2009-10-13 20:22:34 +0200 | [diff] [blame] | 99 | cd->period_bytes, DDMA_FLAGS_IE); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 100 | |
| 101 | /* update next-to-queue period */ |
| 102 | ++cd->q_period; |
| 103 | cd->dma_area += cd->period_bytes; |
| 104 | if (cd->q_period >= cd->periods) { |
| 105 | cd->q_period = 0; |
| 106 | cd->dma_area = cd->dma_area_s; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | static void au1x_pcm_dmatx_cb(int irq, void *dev_id) |
| 111 | { |
| 112 | struct au1xpsc_audio_dmadata *cd = dev_id; |
| 113 | |
| 114 | cd->pos += cd->period_bytes; |
| 115 | if (++cd->curr_period >= cd->periods) { |
| 116 | cd->pos = 0; |
| 117 | cd->curr_period = 0; |
| 118 | } |
| 119 | snd_pcm_period_elapsed(cd->substream); |
| 120 | au1x_pcm_queue_tx(cd); |
| 121 | } |
| 122 | |
| 123 | static void au1x_pcm_dmarx_cb(int irq, void *dev_id) |
| 124 | { |
| 125 | struct au1xpsc_audio_dmadata *cd = dev_id; |
| 126 | |
| 127 | cd->pos += cd->period_bytes; |
| 128 | if (++cd->curr_period >= cd->periods) { |
| 129 | cd->pos = 0; |
| 130 | cd->curr_period = 0; |
| 131 | } |
| 132 | snd_pcm_period_elapsed(cd->substream); |
| 133 | au1x_pcm_queue_rx(cd); |
| 134 | } |
| 135 | |
| 136 | static void au1x_pcm_dbdma_free(struct au1xpsc_audio_dmadata *pcd) |
| 137 | { |
| 138 | if (pcd->ddma_chan) { |
| 139 | au1xxx_dbdma_stop(pcd->ddma_chan); |
| 140 | au1xxx_dbdma_reset(pcd->ddma_chan); |
| 141 | au1xxx_dbdma_chan_free(pcd->ddma_chan); |
| 142 | pcd->ddma_chan = 0; |
| 143 | pcd->msbits = 0; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /* in case of missing DMA ring or changed TX-source / RX-dest bit widths, |
| 148 | * allocate (or reallocate) a 2-descriptor DMA ring with bit depth according |
| 149 | * to ALSA-supplied sample depth. This is due to limitations in the dbdma api |
| 150 | * (cannot adjust source/dest widths of already allocated descriptor ring). |
| 151 | */ |
| 152 | static int au1x_pcm_dbdma_realloc(struct au1xpsc_audio_dmadata *pcd, |
| 153 | int stype, int msbits) |
| 154 | { |
| 155 | /* DMA only in 8/16/32 bit widths */ |
| 156 | if (msbits == 24) |
| 157 | msbits = 32; |
| 158 | |
| 159 | /* check current config: correct bits and descriptors allocated? */ |
| 160 | if ((pcd->ddma_chan) && (msbits == pcd->msbits)) |
| 161 | goto out; /* all ok! */ |
| 162 | |
| 163 | au1x_pcm_dbdma_free(pcd); |
| 164 | |
Manuel Lauss | 25942fd | 2011-07-25 13:45:04 +0200 | [diff] [blame] | 165 | if (stype == SNDRV_PCM_STREAM_CAPTURE) |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 166 | pcd->ddma_chan = au1xxx_dbdma_chan_alloc(pcd->ddma_id, |
| 167 | DSCR_CMD0_ALWAYS, |
| 168 | au1x_pcm_dmarx_cb, (void *)pcd); |
| 169 | else |
| 170 | pcd->ddma_chan = au1xxx_dbdma_chan_alloc(DSCR_CMD0_ALWAYS, |
| 171 | pcd->ddma_id, |
| 172 | au1x_pcm_dmatx_cb, (void *)pcd); |
| 173 | |
| 174 | if (!pcd->ddma_chan) |
Fernando Carrijo | c19a28e | 2009-01-07 18:09:08 -0800 | [diff] [blame] | 175 | return -ENOMEM; |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 176 | |
| 177 | au1xxx_dbdma_set_devwidth(pcd->ddma_chan, msbits); |
| 178 | au1xxx_dbdma_ring_alloc(pcd->ddma_chan, 2); |
| 179 | |
| 180 | pcd->msbits = msbits; |
| 181 | |
| 182 | au1xxx_dbdma_stop(pcd->ddma_chan); |
| 183 | au1xxx_dbdma_reset(pcd->ddma_chan); |
| 184 | |
| 185 | out: |
| 186 | return 0; |
| 187 | } |
| 188 | |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 189 | static inline struct au1xpsc_audio_dmadata *to_dmadata(struct snd_pcm_substream *ss) |
| 190 | { |
| 191 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
Kuninori Morimoto | abf33c7 | 2018-01-29 02:50:37 +0000 | [diff] [blame] | 192 | struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); |
| 193 | struct au1xpsc_audio_dmadata *pcd = snd_soc_component_get_drvdata(component); |
Manuel Lauss | 25942fd | 2011-07-25 13:45:04 +0200 | [diff] [blame] | 194 | return &pcd[ss->stream]; |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 195 | } |
| 196 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 197 | static int au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, |
| 198 | struct snd_pcm_hw_params *params) |
| 199 | { |
| 200 | struct snd_pcm_runtime *runtime = substream->runtime; |
| 201 | struct au1xpsc_audio_dmadata *pcd; |
| 202 | int stype, ret; |
| 203 | |
| 204 | ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); |
| 205 | if (ret < 0) |
| 206 | goto out; |
| 207 | |
Manuel Lauss | 25942fd | 2011-07-25 13:45:04 +0200 | [diff] [blame] | 208 | stype = substream->stream; |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 209 | pcd = to_dmadata(substream); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 210 | |
Heinrich Schuchardt | 896491b | 2016-04-13 01:54:01 +0200 | [diff] [blame] | 211 | DBG("runtime->dma_area = 0x%08lx dma_addr_t = 0x%08lx dma_size = %zu " |
| 212 | "runtime->min_align %lu\n", |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 213 | (unsigned long)runtime->dma_area, |
| 214 | (unsigned long)runtime->dma_addr, runtime->dma_bytes, |
| 215 | runtime->min_align); |
| 216 | |
| 217 | DBG("bits %d frags %d frag_bytes %d is_rx %d\n", params->msbits, |
| 218 | params_periods(params), params_period_bytes(params), stype); |
| 219 | |
| 220 | ret = au1x_pcm_dbdma_realloc(pcd, stype, params->msbits); |
| 221 | if (ret) { |
| 222 | MSG("DDMA channel (re)alloc failed!\n"); |
| 223 | goto out; |
| 224 | } |
| 225 | |
| 226 | pcd->substream = substream; |
| 227 | pcd->period_bytes = params_period_bytes(params); |
| 228 | pcd->periods = params_periods(params); |
Manuel Lauss | 963accb | 2009-10-13 20:22:35 +0200 | [diff] [blame] | 229 | pcd->dma_area_s = pcd->dma_area = runtime->dma_addr; |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 230 | pcd->q_period = 0; |
| 231 | pcd->curr_period = 0; |
| 232 | pcd->pos = 0; |
| 233 | |
| 234 | ret = 0; |
| 235 | out: |
| 236 | return ret; |
| 237 | } |
| 238 | |
| 239 | static int au1xpsc_pcm_hw_free(struct snd_pcm_substream *substream) |
| 240 | { |
| 241 | snd_pcm_lib_free_pages(substream); |
| 242 | return 0; |
| 243 | } |
| 244 | |
| 245 | static int au1xpsc_pcm_prepare(struct snd_pcm_substream *substream) |
| 246 | { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 247 | struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 248 | |
| 249 | au1xxx_dbdma_reset(pcd->ddma_chan); |
| 250 | |
Manuel Lauss | 25942fd | 2011-07-25 13:45:04 +0200 | [diff] [blame] | 251 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 252 | au1x_pcm_queue_rx(pcd); |
| 253 | au1x_pcm_queue_rx(pcd); |
| 254 | } else { |
| 255 | au1x_pcm_queue_tx(pcd); |
| 256 | au1x_pcm_queue_tx(pcd); |
| 257 | } |
| 258 | |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | static int au1xpsc_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
| 263 | { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 264 | u32 c = to_dmadata(substream)->ddma_chan; |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 265 | |
| 266 | switch (cmd) { |
| 267 | case SNDRV_PCM_TRIGGER_START: |
| 268 | case SNDRV_PCM_TRIGGER_RESUME: |
| 269 | au1xxx_dbdma_start(c); |
| 270 | break; |
| 271 | case SNDRV_PCM_TRIGGER_STOP: |
| 272 | case SNDRV_PCM_TRIGGER_SUSPEND: |
| 273 | au1xxx_dbdma_stop(c); |
| 274 | break; |
| 275 | default: |
| 276 | return -EINVAL; |
| 277 | } |
| 278 | return 0; |
| 279 | } |
| 280 | |
| 281 | static snd_pcm_uframes_t |
| 282 | au1xpsc_pcm_pointer(struct snd_pcm_substream *substream) |
| 283 | { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 284 | return bytes_to_frames(substream->runtime, to_dmadata(substream)->pos); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 285 | } |
| 286 | |
| 287 | static int au1xpsc_pcm_open(struct snd_pcm_substream *substream) |
| 288 | { |
Manuel Lauss | 5b0912b | 2011-07-25 13:45:02 +0200 | [diff] [blame] | 289 | struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream); |
| 290 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
Manuel Lauss | 25942fd | 2011-07-25 13:45:04 +0200 | [diff] [blame] | 291 | int stype = substream->stream, *dmaids; |
Manuel Lauss | 5b0912b | 2011-07-25 13:45:02 +0200 | [diff] [blame] | 292 | |
| 293 | dmaids = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
| 294 | if (!dmaids) |
| 295 | return -ENODEV; /* whoa, has ordering changed? */ |
| 296 | |
| 297 | pcd->ddma_id = dmaids[stype]; |
| 298 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 299 | snd_soc_set_runtime_hwparams(substream, &au1xpsc_pcm_hardware); |
| 300 | return 0; |
| 301 | } |
| 302 | |
| 303 | static int au1xpsc_pcm_close(struct snd_pcm_substream *substream) |
| 304 | { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 305 | au1x_pcm_dbdma_free(to_dmadata(substream)); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 306 | return 0; |
| 307 | } |
| 308 | |
Arvind Yadav | e731a87 | 2017-08-14 11:26:24 +0530 | [diff] [blame] | 309 | static const struct snd_pcm_ops au1xpsc_pcm_ops = { |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 310 | .open = au1xpsc_pcm_open, |
| 311 | .close = au1xpsc_pcm_close, |
| 312 | .ioctl = snd_pcm_lib_ioctl, |
| 313 | .hw_params = au1xpsc_pcm_hw_params, |
| 314 | .hw_free = au1xpsc_pcm_hw_free, |
| 315 | .prepare = au1xpsc_pcm_prepare, |
| 316 | .trigger = au1xpsc_pcm_trigger, |
| 317 | .pointer = au1xpsc_pcm_pointer, |
| 318 | }; |
| 319 | |
Liam Girdwood | 552d1ef | 2011-06-07 16:08:33 +0100 | [diff] [blame] | 320 | static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd) |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 321 | { |
Liam Girdwood | 552d1ef | 2011-06-07 16:08:33 +0100 | [diff] [blame] | 322 | struct snd_card *card = rtd->card->snd_card; |
| 323 | struct snd_pcm *pcm = rtd->pcm; |
| 324 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 325 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
| 326 | card->dev, AU1XPSC_BUFFER_MIN_BYTES, (4096 * 1024) - 1); |
| 327 | |
| 328 | return 0; |
| 329 | } |
| 330 | |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 331 | /* au1xpsc audio platform */ |
Kuninori Morimoto | abf33c7 | 2018-01-29 02:50:37 +0000 | [diff] [blame] | 332 | static struct snd_soc_component_driver au1xpsc_soc_component = { |
| 333 | .name = DRV_NAME, |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 334 | .ops = &au1xpsc_pcm_ops, |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 335 | .pcm_new = au1xpsc_pcm_new, |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 336 | }; |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 337 | |
Bill Pemberton | 5c658be | 2012-12-07 09:26:22 -0500 | [diff] [blame] | 338 | static int au1xpsc_pcm_drvprobe(struct platform_device *pdev) |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 339 | { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 340 | struct au1xpsc_audio_dmadata *dmadata; |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 341 | |
Julia Lawall | be547dd | 2011-12-29 17:51:28 +0100 | [diff] [blame] | 342 | dmadata = devm_kzalloc(&pdev->dev, |
| 343 | 2 * sizeof(struct au1xpsc_audio_dmadata), |
| 344 | GFP_KERNEL); |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 345 | if (!dmadata) |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 346 | return -ENOMEM; |
| 347 | |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 348 | platform_set_drvdata(pdev, dmadata); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 349 | |
Kuninori Morimoto | abf33c7 | 2018-01-29 02:50:37 +0000 | [diff] [blame] | 350 | return devm_snd_soc_register_component(&pdev->dev, |
| 351 | &au1xpsc_soc_component, NULL, 0); |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 352 | } |
| 353 | |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 354 | static struct platform_driver au1xpsc_pcm_driver = { |
| 355 | .driver = { |
Manuel Lauss | ffc4fdb | 2010-08-26 14:53:51 +0200 | [diff] [blame] | 356 | .name = "au1xpsc-pcm", |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 357 | }, |
| 358 | .probe = au1xpsc_pcm_drvprobe, |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 359 | }; |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 360 | |
Axel Lin | 8a124f9 | 2011-11-25 10:06:59 +0800 | [diff] [blame] | 361 | module_platform_driver(au1xpsc_pcm_driver); |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 362 | |
Manuel Lauss | 4a161d2 | 2008-07-09 16:27:56 +0200 | [diff] [blame] | 363 | MODULE_LICENSE("GPL"); |
| 364 | MODULE_DESCRIPTION("Au12x0/Au1550 PSC Audio DMA driver"); |
Manuel Lauss | 0f83d63 | 2009-10-31 20:15:08 +0100 | [diff] [blame] | 365 | MODULE_AUTHOR("Manuel Lauss"); |