From patchwork Tue Sep 6 09:27:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12967158 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FDBDECAAA1 for ; Tue, 6 Sep 2022 09:29:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8C92B163B; Tue, 6 Sep 2022 11:28:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8C92B163B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662456543; bh=vXQl6sWYH3s9nZcdEQtm9bzb3mf6vHvob18mX522u5Q=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=r3+nNwVtG8LCi2u1R/4y3VqvmS5hS6YEiBBhGckQUT02a1gRfZ7tyPFsUqY+7rWY7 bSwMqqQDMp8pmGSSSVWqqXFKsnlIC2qKc5+0ZNKcsc/IZepoyY+e9zMLDAV13WMRUE FTxzQYD0lth7kNOyDL4tvIhC0gwuuB50dTTtsJz8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 86AADF80533; Tue, 6 Sep 2022 11:27:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A31EF8019B; Tue, 6 Sep 2022 11:27:46 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09F32F8019B; Tue, 6 Sep 2022 11:27:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09F32F8019B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="gaP7CzHI" Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 68B55660037F; Tue, 6 Sep 2022 10:27:36 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662456458; bh=vXQl6sWYH3s9nZcdEQtm9bzb3mf6vHvob18mX522u5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gaP7CzHIWz3oofHqZpF1nJ/2SBzJ0tEF/o0JbZuWbZzz0jtYTgk1OjQ9MhHoPbYte +InfDwR1jByO1iziZY8SbfOS2imRGasoF9EQVvm5lxVaaVdciPurOQ9vV7njksGjgZ Ms628sECmg3Lk39rxRRyEMz98uT8B/xAtkNukUqWKmCOhFn6HaqVmmlfIfOr6zmUBa y9BZ6HipY9RZyh1ADzEmgq5bFBl0Q/ZD1EwwkufgDQV0JtHsAGDu3OfBVC1/0PkChw VjXWrMQauz4mC7iw6B+VCQUvq9nSWNNrJz5SGheCGz0if30q5Fj6NrbRTWIf28rLmK Jhcg30Re66o5g== From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 1/5] ASoC: mediatek: mt8195-mt6359: Properly register sound card for SOF Date: Tue, 6 Sep 2022 11:27:23 +0200 Message-Id: <20220906092727.37324-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> References: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com, kernel@collabora.com, yung-chuan.liao@linux.intel.com, sound-open-firmware@alsa-project.org, peter.ujfalusi@linux.intel.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, tzungbi@google.com, geert@linux-m68k.org, ranjani.sridharan@linux.intel.com, wenst@chromium.org, trevor.wu@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, yc.hung@mediatek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Adding a probe callback on this snd_soc_card is required when Sound Open Firmware support is desired, as we need to appropriately populate the stream_name for SOF to be able to bind widgets. Failing to do so will produce errors when applying the SOF topology leading to card registration failure (so, no sound). While at it, also make sure to fill the topology_shortname as required. Fixes: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code") Signed-off-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index c530e3fc27e4..961e769602d6 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -1383,7 +1383,13 @@ static int mt8195_mt6359_dev_probe(struct platform_device *pdev) sof_priv->num_streams = ARRAY_SIZE(g_sof_conn_streams); sof_priv->sof_dai_link_fixup = mt8195_dai_link_fixup; soc_card_data->sof_priv = sof_priv; + card->probe = mtk_sof_card_probe; card->late_probe = mtk_sof_card_late_probe; + if (!card->topology_shortname_created) { + snprintf(card->topology_shortname, 32, "sof-%s", card->name); + card->topology_shortname_created = true; + } + card->name = card->topology_shortname; sof_on = 1; } From patchwork Tue Sep 6 09:27:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12967159 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0188C38145 for ; Tue, 6 Sep 2022 09:29:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C35F4163E; Tue, 6 Sep 2022 11:28:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C35F4163E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662456563; bh=WyVYZj+c9maI28dTmRLQ5XLV8nr4NB4/PmV9sY12Gmk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pTr6cr7k65LndfYhfQz+QQSQmQyuWccwChAhEjpLCZZnX652YvOA0Q2sLshhOYAqH nVc6aKPNDanFq7bHQ1KnAhpNNKfeRY5txfu9sOESZ7zCCXlEUrLR+qkkO4CiCb8ylm ka/fC77WGXYzHadzDj6dgo9pckyXQ5A36CqXkP08= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6195BF80536; Tue, 6 Sep 2022 11:27:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E963F80535; Tue, 6 Sep 2022 11:27:47 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2F492F80165; Tue, 6 Sep 2022 11:27:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2F492F80165 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YvL7hcmY" Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 363D46601EB2; Tue, 6 Sep 2022 10:27:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662456459; bh=WyVYZj+c9maI28dTmRLQ5XLV8nr4NB4/PmV9sY12Gmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YvL7hcmYNk/2CwJ3pZ9ZoLT98cjdp69vFL19MlIdv+b7lziyVountzzH4vlXnc+OW ZTh6WDE0KOWl2orEeVlPnAn/FoTp89rCJcgn2Vpe/cDljqQ1xRznKoc7ZYK8cniwN0 oJHCPQFf/HvsWwA8hz7UHDIyTlINe1FLJIbh3GOKC5BODT2+k0UE27D5qFz2nsXsBb HjWhFFGg4O4ItFmN6/wKmHnXBw10ndrFevUobUu9h7fUP4TFpVz2mWYvfXa6e/ey2g J7Ef/JeNGkzLlWg2byJkSY0xCD5IQRHpbQPRs7/ogKE7A7NCgHzZASY5PMPtOxELof zDGl05rTg4iwQ== From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 2/5] ASoC: SOF: mediatek: mt8195: Import namespace SND_SOC_SOF_MTK_COMMON Date: Tue, 6 Sep 2022 11:27:24 +0200 Message-Id: <20220906092727.37324-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> References: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com, kernel@collabora.com, yung-chuan.liao@linux.intel.com, sound-open-firmware@alsa-project.org, peter.ujfalusi@linux.intel.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, tzungbi@google.com, geert@linux-m68k.org, ranjani.sridharan@linux.intel.com, wenst@chromium.org, trevor.wu@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, yc.hung@mediatek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Here we're using function mtk_adsp_dump() from mtk-adsp-common: explicitly import its namespace. Fixes: 3a054f90e955 ("ASoC: SOF: mediatek: Add mt8195 debug dump") Signed-off-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 9c146015cd1b..ff575de7e46a 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -652,4 +652,5 @@ static struct platform_driver snd_sof_of_mt8195_driver = { module_platform_driver(snd_sof_of_mt8195_driver); MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA); +MODULE_IMPORT_NS(SND_SOC_SOF_MTK_COMMON); MODULE_LICENSE("Dual BSD/GPL"); From patchwork Tue Sep 6 09:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12967161 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B467FC54EE9 for ; Tue, 6 Sep 2022 09:30:07 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EE94D829; Tue, 6 Sep 2022 11:29:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE94D829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662456606; bh=yV6nCsjeOdwaKJwa/v3ztHbWo4/fPObpHuPkgeFvzgA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZEikjS77T615mYIWINW1z5bw1djH2x4X8pSJjhkKIT3SNYljXJW/neUQYpyX7WHcf M/YK9W5/+yPB1G9dULGa6/MX+CT9W7OtaIDtN9SmcpgXMk4FhL+M0lwiR6qCOegp2M PzqFRn7m25GDvK1zVXJScFWC4juhOzKQr4hR/+Q8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F33A9F8056F; Tue, 6 Sep 2022 11:27:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 300C8F8055A; Tue, 6 Sep 2022 11:27:51 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9C801F8024C; Tue, 6 Sep 2022 11:27:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9C801F8024C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="kCCCdAdP" Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 821FE660038D; Tue, 6 Sep 2022 10:27:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662456460; bh=yV6nCsjeOdwaKJwa/v3ztHbWo4/fPObpHuPkgeFvzgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kCCCdAdPwuWWeMFa2+5PwAQeF3I4MKfZVzXHZNN8nHmFiSVVBsmDlgUxsLjsyP9xR IG7ng+Ts5OLLA0ENa5tu0bVSpEDNDDO+9dYz6DJGGuQvT3ETw3fg5Ex9W+VROmO1wC Jvgq8XmCrR4QLTvQLvGbaGoG4f3hZiBpJB0fAJoM/sNqiN+0ygNgmwexBb0oy+SUWj 7idoqXQjmJ1znaMpkR+dak5n9t2yN2r1o/7PTgUmR1UwvD4yzSSGWEgoEPjIqLPgiB gVKCwTylk+bgKHgvg0MabafFdICAlHcMgT9VXmoGU7SHBVrcyoymzJBiVG1ksEeaRv ij7DtFUjRljcA== From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 3/5] ASoC: SOF: mediatek: mt8195: Add mailbox generic callbacks for IPC Date: Tue, 6 Sep 2022 11:27:25 +0200 Message-Id: <20220906092727.37324-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> References: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com, kernel@collabora.com, yung-chuan.liao@linux.intel.com, sound-open-firmware@alsa-project.org, peter.ujfalusi@linux.intel.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, tzungbi@google.com, geert@linux-m68k.org, ranjani.sridharan@linux.intel.com, wenst@chromium.org, trevor.wu@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, yc.hung@mediatek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add the .mailbox_{read,write} generic callbacks for SOF IPC and, while at it, also change the ipc_msg_data callback to use the SOF API sof_ipc_msg_data() instead of the custom function mt8195_ipc_msg_data(). Signed-off-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index ff575de7e46a..68747ee21c6f 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -496,14 +496,6 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type) return type; } -static int mt8195_ipc_msg_data(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - void *p, size_t sz) -{ - sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); - return 0; -} - static void mt8195_adsp_dump(struct snd_sof_dev *sdev, u32 flags) { u32 dbg_pc, dbg_data, dbg_bus0, dbg_bus1, dbg_inst; @@ -574,6 +566,10 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { .block_read = sof_block_read, .block_write = sof_block_write, + /* Mailbox IO */ + .mailbox_read = sof_mailbox_read, + .mailbox_write = sof_mailbox_write, + /* Register IO */ .write = sof_io_write, .read = sof_io_read, @@ -584,7 +580,7 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { .send_msg = mt8195_send_msg, .get_mailbox_offset = mt8195_get_mailbox_offset, .get_window_offset = mt8195_get_window_offset, - .ipc_msg_data = mt8195_ipc_msg_data, + .ipc_msg_data = sof_ipc_msg_data, .set_stream_data_offset = sof_set_stream_data_offset, /* misc */ From patchwork Tue Sep 6 09:27:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12967160 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6579C38145 for ; Tue, 6 Sep 2022 09:29:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2442F165E; Tue, 6 Sep 2022 11:29:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2442F165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662456594; bh=YDlQ+YNdqI/5kTvHBiM/B/3jPqKXRqtJVv0TyDN9v4s=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iCNo0jKNJJObKWG9XXW9iDvGJMKOq/JASCcGWlpHBmzrWpNvljIfhIKuGViLkMHAG 4Fjv22NLEtGhKtjKj3f/48pKdxGZL2JUPAbtMlpXnXQ2GmwKmzE/fR24yLDO5F1qEn 2Ya2yyS0mU3uzPb0TYTVzr3jNGhRfP8YP0XYzE/g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 86334F80564; Tue, 6 Sep 2022 11:27:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40056F80558; Tue, 6 Sep 2022 11:27:51 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A4AC3F80528; Tue, 6 Sep 2022 11:27:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A4AC3F80528 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="jUe01iz9" Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id C3A6F6601E73; Tue, 6 Sep 2022 10:27:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662456461; bh=YDlQ+YNdqI/5kTvHBiM/B/3jPqKXRqtJVv0TyDN9v4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUe01iz99vjxX5T1OZqszuO5NuLhZ7HOJybhSE3NubRqkA7xOh107oJhxrBscabsA U/0eCBPs483WDAw8bfelr0xm1W6crl/U+jz4c6NYA7JiZv2y++LJPmvnfc+Shzchjy j5TLzLqoMHNKJpogWol7MEwV0SbiTnxlUTTwxlta6zOYWt0fjo0mVB6eY4PIMvB1gL s+6Fpqa2s/QpoVVZJGxXkq1VQzYQuL+IkhYQBwq/XQ7B9vPpBcAmtjjI1RPciSsDFQ 74JhAc0TlmV//EpD6Kfxgd5Gk29MGhfj9lqnJfz2MbF7oShABq3XHf3f0eMtVkeeN6 IFPussD/yOgTA== From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 4/5] ASoC: SOF: mediatek: mt8195: Add generic pcm_{open, close} callbacks Date: Tue, 6 Sep 2022 11:27:26 +0200 Message-Id: <20220906092727.37324-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> References: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com, kernel@collabora.com, yung-chuan.liao@linux.intel.com, sound-open-firmware@alsa-project.org, peter.ujfalusi@linux.intel.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, tzungbi@google.com, geert@linux-m68k.org, ranjani.sridharan@linux.intel.com, wenst@chromium.org, trevor.wu@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, yc.hung@mediatek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Use the generic sof_stream_pcm_{open,close}() functions for the pcm_{open,close} callbacks. Signed-off-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 68747ee21c6f..c1590e78edd4 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -586,6 +586,10 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { /* misc */ .get_bar_index = mt8195_get_bar_index, + /* stream callbacks */ + .pcm_open = sof_stream_pcm_open, + .pcm_close = sof_stream_pcm_close, + /* firmware loading */ .load_firmware = snd_sof_load_firmware_memcpy, From patchwork Tue Sep 6 09:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12967162 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 056F3ECAAA1 for ; Tue, 6 Sep 2022 09:30:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 46E6C1655; Tue, 6 Sep 2022 11:29:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 46E6C1655 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662456630; bh=q/pjRlc+P1EXAov84vHYYZkyXsNxDJtdjpHTIHnbw+w=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=r4xuUBLxpj+v6lZKmKK3a4XwPXZX/0RvejCS3fLO+iYsNRpbmcgEOXTDq7nI2Wd7r Gj2DlZVhOT/yVw5pfU8Pw+Y1Lo+rQW5OIFEMNZv5T7qQiLy/5SEcnDJpXDFDHhx6MH 10xi1jIGRCUa01PximUSqNqmj8scDAawQ2CVpwJk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0D938F8057C; Tue, 6 Sep 2022 11:28:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CD02AF8057D; Tue, 6 Sep 2022 11:27:58 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 76644F8011C; Tue, 6 Sep 2022 11:27:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 76644F8011C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="X7j7JJNo" Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1A36D6601F39; Tue, 6 Sep 2022 10:27:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662456463; bh=q/pjRlc+P1EXAov84vHYYZkyXsNxDJtdjpHTIHnbw+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7j7JJNoV/4qGA8hHzxbjp29Roe1pEwLywRePOz7quQpuSF3ELkhNFcFELz4usSLR ma9qGN9glh2aoynYH44mhPSEr5MX4SB38P5Dzu2KhkvV3PP1Sled5nHEjvl3+4dkAN S9d7FBvig4OAydOT3pxG5AipzTqt471gt8hspnXlkaKtFjh3mjSZIpKfU8/Q1XMiLJ BNs79djZuVQXHT1FJUSqlU6zKaC9YGJqfwc3pQzc68D7EMRIpjOsLPm+zp3vXLg2LE ZublxmPgPhgumD9twr6pXezF0Albz7sAyU/WPAmyuNYyuck3VVOfxwZ7L/O3c5gJ52 SU+2RwqRrJA7w== From: AngeloGioacchino Del Regno To: broonie@kernel.org Subject: [PATCH 5/5] ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologies Date: Tue, 6 Sep 2022 11:27:27 +0200 Message-Id: <20220906092727.37324-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> References: <20220906092727.37324-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, Allen-KH.Cheng@mediatek.com, lgirdwood@gmail.com, kernel@collabora.com, yung-chuan.liao@linux.intel.com, sound-open-firmware@alsa-project.org, peter.ujfalusi@linux.intel.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, tzungbi@google.com, geert@linux-m68k.org, ranjani.sridharan@linux.intel.com, wenst@chromium.org, trevor.wu@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, yc.hung@mediatek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Support devicetree by adding a snd_soc_of_mach array, specifying SOF topologies for a generic MT8195 machine and for Google Tomato Chromebooks. Signed-off-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index c1590e78edd4..8e359c296308 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -615,7 +615,20 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = { SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, }; +static struct snd_sof_of_mach sof_mt8195_machs[] = { + { + .compatible = "google,tomato", + .sof_tplg_filename = "sof-mt8195-mt6359-rt1019-rt5682-dts.tplg" + }, { + .compatible = "mediatek,mt8195", + .sof_tplg_filename = "sof-mt8195.tplg" + }, { + /* sentinel */ + } +}; + static const struct sof_dev_desc sof_of_mt8195_desc = { + .of_machines = sof_mt8195_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = {