ln2440sbc_alc650.c 1.8 KB

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