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 4A8D1C433EF for ; Fri, 3 Dec 2021 13:38:13 +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 56B2B21E4; Fri, 3 Dec 2021 14:37:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 56B2B21E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638538691; bh=FrOpQQ0G9Bs5Sv/mB+Vp+EOV+OCEeYd1MQaNcuTwelE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GJeIES7BmOK+cZfoE6CQGudCpuoXylvuL14HgoH75gmcSq5370tFw0xWH7KToVzSr NodhaeZhflFTsqxCUUuIa4R0OLr4ENtC70Nqa8OK+tQcd5G37IH5a4K3h6qnRdvdDf LYiVY50HzVR+CnKn8vWfVJIs3lOJWqLthp8iw64Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E23E5F8015B; Fri, 3 Dec 2021 14:37:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55875F800D3; Fri, 3 Dec 2021 14:37:19 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 5C336F800D3 for ; Fri, 3 Dec 2021 14:37:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C336F800D3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Eh3NbrNZ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="N4+q3uy/" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 7B7ED218B8; Fri, 3 Dec 2021 13:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1638538627; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jTjChgwPK+3EEs3o5LFKt4B4iVdG1mllMwF9Eq1oOYQ=; b=Eh3NbrNZcQI5wQMIXRrYExMu2i2wD+S3rbGqfLOI1sPU/TXjsaUd1vskCbrXXABLmLSf70 MoUrhNJMsq77fDPaa+6r/fb2jEgjei6+Z4qiTd+x5cTofwaMKFrq+WgTYQMBYmHcIUP801 pudiJFb64yo6XsbgMNuiDkCOr+o1cUU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1638538627; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jTjChgwPK+3EEs3o5LFKt4B4iVdG1mllMwF9Eq1oOYQ=; b=N4+q3uy/EaVSawt0sZUipWLgG30eVi5813iqNxQxfA42JRFEDH9Hu6+kuRWQPe6/0RYh1k LTe2OsXeBTekILCg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 6CCDFA3B83; Fri, 3 Dec 2021 13:37:07 +0000 (UTC) Date: Fri, 03 Dec 2021 14:37:07 +0100 Message-ID: From: Takashi Iwai To: Geraldo Nascimento Subject: Re: [PATCH] ALSA: usb-audio: Reorder snd_djm_devices entries In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII 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 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 Thanks the patch. The code change is OK, but better to use more explicit form in C99 style initialization, something like below. Could you check whether this works? 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), };