mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: [ptxdist] [PATCH] alsa-lib: add patch to fix builds without ucm
Date: Thu,  2 Sep 2021 22:32:10 +0200	[thread overview]
Message-ID: <20210902203210.43812-1-clemens.gruber@pqgruber.com> (raw)

Adds an upstream patch which fixes builds without the ALSA Use Case
Manager.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 .../0002-fix-build-with-disable-ucm.patch     | 37 +++++++++++++++++++
 patches/alsa-lib-1.2.5.1/series               |  3 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 patches/alsa-lib-1.2.5.1/0002-fix-build-with-disable-ucm.patch

diff --git a/patches/alsa-lib-1.2.5.1/0002-fix-build-with-disable-ucm.patch b/patches/alsa-lib-1.2.5.1/0002-fix-build-with-disable-ucm.patch
new file mode 100644
index 000000000..886374795
--- /dev/null
+++ b/patches/alsa-lib-1.2.5.1/0002-fix-build-with-disable-ucm.patch
@@ -0,0 +1,37 @@
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Mon, 28 Jun 2021 12:08:53 +0200
+Subject: [PATCH] fix build with --disable-ucm
+
+Link: https://mailman.alsa-project.org/pipermail/alsa-devel/2021-June/186729.html
+Reported-by: Michael Forney <mforney@mforney.org>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ include/local.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/include/local.h b/include/local.h
+index 4e7d88a0ecac..7cfcec53dd5d 100644
+--- a/include/local.h
++++ b/include/local.h
+@@ -374,6 +374,8 @@ int _snd_config_load_with_include(snd_config_t *config, snd_input_t *in,
+ void *INTERNAL(snd_dlopen)(const char *name, int mode, char *errbuf, size_t errbuflen);
+ #endif
+ 
++#ifdef BUILD_UCM
++
+ const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name);
+ 
+ static inline int _snd_is_ucm_device(const char *name)
+@@ -381,4 +383,12 @@ static inline int _snd_is_ucm_device(const char *name)
+ 	return name && name[0] == '_' && name[1] == 'u' && name[2] == 'c' && name[3] == 'm';
+ }
+ 
++#else
++
++static inline const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name) { return NULL; }
++static inline int _snd_is_ucm_device(const char *name) { return 0; }
++
++
++#endif
++
+ #endif
diff --git a/patches/alsa-lib-1.2.5.1/series b/patches/alsa-lib-1.2.5.1/series
index f96f3345c..1ede62264 100644
--- a/patches/alsa-lib-1.2.5.1/series
+++ b/patches/alsa-lib-1.2.5.1/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 #tag:base --start-number 1
 0001-add-largefile-support.patch
-# 28c8f5e33d509bdb14724d1cc3204a4d  - git-ptx-patches magic
+0002-fix-build-with-disable-ucm.patch
+# e32eb79bf9ae6a22f1a3a5336617e2d3  - git-ptx-patches magic
-- 
2.33.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


             reply	other threads:[~2021-09-02 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 20:32 Clemens Gruber [this message]
2021-10-07 10:18 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210902203210.43812-1-clemens.gruber@pqgruber.com \
    --to=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox