Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1144272rwi; Wed, 19 Oct 2022 07:13:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vUuPneXH7kaFRyveWfvAeQnZmvKiracNf+UQqZdlw8V0KHLg1X2yp1V6bUY3Usbj7Zta9 X-Received: by 2002:a17:907:1b16:b0:791:8f57:6845 with SMTP id mp22-20020a1709071b1600b007918f576845mr7277387ejc.174.1666188817408; Wed, 19 Oct 2022 07:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666188817; cv=none; d=google.com; s=arc-20160816; b=C1jJO9TKraVMntdtAVSjr3jq+ewov504gdw4XE70ctJuoKv0iWsha0SQ8HLYDy3QO2 E3uSyYEgry5x1Of1ptRYsPg3E776CXWaTZFUGELY0z9TI9Fn9AkZvlzH6CYLlXKg/nil jRjQ9TspZM66+OLCC911yefDXGmWWkMF93I3Cpye0t8tA1KK+wOwgtixjRfcIkPEmDKI 2tVEUrisRKJrL849BuEojRvOIZK0g/O0Gn3BpL733stYo/Sg2gbdhHOQEVLAxsxx53JX 1bLme9pvvhBrU8O54pPYZ9meM7Oep1roWXCkuZHrRp661L/Y6+86EMgqYOn3IOXqff6o Z1xA== 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 Return-Path: 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.13.11; Wed, 19 Oct 2022 07:13:37 -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 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 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); } -- 2.35.1