core.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. /*
  2. * Renesas R-Car SRU/SCU/SSIU/SSI support
  3. *
  4. * Copyright (C) 2013 Renesas Solutions Corp.
  5. * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * Based on fsi.c
  8. * Kuninori Morimoto <morimoto.kuninori@renesas.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. /*
  15. * Renesas R-Car sound device structure
  16. *
  17. * Gen1
  18. *
  19. * SRU : Sound Routing Unit
  20. * - SRC : Sampling Rate Converter
  21. * - CMD
  22. * - CTU : Channel Count Conversion Unit
  23. * - MIX : Mixer
  24. * - DVC : Digital Volume and Mute Function
  25. * - SSI : Serial Sound Interface
  26. *
  27. * Gen2
  28. *
  29. * SCU : Sampling Rate Converter Unit
  30. * - SRC : Sampling Rate Converter
  31. * - CMD
  32. * - CTU : Channel Count Conversion Unit
  33. * - MIX : Mixer
  34. * - DVC : Digital Volume and Mute Function
  35. * SSIU : Serial Sound Interface Unit
  36. * - SSI : Serial Sound Interface
  37. */
  38. /*
  39. * driver data Image
  40. *
  41. * rsnd_priv
  42. * |
  43. * | ** this depends on Gen1/Gen2
  44. * |
  45. * +- gen
  46. * |
  47. * | ** these depend on data path
  48. * | ** gen and platform data control it
  49. * |
  50. * +- rdai[0]
  51. * | | sru ssiu ssi
  52. * | +- playback -> [mod] -> [mod] -> [mod] -> ...
  53. * | |
  54. * | | sru ssiu ssi
  55. * | +- capture -> [mod] -> [mod] -> [mod] -> ...
  56. * |
  57. * +- rdai[1]
  58. * | | sru ssiu ssi
  59. * | +- playback -> [mod] -> [mod] -> [mod] -> ...
  60. * | |
  61. * | | sru ssiu ssi
  62. * | +- capture -> [mod] -> [mod] -> [mod] -> ...
  63. * ...
  64. * |
  65. * | ** these control ssi
  66. * |
  67. * +- ssi
  68. * | |
  69. * | +- ssi[0]
  70. * | +- ssi[1]
  71. * | +- ssi[2]
  72. * | ...
  73. * |
  74. * | ** these control scu
  75. * |
  76. * +- scu
  77. * |
  78. * +- scu[0]
  79. * +- scu[1]
  80. * +- scu[2]
  81. * ...
  82. *
  83. *
  84. * for_each_rsnd_dai(xx, priv, xx)
  85. * rdai[0] => rdai[1] => rdai[2] => ...
  86. *
  87. * for_each_rsnd_mod(xx, rdai, xx)
  88. * [mod] => [mod] => [mod] => ...
  89. *
  90. * rsnd_dai_call(xxx, fn )
  91. * [mod]->fn() -> [mod]->fn() -> [mod]->fn()...
  92. *
  93. */
  94. #include <linux/pm_runtime.h>
  95. #include "rsnd.h"
  96. #define RSND_RATES SNDRV_PCM_RATE_8000_96000
  97. #define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
  98. /*
  99. * rsnd_platform functions
  100. */
  101. #define rsnd_platform_call(priv, dai, func, param...) \
  102. (!(priv->info->func) ? -ENODEV : \
  103. priv->info->func(param))
  104. /*
  105. * basic function
  106. */
  107. u32 rsnd_read(struct rsnd_priv *priv,
  108. struct rsnd_mod *mod, enum rsnd_reg reg)
  109. {
  110. void __iomem *base = rsnd_gen_reg_get(priv, mod, reg);
  111. BUG_ON(!base);
  112. return ioread32(base);
  113. }
  114. void rsnd_write(struct rsnd_priv *priv,
  115. struct rsnd_mod *mod,
  116. enum rsnd_reg reg, u32 data)
  117. {
  118. void __iomem *base = rsnd_gen_reg_get(priv, mod, reg);
  119. struct device *dev = rsnd_priv_to_dev(priv);
  120. BUG_ON(!base);
  121. dev_dbg(dev, "w %p : %08x\n", base, data);
  122. iowrite32(data, base);
  123. }
  124. void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod,
  125. enum rsnd_reg reg, u32 mask, u32 data)
  126. {
  127. void __iomem *base = rsnd_gen_reg_get(priv, mod, reg);
  128. struct device *dev = rsnd_priv_to_dev(priv);
  129. u32 val;
  130. BUG_ON(!base);
  131. val = ioread32(base);
  132. val &= ~mask;
  133. val |= data & mask;
  134. iowrite32(val, base);
  135. dev_dbg(dev, "s %p : %08x\n", base, val);
  136. }
  137. /*
  138. * rsnd_mod functions
  139. */
  140. char *rsnd_mod_name(struct rsnd_mod *mod)
  141. {
  142. if (!mod || !mod->ops)
  143. return "unknown";
  144. return mod->ops->name;
  145. }
  146. void rsnd_mod_init(struct rsnd_priv *priv,
  147. struct rsnd_mod *mod,
  148. struct rsnd_mod_ops *ops,
  149. int id)
  150. {
  151. mod->priv = priv;
  152. mod->id = id;
  153. mod->ops = ops;
  154. INIT_LIST_HEAD(&mod->list);
  155. }
  156. /*
  157. * rsnd_dai functions
  158. */
  159. #define rsnd_dai_call(rdai, io, fn) \
  160. ({ \
  161. struct rsnd_mod *mod, *n; \
  162. int ret = 0; \
  163. for_each_rsnd_mod(mod, n, io) { \
  164. ret = rsnd_mod_call(mod, fn, rdai, io); \
  165. if (ret < 0) \
  166. break; \
  167. } \
  168. ret; \
  169. })
  170. int rsnd_dai_connect(struct rsnd_dai *rdai,
  171. struct rsnd_mod *mod,
  172. struct rsnd_dai_stream *io)
  173. {
  174. struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
  175. struct device *dev = rsnd_priv_to_dev(priv);
  176. if (!mod) {
  177. dev_err(dev, "NULL mod\n");
  178. return -EIO;
  179. }
  180. if (!list_empty(&mod->list)) {
  181. dev_err(dev, "%s%d is not empty\n",
  182. rsnd_mod_name(mod),
  183. rsnd_mod_id(mod));
  184. return -EIO;
  185. }
  186. list_add_tail(&mod->list, &io->head);
  187. return 0;
  188. }
  189. int rsnd_dai_disconnect(struct rsnd_mod *mod)
  190. {
  191. list_del_init(&mod->list);
  192. return 0;
  193. }
  194. struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id)
  195. {
  196. return priv->rdai + id;
  197. }
  198. static struct rsnd_dai *rsnd_dai_to_rdai(struct snd_soc_dai *dai)
  199. {
  200. struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai);
  201. return rsnd_dai_get(priv, dai->id);
  202. }
  203. int rsnd_dai_is_play(struct rsnd_dai *rdai, struct rsnd_dai_stream *io)
  204. {
  205. return &rdai->playback == io;
  206. }
  207. /*
  208. * rsnd_soc_dai functions
  209. */
  210. int rsnd_dai_pointer_offset(struct rsnd_dai_stream *io, int additional)
  211. {
  212. struct snd_pcm_substream *substream = io->substream;
  213. struct snd_pcm_runtime *runtime = substream->runtime;
  214. int pos = io->byte_pos + additional;
  215. pos %= (runtime->periods * io->byte_per_period);
  216. return pos;
  217. }
  218. void rsnd_dai_pointer_update(struct rsnd_dai_stream *io, int byte)
  219. {
  220. io->byte_pos += byte;
  221. if (io->byte_pos >= io->next_period_byte) {
  222. struct snd_pcm_substream *substream = io->substream;
  223. struct snd_pcm_runtime *runtime = substream->runtime;
  224. io->period_pos++;
  225. io->next_period_byte += io->byte_per_period;
  226. if (io->period_pos >= runtime->periods) {
  227. io->byte_pos = 0;
  228. io->period_pos = 0;
  229. io->next_period_byte = io->byte_per_period;
  230. }
  231. snd_pcm_period_elapsed(substream);
  232. }
  233. }
  234. static int rsnd_dai_stream_init(struct rsnd_dai_stream *io,
  235. struct snd_pcm_substream *substream)
  236. {
  237. struct snd_pcm_runtime *runtime = substream->runtime;
  238. if (!list_empty(&io->head))
  239. return -EIO;
  240. INIT_LIST_HEAD(&io->head);
  241. io->substream = substream;
  242. io->byte_pos = 0;
  243. io->period_pos = 0;
  244. io->byte_per_period = runtime->period_size *
  245. runtime->channels *
  246. samples_to_bytes(runtime, 1);
  247. io->next_period_byte = io->byte_per_period;
  248. return 0;
  249. }
  250. static
  251. struct snd_soc_dai *rsnd_substream_to_dai(struct snd_pcm_substream *substream)
  252. {
  253. struct snd_soc_pcm_runtime *rtd = substream->private_data;
  254. return rtd->cpu_dai;
  255. }
  256. static
  257. struct rsnd_dai_stream *rsnd_rdai_to_io(struct rsnd_dai *rdai,
  258. struct snd_pcm_substream *substream)
  259. {
  260. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
  261. return &rdai->playback;
  262. else
  263. return &rdai->capture;
  264. }
  265. static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
  266. struct snd_soc_dai *dai)
  267. {
  268. struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai);
  269. struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
  270. struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream);
  271. struct rsnd_dai_platform_info *info = rsnd_dai_get_platform_info(rdai);
  272. int ssi_id = rsnd_dai_is_play(rdai, io) ? info->ssi_id_playback :
  273. info->ssi_id_capture;
  274. int ret;
  275. unsigned long flags;
  276. rsnd_lock(priv, flags);
  277. switch (cmd) {
  278. case SNDRV_PCM_TRIGGER_START:
  279. ret = rsnd_dai_stream_init(io, substream);
  280. if (ret < 0)
  281. goto dai_trigger_end;
  282. ret = rsnd_platform_call(priv, dai, start, ssi_id);
  283. if (ret < 0)
  284. goto dai_trigger_end;
  285. ret = rsnd_gen_path_init(priv, rdai, io);
  286. if (ret < 0)
  287. goto dai_trigger_end;
  288. ret = rsnd_dai_call(rdai, io, init);
  289. if (ret < 0)
  290. goto dai_trigger_end;
  291. ret = rsnd_dai_call(rdai, io, start);
  292. if (ret < 0)
  293. goto dai_trigger_end;
  294. break;
  295. case SNDRV_PCM_TRIGGER_STOP:
  296. ret = rsnd_dai_call(rdai, io, stop);
  297. if (ret < 0)
  298. goto dai_trigger_end;
  299. ret = rsnd_dai_call(rdai, io, quit);
  300. if (ret < 0)
  301. goto dai_trigger_end;
  302. ret = rsnd_gen_path_exit(priv, rdai, io);
  303. if (ret < 0)
  304. goto dai_trigger_end;
  305. ret = rsnd_platform_call(priv, dai, stop, ssi_id);
  306. if (ret < 0)
  307. goto dai_trigger_end;
  308. break;
  309. default:
  310. ret = -EINVAL;
  311. }
  312. dai_trigger_end:
  313. rsnd_unlock(priv, flags);
  314. return ret;
  315. }
  316. static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
  317. {
  318. struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
  319. /* set master/slave audio interface */
  320. switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
  321. case SND_SOC_DAIFMT_CBM_CFM:
  322. rdai->clk_master = 1;
  323. break;
  324. case SND_SOC_DAIFMT_CBS_CFS:
  325. rdai->clk_master = 0;
  326. break;
  327. default:
  328. return -EINVAL;
  329. }
  330. /* set clock inversion */
  331. switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
  332. case SND_SOC_DAIFMT_NB_IF:
  333. rdai->bit_clk_inv = 0;
  334. rdai->frm_clk_inv = 1;
  335. break;
  336. case SND_SOC_DAIFMT_IB_NF:
  337. rdai->bit_clk_inv = 1;
  338. rdai->frm_clk_inv = 0;
  339. break;
  340. case SND_SOC_DAIFMT_IB_IF:
  341. rdai->bit_clk_inv = 1;
  342. rdai->frm_clk_inv = 1;
  343. break;
  344. case SND_SOC_DAIFMT_NB_NF:
  345. default:
  346. rdai->bit_clk_inv = 0;
  347. rdai->frm_clk_inv = 0;
  348. break;
  349. }
  350. /* set format */
  351. switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
  352. case SND_SOC_DAIFMT_I2S:
  353. rdai->sys_delay = 0;
  354. rdai->data_alignment = 0;
  355. break;
  356. case SND_SOC_DAIFMT_LEFT_J:
  357. rdai->sys_delay = 1;
  358. rdai->data_alignment = 0;
  359. break;
  360. case SND_SOC_DAIFMT_RIGHT_J:
  361. rdai->sys_delay = 1;
  362. rdai->data_alignment = 1;
  363. break;
  364. }
  365. return 0;
  366. }
  367. static const struct snd_soc_dai_ops rsnd_soc_dai_ops = {
  368. .trigger = rsnd_soc_dai_trigger,
  369. .set_fmt = rsnd_soc_dai_set_fmt,
  370. };
  371. static int rsnd_dai_probe(struct platform_device *pdev,
  372. struct rcar_snd_info *info,
  373. struct rsnd_priv *priv)
  374. {
  375. struct snd_soc_dai_driver *drv;
  376. struct rsnd_dai *rdai;
  377. struct device *dev = rsnd_priv_to_dev(priv);
  378. struct rsnd_dai_platform_info *dai_info;
  379. int dai_nr = info->dai_info_nr;
  380. int i, pid, cid;
  381. drv = devm_kzalloc(dev, sizeof(*drv) * dai_nr, GFP_KERNEL);
  382. rdai = devm_kzalloc(dev, sizeof(*rdai) * dai_nr, GFP_KERNEL);
  383. if (!drv || !rdai) {
  384. dev_err(dev, "dai allocate failed\n");
  385. return -ENOMEM;
  386. }
  387. for (i = 0; i < dai_nr; i++) {
  388. dai_info = &info->dai_info[i];
  389. pid = dai_info->ssi_id_playback;
  390. cid = dai_info->ssi_id_capture;
  391. /*
  392. * init rsnd_dai
  393. */
  394. INIT_LIST_HEAD(&rdai[i].playback.head);
  395. INIT_LIST_HEAD(&rdai[i].capture.head);
  396. rdai[i].info = dai_info;
  397. snprintf(rdai[i].name, RSND_DAI_NAME_SIZE, "rsnd-dai.%d", i);
  398. /*
  399. * init snd_soc_dai_driver
  400. */
  401. drv[i].name = rdai[i].name;
  402. drv[i].ops = &rsnd_soc_dai_ops;
  403. if (pid >= 0) {
  404. drv[i].playback.rates = RSND_RATES;
  405. drv[i].playback.formats = RSND_FMTS;
  406. drv[i].playback.channels_min = 2;
  407. drv[i].playback.channels_max = 2;
  408. }
  409. if (cid >= 0) {
  410. drv[i].capture.rates = RSND_RATES;
  411. drv[i].capture.formats = RSND_FMTS;
  412. drv[i].capture.channels_min = 2;
  413. drv[i].capture.channels_max = 2;
  414. }
  415. dev_dbg(dev, "%s (%d, %d) probed", rdai[i].name, pid, cid);
  416. }
  417. priv->dai_nr = dai_nr;
  418. priv->daidrv = drv;
  419. priv->rdai = rdai;
  420. return 0;
  421. }
  422. static void rsnd_dai_remove(struct platform_device *pdev,
  423. struct rsnd_priv *priv)
  424. {
  425. }
  426. /*
  427. * pcm ops
  428. */
  429. static struct snd_pcm_hardware rsnd_pcm_hardware = {
  430. .info = SNDRV_PCM_INFO_INTERLEAVED |
  431. SNDRV_PCM_INFO_MMAP |
  432. SNDRV_PCM_INFO_MMAP_VALID |
  433. SNDRV_PCM_INFO_PAUSE,
  434. .formats = RSND_FMTS,
  435. .rates = RSND_RATES,
  436. .rate_min = 8000,
  437. .rate_max = 192000,
  438. .channels_min = 2,
  439. .channels_max = 2,
  440. .buffer_bytes_max = 64 * 1024,
  441. .period_bytes_min = 32,
  442. .period_bytes_max = 8192,
  443. .periods_min = 1,
  444. .periods_max = 32,
  445. .fifo_size = 256,
  446. };
  447. static int rsnd_pcm_open(struct snd_pcm_substream *substream)
  448. {
  449. struct snd_pcm_runtime *runtime = substream->runtime;
  450. int ret = 0;
  451. snd_soc_set_runtime_hwparams(substream, &rsnd_pcm_hardware);
  452. ret = snd_pcm_hw_constraint_integer(runtime,
  453. SNDRV_PCM_HW_PARAM_PERIODS);
  454. return ret;
  455. }
  456. static int rsnd_hw_params(struct snd_pcm_substream *substream,
  457. struct snd_pcm_hw_params *hw_params)
  458. {
  459. return snd_pcm_lib_malloc_pages(substream,
  460. params_buffer_bytes(hw_params));
  461. }
  462. static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
  463. {
  464. struct snd_pcm_runtime *runtime = substream->runtime;
  465. struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
  466. struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
  467. struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream);
  468. return bytes_to_frames(runtime, io->byte_pos);
  469. }
  470. static struct snd_pcm_ops rsnd_pcm_ops = {
  471. .open = rsnd_pcm_open,
  472. .ioctl = snd_pcm_lib_ioctl,
  473. .hw_params = rsnd_hw_params,
  474. .hw_free = snd_pcm_lib_free_pages,
  475. .pointer = rsnd_pointer,
  476. };
  477. /*
  478. * snd_soc_platform
  479. */
  480. #define PREALLOC_BUFFER (32 * 1024)
  481. #define PREALLOC_BUFFER_MAX (32 * 1024)
  482. static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd)
  483. {
  484. return snd_pcm_lib_preallocate_pages_for_all(
  485. rtd->pcm,
  486. SNDRV_DMA_TYPE_DEV,
  487. rtd->card->snd_card->dev,
  488. PREALLOC_BUFFER, PREALLOC_BUFFER_MAX);
  489. }
  490. static void rsnd_pcm_free(struct snd_pcm *pcm)
  491. {
  492. snd_pcm_lib_preallocate_free_for_all(pcm);
  493. }
  494. static struct snd_soc_platform_driver rsnd_soc_platform = {
  495. .ops = &rsnd_pcm_ops,
  496. .pcm_new = rsnd_pcm_new,
  497. .pcm_free = rsnd_pcm_free,
  498. };
  499. static const struct snd_soc_component_driver rsnd_soc_component = {
  500. .name = "rsnd",
  501. };
  502. /*
  503. * rsnd probe
  504. */
  505. static int rsnd_probe(struct platform_device *pdev)
  506. {
  507. struct rcar_snd_info *info;
  508. struct rsnd_priv *priv;
  509. struct device *dev = &pdev->dev;
  510. int ret;
  511. info = pdev->dev.platform_data;
  512. if (!info) {
  513. dev_err(dev, "driver needs R-Car sound information\n");
  514. return -ENODEV;
  515. }
  516. /*
  517. * init priv data
  518. */
  519. priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
  520. if (!priv) {
  521. dev_err(dev, "priv allocate failed\n");
  522. return -ENODEV;
  523. }
  524. priv->dev = dev;
  525. priv->info = info;
  526. spin_lock_init(&priv->lock);
  527. /*
  528. * init each module
  529. */
  530. ret = rsnd_gen_probe(pdev, info, priv);
  531. if (ret < 0)
  532. return ret;
  533. ret = rsnd_dai_probe(pdev, info, priv);
  534. if (ret < 0)
  535. return ret;
  536. ret = rsnd_scu_probe(pdev, info, priv);
  537. if (ret < 0)
  538. return ret;
  539. ret = rsnd_adg_probe(pdev, info, priv);
  540. if (ret < 0)
  541. return ret;
  542. /*
  543. * asoc register
  544. */
  545. ret = snd_soc_register_platform(dev, &rsnd_soc_platform);
  546. if (ret < 0) {
  547. dev_err(dev, "cannot snd soc register\n");
  548. return ret;
  549. }
  550. ret = snd_soc_register_component(dev, &rsnd_soc_component,
  551. priv->daidrv, rsnd_dai_nr(priv));
  552. if (ret < 0) {
  553. dev_err(dev, "cannot snd dai register\n");
  554. goto exit_snd_soc;
  555. }
  556. dev_set_drvdata(dev, priv);
  557. pm_runtime_enable(dev);
  558. dev_info(dev, "probed\n");
  559. return ret;
  560. exit_snd_soc:
  561. snd_soc_unregister_platform(dev);
  562. return ret;
  563. }
  564. static int rsnd_remove(struct platform_device *pdev)
  565. {
  566. struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev);
  567. pm_runtime_disable(&pdev->dev);
  568. /*
  569. * remove each module
  570. */
  571. rsnd_adg_remove(pdev, priv);
  572. rsnd_scu_remove(pdev, priv);
  573. rsnd_dai_remove(pdev, priv);
  574. rsnd_gen_remove(pdev, priv);
  575. return 0;
  576. }
  577. static struct platform_driver rsnd_driver = {
  578. .driver = {
  579. .name = "rcar_sound",
  580. },
  581. .probe = rsnd_probe,
  582. .remove = rsnd_remove,
  583. };
  584. module_platform_driver(rsnd_driver);
  585. MODULE_LICENSE("GPL");
  586. MODULE_DESCRIPTION("Renesas R-Car audio driver");
  587. MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
  588. MODULE_ALIAS("platform:rcar-pcm-audio");