1 --- a/aplay/aplay.orig.c
6 #include <alsa/asoundlib.h>
7 +#ifdef HAVE_ALSA_USE_CASE_H
8 #include <alsa/use-case.h>
17 +#ifdef HAVE_ALSA_USE_CASE_H
18 static int open_ucm(snd_use_case_mgr_t **uc_mgr, char **pcm_name, const char *name)
27 static long parse_long(const char *str, int *err)
30 int do_device_list = 0, do_pcm_list = 0, force_sample_format = 0;
33 +#ifdef HAVE_ALSA_USE_CASE_H
34 snd_use_case_mgr_t *uc_mgr = NULL;
38 setlocale(LC_ALL, "");
43 +#ifdef HAVE_ALSA_USE_CASE_H
44 if (strncmp(pcm_name, "ucm.", 4) == 0) {
45 err = open_ucm(&uc_mgr, &pcm_name, pcm_name + 4);
49 fprintf(stderr, _("Found UCM PCM device: %s\n"), pcm_name);
53 err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
58 snd_pcm_close(handle);
59 +#ifdef HAVE_ALSA_USE_CASE_H
61 snd_use_case_mgr_close(uc_mgr);