From patchwork Thu Aug 4 09:13:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunxu Li X-Patchwork-Id: 12936232 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8779CC19F2B for ; Thu, 4 Aug 2022 09:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VYUfT68RNsoGGWKKnAeyYhCj4GxAS2uI+JLm2JoABYs=; b=GtbPPeRzmyTLuWK1xzLhZgfqAl Uzl3om+cyOLun4UqrWOlsRmC+LbL/PfsN2m/RKVrAHwI1d6pGhlP99NuFODwlpp0RSXeMPGQ9BI1J 631Y1wqsLF/b6jMXWLCKqdPqinUEtTTJe6odw6hcwUsv88tFgEvLE0tHG9Zlks611jbEe4iwmpk2n cF1IRIfpbYFkx0DqMME4W4ilc2ebbMkpTx5xtD9Hg14kxApEkxMMu7Lapn7y2WKNjvvUV/Y36Adzl MSkGGvFduFdyxIn2zcNZ0DEcZZsMKhFUdzUKbMxWw48qosAIOIs23ZwQOpmOR1XfezgsSeWOP4HwH vWwJjyHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJX6O-004nig-3c; Thu, 04 Aug 2022 09:25:12 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJX62-004nXR-Ue; Thu, 04 Aug 2022 09:24:52 +0000 X-UUID: d7f3ca992a7b4ad8bf90fb21c0e315d0-20220804 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:bd517d54-96d8-4c4b-a096-effcd9dd67e6,OB:0,LO B:0,IP:0,URL:5,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:0 X-CID-META: VersionHash:0f94e32,CLOUDID:26ee47d0-a6cf-4fb6-be1b-c60094821ca2,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: d7f3ca992a7b4ad8bf90fb21c0e315d0-20220804 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 841998729; Thu, 04 Aug 2022 02:24:48 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 4 Aug 2022 17:14:10 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Aug 2022 17:14:09 +0800 From: Chunxu Li To: , , , , , CC: , , , , , , , , , Chunxu Li Subject: [PATCH 2/2] ASoC: SOF: mediatek: Add .of_machine_select field for mt8186 Date: Thu, 4 Aug 2022 17:13:59 +0800 Message-ID: <20220804091359.31449-3-chunxu.li@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220804091359.31449-1-chunxu.li@mediatek.com> References: <20220804091359.31449-1-chunxu.li@mediatek.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220804_022451_021951_599A1BF0 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org As the mt8186 do not use ACPI type machine, the of_machine_select is used to distinguish different machines in sof_machine_check. Signed-off-by: Chunxu Li --- sound/soc/sof/mediatek/mt8186/mt8186.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index e006532caf2f..cb8bed383064 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -497,6 +497,8 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = { /* misc */ .get_bar_index = mt8186_get_bar_index, + .of_machine_select = sof_of_machine_select, + /* firmware loading */ .load_firmware = snd_sof_load_firmware_memcpy, @@ -515,7 +517,16 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = { SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, }; +static struct snd_sof_of_mach sof_mt8186_machs[] = { + { + .board = "mediatek,mt8186", + .sof_tplg_filename = "sof-mt8186.tplg", + }, + {} +}; + static const struct sof_dev_desc sof_of_mt8186_desc = { + .of_machines = sof_mt8186_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = {