fsi-hdmi.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * FSI - HDMI sound support
  3. *
  4. * Copyright (C) 2010 Renesas Solutions Corp.
  5. * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #include <linux/platform_device.h>
  12. #include <sound/sh_fsi.h>
  13. static struct snd_soc_dai_link fsi_dai_link = {
  14. .name = "HDMI",
  15. .stream_name = "HDMI",
  16. .cpu_dai_name = "fsib-dai", /* fsi B */
  17. .codec_dai_name = "sh_mobile_hdmi-hifi",
  18. .platform_name = "sh_fsi2",
  19. .codec_name = "sh-mobile-hdmi",
  20. };
  21. static struct snd_soc_card fsi_soc_card = {
  22. .name = "FSI (SH MOBILE HDMI)",
  23. .dai_link = &fsi_dai_link,
  24. .num_links = 1,
  25. };
  26. static struct platform_device *fsi_snd_device;
  27. static int __init fsi_hdmi_init(void)
  28. {
  29. int ret = -ENOMEM;
  30. fsi_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B);
  31. if (!fsi_snd_device)
  32. goto out;
  33. platform_set_drvdata(fsi_snd_device, &fsi_soc_card);
  34. ret = platform_device_add(fsi_snd_device);
  35. if (ret)
  36. platform_device_put(fsi_snd_device);
  37. out:
  38. return ret;
  39. }
  40. static void __exit fsi_hdmi_exit(void)
  41. {
  42. platform_device_unregister(fsi_snd_device);
  43. }
  44. module_init(fsi_hdmi_init);
  45. module_exit(fsi_hdmi_exit);
  46. MODULE_LICENSE("GPL");
  47. MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
  48. MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");