Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4026908rwi; Sat, 22 Oct 2022 04:05:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kIFqaj9Ie2OcasYruxkrQC5lMT1AzGTly7inSVDlyGnhsMb8a7eSwN/giyVCkB1VxO5u4 X-Received: by 2002:a50:eb05:0:b0:457:c6f5:5f65 with SMTP id y5-20020a50eb05000000b00457c6f55f65mr21247969edp.311.1666436742470; Sat, 22 Oct 2022 04:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666436742; cv=none; d=google.com; s=arc-20160816; b=FbSZgs7lxTat94q/Pxzs/ziQu/SDwgmtoYY/DJgm2NROO541uEbKIs32QdRcph1kQM wPvVlIms4i9X1vnMJaEbQX+tmm/hWPYiQ0MYiLqtlcJDsUKmJICa/YoAeguSYUzD8OuE aSzZqLJ39+CRTXRU3qenVRVYgy4DCoUnpUavkKZhH/VDYQ5JSeURHYz3SHeL5lmpUTeI D6rDeT186HQEbcUYfDSA+jnBOysFf5+8VOWpnNF40AmfA0LhA0kTUSNhkc94vYhWqGQY 7DbZpfnSykyj3DOCJNLlVSJ89cNVn7X5at2KgAwEmCHMkT9cNcggp65ETW+nM6wX0wf8 Pv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9xVrRUz5QHgjfnMqmkLC22PRD1VBPD2pqEiE4V1wiSk=; b=w/yQWxddPByYnclwWQlWvpsOQh1v/UzPAbmxTnJaOWYgwwfQJ4M66uWP9k6r6OROC4 lRPGrmYkQNtrDN+w2HIDbHJNM3ajFTXnRqkhMNaDRFUYGAnh5KgM0nefd2CiI6IBqi8e NC1IbhcFXrkhp8v04G8FYjmYSIlI+m7KXJbAuFMFOkvHSePDYWPPNkMaNn8xBoSghD9i zJihzq3XoBVw7aMoinkQ973fmHyCOVRCmNWgKA/lpt/OKnvRO3Dozx4hGzhFrmU0TDtS p2a1+yJ2zqjlwOcnk2NW4cHGaPoiQ01qvc7TA2xEV0xreG98tiO9TsUk7+s1MG4s+L1P JEHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A8KHaivr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a056402430400b0045ca15afe1csi23525648edc.553.2022.10.22.04.05.10; Sat, 22 Oct 2022 04:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=A8KHaivr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiJVK2B (ORCPT + 99 others); Sat, 22 Oct 2022 06:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbiJVK1b (ORCPT ); Sat, 22 Oct 2022 06:27:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D240DDDA24; Sat, 22 Oct 2022 02:42:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DD2CF60AB1; Sat, 22 Oct 2022 07:48:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C649DC433D7; Sat, 22 Oct 2022 07:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424908; bh=8ov550mYe0q+OuIWy6vLBThDt4WXXctu0mu59Wjd02g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8KHaivrENtU6ENY3+u48cbIAoiXY3HEVjxl6hE4Yncf5rBk7eKj9zdTNSoBstwer 18t2gAOyMNpMIAJXssIaBos3bM7gwIME8Su/NpEaL4jtDkCdwOotM5guHsU5vhE03y Lkjfp2u1lm/OZPIndM80Gg6egunIvC2rTpCfhru0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cristian Ciocaltea , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 5.19 321/717] ASoC: wm_adsp: Handle optional legacy support Date: Sat, 22 Oct 2022 09:23:20 +0200 Message-Id: <20221022072508.612649469@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Cristian Ciocaltea [ Upstream commit 35c8ae25c4fdeabf490e005692795a3be17ca5f6 ] The tracing capabilities for the speaker protection fw enabled via commit c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") are not be available on all platforms, such as the Valve's Steam Deck which is based on the Halo Core DSP. As a consequence, whenever the firmware is loaded, a rather misleading 'Failed to parse legacy: -19' error message is written to the kernel ring buffer: [ 288.977412] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware version: 3 [ 288.978002] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: cs35l41-dsp1-spk-prot.wmfw: Fri 02 Apr 2021 21:03:50 W. Europe Daylight Time [ 289.094065] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware: 400a4 vendor: 0x2 v0.33.0, 2 algorithms [ 289.095073] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 0: ID cd v29.53.0 XM@94 YM@e [ 289.095665] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 1: ID f20b v0.0.1 XM@170 YM@0 [ 289.096275] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Protection: C:\Users\ocanavan\Desktop\cirrusTune_july2021.bin [ 291.172383] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Failed to parse legacy: -19 Update wm_adsp_buffer_init() to print a more descriptive info message when wm_adsp_buffer_parse_legacy() returns -ENODEV. Fixes: c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") Signed-off-by: Cristian Ciocaltea Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20220825220530.1205141-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm_adsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index a7784ac15dde..0e2c785d911f 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1617,7 +1617,9 @@ static int wm_adsp_buffer_init(struct wm_adsp *dsp) if (list_empty(&dsp->buffer_list)) { /* Fall back to legacy support */ ret = wm_adsp_buffer_parse_legacy(dsp); - if (ret) + if (ret == -ENODEV) + adsp_info(dsp, "Legacy support not available\n"); + else if (ret) adsp_warn(dsp, "Failed to parse legacy: %d\n", ret); } -- 2.35.1