From 9a47cf7b35f9840379f6ebdcf429128ddc572049 Mon Sep 17 00:00:00 2001 From: Peter Stokes Date: Mon, 12 Jan 2009 12:29:41 +0100 Subject: [PATCH] Fix wrong direction check in aplay/arecord --list-pcms 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 Signed-off-by: Takashi Iwai --- aplay/aplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aplay/aplay.c b/aplay/aplay.c index 2e14d2a..837e46a 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -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) { -- 2.47.1