mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:35:42 +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 <time.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
#include <alsa/use-case.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@ -453,30 +452,6 @@ static ssize_t xwrite(int fd, const void *buf, size_t count)
|
||||||
return offset;
|
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)
|
static long parse_long(const char *str, int *err)
|
||||||
{
|
{
|
||||||
long val;
|
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;
|
int do_device_list = 0, do_pcm_list = 0, force_sample_format = 0;
|
||||||
snd_pcm_info_t *info;
|
snd_pcm_info_t *info;
|
||||||
FILE *direction;
|
FILE *direction;
|
||||||
snd_use_case_mgr_t *uc_mgr = NULL;
|
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
@ -852,16 +826,6 @@ int main(int argc, char *argv[])
|
||||||
goto __end;
|
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);
|
err = snd_pcm_open(&handle, pcm_name, stream, open_mode);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
error(_("audio open error: %s"), snd_strerror(err));
|
error(_("audio open error: %s"), snd_strerror(err));
|
||||||
|
@ -951,8 +915,6 @@ int main(int argc, char *argv[])
|
||||||
if (verbose==2)
|
if (verbose==2)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
snd_pcm_close(handle);
|
snd_pcm_close(handle);
|
||||||
if (uc_mgr)
|
|
||||||
snd_use_case_mgr_close(uc_mgr);
|
|
||||||
handle = NULL;
|
handle = NULL;
|
||||||
free(audiobuf);
|
free(audiobuf);
|
||||||
__end:
|
__end:
|
||||||
|
|
Loading…
Reference in a new issue