ln2440sbc_alc650.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * SoC audio for ln2440sbc
  3. *
  4. * Copyright 2007 KonekTel, a.s.
  5. * Author: Ivan Kuten
  6. * ivan.kuten@promwad.com
  7. *
  8. * Heavily based on smdk2443_wm9710.c
  9. * Copyright 2007 Wolfson Microelectronics PLC.
  10. * Author: Graeme Gregory
  11. * graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License version 2 as
  15. * published by the Free Software Foundation.
  16. *
  17. */
  18. #include <linux/module.h>
  19. #include <sound/soc.h>
  20. static struct snd_soc_card ln2440sbc;
  21. static struct snd_soc_dai_link ln2440sbc_dai[] = {
  22. {
  23. .name = "AC97",
  24. .stream_name = "AC97 HiFi",
  25. .cpu_dai_name = "samsung-ac97",
  26. .codec_dai_name = "ac97-hifi",
  27. .codec_name = "ac97-codec",
  28. .platform_name = "samsung-audio",
  29. },
  30. };
  31. static struct snd_soc_card ln2440sbc = {
  32. .name = "LN2440SBC",
  33. .owner = THIS_MODULE,
  34. .dai_link = ln2440sbc_dai,
  35. .num_links = ARRAY_SIZE(ln2440sbc_dai),
  36. };
  37. static struct platform_device *ln2440sbc_snd_ac97_device;
  38. static int __init ln2440sbc_init(void)
  39. {
  40. int ret;
  41. ln2440sbc_snd_ac97_device = platform_device_alloc("soc-audio", -1);
  42. if (!ln2440sbc_snd_ac97_device)
  43. return -ENOMEM;
  44. platform_set_drvdata(ln2440sbc_snd_ac97_device, &ln2440sbc);
  45. ret = platform_device_add(ln2440sbc_snd_ac97_device);
  46. if (ret)
  47. platform_device_put(ln2440sbc_snd_ac97_device);
  48. return ret;
  49. }
  50. static void __exit ln2440sbc_exit(void)
  51. {
  52. platform_device_unregister(ln2440sbc_snd_ac97_device);
  53. }
  54. module_init(ln2440sbc_init);
  55. module_exit(ln2440sbc_exit);
  56. /* Module information */
  57. MODULE_AUTHOR("Ivan Kuten");
  58. MODULE_DESCRIPTION("ALSA SoC ALC650 LN2440SBC");
  59. MODULE_LICENSE("GPL");