tegra30_i2s.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. /*
  2. * tegra30_i2s.c - Tegra30 I2S driver
  3. *
  4. * Author: Stephen Warren <swarren@nvidia.com>
  5. * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
  6. *
  7. * Based on code copyright/by:
  8. *
  9. * Copyright (c) 2009-2010, NVIDIA Corporation.
  10. * Scott Peterson <speterson@nvidia.com>
  11. *
  12. * Copyright (C) 2010 Google, Inc.
  13. * Iliyan Malchev <malchev@google.com>
  14. *
  15. * This program is free software; you can redistribute it and/or modify it
  16. * under the terms and conditions of the GNU General Public License,
  17. * version 2, as published by the Free Software Foundation.
  18. *
  19. * This program is distributed in the hope it will be useful, but WITHOUT
  20. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  21. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  22. * more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. */
  27. #include <linux/clk.h>
  28. #include <linux/device.h>
  29. #include <linux/io.h>
  30. #include <linux/module.h>
  31. #include <linux/of.h>
  32. #include <linux/platform_device.h>
  33. #include <linux/pm_runtime.h>
  34. #include <linux/regmap.h>
  35. #include <linux/slab.h>
  36. #include <sound/core.h>
  37. #include <sound/pcm.h>
  38. #include <sound/pcm_params.h>
  39. #include <sound/soc.h>
  40. #include "tegra30_ahub.h"
  41. #include "tegra30_i2s.h"
  42. #define DRV_NAME "tegra30-i2s"
  43. static inline void tegra30_i2s_write(struct tegra30_i2s *i2s, u32 reg, u32 val)
  44. {
  45. regmap_write(i2s->regmap, reg, val);
  46. }
  47. static inline u32 tegra30_i2s_read(struct tegra30_i2s *i2s, u32 reg)
  48. {
  49. u32 val;
  50. regmap_read(i2s->regmap, reg, &val);
  51. return val;
  52. }
  53. static int tegra30_i2s_runtime_suspend(struct device *dev)
  54. {
  55. struct tegra30_i2s *i2s = dev_get_drvdata(dev);
  56. regcache_cache_only(i2s->regmap, true);
  57. clk_disable(i2s->clk_i2s);
  58. return 0;
  59. }
  60. static int tegra30_i2s_runtime_resume(struct device *dev)
  61. {
  62. struct tegra30_i2s *i2s = dev_get_drvdata(dev);
  63. int ret;
  64. ret = clk_enable(i2s->clk_i2s);
  65. if (ret) {
  66. dev_err(dev, "clk_enable failed: %d\n", ret);
  67. return ret;
  68. }
  69. regcache_cache_only(i2s->regmap, false);
  70. return 0;
  71. }
  72. int tegra30_i2s_startup(struct snd_pcm_substream *substream,
  73. struct snd_soc_dai *dai)
  74. {
  75. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  76. int ret;
  77. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
  78. ret = tegra30_ahub_allocate_tx_fifo(&i2s->playback_fifo_cif,
  79. &i2s->playback_dma_data.addr,
  80. &i2s->playback_dma_data.req_sel);
  81. i2s->playback_dma_data.wrap = 4;
  82. i2s->playback_dma_data.width = 32;
  83. tegra30_ahub_set_rx_cif_source(i2s->playback_i2s_cif,
  84. i2s->playback_fifo_cif);
  85. } else {
  86. ret = tegra30_ahub_allocate_rx_fifo(&i2s->capture_fifo_cif,
  87. &i2s->capture_dma_data.addr,
  88. &i2s->capture_dma_data.req_sel);
  89. i2s->capture_dma_data.wrap = 4;
  90. i2s->capture_dma_data.width = 32;
  91. tegra30_ahub_set_rx_cif_source(i2s->capture_fifo_cif,
  92. i2s->capture_i2s_cif);
  93. }
  94. return ret;
  95. }
  96. void tegra30_i2s_shutdown(struct snd_pcm_substream *substream,
  97. struct snd_soc_dai *dai)
  98. {
  99. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  100. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
  101. tegra30_ahub_unset_rx_cif_source(i2s->playback_i2s_cif);
  102. tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif);
  103. } else {
  104. tegra30_ahub_unset_rx_cif_source(i2s->capture_fifo_cif);
  105. tegra30_ahub_free_rx_fifo(i2s->capture_fifo_cif);
  106. }
  107. }
  108. static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai,
  109. unsigned int fmt)
  110. {
  111. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  112. switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
  113. case SND_SOC_DAIFMT_NB_NF:
  114. break;
  115. default:
  116. return -EINVAL;
  117. }
  118. i2s->reg_ctrl &= ~TEGRA30_I2S_CTRL_MASTER_ENABLE;
  119. switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
  120. case SND_SOC_DAIFMT_CBS_CFS:
  121. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_MASTER_ENABLE;
  122. break;
  123. case SND_SOC_DAIFMT_CBM_CFM:
  124. break;
  125. default:
  126. return -EINVAL;
  127. }
  128. i2s->reg_ctrl &= ~(TEGRA30_I2S_CTRL_FRAME_FORMAT_MASK |
  129. TEGRA30_I2S_CTRL_LRCK_MASK);
  130. switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
  131. case SND_SOC_DAIFMT_DSP_A:
  132. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_FRAME_FORMAT_FSYNC;
  133. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_LRCK_L_LOW;
  134. break;
  135. case SND_SOC_DAIFMT_DSP_B:
  136. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_FRAME_FORMAT_FSYNC;
  137. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_LRCK_R_LOW;
  138. break;
  139. case SND_SOC_DAIFMT_I2S:
  140. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_FRAME_FORMAT_LRCK;
  141. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_LRCK_L_LOW;
  142. break;
  143. case SND_SOC_DAIFMT_RIGHT_J:
  144. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_FRAME_FORMAT_LRCK;
  145. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_LRCK_L_LOW;
  146. break;
  147. case SND_SOC_DAIFMT_LEFT_J:
  148. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_FRAME_FORMAT_LRCK;
  149. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_LRCK_L_LOW;
  150. break;
  151. default:
  152. return -EINVAL;
  153. }
  154. return 0;
  155. }
  156. static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream,
  157. struct snd_pcm_hw_params *params,
  158. struct snd_soc_dai *dai)
  159. {
  160. struct device *dev = substream->pcm->card->dev;
  161. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  162. u32 val;
  163. int ret, sample_size, srate, i2sclock, bitcnt;
  164. if (params_channels(params) != 2)
  165. return -EINVAL;
  166. i2s->reg_ctrl &= ~TEGRA30_I2S_CTRL_BIT_SIZE_MASK;
  167. switch (params_format(params)) {
  168. case SNDRV_PCM_FORMAT_S16_LE:
  169. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_BIT_SIZE_16;
  170. sample_size = 16;
  171. break;
  172. default:
  173. return -EINVAL;
  174. }
  175. srate = params_rate(params);
  176. /* Final "* 2" required by Tegra hardware */
  177. i2sclock = srate * params_channels(params) * sample_size * 2;
  178. bitcnt = (i2sclock / (2 * srate)) - 1;
  179. if (bitcnt < 0 || bitcnt > TEGRA30_I2S_TIMING_CHANNEL_BIT_COUNT_MASK_US)
  180. return -EINVAL;
  181. ret = clk_set_rate(i2s->clk_i2s, i2sclock);
  182. if (ret) {
  183. dev_err(dev, "Can't set I2S clock rate: %d\n", ret);
  184. return ret;
  185. }
  186. val = bitcnt << TEGRA30_I2S_TIMING_CHANNEL_BIT_COUNT_SHIFT;
  187. if (i2sclock % (2 * srate))
  188. val |= TEGRA30_I2S_TIMING_NON_SYM_ENABLE;
  189. tegra30_i2s_write(i2s, TEGRA30_I2S_TIMING, val);
  190. val = (0 << TEGRA30_AUDIOCIF_CTRL_FIFO_THRESHOLD_SHIFT) |
  191. (1 << TEGRA30_AUDIOCIF_CTRL_AUDIO_CHANNELS_SHIFT) |
  192. (1 << TEGRA30_AUDIOCIF_CTRL_CLIENT_CHANNELS_SHIFT) |
  193. TEGRA30_AUDIOCIF_CTRL_AUDIO_BITS_16 |
  194. TEGRA30_AUDIOCIF_CTRL_CLIENT_BITS_16;
  195. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
  196. val |= TEGRA30_AUDIOCIF_CTRL_DIRECTION_RX;
  197. tegra30_i2s_write(i2s, TEGRA30_I2S_CIF_RX_CTRL, val);
  198. } else {
  199. val |= TEGRA30_AUDIOCIF_CTRL_DIRECTION_TX;
  200. tegra30_i2s_write(i2s, TEGRA30_I2S_CIF_TX_CTRL, val);
  201. }
  202. val = (1 << TEGRA30_I2S_OFFSET_RX_DATA_OFFSET_SHIFT) |
  203. (1 << TEGRA30_I2S_OFFSET_TX_DATA_OFFSET_SHIFT);
  204. tegra30_i2s_write(i2s, TEGRA30_I2S_OFFSET, val);
  205. return 0;
  206. }
  207. static void tegra30_i2s_start_playback(struct tegra30_i2s *i2s)
  208. {
  209. tegra30_ahub_enable_tx_fifo(i2s->playback_fifo_cif);
  210. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_XFER_EN_TX;
  211. tegra30_i2s_write(i2s, TEGRA30_I2S_CTRL, i2s->reg_ctrl);
  212. }
  213. static void tegra30_i2s_stop_playback(struct tegra30_i2s *i2s)
  214. {
  215. tegra30_ahub_disable_tx_fifo(i2s->playback_fifo_cif);
  216. i2s->reg_ctrl &= ~TEGRA30_I2S_CTRL_XFER_EN_TX;
  217. tegra30_i2s_write(i2s, TEGRA30_I2S_CTRL, i2s->reg_ctrl);
  218. }
  219. static void tegra30_i2s_start_capture(struct tegra30_i2s *i2s)
  220. {
  221. tegra30_ahub_enable_rx_fifo(i2s->capture_fifo_cif);
  222. i2s->reg_ctrl |= TEGRA30_I2S_CTRL_XFER_EN_RX;
  223. tegra30_i2s_write(i2s, TEGRA30_I2S_CTRL, i2s->reg_ctrl);
  224. }
  225. static void tegra30_i2s_stop_capture(struct tegra30_i2s *i2s)
  226. {
  227. tegra30_ahub_disable_rx_fifo(i2s->capture_fifo_cif);
  228. i2s->reg_ctrl &= ~TEGRA30_I2S_CTRL_XFER_EN_RX;
  229. tegra30_i2s_write(i2s, TEGRA30_I2S_CTRL, i2s->reg_ctrl);
  230. }
  231. static int tegra30_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
  232. struct snd_soc_dai *dai)
  233. {
  234. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  235. switch (cmd) {
  236. case SNDRV_PCM_TRIGGER_START:
  237. case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
  238. case SNDRV_PCM_TRIGGER_RESUME:
  239. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
  240. tegra30_i2s_start_playback(i2s);
  241. else
  242. tegra30_i2s_start_capture(i2s);
  243. break;
  244. case SNDRV_PCM_TRIGGER_STOP:
  245. case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
  246. case SNDRV_PCM_TRIGGER_SUSPEND:
  247. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
  248. tegra30_i2s_stop_playback(i2s);
  249. else
  250. tegra30_i2s_stop_capture(i2s);
  251. break;
  252. default:
  253. return -EINVAL;
  254. }
  255. return 0;
  256. }
  257. static int tegra30_i2s_probe(struct snd_soc_dai *dai)
  258. {
  259. struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
  260. dai->capture_dma_data = &i2s->capture_dma_data;
  261. dai->playback_dma_data = &i2s->playback_dma_data;
  262. return 0;
  263. }
  264. static struct snd_soc_dai_ops tegra30_i2s_dai_ops = {
  265. .startup = tegra30_i2s_startup,
  266. .shutdown = tegra30_i2s_shutdown,
  267. .set_fmt = tegra30_i2s_set_fmt,
  268. .hw_params = tegra30_i2s_hw_params,
  269. .trigger = tegra30_i2s_trigger,
  270. };
  271. static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
  272. .probe = tegra30_i2s_probe,
  273. .playback = {
  274. .channels_min = 2,
  275. .channels_max = 2,
  276. .rates = SNDRV_PCM_RATE_8000_96000,
  277. .formats = SNDRV_PCM_FMTBIT_S16_LE,
  278. },
  279. .capture = {
  280. .channels_min = 2,
  281. .channels_max = 2,
  282. .rates = SNDRV_PCM_RATE_8000_96000,
  283. .formats = SNDRV_PCM_FMTBIT_S16_LE,
  284. },
  285. .ops = &tegra30_i2s_dai_ops,
  286. .symmetric_rates = 1,
  287. };
  288. static bool tegra30_i2s_wr_rd_reg(struct device *dev, unsigned int reg)
  289. {
  290. switch (reg) {
  291. case TEGRA30_I2S_CTRL:
  292. case TEGRA30_I2S_TIMING:
  293. case TEGRA30_I2S_OFFSET:
  294. case TEGRA30_I2S_CH_CTRL:
  295. case TEGRA30_I2S_SLOT_CTRL:
  296. case TEGRA30_I2S_CIF_RX_CTRL:
  297. case TEGRA30_I2S_CIF_TX_CTRL:
  298. case TEGRA30_I2S_FLOWCTL:
  299. case TEGRA30_I2S_TX_STEP:
  300. case TEGRA30_I2S_FLOW_STATUS:
  301. case TEGRA30_I2S_FLOW_TOTAL:
  302. case TEGRA30_I2S_FLOW_OVER:
  303. case TEGRA30_I2S_FLOW_UNDER:
  304. case TEGRA30_I2S_LCOEF_1_4_0:
  305. case TEGRA30_I2S_LCOEF_1_4_1:
  306. case TEGRA30_I2S_LCOEF_1_4_2:
  307. case TEGRA30_I2S_LCOEF_1_4_3:
  308. case TEGRA30_I2S_LCOEF_1_4_4:
  309. case TEGRA30_I2S_LCOEF_1_4_5:
  310. case TEGRA30_I2S_LCOEF_2_4_0:
  311. case TEGRA30_I2S_LCOEF_2_4_1:
  312. case TEGRA30_I2S_LCOEF_2_4_2:
  313. return true;
  314. default:
  315. return false;
  316. };
  317. }
  318. static bool tegra30_i2s_volatile_reg(struct device *dev, unsigned int reg)
  319. {
  320. switch (reg) {
  321. case TEGRA30_I2S_FLOW_STATUS:
  322. case TEGRA30_I2S_FLOW_TOTAL:
  323. case TEGRA30_I2S_FLOW_OVER:
  324. case TEGRA30_I2S_FLOW_UNDER:
  325. return true;
  326. default:
  327. return false;
  328. };
  329. }
  330. static const struct regmap_config tegra30_i2s_regmap_config = {
  331. .reg_bits = 32,
  332. .reg_stride = 4,
  333. .val_bits = 32,
  334. .max_register = TEGRA30_I2S_LCOEF_2_4_2,
  335. .writeable_reg = tegra30_i2s_wr_rd_reg,
  336. .readable_reg = tegra30_i2s_wr_rd_reg,
  337. .volatile_reg = tegra30_i2s_volatile_reg,
  338. .cache_type = REGCACHE_RBTREE,
  339. };
  340. static __devinit int tegra30_i2s_platform_probe(struct platform_device *pdev)
  341. {
  342. struct tegra30_i2s *i2s;
  343. u32 cif_ids[2];
  344. struct resource *mem, *memregion;
  345. void __iomem *regs;
  346. int ret;
  347. i2s = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_i2s), GFP_KERNEL);
  348. if (!i2s) {
  349. dev_err(&pdev->dev, "Can't allocate tegra30_i2s\n");
  350. ret = -ENOMEM;
  351. goto err;
  352. }
  353. dev_set_drvdata(&pdev->dev, i2s);
  354. i2s->dai = tegra30_i2s_dai_template;
  355. i2s->dai.name = dev_name(&pdev->dev);
  356. ret = of_property_read_u32_array(pdev->dev.of_node,
  357. "nvidia,ahub-cif-ids", cif_ids,
  358. ARRAY_SIZE(cif_ids));
  359. if (ret < 0)
  360. goto err;
  361. i2s->playback_i2s_cif = cif_ids[0];
  362. i2s->capture_i2s_cif = cif_ids[1];
  363. i2s->clk_i2s = clk_get(&pdev->dev, NULL);
  364. if (IS_ERR(i2s->clk_i2s)) {
  365. dev_err(&pdev->dev, "Can't retrieve i2s clock\n");
  366. ret = PTR_ERR(i2s->clk_i2s);
  367. goto err;
  368. }
  369. mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  370. if (!mem) {
  371. dev_err(&pdev->dev, "No memory resource\n");
  372. ret = -ENODEV;
  373. goto err_clk_put;
  374. }
  375. memregion = devm_request_mem_region(&pdev->dev, mem->start,
  376. resource_size(mem), DRV_NAME);
  377. if (!memregion) {
  378. dev_err(&pdev->dev, "Memory region already claimed\n");
  379. ret = -EBUSY;
  380. goto err_clk_put;
  381. }
  382. regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
  383. if (!regs) {
  384. dev_err(&pdev->dev, "ioremap failed\n");
  385. ret = -ENOMEM;
  386. goto err_clk_put;
  387. }
  388. i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
  389. &tegra30_i2s_regmap_config);
  390. if (IS_ERR(i2s->regmap)) {
  391. dev_err(&pdev->dev, "regmap init failed\n");
  392. ret = PTR_ERR(i2s->regmap);
  393. goto err_clk_put;
  394. }
  395. regcache_cache_only(i2s->regmap, true);
  396. pm_runtime_enable(&pdev->dev);
  397. if (!pm_runtime_enabled(&pdev->dev)) {
  398. ret = tegra30_i2s_runtime_resume(&pdev->dev);
  399. if (ret)
  400. goto err_pm_disable;
  401. }
  402. ret = snd_soc_register_dai(&pdev->dev, &i2s->dai);
  403. if (ret) {
  404. dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
  405. ret = -ENOMEM;
  406. goto err_suspend;
  407. }
  408. ret = tegra_pcm_platform_register(&pdev->dev);
  409. if (ret) {
  410. dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
  411. goto err_unregister_dai;
  412. }
  413. return 0;
  414. err_unregister_dai:
  415. snd_soc_unregister_dai(&pdev->dev);
  416. err_suspend:
  417. if (!pm_runtime_status_suspended(&pdev->dev))
  418. tegra30_i2s_runtime_suspend(&pdev->dev);
  419. err_pm_disable:
  420. pm_runtime_disable(&pdev->dev);
  421. err_clk_put:
  422. clk_put(i2s->clk_i2s);
  423. err:
  424. return ret;
  425. }
  426. static int __devexit tegra30_i2s_platform_remove(struct platform_device *pdev)
  427. {
  428. struct tegra30_i2s *i2s = dev_get_drvdata(&pdev->dev);
  429. pm_runtime_disable(&pdev->dev);
  430. if (!pm_runtime_status_suspended(&pdev->dev))
  431. tegra30_i2s_runtime_suspend(&pdev->dev);
  432. tegra_pcm_platform_unregister(&pdev->dev);
  433. snd_soc_unregister_dai(&pdev->dev);
  434. clk_put(i2s->clk_i2s);
  435. return 0;
  436. }
  437. static const struct of_device_id tegra30_i2s_of_match[] __devinitconst = {
  438. { .compatible = "nvidia,tegra30-i2s", },
  439. {},
  440. };
  441. static const struct dev_pm_ops tegra30_i2s_pm_ops __devinitconst = {
  442. SET_RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend,
  443. tegra30_i2s_runtime_resume, NULL)
  444. };
  445. static struct platform_driver tegra30_i2s_driver = {
  446. .driver = {
  447. .name = DRV_NAME,
  448. .owner = THIS_MODULE,
  449. .of_match_table = tegra30_i2s_of_match,
  450. .pm = &tegra30_i2s_pm_ops,
  451. },
  452. .probe = tegra30_i2s_platform_probe,
  453. .remove = __devexit_p(tegra30_i2s_platform_remove),
  454. };
  455. module_platform_driver(tegra30_i2s_driver);
  456. MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
  457. MODULE_DESCRIPTION("Tegra30 I2S ASoC driver");
  458. MODULE_LICENSE("GPL");
  459. MODULE_ALIAS("platform:" DRV_NAME);
  460. MODULE_DEVICE_TABLE(of, tegra30_i2s_of_match);