]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Fix wrong direction check in aplay/arecord --list-pcms
authorPeter Stokes <linux@dadeos.co.uk>
Mon, 12 Jan 2009 11:29:41 +0000 (12:29 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2009 11:29:41 +0000 (12:29 +0100)
I have just discovered a minor logic inversion bug in
aplay/arecord --list-pcms functionality.

Basically, executing "aplay --list-pcms" lists all devices capable of
capture and executing "arecord --list-pcms" lists all devices capable
of playback.

Signed-off-by: Peter Stokes <linux@dadeos.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c

index 2e14d2ac7c64e810a94de834c7ea8788364d72c8..837e46a97fbcccb4d0a75fae5e7afaef7e75b1fc 100644 (file)
@@ -287,7 +287,7 @@ static void pcm_list(void)
                name = snd_device_name_get_hint(*n, "NAME");
                descr = snd_device_name_get_hint(*n, "DESC");
                io = snd_device_name_get_hint(*n, "IOID");
-               if (io != NULL && strcmp(io, filter) == 0)
+               if (io != NULL && strcmp(io, filter) != 0)
                        goto __end;
                printf("%s\n", name);
                if ((descr1 = descr) != NULL) {