From patchwork Wed Oct 19 08:27:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5557 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp349908wrs; Wed, 19 Oct 2022 07:12:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5lSswKVBIR3C9rcgmTeEIzDGuIbn0kaS6fpLz3d0t9u4rAEhFs+PaQOUtyQc0cXA6NKwP9 X-Received: by 2002:a17:907:3f1e:b0:78d:f198:fd00 with SMTP id hq30-20020a1709073f1e00b0078df198fd00mr6724854ejc.730.1666188762472; Wed, 19 Oct 2022 07:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666188762; cv=none; d=google.com; s=arc-20160816; b=n+JTZ1fHVA1WpTtTIRFSQEnOB7BUl+/QqZfR20fwKh4lRBm/qg0M7shPTdwZOJ24Zh iromXtUYR+yBlMDTQD5wrtHI20oCY1fa94u0lhEZG1eOHHPCXKUERZ6u1q7tBbH+O2Lo X9ltuc0abqUnS4+PxoXlSNU3BASWq/foBLbgVEyXcvfcDcj9VNKRtN5MhEjtmjJCQGYH CbRBED+7zqFi6DN1m4q2kgXyeaOexTAR/1+zcIMAexksAPl2wLeTXDVafeewhMB2dsCh kvXtBbm5pZi4oWJCS6v+6w62OMZfFzlml/L8RxJDQNm8Z4W2RR3BuYgLeyz4jZzzy5ID hQVQ== 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=dmi7DpQ/urD9/pj/Am7j6RrvXnOOJ370FPfJD3f+AWA=; b=uqNx+WolQrvUvdEw0DMR9ww8lv1xTrhJRidj6++PE2+/FU6wZ5rfvhod83zyD1/zNV E53ZejT5jnItx2SqH+IRtMXurcT8RR+sZ46rRzoLXYCtJ0s5VUXjilVx4IHuQeooacEr fJerTRK1QXLsuJRgdhkie6QkwQ+B6Fc4HW5jk9RFB+7vinLeXavqHb+TOoWTSQ3d1WtQ RqCm9nqX4qNXVeH6qW/9CgMrgWiynobujJL6CcQKAqF88P7AVOwVbiP11bpImuPEXV5S 1nx6pypxG8Cz1RX9/zcqYQCQBUYVtuQebLQXOG7GRUj4W3xyIFlm5nq0ctdNQsUBPy+U 5zjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LKgmsxpU; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di8-20020a170906730800b00783de095de7si15135902ejc.847.2022.10.19.07.11.56; Wed, 19 Oct 2022 07:12: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=LKgmsxpU; 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 S231139AbiJSN5d (ORCPT + 99 others); Wed, 19 Oct 2022 09:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233014AbiJSNw7 (ORCPT ); Wed, 19 Oct 2022 09:52:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D61731ECE; Wed, 19 Oct 2022 06:36:25 -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 ams.source.kernel.org (Postfix) with ESMTPS id 7FA17B823DB; Wed, 19 Oct 2022 08:56:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4121C433D7; Wed, 19 Oct 2022 08:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169800; bh=EbACe5qacps0SV0GIDnIuKU9lBFLNTXwJE3mpAJw9sE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LKgmsxpU3rVnOhUfky4eqUsXkkd9jGaG0A9JhF3ycWLh8l62SEaps0TEonYTmXkFE qupCFsmrDbEZPH//CclTTg6q0BN0dfa4PsiuDEksqeutgFiuMMjon4PcYNi0KbICfU TsAzOKhEthu9jEbAJ44m8GjYvBTyEvugirVEu/hc= 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 6.0 381/862] ASoC: wm_adsp: Handle optional legacy support Date: Wed, 19 Oct 2022 10:27:48 +0200 Message-Id: <20221019083306.807821695@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747125547451050093?= X-GMAIL-MSGID: =?utf-8?q?1747125547451050093?= 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 cfaa45ede916..8a2e9771bb50 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1602,7 +1602,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); }