Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3797174rwa; Tue, 23 Aug 2022 10:14:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR61paLXs8zgO611Qom3NdZLEsa6OzqNK//2I438oWqKfZNvLHoXGC72Yn5tOyORTVOf2/h0 X-Received: by 2002:a17:90b:3a92:b0:1fb:23f3:f218 with SMTP id om18-20020a17090b3a9200b001fb23f3f218mr4097673pjb.102.1661274868773; Tue, 23 Aug 2022 10:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661274868; cv=none; d=google.com; s=arc-20160816; b=fg1ESwm9AkuaGT+eFv/mUencfanugIE7kxkGok5UrX4h9eRKj5VTiS0An5Di78H8x8 c1+DihrM61jk95iWvHpCBCt9nq3nKiooVPt7/DEBz9RW/OaPKHWHCIi8fHtIHPUZoECa i+6pGVUHnpYgolqths1jK/O7QNej/eaRd9rgbxwH/RJ31jSdfsSHLg1YJotUB8W70+fN /7w0P+/OLB/MzvPcITynFNNoWWahYDGAKFI+8fFnyqVxT/q7zsGktzSbTNqYkHMoHWx0 q4qsmzjiI2PqkzNfwVZFclx1sRkr9559lkWxrik4vctdnDLj63kyOvLxABHOCzZX2oL3 QOgA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=b6oAt20tu634Nl6+/00OA513SpzoQ4PRNURMtX6eXMA=; b=L/ikWmoedH6KJH2XUKDc+7GErj1WWCQy3Iac2255gtBcXjKOfY3WhoRVhv0MnzOZYo 4Ls+xdJZ3aA+fdcx0l720fnrjmXKaj2DBoQ9+G4PcD+iRUYLHqYwMIC9kdIenjae5Fv7 EfXPjYa+lvsPTv5r1LKJmGOjnyBI3gxKBzGIIdlppY0/6tXy7ToMzN7S6LWd2sGfLNGc 9aNcPWldcNPZ3v+ZOxqY+uR7fHkYBcB2QzgSsxKmVHsYdQxNYTsFJ3Rm4/ENBv4V1pAE cXHXanccvptxhAAl8FNbP5s/GHd+/x7u4rjMZnYvMFNY2z2sUVpqbEqZpOV/T7lBPz5i 7mWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kdS3FbP7; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b0016d09df65d8si17204850plk.411.2022.08.23.10.14.16; Tue, 23 Aug 2022 10:14:28 -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=@collabora.com header.s=mail header.b=kdS3FbP7; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343828AbiHWRHP (ORCPT + 99 others); Tue, 23 Aug 2022 13:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343659AbiHWREg (ORCPT ); Tue, 23 Aug 2022 13:04:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90504150818 for ; Tue, 23 Aug 2022 06:33:54 -0700 (PDT) Received: from localhost (unknown [188.27.54.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 98CF96601DD8; Tue, 23 Aug 2022 14:33:52 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661261632; bh=KvyKH4tCG8wypTKHfM32t7GmFM5Vps/K2+Zv0yTNZQE=; h=From:To:Cc:Subject:Date:From; b=kdS3FbP71jZnKLHgNZwZBQS46dupsSqvw9DWB5BNUOzjUySdQ6r+bqMoc+sqAz44s qjJWmqi5bqgX/7dIBRRJvxPODJIEsvbnOA8DDCSiRgGOroIFxOo+FPJ2BW+oSuCvdE ylDlVpBfOrbtrXZJwKlpXR2RHHACYreRm9sSH4e8GD09lSjGB2IEvTrc97LdxDKJyT dLcde+uhV19i56WX2mNmZyBKi4/yxHAJwfN7ngOVN52ub9vsL15udkmxqWhliG+fXu x5zbj7XloC35j948sYbZiim+TPSPUjdpR6MqY1JGoqcBDLzrzmxZGy8bcUR+Q2A/68 REpeg05rWLfVA== From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vlad Karpovich , Charles Keepax Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH] ASoC: wm_adsp: Silent parsing error on loading speaker protection fw Date: Tue, 23 Aug 2022 16:33:47 +0300 Message-Id: <20220823133347.919706-1-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 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 *not* report the ENODEV error when the firmware type is WM_ADSP_FW_SPK_PROT. Fixes: c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") Signed-off-by: Cristian Ciocaltea --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index cfaa45ede916..7514fc03b468 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1602,7 +1602,7 @@ 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 && (dsp->fw != WM_ADSP_FW_SPK_PROT || ret != -ENODEV)) adsp_warn(dsp, "Failed to parse legacy: %d\n", ret); } base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.2