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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84F83C433FE for ; Fri, 21 Oct 2022 06:18:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbiJUGSy (ORCPT ); Fri, 21 Oct 2022 02:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiJUGSw (ORCPT ); Fri, 21 Oct 2022 02:18:52 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA95237979 for ; Thu, 20 Oct 2022 23:18:50 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 812E21F90F; Fri, 21 Oct 2022 06:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666333128; 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=liod0Qgbw11Wm2miSEFyU6Lk4/K7ugeWAi8+5SI6jGU=; b=nqrk8CZ2AcdP1d6jBIlAAieU6noFwFbMS6w1B1K0Wc8xuwkljZZuVKpYYjwf8fvOZ1vyu/ htynq9cFySCaLoxfCJaUqipIycLF2CcGxegqz4nAFjbOCvVBC6P3/GAzJCRITC2A6EAGI1 1BPxpLtBnpEhHm1Nmmg62nIu65aVNIM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666333128; 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=liod0Qgbw11Wm2miSEFyU6Lk4/K7ugeWAi8+5SI6jGU=; b=eICvxvmoJOTT8ziO6BXd9AAiohu14/yjok0q69dQ/K0SnAnylNnU0W33f8JF9FmanX6jX4 BrL9s+u4U5lFVoBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 42B441331A; Fri, 21 Oct 2022 06:18:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UXODD8g5UmNnDgAAMHmgww (envelope-from ); Fri, 21 Oct 2022 06:18:48 +0000 Date: Fri, 21 Oct 2022 08:18:47 +0200 Message-ID: <8735bh8zso.wl-tiwai@suse.de> From: Takashi Iwai To: "Maciej S. Szmigiero" Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/6] Fix direct renaming of hashed controls In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Oct 2022 22:46:20 +0200, Maciej S. Szmigiero wrote: > > From: "Maciej S. Szmigiero" > > I've noticed that some of mixer controls on my sound card seem to > be partially broken on the 6.0 kernel - alsactl wasn't able to find them > when restoring the mixer state. > > The issue was traced down to the recent addition of hashed controls lookup > in commit c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups"). > > Since that commit it is *not* enough to just directly update the control > name field (like some of ALSA drivers were doing). > Now the hash entries for the modified control have to be updated too. > > This patch set adds a snd_ctl_rename() function that takes care of doing > this operation properly for callers that already have the relevant > struct snd_kcontrol at hand and hold the control write lock (or simply > haven't registered the card yet). > > These prerequisites hold true for all the call sites modified. > > The core controls change and the emu10k1 patch were runtime tested. > Similar patches for other devices were only compile tested. Good catch! Applied all patches now. thanks, Takashi