0034-BCM2708-Add-HifiBerry-DAC-to-board-file.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 75d90451c5929bc54e169ac92fc3faf234f28543 Mon Sep 17 00:00:00 2001
  2. From: Florian Meier <florian.meier@koalo.de>
  3. Date: Fri, 22 Nov 2013 19:21:34 +0100
  4. Subject: [PATCH 034/114] BCM2708: Add HifiBerry DAC to board file
  5. This adds the initalization of the HifiBerry DAC
  6. to the mach-bcm2708 board file.
  7. Signed-off-by: Florian Meier <florian.meier@koalo.de>
  8. ---
  9. arch/arm/mach-bcm2708/bcm2708.c | 19 +++++++++++++++++++
  10. 1 file changed, 19 insertions(+)
  11. --- a/arch/arm/mach-bcm2708/bcm2708.c
  12. +++ b/arch/arm/mach-bcm2708/bcm2708.c
  13. @@ -609,6 +609,20 @@ static struct platform_device bcm2708_i2
  14. };
  15. #endif
  16. +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
  17. +static struct platform_device snd_hifiberry_dac_device = {
  18. + .name = "snd-hifiberry-dac",
  19. + .id = 0,
  20. + .num_resources = 0,
  21. +};
  22. +
  23. +static struct platform_device snd_pcm5102a_codec_device = {
  24. + .name = "pcm5102a-codec",
  25. + .id = -1,
  26. + .num_resources = 0,
  27. +};
  28. +#endif
  29. +
  30. int __init bcm_register_device(struct platform_device *pdev)
  31. {
  32. int ret;
  33. @@ -733,6 +747,11 @@ void __init bcm2708_init(void)
  34. bcm_register_device(&bcm2708_i2s_device);
  35. #endif
  36. +#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE)
  37. + bcm_register_device(&snd_hifiberry_dac_device);
  38. + bcm_register_device(&snd_pcm5102a_codec_device);
  39. +#endif
  40. +
  41. for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
  42. struct amba_device *d = amba_devs[i];
  43. amba_device_register(d, &iomem_resource);