From patchwork Wed Jun 28 10:26:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13295527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C813CEB64D7 for ; Wed, 28 Jun 2023 10:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjF1K2o (ORCPT ); Wed, 28 Jun 2023 06:28:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbjF1K0l (ORCPT ); Wed, 28 Jun 2023 06:26:41 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED832D69 for ; Wed, 28 Jun 2023 03:26:39 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fb7acaa7a5so4341715e87.1 for ; Wed, 28 Jun 2023 03:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687947998; x=1690539998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LuHCd5iHQZEu3yLxK3H5002Fp9mhCHE1bYCUjxfT00w=; b=kIrvu1fp5N6kZkZzTu819ivlwe2RwOsvvRpr95K+WkF7h6uLaoxXcEFvbKFSfmnFWC 3G2msJZnhQgaP8TEEotmbMaajTUUw85K5DP0npluG7rDEEcyFElDo8YLKLbWJYujvX8L 0QA9udsFcOepH5hZ7Zp84DQR2rEU0XCk/6dOjNoYmGaCVDh179a2NG/AVmxx62eXjArA dSQHjhBHyxsStTn0TEzO80cAnCaowhhLQcjYyCiQLncSezOjxTBPUpy1F+TblUX+cEJ1 KbJB61BXm5w7yFtxabaKTIX2YtLeSTuXz00Aeu25PnDs2iTZw9KfOdCHqPd2wa5C4oKW X3RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687947998; x=1690539998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LuHCd5iHQZEu3yLxK3H5002Fp9mhCHE1bYCUjxfT00w=; b=iuhiMqd36TsIfbLZ3PPsrmGyrJ4Mk/7ZYXlZwgPsLa1k/NrIFnZsWvUXIM87M5JAdc oKBn/k1gP0PmAq78tWoVJjZB2j/yYT7+8ibahfZb5WppmIybyilSu80ANWddR4ibvEv0 hJDJ/df2IwC/A2Z1XCr8qezrWsIySDLQH4fWTsbf6n5lPdur5q732xaHy0z0COUn5cPv wm7lGjoh9u6vC5QPL5cxnxiU2SZNUcHSZrg/ZYUvmvpYHmjk+lnFS+/aFtBHAbt2iyZ5 Xc2JRC/87GnDLPWLkwc8CHjKdrC1l1/hSPYpIBBqaMEoLdmB9WiVqJwIDtWrKPqmWZvt 1OJw== X-Gm-Message-State: AC+VfDzaD2+55VuGg/rWJybMUcu/RF+87Zl/ii+Qo4/9wzVu1fADrWhs hmzN70US0NdYlvJe+n4/WP3Mxg== X-Google-Smtp-Source: ACHHUZ4D7KP/WuAE/uTqzc8uPPDUFt3JfNe6/Y6fhu0gjx1LzcDjG70eVVOvxHFT+42JXA+dBchO4g== X-Received: by 2002:a05:6512:2348:b0:4fb:76a5:2325 with SMTP id p8-20020a056512234800b004fb76a52325mr6782533lfu.24.1687947998165; Wed, 28 Jun 2023 03:26:38 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a10-20020a5d53ca000000b003140555c0ddsm2467780wrw.56.2023.06.28.03.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 03:26:37 -0700 (PDT) From: Srinivas Kandagatla To: krzysztof.kozlowski+dt@linaro.org, andersson@kernel.org, broonie@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@linaro.org, johan+linaro@kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 1/3] ASoC: dt-bindings: q6apm: add firmware-name bindings Date: Wed, 28 Jun 2023 11:26:19 +0100 Message-Id: <20230628102621.15016-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> References: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add bindings to get firmare-name from DT, this will provide more flexibility to specify platform specific firmware file name and location. Also this brings tplg firmware name inline with other board specific firmware locations. Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/sound/qcom,q6apm.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml index ef1965aca254..c783451145ef 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml @@ -31,6 +31,10 @@ properties: unevaluatedProperties: false description: Qualcomm DSP audio ports + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Audio Topology Firmware name + '#sound-dai-cells': const: 0 @@ -38,6 +42,7 @@ required: - compatible - bedais - dais + - firmware-name unevaluatedProperties: false From patchwork Wed Jun 28 10:26:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13295526 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A15AEB64DD for ; Wed, 28 Jun 2023 10:28:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231430AbjF1K2p (ORCPT ); Wed, 28 Jun 2023 06:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231417AbjF1K0n (ORCPT ); Wed, 28 Jun 2023 06:26:43 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1077630C0 for ; Wed, 28 Jun 2023 03:26:41 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-313f3cd6bb4so2941051f8f.3 for ; Wed, 28 Jun 2023 03:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687947999; x=1690539999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QndBu+Ea73+5HZm45UHtALLqjv/Bpq0i3QEOMrOjFEA=; b=xXvqIFxIGebSeM10VHUvp6JelIbH0a8Ghpt64wKknXwMSWL95vKtz40Urf/l2eRZyA cjijU5zSPWNmwFnS43WQxxT2utoqGcRzSyayFdaRLw0YHKXIWNe5nbZlSY5r5IUciEtW Sur/5jylNwWcOGVtBJ3bEGewf7JLwbJrpY2LUxwj92DLECfudE3uVlpVGlrPXyKYapA9 H1yc3NgwjRve8v2SGiIZGEu2TQDAlBD3bjDUzFPwr1kBUwjVLXE4764tZgl9hFDs1Yak lZrusYucIwYjDAT76FMkcFZmsRM6Gyn/Z02PodY4GX3iq+EfHcdaJnfC15T9MvKCvs4P ocEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687947999; x=1690539999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QndBu+Ea73+5HZm45UHtALLqjv/Bpq0i3QEOMrOjFEA=; b=UUBpDsHoxw0xP+g2LRiiw3va3QFvU66vddRl8s4rtN0nNu1vhWZDddUyFJdp4NbDKX GzJGvOhFqjH6ypJeXaCj3e2VPcNE2xv9fB3rWoyJXGYFBS6zWRusIdcao2dW26yyLEiG mBqQGsslcWgGSk9DusnsUl1WDeEWW4rDCaK/rn6IypV9MSmJ3hnjuNe0V2gV4m+ZtGDW v0Mw7x2masBdNQ9zrEAqYQ+PfiBgtQFYQEJ07t3Vg6/JMyizuuiWruNl9YoWfXE/RlEa 8dQEujQYYTMChMfjBmh7vebN8b1neaPqyqk8QqZlhMLAQBlvERUBi9ZVJZp8RLpSZ522 r1Kw== X-Gm-Message-State: AC+VfDy/g38m9j68A/cuSPiEhMUbBK/G9tdIX57Zxbfz1SE0TG1tRePR uPoJFlSKVc9ftRw2lpF+/QQ3r35bKAcUsVdRUg/u+A== X-Google-Smtp-Source: ACHHUZ5jM7AFbBVobXv7tCMo8URNzib2Q8aoTQ3nBXjD6sz9p2fAnpPFJReVgG2Pjw6ld9T5Q04RIw== X-Received: by 2002:adf:e741:0:b0:313:ee2e:dae1 with SMTP id c1-20020adfe741000000b00313ee2edae1mr7605993wrn.18.1687947999424; Wed, 28 Jun 2023 03:26:39 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a10-20020a5d53ca000000b003140555c0ddsm2467780wrw.56.2023.06.28.03.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 03:26:39 -0700 (PDT) From: Srinivas Kandagatla To: krzysztof.kozlowski+dt@linaro.org, andersson@kernel.org, broonie@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@linaro.org, johan+linaro@kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 2/3] ASoC: qcom: q6apm: add support for reading firmware name from DT Date: Wed, 28 Jun 2023 11:26:20 +0100 Message-Id: <20230628102621.15016-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> References: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Currently firmware file name is autogenerated based on card name and model number, however this imposed a restriction of finding firmware in a single firmware path. Platform specific firmwares are normally located in sub folders of the SoC. Provide more flexibity by reading firmware-name from DT. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/topology.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c index cccc59b570b9..ccb4efc15648 100644 --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -1258,16 +1258,16 @@ static struct snd_soc_tplg_ops audioreach_tplg_ops = { int audioreach_tplg_init(struct snd_soc_component *component) { - struct snd_soc_card *card = component->card; struct device *dev = component->dev; const struct firmware *fw; - char *tplg_fw_name; + const char *tplg_fw_name; int ret; - /* Inline with Qualcomm UCM configs and linux-firmware path */ - tplg_fw_name = kasprintf(GFP_KERNEL, "qcom/%s/%s-tplg.bin", card->driver_name, card->name); - if (!tplg_fw_name) - return -ENOMEM; + ret = of_property_read_string(dev->of_node, "firmware-name", &tplg_fw_name); + if (ret < 0) { + dev_err(dev, "firmware-name property missing in Device tree\n"); + return ret; + } ret = request_firmware(&fw, tplg_fw_name, dev); if (ret < 0) { @@ -1283,8 +1283,6 @@ int audioreach_tplg_init(struct snd_soc_component *component) release_firmware(fw); err: - kfree(tplg_fw_name); - return ret; } EXPORT_SYMBOL_GPL(audioreach_tplg_init); From patchwork Wed Jun 28 10:26:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 13295528 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB6BDEB64DC for ; Wed, 28 Jun 2023 10:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231410AbjF1K2q (ORCPT ); Wed, 28 Jun 2023 06:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbjF1K0n (ORCPT ); Wed, 28 Jun 2023 06:26:43 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3452230C4 for ; Wed, 28 Jun 2023 03:26:42 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-311099fac92so6973250f8f.0 for ; Wed, 28 Jun 2023 03:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687948000; x=1690540000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=srR4qXI4SOaRzuTnNjTHD1luV6fZZPzoY3QYdalo8qI=; b=Y6Q+PawFy+kJaRdCZCPHXwMw9ZqLRbomAw6YgjOi9KVEfS/4P/HbDrP9ZhJRU6ywOe iPv0i8olWL0oVFvuiIRH981wrhd+0pzPMqEy0D0ZgBge/cjyeDZ73H6a0WW82n704GUS 4Y+Wk0SCIcMFW7ghIYsQg9J15d+lSu6A4sqaWr3IocqBnd+WBewi6ZB7hEw7JCckIql5 FB4i5VDkAG78WKb1JBJChHG/5jncfE8sX84cDYXoNG4syCvR7JTv6mmK4Japm2OWV8Qy wiiX9wGTj6mkM9Z74fzUTnghT2FI9trCV2M1LmWw3YvtarKYty56k+D3F+H0+NoLgpO5 yY9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687948000; x=1690540000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=srR4qXI4SOaRzuTnNjTHD1luV6fZZPzoY3QYdalo8qI=; b=U/ekw3aUWb6UYSNjRQzkFb6QABuiBnnsA3Pw4NYphDjRbiQn0RGY8SdspP7Aq6jm2o cVnDRKg1kMqiEZEEjNguzBKGCSrmx+XwSKEv5Y6SPh3eGeDvkGRVrDC58f9NTsl8OC4W UbRoXImw9F1/ctZpLU/iglR3TZreCtNMKjrZweNB1qKq+Ykngpy5XvV8Ffsqhh+Ab3No kVjvphIhyU/wZ+PURIL94iIAFb/bVrYT3/9lIvoxN9q+UCNm2QEqMU1wyPXy3AiRZ6DM 839NE9P9kD2odiffcEWzm5M//tCriXedu3qZPRibe5WCwD/+h3Xy64GySXCPCoGCQx22 axcw== X-Gm-Message-State: AC+VfDzEx3YXhcvXw/c4sXhPaHxL815Ynhnc1pjyUIBvSbg2wEdikKS4 fIn2WX6axBQ1+mTUVLUSIYtWsw== X-Google-Smtp-Source: ACHHUZ5S4H9zXhddpOXM9tKWiI2dGOx62qaeBcYbU97WH85fLsREvkzVPMEm3gY/9OG0jwyaeyA//w== X-Received: by 2002:a5d:5307:0:b0:313:f60d:4958 with SMTP id e7-20020a5d5307000000b00313f60d4958mr5463674wrv.53.1687948000700; Wed, 28 Jun 2023 03:26:40 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a10-20020a5d53ca000000b003140555c0ddsm2467780wrw.56.2023.06.28.03.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 03:26:40 -0700 (PDT) From: Srinivas Kandagatla To: krzysztof.kozlowski+dt@linaro.org, andersson@kernel.org, broonie@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@linaro.org, johan+linaro@kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH 3/3] arm64: dts: qcom: sc8280xp-x13s: Add audio topology firmware path Date: Wed, 28 Jun 2023 11:26:21 +0100 Message-Id: <20230628102621.15016-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> References: <20230628102621.15016-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add audio topology firmware name and path in dt so that we can specify full path for it. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 7cc3028440b6..0160b8e7d64f 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -924,6 +924,11 @@ }; }; + +&q6apm { + firmware-name = "qcom/sc8280xp/LENOVO/21BX/audioreach-tplg.bin"; +}; + &qup0 { status = "okay"; };