db1000.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * DB1000/DB1500/DB1100 ASoC audio fabric support code.
  3. *
  4. * (c) 2011 Manuel Lauss <manuel.lauss@googlemail.com>
  5. *
  6. */
  7. #include <linux/module.h>
  8. #include <linux/moduleparam.h>
  9. #include <linux/timer.h>
  10. #include <linux/interrupt.h>
  11. #include <linux/platform_device.h>
  12. #include <sound/core.h>
  13. #include <sound/pcm.h>
  14. #include <sound/soc.h>
  15. #include <asm/mach-au1x00/au1000.h>
  16. #include <asm/mach-db1x00/bcsr.h>
  17. #include "psc.h"
  18. static struct snd_soc_dai_link db1000_ac97_dai = {
  19. .name = "AC97",
  20. .stream_name = "AC97 HiFi",
  21. .codec_dai_name = "ac97-hifi",
  22. .cpu_dai_name = "alchemy-ac97c",
  23. .platform_name = "alchemy-pcm-dma.0",
  24. .codec_name = "ac97-codec",
  25. };
  26. static struct snd_soc_card db1000_ac97 = {
  27. .name = "DB1000_AC97",
  28. .owner = THIS_MODULE,
  29. .dai_link = &db1000_ac97_dai,
  30. .num_links = 1,
  31. };
  32. static int db1000_audio_probe(struct platform_device *pdev)
  33. {
  34. struct snd_soc_card *card = &db1000_ac97;
  35. card->dev = &pdev->dev;
  36. return devm_snd_soc_register_card(&pdev->dev, card);
  37. }
  38. static struct platform_driver db1000_audio_driver = {
  39. .driver = {
  40. .name = "db1000-audio",
  41. .pm = &snd_soc_pm_ops,
  42. },
  43. .probe = db1000_audio_probe,
  44. };
  45. module_platform_driver(db1000_audio_driver);
  46. MODULE_LICENSE("GPL");
  47. MODULE_DESCRIPTION("DB1000/DB1500/DB1100 ASoC audio");
  48. MODULE_AUTHOR("Manuel Lauss");