ln2440sbc_alc650.c 1.8 KB

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