2
1

0002-fix-build-with-disable-ucm.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 3fbaea3ff390d4c09adbf5d6ae62fb7b5f3f24f5 Mon Sep 17 00:00:00 2001
  2. From: Jaroslav Kysela <perex@perex.cz>
  3. Date: Mon, 28 Jun 2021 12:08:53 +0200
  4. Subject: [PATCH] fix build with --disable-ucm
  5. Link: https://mailman.alsa-project.org/pipermail/alsa-devel/2021-June/186729.html
  6. Reported-by: Michael Forney <mforney@mforney.org>
  7. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  8. Upstream: f4f29d42be8b8ad60ea4c5697374adad4bfe6868
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  10. ---
  11. include/local.h | 10 ++++++++++
  12. 1 file changed, 10 insertions(+)
  13. diff --git a/include/local.h b/include/local.h
  14. index 4e7d88a0..7cfcec53 100644
  15. --- a/include/local.h
  16. +++ b/include/local.h
  17. @@ -374,6 +374,8 @@ int _snd_config_load_with_include(snd_config_t *config, snd_input_t *in,
  18. void *INTERNAL(snd_dlopen)(const char *name, int mode, char *errbuf, size_t errbuflen);
  19. #endif
  20. +#ifdef BUILD_UCM
  21. +
  22. const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name);
  23. static inline int _snd_is_ucm_device(const char *name)
  24. @@ -381,4 +383,12 @@ static inline int _snd_is_ucm_device(const char *name)
  25. return name && name[0] == '_' && name[1] == 'u' && name[2] == 'c' && name[3] == 'm';
  26. }
  27. +#else
  28. +
  29. +static inline const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name) { return NULL; }
  30. +static inline int _snd_is_ucm_device(const char *name) { return 0; }
  31. +
  32. +
  33. +#endif
  34. +
  35. #endif
  36. --
  37. 2.31.1