From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7786C433EF for ; Sat, 4 Dec 2021 00:00:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 321A3255A; Sat, 4 Dec 2021 00:59:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 321A3255A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638576000; bh=eH4AVT8EhXniK4YTDF4qVfgIFQagjBtaNRTg14JTcB4=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lrYD5IGvX/JddvoC/aiQW0kaYfBgtq7yBKcXbUZBvySpwlMErON98eNvByAqDh2zZ vwRLdnhwSPQaJs+POB9tDhts4JssDnp6B+xBQcrImL9goyIuwHNudkQpNH5EIgsiQm pgUThZmroSSljDokkOs7V88MLyBKkyWpaBgnb2LA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B1DF5F8015B; Sat, 4 Dec 2021 00:59:09 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB880F80246; Sat, 4 Dec 2021 00:59:06 +0100 (CET) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 73619F80085 for ; Sat, 4 Dec 2021 00:58:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 73619F80085 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pmdihMTx" Received: by mail-qk1-x72b.google.com with SMTP id t83so5194044qke.8 for ; Fri, 03 Dec 2021 15:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bpAtCKPeMSv2oRRZN0QFKaKPzEIQxPPQzD2YI3RgM3U=; b=pmdihMTxL1nzF6Cy/V8uvFk551i/TDzE7daDmFaxbKK6UcznmKNrVUysII/zbe1OrB WUJOjaW/WSZlS+Ko4kPT48xZ01uMs3+L/s2xVVkKL/eOncerjJoadYiYhTLiwEYWjr4u cFzzUHYbu/qN0OD3JS0ljolq3aWzK+8jN47hIwfz2xwOR85s4436bU/JTuG4XPX+TTdP uvwqc4j6+/09TdbzM1bilvtKV9fjStautD+W+7ajnoC71BJX604VmkWyFcumASHYKz5w MA6NU6RvmJWLsoh9PllM4pzg2FGqXRZRKUIxgIwM3aL2+5j2GEhoobssbdDJDc2dPttQ E58w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bpAtCKPeMSv2oRRZN0QFKaKPzEIQxPPQzD2YI3RgM3U=; b=3GIdR3CQh73wBK0sOfDFsWHXjA6fiQlX1UHXtzSEfYH6Ds1iH3Za5Uea1H5k/06JWR bjNpYjGl19mR/mZtg8709ROqhGuFAC6YjuRKEeMmRc8qBbdiZ5g+yffr2hglGiMLi5Jy Cl+VxBy7/rtydCck+CWeQPnIK+9+vbtx/8lXBZcb0FKCCDNbSD0pY6dvnRQcKcW7lmQ3 8LTPfUgrORQ+zwyHbNrqVI3T9QH5c1HuKEYpBOUoMFcyzmOuLT8yREn/1xigMOsSPRxP BOCqZfmyzH/Yi/ssMucEAU13k4FOHau64LhB/Nuj/p34hQZF1gg60qYVeqO89Xexy+fi bWAg== X-Gm-Message-State: AOAM531yPF7qhvE/ei1EpVtf1gu3jbdDFeGPJIrf5w/o1ICn0i57oyri emjYKEPRp8IRVWCQbfdaMu0= X-Google-Smtp-Source: ABdhPJxxPENqcZGsWoIVRfo8QTn6amLjVfFIdzZTqJ5ixns0+CnvYDgZhj7ZOC3WNMxSUiDPYEj07w== X-Received: by 2002:a05:620a:1924:: with SMTP id bj36mr20379559qkb.476.1638575934218; Fri, 03 Dec 2021 15:58:54 -0800 (PST) Received: from geday ([2804:7f2:8002:7bf1:59c9:7624:9b4a:10d2]) by smtp.gmail.com with ESMTPSA id r65sm2799279qke.85.2021.12.03.15.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 15:58:53 -0800 (PST) Date: Fri, 3 Dec 2021 20:58:53 -0300 From: Geraldo Nascimento To: Takashi Iwai Subject: Re: [PATCH] ALSA: usb-audio: Reorder snd_djm_devices entries Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: William Overton , ALSA-devel , Olivia Mackintosh X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Fri, Dec 03, 2021 at 02:37:07PM +0100, Takashi Iwai wrote: > On Thu, 02 Dec 2021 21:55:51 +0100, > Geraldo Nascimento wrote: > > > > Olivia Mackintosh has posted to alsa-devel reporting that > > there's a potential bug that could break mixer quirks for Pioneer > > devices introduced by 6d27788160362a7ee6c0d317636fe4b1ddbe59a7 > > "ALSA: usb-audio: Add support for the Pioneer DJM 750MK2 > > Mixer/Soundcard". > > > > This happened because the DJM 750 MK2 was added last to the Pioneer DJM > > device table index and defined as 0x4 but was added to snd_djm_devices[] > > just after the DJM 750 (MK1) entry instead of last, after the DJM 900 > > NXS2. This escaped review. > > > > Let's reorder the entries in snd_djm_devices[] so they match the Pioneer > > DJM device table index #define's. > > > > Reported-by: Olivia Mackintosh > > Signed-off-by: Geraldo Nascimento > Hi, Takashi > Thanks the patch. My pleasure. > > The code change is OK, but better to use more explicit form in C99 > style initialization, something like below. I'll send v2 of the patch with C99-style designators as you have suggested. > > Could you check whether this works? That's the problem, I don't own any DJM mixer, someone else needs to test this. Thanks, Geraldo Nascimento > > > thanks, > > Takashi > > --- a/sound/usb/mixer_quirks.c > +++ b/sound/usb/mixer_quirks.c > @@ -3016,11 +3016,11 @@ static const struct snd_djm_ctl snd_djm_ctls_750mk2[] = { > > > static const struct snd_djm_device snd_djm_devices[] = { > - SND_DJM_DEVICE(250mk2), > - SND_DJM_DEVICE(750), > - SND_DJM_DEVICE(750mk2), > - SND_DJM_DEVICE(850), > - SND_DJM_DEVICE(900nxs2) > + [SND_DJM_250MK2_IDX] = SND_DJM_DEVICE(250mk2), > + [SND_DJM_750_IDX] = SND_DJM_DEVICE(750), > + [SND_DJM_850_IDX] = SND_DJM_DEVICE(850), > + [SND_DJM_900NXS2_IDX] = SND_DJM_DEVICE(900nxs2), > + [SND_DJM_750MK2_IDX] = SND_DJM_DEVICE(750mk2), > }; > >