Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5817726ioo; Wed, 1 Jun 2022 13:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaHwDa/O53bqvWW/Cl9CnmaKUhUDdNiGy+dxz57CTAmMuPiRP76kI4qNW455yvjW/G3ZD4 X-Received: by 2002:a05:6a00:150e:b0:518:d45b:a41d with SMTP id q14-20020a056a00150e00b00518d45ba41dmr1231547pfu.44.1654114430974; Wed, 01 Jun 2022 13:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654114430; cv=none; d=google.com; s=arc-20160816; b=ug+fid+u0YQl2ev7covE5zWdU41N5EKeSSnjsa99XqrSLM+x4cXHyOAPV6QMjXOxhq 7l1Pa2FTtoNZGpbSiMIvfWGwakyp57R5g0gkTW57NR0a7tZjuUyWgZ06YLO1ilwWG+zx qneyA3MGmqcFKr7+tA4iPRw/25szZdqFp6/nLiLOIQQSH73qOpPqs/MKixTZaIsdsUTe DV3jBbjH8zuMlhrnm/OhfDM1AH/O6EHBVRTacfcGKn4PrWIjnwvHtB1UKaKy7Wo9AQwv mL5aVslSrGZt24dTEJxGh+E3ZKaTggFcBheEhY0ah1l8ZytXSr1fcIsnInPuUttp65Vl yODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=BE55qxSMS0UTxraTXVwJDW4YqxLCR/urdAJrBe0gCjw=; b=QfrDYHQSn83fEH/EQXTJ5fJKoTG+lEkGRDfJ4F+tSA9UkAlJJrLTa2sGYOb6GhXtXX T44zBsi4NIQZE024OBiLl0e91LWIoNfky0eron1Z066ge3zOHsMBBecDP2IoUznsNKth 2fT3MgfCGLtijX7dMkClqD9V3wenmSbWigbklSHnqWc4HZxyeZRBYBkskagD0B6C8/+m 9Y1gju8kcJBZuPPS4IXmVW+cj+1FIn4gYs1lyOP9FtR75/aRRve9udnOFrwNs07ImO4i 2FRrJXj+Vn8GdDkyHBVvHaEExqmuxu+20ynsi7jx8v66OgxXhcdgUwunuNqpoS7vyJGC wyUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=SaslVQ8q; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k190-20020a6384c7000000b003fcc0510870si1588318pgd.388.2022.06.01.13.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:13:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=SaslVQ8q; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 710E13139C; Wed, 1 Jun 2022 12:27:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235543AbiE3KrK (ORCPT + 99 others); Mon, 30 May 2022 06:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235561AbiE3KpN (ORCPT ); Mon, 30 May 2022 06:45:13 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC0E7CB1E for ; Mon, 30 May 2022 03:45:10 -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-out1.suse.de (Postfix) with ESMTPS id 537F221B50; Mon, 30 May 2022 10:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1653907509; 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=BE55qxSMS0UTxraTXVwJDW4YqxLCR/urdAJrBe0gCjw=; b=SaslVQ8qqTXREhp2ONr5sZIADkyLY7VBzO/FdeerZHCfkYsNKTiqRQVeM+bYuLXRvUnvA/ bDuFdy25BMZnb5I5Ifls1U9/2hd2ZbfsA7WGkVMHR/JOi7pRFbJ7h0Z1ocv8yYD+Fq8p4z y7c+xLY2VDfOod3G4oWWQuqUqhBTS0I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1653907509; 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=BE55qxSMS0UTxraTXVwJDW4YqxLCR/urdAJrBe0gCjw=; b=/wSTltsAeifd2pgyDzeqdXh8CFgtineg0dz9gyhR7VoUAXN1GkeblyC9SCmj093gg4gzK5 5yE5Wj516Wyv+hBw== 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 27EF013AFD; Mon, 30 May 2022 10:45:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G+3rCDWglGKvWgAAMHmgww (envelope-from ); Mon, 30 May 2022 10:45:09 +0000 Date: Mon, 30 May 2022 12:45:08 +0200 Message-ID: <871qwbxpsb.wl-tiwai@suse.de> From: Takashi Iwai To: Charles Keepax Cc: Vitaly Rodionov , Jaroslav Kysela , Takashi Iwai , Mark Brown , , , Subject: Re: [PATCH v4 00/17] ALSA: hda: cirrus: Add initial DSP support and firmware loading In-Reply-To: <20220530103415.GU38351@ediswmail.ad.cirrus.com> References: <20220525131638.5512-1-vitalyr@opensource.cirrus.com> <871qwf0x8t.wl-tiwai@suse.de> <20220530090846.GS38351@ediswmail.ad.cirrus.com> <87czfvxtsc.wl-tiwai@suse.de> <20220530093639.GT38351@ediswmail.ad.cirrus.com> <87a6azxr7h.wl-tiwai@suse.de> <20220530103415.GU38351@ediswmail.ad.cirrus.com> 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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 May 2022 12:34:15 +0200, Charles Keepax wrote: > > On Mon, May 30, 2022 at 12:14:26PM +0200, Takashi Iwai wrote: > > On Mon, 30 May 2022 11:36:39 +0200, > > Charles Keepax wrote: > > > On Mon, May 30, 2022 at 11:18:43AM +0200, Takashi Iwai wrote: > > > > On Mon, 30 May 2022 11:08:46 +0200, > > > > Charles Keepax wrote: > > > > > On Fri, May 27, 2022 at 06:13:38PM +0200, Takashi Iwai wrote: > > > > > > On Wed, 25 May 2022 15:16:21 +0200, > > > > > > Vitaly Rodionov wrote: > > > Yeah that should be what is happening here. Although it looks > > > like this code might be removing all the controls if the firmware > > > is unloaded. I will discuss that with the guys, we normal just > > > disable the controls on the wm_adsp stuff. > > > > OK, that sounds good. Basically my concern came up from the code > > snippet doing asynchronous addition/removal via work. This showed > > some yellow signal, as such a pattern doesn't appear in the normal > > implementation. If this is (still) really necessary, it has to be > > clarified as an exception. > > > > Hm... ok we will think about that. I think that part will > probably still be necessary. Because there is an ALSA control > that selects the firmware, then it is necesarry to defer creating > the controls to some work, since you are already holding the > lock. Well, if an ALSA control can trigger the firmware loading, that's already fragile. A firmware loading is a heavy task, which should happen only at probing and/or resuming in general. Do we have other drivers doing the f/w loading triggered by a kctl...? > I guess we could look at adding locked versions of the add > control functions as well if that might be preferred? If the patterns of additional kctls (specific for firmware?) are fixed, we may create all such kctls beforehand and let them inactive unless the corresponding firmware is really loaded, too. thanks, Takashi