All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/alsa-utils: fix two build issues following 1.2.7 bump
Date: Sun, 17 Jul 2022 20:42:46 +0200	[thread overview]
Message-ID: <20220717184246.GV2249625@scaer> (raw)
In-Reply-To: <20220717173510.1388390-1-thomas.petazzoni@bootlin.com>

Thomas, All,

On 2022-07-17 19:35 +0200, Thomas Petazzoni via buildroot spake thusly:
> Commit 4dc8563363d639255217ffc59482eaccf93a1b51 ("package/alsa-utils:
> bump version to 1.2.7") has bumped alsa-utils to 1.2.7, triggering
> several build failures in the autobuilders.
> 
> The two build issues are fixed by two different patches, both of which
> have been submitted upstream.
> 
> The first patch fixes:
> 
>   http://autobuild.buildroot.net/results/c185ad120eb95cb3af0cd3be5fe47c924c565d3e/
> 
> The second patch fixes:
> 
>   http://autobuild.buildroot.net/results/31f52013db927511bbf0ad8e9d8701ac70e27be0/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
[--SNIP--]
> diff --git a/package/alsa-utils/0002-aplay-aplay.c-make-UCM-support-optional.patch b/package/alsa-utils/0002-aplay-aplay.c-make-UCM-support-optional.patch
> new file mode 100644
> index 0000000000..cd5c96bd55
> --- /dev/null
> +++ b/package/alsa-utils/0002-aplay-aplay.c-make-UCM-support-optional.patch
> @@ -0,0 +1,89 @@
> +From 1921efacfe1a230021849b83b2877c8f239b44ab Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Date: Sun, 17 Jul 2022 19:09:04 +0200
> +Subject: [PATCH] aplay/aplay.c: make UCM support optional
> +
> +Commit 90f59671784a7e47b40485095cd66892d4840ed7 ("topology:
> +pre-processor: Move the call to expand variables") modified aplay by
> +unconditionally invoking features of the use case manager (UCM) from
> +alsa-lib. However, alsa-lib can be compiled with UCM support.

I guess you meant:  alsa-lib can be compiled with*out* UCM support.

Fixed, and applied to master, thanks.

Regards,
Yann E. MORIN.

> +In order to properly support this situation, this commit changes aplay
> +to only conditionally compile the UCM related code.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Upstream: https://mailman.alsa-project.org/pipermail/alsa-devel/2022-July/203847.html
> +---
> + aplay/aplay.c | 10 ++++++++++
> + 1 file changed, 10 insertions(+)
> +
> +diff --git a/aplay/aplay.c b/aplay/aplay.c
> +index b3b3635..59f937d 100644
> +--- a/aplay/aplay.c
> ++++ b/aplay/aplay.c
> +@@ -41,7 +41,9 @@
> + #include <time.h>
> + #include <locale.h>
> + #include <alsa/asoundlib.h>
> ++#ifdef HAVE_ALSA_USE_CASE_H
> + #include <alsa/use-case.h>
> ++#endif
> + #include <assert.h>
> + #include <termios.h>
> + #include <signal.h>
> +@@ -453,6 +455,7 @@ static ssize_t xwrite(int fd, const void *buf, size_t count)
> + 	return offset;
> + }
> + 
> ++#ifdef HAVE_ALSA_USE_CASE_H
> + static int open_ucm(snd_use_case_mgr_t **uc_mgr, char **pcm_name, const char *name)
> + {
> + 	char *s, *p;
> +@@ -476,6 +479,7 @@ static int open_ucm(snd_use_case_mgr_t **uc_mgr, char **pcm_name, const char *na
> + 	}
> + 	return err;
> + }
> ++#endif
> + 
> + static long parse_long(const char *str, int *err)
> + {
> +@@ -553,7 +557,9 @@ int main(int argc, char *argv[])
> + 	int do_device_list = 0, do_pcm_list = 0, force_sample_format = 0;
> + 	snd_pcm_info_t *info;
> + 	FILE *direction;
> ++#ifdef HAVE_ALSA_USE_CASE_H
> + 	snd_use_case_mgr_t *uc_mgr = NULL;
> ++#endif
> + 
> + #ifdef ENABLE_NLS
> + 	setlocale(LC_ALL, "");
> +@@ -852,6 +858,7 @@ int main(int argc, char *argv[])
> + 		goto __end;
> + 	}
> + 
> ++#ifdef HAVE_ALSA_USE_CASE_H
> + 	if (strncmp(pcm_name, "ucm.", 4) == 0) {
> + 		err = open_ucm(&uc_mgr, &pcm_name, pcm_name + 4);
> + 		if (err < 0) {
> +@@ -861,6 +868,7 @@ int main(int argc, char *argv[])
> + 		if (verbose)
> + 			fprintf(stderr, _("Found UCM PCM device: %s\n"), pcm_name);
> + 	}
> ++#endif
> + 
> + 	err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
> + 	if (err < 0) {
> +@@ -951,8 +959,10 @@ int main(int argc, char *argv[])
> + 	if (verbose==2)
> + 		putchar('\n');
> + 	snd_pcm_close(handle);
> ++#ifdef HAVE_ALSA_USE_CASE_H
> + 	if (uc_mgr)
> + 		snd_use_case_mgr_close(uc_mgr);
> ++#endif
> + 	handle = NULL;
> + 	free(audiobuf);
> +       __end:
> +-- 
> +2.36.1
> +
> -- 
> 2.36.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-17 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17 17:35 [Buildroot] [PATCH] package/alsa-utils: fix two build issues following 1.2.7 bump Thomas Petazzoni via buildroot
2022-07-17 18:42 ` Yann E. MORIN [this message]
2022-08-06 13:45   ` Thomas Petazzoni via buildroot

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=20220717184246.GV2249625@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=bernd.kuhls@t-online.de \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.