mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:45:41 +01:00
aplay: remove wrongly merged UCM code
The code origin comes from me. Unfortunately, it was merged by mistake to another commit. Remove it for now. Fixes: https://github.com/alsa-project/alsa-utils/issues/153 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
6ee086363a
commit
62cd05a929
1 changed files with 0 additions and 38 deletions
|
@ -41,7 +41,6 @@
|
|||
#include <time.h>
|
||||
#include <locale.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <alsa/use-case.h>
|
||||
#include <assert.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
|
@ -453,30 +452,6 @@ static ssize_t xwrite(int fd, const void *buf, size_t count)
|
|||
return offset;
|
||||
}
|
||||
|
||||
static int open_ucm(snd_use_case_mgr_t **uc_mgr, char **pcm_name, const char *name)
|
||||
{
|
||||
char *s, *p;
|
||||
int err;
|
||||
|
||||
s = strdup(name);
|
||||
if (s == NULL)
|
||||
return -ENOMEM;
|
||||
p = strchr(s, '.');
|
||||
if (p == NULL)
|
||||
return -EINVAL;
|
||||
*p = '\0';
|
||||
err = snd_use_case_mgr_open(uc_mgr, s);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_use_case_get(*uc_mgr, p + 1, (const char **)pcm_name);
|
||||
if (err < 0) {
|
||||
error(_("UCM value '%s' error: %s"), p + 1, snd_strerror(err));
|
||||
snd_use_case_mgr_close(*uc_mgr);
|
||||
return err;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static long parse_long(const char *str, int *err)
|
||||
{
|
||||
long val;
|
||||
|
@ -553,7 +528,6 @@ 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;
|
||||
snd_use_case_mgr_t *uc_mgr = NULL;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale(LC_ALL, "");
|
||||
|
@ -852,16 +826,6 @@ int main(int argc, char *argv[])
|
|||
goto __end;
|
||||
}
|
||||
|
||||
if (strncmp(pcm_name, "ucm.", 4) == 0) {
|
||||
err = open_ucm(&uc_mgr, &pcm_name, pcm_name + 4);
|
||||
if (err < 0) {
|
||||
error(_("UCM open error: %s"), snd_strerror(err));
|
||||
return 1;
|
||||
}
|
||||
if (verbose)
|
||||
fprintf(stderr, _("Found UCM PCM device: %s\n"), pcm_name);
|
||||
}
|
||||
|
||||
err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
|
||||
if (err < 0) {
|
||||
error(_("audio open error: %s"), snd_strerror(err));
|
||||
|
@ -951,8 +915,6 @@ int main(int argc, char *argv[])
|
|||
if (verbose==2)
|
||||
putchar('\n');
|
||||
snd_pcm_close(handle);
|
||||
if (uc_mgr)
|
||||
snd_use_case_mgr_close(uc_mgr);
|
||||
handle = NULL;
|
||||
free(audiobuf);
|
||||
__end:
|
||||
|
|
Loading…
Reference in a new issue