From 00cf60e11da131e7dd8a94d451eaff2bf2467b43 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Sat, 14 Oct 2000 10:35:24 +0000 Subject: [PATCH] Ported to alsa-lib changes --- alsactl/alsactl.c | 4 ++-- aplay/aplay.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c index 9e63e5a..6f0714b 100644 --- a/alsactl/alsactl.c +++ b/alsactl/alsactl.c @@ -424,7 +424,7 @@ static int get_controls(int cardno, snd_config_t *top) snd_control_list_t list; int idx, err; - err = snd_ctl_hw_open(&handle, cardno); + err = snd_ctl_hw_open(&handle, NULL, cardno); if (err < 0) { error("snd_ctl_open error: %s", snd_strerror(err)); return err; @@ -852,7 +852,7 @@ static int set_controls(int card, snd_config_t *top) snd_config_iterator_t i; int err; - err = snd_ctl_hw_open(&handle, card); + err = snd_ctl_hw_open(&handle, NULL, card); if (err < 0) { error("snd_ctl_open error: %s", snd_strerror(err)); return err; diff --git a/aplay/aplay.c b/aplay/aplay.c index aa3a2ae..8e6a625 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -72,7 +72,6 @@ static int ready_mode = SND_PCM_READY_FRAGMENT; static int open_mode = 0; static int stream = SND_PCM_STREAM_PLAYBACK; static int mmap_flag = 0; -static char *mmap_data = NULL; static int nonblock = 0; static char *audiobuf = NULL; static int buffer_size = -1; @@ -164,6 +163,7 @@ static void check_new_format(snd_pcm_format_t * format) error("unsupported format %s", snd_pcm_format_name(format->sfmt)); exit(EXIT_FAILURE); } +#if 0 if (format->channels > 1) { if (xfer_mode == SND_PCM_XFER_INTERLEAVED) { if (!(cpinfo.flags & SND_PCM_INFO_INTERLEAVED)) { @@ -175,6 +175,7 @@ static void check_new_format(snd_pcm_format_t * format) exit(EXIT_FAILURE); } } +#endif } static void usage(char *command) @@ -239,7 +240,7 @@ static void device_list(void) for (card = 0; card < SND_CARDS; card++) { if (!(mask & (1 << card))) continue; - if ((err = snd_ctl_hw_open(&handle, card)) < 0) { + if ((err = snd_ctl_hw_open(&handle, NULL, card)) < 0) { error("control open (%i): %s", card, snd_strerror(err)); continue; } @@ -798,7 +799,7 @@ static void set_params(void) exit(EXIT_FAILURE); } if (mmap_flag) { - if (snd_pcm_mmap(handle, (void **)&mmap_data)<0) { + if (snd_pcm_mmap(handle)<0) { error("unable to mmap memory"); exit(EXIT_FAILURE); }