[PATCH] Bug in aplay/arecord --list-pcms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.

Please find below a patch to resolve this issue.

Best regards

Peter Stokes

-------------------------------------------------------------------------------

Signed-off-by: Peter Stokes <linux@xxxxxxxxxxxx>

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) {

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux