From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] Bug in aplay/arecord --list-pcms Date: Mon, 12 Jan 2009 12:32:29 +0100 Message-ID: References: <200901111505.21730.linux@dadeos.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id AAFD21037EC for ; Mon, 12 Jan 2009 12:32:29 +0100 (CET) In-Reply-To: <200901111505.21730.linux@dadeos.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Peter Stokes Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 11 Jan 2009 15:05:21 +0000, Peter Stokes wrote: > > 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 Thanks! Applied now. Takashi > > 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@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >