ams-delta.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * ams-delta.c -- SoC audio for Amstrad E3 (Delta) videophone
  4. *
  5. * Copyright (C) 2009 Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
  6. *
  7. * Initially based on sound/soc/omap/osk5912.x
  8. * Copyright (C) 2008 Mistral Solutions
  9. */
  10. #include <linux/gpio/consumer.h>
  11. #include <linux/spinlock.h>
  12. #include <linux/tty.h>
  13. #include <linux/module.h>
  14. #include <sound/soc.h>
  15. #include <sound/jack.h>
  16. #include <linux/platform_data/asoc-ti-mcbsp.h>
  17. #include "omap-mcbsp.h"
  18. #include "../codecs/cx20442.h"
  19. static struct gpio_desc *handset_mute;
  20. static struct gpio_desc *handsfree_mute;
  21. static int ams_delta_event_handset(struct snd_soc_dapm_widget *w,
  22. struct snd_kcontrol *k, int event)
  23. {
  24. gpiod_set_value_cansleep(handset_mute, !SND_SOC_DAPM_EVENT_ON(event));
  25. return 0;
  26. }
  27. static int ams_delta_event_handsfree(struct snd_soc_dapm_widget *w,
  28. struct snd_kcontrol *k, int event)
  29. {
  30. gpiod_set_value_cansleep(handsfree_mute, !SND_SOC_DAPM_EVENT_ON(event));
  31. return 0;
  32. }
  33. /* Board specific DAPM widgets */
  34. static const struct snd_soc_dapm_widget ams_delta_dapm_widgets[] = {
  35. /* Handset */
  36. SND_SOC_DAPM_MIC("Mouthpiece", NULL),
  37. SND_SOC_DAPM_HP("Earpiece", ams_delta_event_handset),
  38. /* Handsfree/Speakerphone */
  39. SND_SOC_DAPM_MIC("Microphone", NULL),
  40. SND_SOC_DAPM_SPK("Speaker", ams_delta_event_handsfree),
  41. };
  42. /* How they are connected to codec pins */
  43. static const struct snd_soc_dapm_route ams_delta_audio_map[] = {
  44. {"TELIN", NULL, "Mouthpiece"},
  45. {"Earpiece", NULL, "TELOUT"},
  46. {"MIC", NULL, "Microphone"},
  47. {"Speaker", NULL, "SPKOUT"},
  48. };
  49. /*
  50. * Controls, functional after the modem line discipline is activated.
  51. */
  52. /* Virtual switch: audio input/output constellations */
  53. static const char *ams_delta_audio_mode[] =
  54. {"Mixed", "Handset", "Handsfree", "Speakerphone"};
  55. /* Selection <-> pin translation */
  56. #define AMS_DELTA_MOUTHPIECE 0
  57. #define AMS_DELTA_EARPIECE 1
  58. #define AMS_DELTA_MICROPHONE 2
  59. #define AMS_DELTA_SPEAKER 3
  60. #define AMS_DELTA_AGC 4
  61. #define AMS_DELTA_MIXED ((1 << AMS_DELTA_EARPIECE) | \
  62. (1 << AMS_DELTA_MICROPHONE))
  63. #define AMS_DELTA_HANDSET ((1 << AMS_DELTA_MOUTHPIECE) | \
  64. (1 << AMS_DELTA_EARPIECE))
  65. #define AMS_DELTA_HANDSFREE ((1 << AMS_DELTA_MICROPHONE) | \
  66. (1 << AMS_DELTA_SPEAKER))
  67. #define AMS_DELTA_SPEAKERPHONE (AMS_DELTA_HANDSFREE | (1 << AMS_DELTA_AGC))
  68. static const unsigned short ams_delta_audio_mode_pins[] = {
  69. AMS_DELTA_MIXED,
  70. AMS_DELTA_HANDSET,
  71. AMS_DELTA_HANDSFREE,
  72. AMS_DELTA_SPEAKERPHONE,
  73. };
  74. static unsigned short ams_delta_audio_agc;
  75. /*
  76. * Used for passing a codec structure pointer
  77. * from the board initialization code to the tty line discipline.
  78. */
  79. static struct snd_soc_component *cx20442_codec;
  80. static int ams_delta_set_audio_mode(struct snd_kcontrol *kcontrol,
  81. struct snd_ctl_elem_value *ucontrol)
  82. {
  83. struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
  84. struct snd_soc_dapm_context *dapm = &card->dapm;
  85. struct soc_enum *control = (struct soc_enum *)kcontrol->private_value;
  86. unsigned short pins;
  87. int pin, changed = 0;
  88. /* Refuse any mode changes if we are not able to control the codec. */
  89. if (!cx20442_codec->card->pop_time)
  90. return -EUNATCH;
  91. if (ucontrol->value.enumerated.item[0] >= control->items)
  92. return -EINVAL;
  93. snd_soc_dapm_mutex_lock(dapm);
  94. /* Translate selection to bitmap */
  95. pins = ams_delta_audio_mode_pins[ucontrol->value.enumerated.item[0]];
  96. /* Setup pins after corresponding bits if changed */
  97. pin = !!(pins & (1 << AMS_DELTA_MOUTHPIECE));
  98. if (pin != snd_soc_dapm_get_pin_status(dapm, "Mouthpiece")) {
  99. changed = 1;
  100. if (pin)
  101. snd_soc_dapm_enable_pin_unlocked(dapm, "Mouthpiece");
  102. else
  103. snd_soc_dapm_disable_pin_unlocked(dapm, "Mouthpiece");
  104. }
  105. pin = !!(pins & (1 << AMS_DELTA_EARPIECE));
  106. if (pin != snd_soc_dapm_get_pin_status(dapm, "Earpiece")) {
  107. changed = 1;
  108. if (pin)
  109. snd_soc_dapm_enable_pin_unlocked(dapm, "Earpiece");
  110. else
  111. snd_soc_dapm_disable_pin_unlocked(dapm, "Earpiece");
  112. }
  113. pin = !!(pins & (1 << AMS_DELTA_MICROPHONE));
  114. if (pin != snd_soc_dapm_get_pin_status(dapm, "Microphone")) {
  115. changed = 1;
  116. if (pin)
  117. snd_soc_dapm_enable_pin_unlocked(dapm, "Microphone");
  118. else
  119. snd_soc_dapm_disable_pin_unlocked(dapm, "Microphone");
  120. }
  121. pin = !!(pins & (1 << AMS_DELTA_SPEAKER));
  122. if (pin != snd_soc_dapm_get_pin_status(dapm, "Speaker")) {
  123. changed = 1;
  124. if (pin)
  125. snd_soc_dapm_enable_pin_unlocked(dapm, "Speaker");
  126. else
  127. snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
  128. }
  129. pin = !!(pins & (1 << AMS_DELTA_AGC));
  130. if (pin != ams_delta_audio_agc) {
  131. ams_delta_audio_agc = pin;
  132. changed = 1;
  133. if (pin)
  134. snd_soc_dapm_enable_pin_unlocked(dapm, "AGCIN");
  135. else
  136. snd_soc_dapm_disable_pin_unlocked(dapm, "AGCIN");
  137. }
  138. if (changed)
  139. snd_soc_dapm_sync_unlocked(dapm);
  140. snd_soc_dapm_mutex_unlock(dapm);
  141. return changed;
  142. }
  143. static int ams_delta_get_audio_mode(struct snd_kcontrol *kcontrol,
  144. struct snd_ctl_elem_value *ucontrol)
  145. {
  146. struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
  147. struct snd_soc_dapm_context *dapm = &card->dapm;
  148. unsigned short pins, mode;
  149. pins = ((snd_soc_dapm_get_pin_status(dapm, "Mouthpiece") <<
  150. AMS_DELTA_MOUTHPIECE) |
  151. (snd_soc_dapm_get_pin_status(dapm, "Earpiece") <<
  152. AMS_DELTA_EARPIECE));
  153. if (pins)
  154. pins |= (snd_soc_dapm_get_pin_status(dapm, "Microphone") <<
  155. AMS_DELTA_MICROPHONE);
  156. else
  157. pins = ((snd_soc_dapm_get_pin_status(dapm, "Microphone") <<
  158. AMS_DELTA_MICROPHONE) |
  159. (snd_soc_dapm_get_pin_status(dapm, "Speaker") <<
  160. AMS_DELTA_SPEAKER) |
  161. (ams_delta_audio_agc << AMS_DELTA_AGC));
  162. for (mode = 0; mode < ARRAY_SIZE(ams_delta_audio_mode); mode++)
  163. if (pins == ams_delta_audio_mode_pins[mode])
  164. break;
  165. if (mode >= ARRAY_SIZE(ams_delta_audio_mode))
  166. return -EINVAL;
  167. ucontrol->value.enumerated.item[0] = mode;
  168. return 0;
  169. }
  170. static SOC_ENUM_SINGLE_EXT_DECL(ams_delta_audio_enum,
  171. ams_delta_audio_mode);
  172. static const struct snd_kcontrol_new ams_delta_audio_controls[] = {
  173. SOC_ENUM_EXT("Audio Mode", ams_delta_audio_enum,
  174. ams_delta_get_audio_mode, ams_delta_set_audio_mode),
  175. };
  176. /* Hook switch */
  177. static struct snd_soc_jack ams_delta_hook_switch;
  178. static struct snd_soc_jack_gpio ams_delta_hook_switch_gpios[] = {
  179. {
  180. .name = "hook_switch",
  181. .report = SND_JACK_HEADSET,
  182. .invert = 1,
  183. .debounce_time = 150,
  184. }
  185. };
  186. /* After we are able to control the codec over the modem,
  187. * the hook switch can be used for dynamic DAPM reconfiguration. */
  188. static struct snd_soc_jack_pin ams_delta_hook_switch_pins[] = {
  189. /* Handset */
  190. {
  191. .pin = "Mouthpiece",
  192. .mask = SND_JACK_MICROPHONE,
  193. },
  194. {
  195. .pin = "Earpiece",
  196. .mask = SND_JACK_HEADPHONE,
  197. },
  198. /* Handsfree */
  199. {
  200. .pin = "Microphone",
  201. .mask = SND_JACK_MICROPHONE,
  202. .invert = 1,
  203. },
  204. {
  205. .pin = "Speaker",
  206. .mask = SND_JACK_HEADPHONE,
  207. .invert = 1,
  208. },
  209. };
  210. /*
  211. * Modem line discipline, required for making above controls functional.
  212. * Activated from userspace with ldattach, possibly invoked from udev rule.
  213. */
  214. /* To actually apply any modem controlled configuration changes to the codec,
  215. * we must connect codec DAI pins to the modem for a moment. Be careful not
  216. * to interfere with our digital mute function that shares the same hardware. */
  217. static struct timer_list cx81801_timer;
  218. static bool cx81801_cmd_pending;
  219. static bool ams_delta_muted;
  220. static DEFINE_SPINLOCK(ams_delta_lock);
  221. static struct gpio_desc *gpiod_modem_codec;
  222. static void cx81801_timeout(struct timer_list *unused)
  223. {
  224. int muted;
  225. spin_lock(&ams_delta_lock);
  226. cx81801_cmd_pending = 0;
  227. muted = ams_delta_muted;
  228. spin_unlock(&ams_delta_lock);
  229. /* Reconnect the codec DAI back from the modem to the CPU DAI
  230. * only if digital mute still off */
  231. if (!muted)
  232. gpiod_set_value(gpiod_modem_codec, 0);
  233. }
  234. /* Line discipline .open() */
  235. static int cx81801_open(struct tty_struct *tty)
  236. {
  237. int ret;
  238. if (!cx20442_codec)
  239. return -ENODEV;
  240. /*
  241. * Pass the codec structure pointer for use by other ldisc callbacks,
  242. * both the card and the codec specific parts.
  243. */
  244. tty->disc_data = cx20442_codec;
  245. ret = v253_ops.open(tty);
  246. if (ret < 0)
  247. tty->disc_data = NULL;
  248. return ret;
  249. }
  250. /* Line discipline .close() */
  251. static void cx81801_close(struct tty_struct *tty)
  252. {
  253. struct snd_soc_component *component = tty->disc_data;
  254. struct snd_soc_dapm_context *dapm;
  255. del_timer_sync(&cx81801_timer);
  256. /* Prevent the hook switch from further changing the DAPM pins */
  257. INIT_LIST_HEAD(&ams_delta_hook_switch.pins);
  258. if (!component)
  259. return;
  260. v253_ops.close(tty);
  261. dapm = &component->card->dapm;
  262. /* Revert back to default audio input/output constellation */
  263. snd_soc_dapm_mutex_lock(dapm);
  264. snd_soc_dapm_disable_pin_unlocked(dapm, "Mouthpiece");
  265. snd_soc_dapm_enable_pin_unlocked(dapm, "Earpiece");
  266. snd_soc_dapm_enable_pin_unlocked(dapm, "Microphone");
  267. snd_soc_dapm_disable_pin_unlocked(dapm, "Speaker");
  268. snd_soc_dapm_disable_pin_unlocked(dapm, "AGCIN");
  269. snd_soc_dapm_sync_unlocked(dapm);
  270. snd_soc_dapm_mutex_unlock(dapm);
  271. }
  272. /* Line discipline .hangup() */
  273. static void cx81801_hangup(struct tty_struct *tty)
  274. {
  275. cx81801_close(tty);
  276. }
  277. /* Line discipline .receive_buf() */
  278. static void cx81801_receive(struct tty_struct *tty, const u8 *cp, const u8 *fp,
  279. size_t count)
  280. {
  281. struct snd_soc_component *component = tty->disc_data;
  282. const unsigned char *c;
  283. int apply, ret;
  284. if (!component)
  285. return;
  286. if (!component->card->pop_time) {
  287. /* First modem response, complete setup procedure */
  288. /* Initialize timer used for config pulse generation */
  289. timer_setup(&cx81801_timer, cx81801_timeout, 0);
  290. v253_ops.receive_buf(tty, cp, fp, count);
  291. /* Link hook switch to DAPM pins */
  292. ret = snd_soc_jack_add_pins(&ams_delta_hook_switch,
  293. ARRAY_SIZE(ams_delta_hook_switch_pins),
  294. ams_delta_hook_switch_pins);
  295. if (ret)
  296. dev_warn(component->dev,
  297. "Failed to link hook switch to DAPM pins, "
  298. "will continue with hook switch unlinked.\n");
  299. return;
  300. }
  301. v253_ops.receive_buf(tty, cp, fp, count);
  302. for (c = &cp[count - 1]; c >= cp; c--) {
  303. if (*c != '\r')
  304. continue;
  305. /* Complete modem response received, apply config to codec */
  306. spin_lock_bh(&ams_delta_lock);
  307. mod_timer(&cx81801_timer, jiffies + msecs_to_jiffies(150));
  308. apply = !ams_delta_muted && !cx81801_cmd_pending;
  309. cx81801_cmd_pending = 1;
  310. spin_unlock_bh(&ams_delta_lock);
  311. /* Apply config pulse by connecting the codec to the modem
  312. * if not already done */
  313. if (apply)
  314. gpiod_set_value(gpiod_modem_codec, 1);
  315. break;
  316. }
  317. }
  318. /* Line discipline .write_wakeup() */
  319. static void cx81801_wakeup(struct tty_struct *tty)
  320. {
  321. v253_ops.write_wakeup(tty);
  322. }
  323. static struct tty_ldisc_ops cx81801_ops = {
  324. .name = "cx81801",
  325. .num = N_V253,
  326. .owner = THIS_MODULE,
  327. .open = cx81801_open,
  328. .close = cx81801_close,
  329. .hangup = cx81801_hangup,
  330. .receive_buf = cx81801_receive,
  331. .write_wakeup = cx81801_wakeup,
  332. };
  333. /*
  334. * Even if not very useful, the sound card can still work without any of the
  335. * above functionality activated. You can still control its audio input/output
  336. * constellation and speakerphone gain from userspace by issuing AT commands
  337. * over the modem port.
  338. */
  339. static struct snd_soc_ops ams_delta_ops;
  340. /* Digital mute implemented using modem/CPU multiplexer.
  341. * Shares hardware with codec config pulse generation */
  342. static bool ams_delta_muted = 1;
  343. static int ams_delta_mute(struct snd_soc_dai *dai, int mute, int direction)
  344. {
  345. int apply;
  346. if (ams_delta_muted == mute)
  347. return 0;
  348. spin_lock_bh(&ams_delta_lock);
  349. ams_delta_muted = mute;
  350. apply = !cx81801_cmd_pending;
  351. spin_unlock_bh(&ams_delta_lock);
  352. if (apply)
  353. gpiod_set_value(gpiod_modem_codec, !!mute);
  354. return 0;
  355. }
  356. /* Our codec DAI probably doesn't have its own .ops structure */
  357. static const struct snd_soc_dai_ops ams_delta_dai_ops = {
  358. .mute_stream = ams_delta_mute,
  359. .no_capture_mute = 1,
  360. };
  361. /* Will be used if the codec ever has its own digital_mute function */
  362. static int ams_delta_startup(struct snd_pcm_substream *substream)
  363. {
  364. return ams_delta_mute(NULL, 0, substream->stream);
  365. }
  366. static void ams_delta_shutdown(struct snd_pcm_substream *substream)
  367. {
  368. ams_delta_mute(NULL, 1, substream->stream);
  369. }
  370. /*
  371. * Card initialization
  372. */
  373. static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
  374. {
  375. struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
  376. struct snd_soc_card *card = rtd->card;
  377. struct snd_soc_dapm_context *dapm = &card->dapm;
  378. int ret;
  379. /* Codec is ready, now add/activate board specific controls */
  380. /* Store a pointer to the codec structure for tty ldisc use */
  381. cx20442_codec = snd_soc_rtd_to_codec(rtd, 0)->component;
  382. /* Add hook switch - can be used to control the codec from userspace
  383. * even if line discipline fails */
  384. ret = snd_soc_card_jack_new_pins(card, "hook_switch", SND_JACK_HEADSET,
  385. &ams_delta_hook_switch, NULL, 0);
  386. if (ret)
  387. dev_warn(card->dev,
  388. "Failed to allocate resources for hook switch, "
  389. "will continue without one.\n");
  390. else {
  391. ret = snd_soc_jack_add_gpiods(card->dev, &ams_delta_hook_switch,
  392. ARRAY_SIZE(ams_delta_hook_switch_gpios),
  393. ams_delta_hook_switch_gpios);
  394. if (ret)
  395. dev_warn(card->dev,
  396. "Failed to set up hook switch GPIO line, "
  397. "will continue with hook switch inactive.\n");
  398. }
  399. gpiod_modem_codec = devm_gpiod_get(card->dev, "modem_codec",
  400. GPIOD_OUT_HIGH);
  401. if (IS_ERR(gpiod_modem_codec)) {
  402. dev_warn(card->dev, "Failed to obtain modem_codec GPIO\n");
  403. return 0;
  404. }
  405. /* Set up digital mute if not provided by the codec */
  406. if (!codec_dai->driver->ops) {
  407. codec_dai->driver->ops = &ams_delta_dai_ops;
  408. } else {
  409. ams_delta_ops.startup = ams_delta_startup;
  410. ams_delta_ops.shutdown = ams_delta_shutdown;
  411. }
  412. /* Register optional line discipline for over the modem control */
  413. ret = tty_register_ldisc(&cx81801_ops);
  414. if (ret) {
  415. dev_warn(card->dev,
  416. "Failed to register line discipline, "
  417. "will continue without any controls.\n");
  418. return 0;
  419. }
  420. /* Set up initial pin constellation */
  421. snd_soc_dapm_disable_pin(dapm, "Mouthpiece");
  422. snd_soc_dapm_disable_pin(dapm, "Speaker");
  423. snd_soc_dapm_disable_pin(dapm, "AGCIN");
  424. snd_soc_dapm_disable_pin(dapm, "AGCOUT");
  425. return 0;
  426. }
  427. /* DAI glue - connects codec <--> CPU */
  428. SND_SOC_DAILINK_DEFS(cx20442,
  429. DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.1")),
  430. DAILINK_COMP_ARRAY(COMP_CODEC("cx20442-codec", "cx20442-voice")),
  431. DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.1")));
  432. static struct snd_soc_dai_link ams_delta_dai_link = {
  433. .name = "CX20442",
  434. .stream_name = "CX20442",
  435. .init = ams_delta_cx20442_init,
  436. .ops = &ams_delta_ops,
  437. .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF |
  438. SND_SOC_DAIFMT_CBM_CFM,
  439. SND_SOC_DAILINK_REG(cx20442),
  440. };
  441. /* Audio card driver */
  442. static struct snd_soc_card ams_delta_audio_card = {
  443. .name = "AMS_DELTA",
  444. .owner = THIS_MODULE,
  445. .dai_link = &ams_delta_dai_link,
  446. .num_links = 1,
  447. .controls = ams_delta_audio_controls,
  448. .num_controls = ARRAY_SIZE(ams_delta_audio_controls),
  449. .dapm_widgets = ams_delta_dapm_widgets,
  450. .num_dapm_widgets = ARRAY_SIZE(ams_delta_dapm_widgets),
  451. .dapm_routes = ams_delta_audio_map,
  452. .num_dapm_routes = ARRAY_SIZE(ams_delta_audio_map),
  453. };
  454. /* Module init/exit */
  455. static int ams_delta_probe(struct platform_device *pdev)
  456. {
  457. struct snd_soc_card *card = &ams_delta_audio_card;
  458. int ret;
  459. card->dev = &pdev->dev;
  460. handset_mute = devm_gpiod_get(card->dev, "handset_mute",
  461. GPIOD_OUT_HIGH);
  462. if (IS_ERR(handset_mute))
  463. return PTR_ERR(handset_mute);
  464. handsfree_mute = devm_gpiod_get(card->dev, "handsfree_mute",
  465. GPIOD_OUT_HIGH);
  466. if (IS_ERR(handsfree_mute))
  467. return PTR_ERR(handsfree_mute);
  468. ret = snd_soc_register_card(card);
  469. if (ret) {
  470. dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
  471. card->dev = NULL;
  472. return ret;
  473. }
  474. return 0;
  475. }
  476. static void ams_delta_remove(struct platform_device *pdev)
  477. {
  478. struct snd_soc_card *card = platform_get_drvdata(pdev);
  479. tty_unregister_ldisc(&cx81801_ops);
  480. snd_soc_unregister_card(card);
  481. card->dev = NULL;
  482. }
  483. #define DRV_NAME "ams-delta-audio"
  484. static struct platform_driver ams_delta_driver = {
  485. .driver = {
  486. .name = DRV_NAME,
  487. },
  488. .probe = ams_delta_probe,
  489. .remove = ams_delta_remove,
  490. };
  491. module_platform_driver(ams_delta_driver);
  492. MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>");
  493. MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone");
  494. MODULE_LICENSE("GPL");
  495. MODULE_ALIAS("platform:" DRV_NAME);