Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4012047rdb; Thu, 14 Sep 2023 09:10:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMOUI0mWhLxbH6/RPwSSzFh2MDbrTNAGE19V9Jwajyao1d6P67H65YsDx6eadhi2n13yKl X-Received: by 2002:a17:90a:38a3:b0:262:ba7f:30cd with SMTP id x32-20020a17090a38a300b00262ba7f30cdmr5713071pjb.31.1694707832566; Thu, 14 Sep 2023 09:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694707832; cv=none; d=google.com; s=arc-20160816; b=HEUAfAZn9+T7yitt//xhNbQc6Nhok9WZ1iODqe9oNUR6gV04UtmIrV1eGSgrKa7qrR A3b3w0zq3Vnwu2r5Qd7jhmuS7u3X6SJf9GY5UxaMKbfvI6NWbvVjMM38BSkByKGu7hJG jVj9GUqxBczI/c+Q3aEUacp5SnbnMr/+zoK9uQ0rbRfrueh6GFinjc4/r7mD0MxqBBkp p6VETWHFbkVyzvVV4T6Qtis3p8L3kHk6q8N13zZ75c1+umiJNtlzhXyea+VGEDHkDPeU +30UHWFz6E0N0sIDBqkgp5bytg7pRuqW8fchzVktOf4Gt1Gb6jtPC4A/gUGCXSRY38c3 I5MQ== 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=2cQqm3IxLFOpNf1wNNro2m2AP7w9Qrx243MKxUbDrug=; fh=ioU4v7Iz2qoS2/+kvYEd2Bw84BRg6F2vLjWVJuhFnx0=; b=Sdpd5L1Ltf0E62Kd0GMwZNgtCVkO4BrNxV/q2UBgslLac35lkA6b+e9lduDuCDuWl3 n4bhhMOFSFYnpkp3G6gYh+REoXCZo+iB6GOKbI8yYIkdqT2oxUGlW2VFZOCU9bM8HgNy V4pwxor0S3jzz5ZzivqC/+uQ1lvSG24Fv3iwvfEuPPbN8EFZbS3fF/Zukr+LFK0ULzvl MjY4NAS+Dq8o1dW0X3Fn/Nlra8VVRyofqYs4BPlsOCICFCDAlmy25our2zJVo37DaftW pPF15y334TeV/eluLO430B8cxgQN7ouClnna8wpgWTNNori/Vkb7eJsbWUV++Prw4v/g HJzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=clsjyHng; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id pg14-20020a17090b1e0e00b00263e1d9c4f2si2139795pjb.26.2023.09.14.09.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=clsjyHng; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5CC3E831335E; Thu, 14 Sep 2023 07:29:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240168AbjINO3S (ORCPT + 99 others); Thu, 14 Sep 2023 10:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240101AbjINO3R (ORCPT ); Thu, 14 Sep 2023 10:29:17 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2FA2115 for ; Thu, 14 Sep 2023 07:29:12 -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 AC16E218F0; Thu, 14 Sep 2023 14:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694701751; 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=2cQqm3IxLFOpNf1wNNro2m2AP7w9Qrx243MKxUbDrug=; b=clsjyHnglaHWQoHtjJbOXG+74XyDfkQuidTS+CW6rTfrlYbcXFZe+5wpqYtlS7m1t5e483 dsB+Mx3gEYWvxbKd49pYdngvlKhWbBupSV5EBLkbjm2u/RQeXyOoU9T+nO0ZVE6+2hRgav y7YpRa4obHYN3gT2VaDpzMEoQ/5CDnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694701751; 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=2cQqm3IxLFOpNf1wNNro2m2AP7w9Qrx243MKxUbDrug=; b=MuPvWmJy9St++Q7vQIiRQqZ5ko+Ty17s9S8fFiCWNaxow+Jl4sj2pkQWSElXyOkvLj0b4n fj7PJwsLtmjbcCBQ== 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 86F60139DB; Thu, 14 Sep 2023 14:29:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9osnILcYA2VFdAAAMHmgww (envelope-from ); Thu, 14 Sep 2023 14:29:11 +0000 Date: Thu, 14 Sep 2023 16:29:11 +0200 Message-ID: <871qf0zv48.wl-tiwai@suse.de> From: Takashi Iwai To: Richard Fitzgerald Cc: , , , Subject: Re: [PATCH] ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing In-Reply-To: <20230914121120.6201-1-rf@opensource.cirrus.com> References: <20230914121120.6201-1-rf@opensource.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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 07:29:17 -0700 (PDT) On Thu, 14 Sep 2023 14:11:20 +0200, Richard Fitzgerald wrote: > > In cs35l56_hda_read_acpi() do not return if ACPI _SUB is missing. > > A missing _SUB means that the driver cannot load a system-specific > firmware, because the firmware is identified by the _SUB. But it can > fallback to a generic firmware. Unfortunately this was being handled > by immediately returning 0, which would skip the remaining ACPI > configuration in cs35l56_hda_read_acpi() and so it would not get the > RESET GPIO. > > Signed-off-by: Richard Fitzgerald > Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") > --- > sound/pci/hda/cs35l56_hda.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c > index 9e4976bdb5e0..a9844336bdc9 100644 > --- a/sound/pci/hda/cs35l56_hda.c > +++ b/sound/pci/hda/cs35l56_hda.c > @@ -864,15 +864,11 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) > > sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); > > - if (IS_ERR(sub)) { > - /* If no ACPI SUB, return 0 and fallback to legacy firmware path, otherwise fail */ > - if (PTR_ERR(sub) == -ENODATA) > - return 0; > - else > - return PTR_ERR(sub); > - } > - > - cs35l56->system_name = sub; > + if (IS_ERR(sub)) > + dev_err_probe(cs35l56->base.dev, PTR_ERR(sub), > + "Read ACPI _SUB failed: fallback to generic firmware\n"); Do we want to show as an error? Since the driver continue to work, it could be rather dev_info()? thanks, Takashi