OSDN Git Service

Ported to alsa-lib changes
authorAbramo Bagnara <abramo@alsa-project.org>
Sat, 14 Oct 2000 10:35:24 +0000 (10:35 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Sat, 14 Oct 2000 10:35:24 +0000 (10:35 +0000)
alsactl/alsactl.c
aplay/aplay.c

index 9e63e5a..6f0714b 100644 (file)
@@ -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;
index aa3a2ae..8e6a625 100644 (file)
@@ -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);
                }