ln2440sbc_alc650.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 <sound/soc.h>
  19. static struct snd_soc_card ln2440sbc;
  20. static struct snd_soc_dai_link ln2440sbc_dai[] = {
  21. {
  22. .name = "AC97",
  23. .stream_name = "AC97 HiFi",
  24. .cpu_dai_name = "samsung-ac97",
  25. .codec_dai_name = "ac97-hifi",
  26. .codec_name = "ac97-codec",
  27. .platform_name = "samsung-audio",
  28. },
  29. };
  30. static struct snd_soc_card ln2440sbc = {
  31. .name = "LN2440SBC",
  32. .dai_link = ln2440sbc_dai,
  33. .num_links = ARRAY_SIZE(ln2440sbc_dai),
  34. };
  35. static struct platform_device *ln2440sbc_snd_ac97_device;
  36. static int __init ln2440sbc_init(void)
  37. {
  38. int ret;
  39. ln2440sbc_snd_ac97_device = platform_device_alloc("soc-audio", -1);
  40. if (!ln2440sbc_snd_ac97_device)
  41. return -ENOMEM;
  42. platform_set_drvdata(ln2440sbc_snd_ac97_device, &ln2440sbc);
  43. ret = platform_device_add(ln2440sbc_snd_ac97_device);
  44. if (ret)
  45. platform_device_put(ln2440sbc_snd_ac97_device);
  46. return ret;
  47. }
  48. static void __exit ln2440sbc_exit(void)
  49. {
  50. platform_device_unregister(ln2440sbc_snd_ac97_device);
  51. }
  52. module_init(ln2440sbc_init);
  53. module_exit(ln2440sbc_exit);
  54. /* Module information */
  55. MODULE_AUTHOR("Ivan Kuten");
  56. MODULE_DESCRIPTION("ALSA SoC ALC650 LN2440SBC");
  57. MODULE_LICENSE("GPL");