ams-delta.c 16 KB

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