From patchwork Wed Nov 8 06:38:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Zhou X-Patchwork-Id: 13449584 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 193C5C4167B for ; Wed, 8 Nov 2023 06:38:26 +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-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lnUk2lN233lJF/YyaHvDp2l8ZWBM31IpiG9Lcizf72Y=; b=GB8ToYAiZw7xgZ00NSBbmHycNx F06SIg/gqjX3oecDobhh+72WIBkcd+Q0VzbNyZ1zN9BUdRB+5lwfYgabxmhx0MdoD/Hcy2nPQa34P oyf5C6Nz8xF9y99CwJXIXH3L4eWn33x6xKayS5dc9KVUMZtQpGpaIFXGIN6njMJ2Wj6Wsw4zC2Xqy dIJ7La846z/oOfwcFOZ4NlDTZeKvGsczuFaeYXKake8bPYnP0q1gHY1VlLMFyc+BX/71o0IwzlD2a VpbF6HmSLMct444jpu22NZ3IWITJkU46UO3muvA8saXImt73//m7t55EXMu5hLcVJiB/HElNDb28A 7afErGXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCm-00367O-35; Wed, 08 Nov 2023 06:38:24 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCk-003666-0k for linux-mediatek@lists.infradead.org; Wed, 08 Nov 2023 06:38:23 +0000 Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-da7ea62e76cso5367017276.3 for ; Tue, 07 Nov 2023 22:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1699425499; x=1700030299; darn=lists.infradead.org; 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=lnUk2lN233lJF/YyaHvDp2l8ZWBM31IpiG9Lcizf72Y=; b=jviww+6BBAOLDja4C03xI5D0YOUulC6W3xrvhwacRbObMsYLvqJP0QFJ++CQVOva1J Fnn1/TC1PkVJZUA0b6t7qFWtO+0er8er5JDlAwvR6pEvvBuTm28+OpphzNCBtbSy4Ogv E2SC1OVkHg0LbgVGW83bbyxmDSKU+3quB/Yz+pcGVG6BEaaQQtJ9MbfOg6a7zGime3at hKq1vatiqFZzn1/+inEzL/G/TR6bPAWT+YXVv0ZmjOCHWqTGkUz3z8S1OaFJJAArwAxb 3Yky9fEu2FvhTTKYotDmKdWeOIQkH3E3oelKpQzbD3VpvDAzYVRxVE+fz9rQL2+l4Vkd uObA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699425499; x=1700030299; 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=lnUk2lN233lJF/YyaHvDp2l8ZWBM31IpiG9Lcizf72Y=; b=N8DT2wYSRU8x0dO5LiUUyXEusipql0d4W/73AR6/Eb92f2Muvtuf9/CXd9aWTF+lVJ rVgtZgf8dY+3tx/yxDFtYNMMW2wR90wlsl8WuZB0SsdvzhbBtJUYWxAuXKnfwmIRzLfH xJ1Ugj6fE5A4PDui5Fs+7cIVPlNay7gWGyx6wViLSWx57fWm02n5ZZBTk0LlrfvIzmoe E20xTHLmPUKU7QhM484OtTWwg6kdazlufA6bHln13h9sxTNPwURIB83RvRzH2MnFAtJv fAXWg0GfixS0wtfZyWwZkEO48adK1shVUwi32Iu2zsH8hYe+z+G8p6eztkvK0yWkgLBL 10oA== X-Gm-Message-State: AOJu0YxtH6Tu26APjapbRg2UovPY1r5tSQEDv11p5I2wX3Qf49XRYGSA rA5TBW9LKiG445xDzu/rHREKgQ== X-Google-Smtp-Source: AGHT+IHvElmDIAzzTZgl3H9gkvFKWs2kG+fqXmHaKSyPbD5f9Ly/HwL680gzesqVZn1vwJHktE1dqA== X-Received: by 2002:a25:da56:0:b0:d9d:746:1f0a with SMTP id n83-20020a25da56000000b00d9d07461f0amr1026355ybf.8.1699425496149; Tue, 07 Nov 2023 22:38:16 -0800 (PST) Received: from localhost.localdomain ([101.78.151.194]) by smtp.gmail.com with ESMTPSA id u8-20020a627908000000b006baa1cf561dsm8588660pfc.0.2023.11.07.22.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 22:38:15 -0800 (PST) From: Rui Zhou To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, angelogioacchino.delregno@collabora.com, perex@perex.cz, allen-kh.cheng@mediatek.com, kuninori.morimoto.gx@renesas.com Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Rui Zhou Subject: [PATCH v3 1/3] ASoC: dt-bindings: mt8188-mt6359: add es8326 support Date: Wed, 8 Nov 2023 14:38:02 +0800 Message-Id: <20231108063804.592982-2-zhourui@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> References: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_223822_269287_94C75C0C X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. 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 Add compatible string "mediatek,mt8188-es8326" to support new board with es8326 codec. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rui Zhou Acked-by: Conor Dooley --- .../devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml index 4c8c95057ef7..f94ad0715e32 100644 --- a/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml +++ b/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml @@ -15,6 +15,7 @@ allOf: properties: compatible: enum: + - mediatek,mt8188-es8326 - mediatek,mt8188-mt6359-evb - mediatek,mt8188-nau8825 - mediatek,mt8188-rt5682s From patchwork Wed Nov 8 06:38:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Zhou X-Patchwork-Id: 13449585 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 516CEC4167D for ; Wed, 8 Nov 2023 06:38:27 +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-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CKgGKtJhLmXRufltux14fJMclaoxn7oMZiicA565Zb0=; b=v6JqTxC7P3RBL1cIKC5kn0KdzB 7d2R75MANQwhUlCA+asAY/dwm6jYivOvEKGPQEs55Eu1V0kJ9eXcsuue8WHvyHW1AgpUBWXOVnGs0 uAwxO/BgMEng/oLjRx5z8W+eSiDCuxIP+2Gq/ah2L6wcDFRmXGHx53HHLm9XCtKxTjsYBUVmvd072 fJbU5JlmdJggNMr5BLtFsf8fe3/GTyeGZPateMVLLLzuZb0p7dG/ipwrkjlkncLivQ+7Nz8g26zNE vywTesJ8zLvwnzVnzx+lgdRJjPS+3oVdQGDuN43NVDYRFF2wmoAoMoRBbTqbdhTLDUklIif393+p3 yD5JjZeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCo-00367x-11; Wed, 08 Nov 2023 06:38:26 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCl-00366G-1k for linux-mediatek@lists.infradead.org; Wed, 08 Nov 2023 06:38:25 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-da077db5145so6476198276.0 for ; Tue, 07 Nov 2023 22:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1699425500; x=1700030300; darn=lists.infradead.org; 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=CKgGKtJhLmXRufltux14fJMclaoxn7oMZiicA565Zb0=; b=IjcXLCjsYKHGwB1eruk0nuzo8P1rcoL9Zsv+3oZShzPxPfcGpaqNTiQXZTloGTuKPB pHSIQl4IAYk/pPzFaS3Brzgy1LTFl7RKtYFC76EPrupxcfJp6w8OSxYymh4zBcPglyq0 h62vbbeMHf07QFq5R2GxvxO7QqPCGbxHNS9AjfNM6Q4r+PnoLJRb6cwA0Np7dAy6rwfc gVyrhMg62OtitGV+BK5E0721+5H2YvHPgjoCznTJglIo7XXBfqBFnNcz4dB4PJrptJb9 1TgsHSnd6Thf3EfCY6tF8BJW6cazyeI2NRBTre5on7EnCTAjjau653+F67zHoqihNZ6i I6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699425500; x=1700030300; 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=CKgGKtJhLmXRufltux14fJMclaoxn7oMZiicA565Zb0=; b=mEey+4uHMNtBi04tcPsbnGVU9/z1GcdOJhnsiQc89MF+iiJf36seH0dQJsPbOprdD8 JgKSZa/o6X1B0PliwRCrAqNdxMbMV2KvXCY5AQg3yQ1VZYUiZAZ2gkWG0HyqX04LyqOK 38qsXnemnt83SGin2uFj7drdF7H+b2uj26QLC1PoekvTbc8JcCBQoMpyBSr6SASciCXi hDCpWdb5lyjduYUHcMTmO6DrF+cFeLVhmrSLWKIk1QaE/vYFddrEOzS6WQIDUVEgCK0o y75C2Zu6gc/Mk3JoKcIGhyiexh8mEpSsIHBJj7D6bhcr1EZJHPt70S2VPlhB0RCaC88b 1Fqw== X-Gm-Message-State: AOJu0YykExV4/j1MzZ1nSMFXV4uslpOS2I47jVn7RXuatfhYJUNnDoIx FycsF5YjiJZ3j73qwxgNQ/GEeg== X-Google-Smtp-Source: AGHT+IF4ClliSFFhMvggKkelgvvh51WHkMdXuNxjEJI8WyF9+rIRTsKj9WqoXSS8Hy7XiFSQ+0lD6w== X-Received: by 2002:a25:492:0:b0:da0:4c40:67b7 with SMTP id 140-20020a250492000000b00da04c4067b7mr942549ybe.31.1699425500448; Tue, 07 Nov 2023 22:38:20 -0800 (PST) Received: from localhost.localdomain ([101.78.151.194]) by smtp.gmail.com with ESMTPSA id u8-20020a627908000000b006baa1cf561dsm8588660pfc.0.2023.11.07.22.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 22:38:20 -0800 (PST) From: Rui Zhou To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, angelogioacchino.delregno@collabora.com, perex@perex.cz, allen-kh.cheng@mediatek.com, kuninori.morimoto.gx@renesas.com Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Rui Zhou Subject: [PATCH v3 2/3] ASoC: mediatek: mt8188-mt6359: add es8326 support Date: Wed, 8 Nov 2023 14:38:03 +0800 Message-Id: <20231108063804.592982-3-zhourui@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> References: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_223823_583055_70A7174C X-CRM114-Status: GOOD ( 21.50 ) 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 To use ES8326 as the codec, add a new sound card named mt8186_es8326. Signed-off-by: Rui Zhou --- sound/soc/mediatek/Kconfig | 1 + sound/soc/mediatek/mt8188/mt8188-mt6359.c | 100 +++++++++++++++++++++- 2 files changed, 100 insertions(+), 1 deletion(-) diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index b93d455744ab..296b434caf81 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -252,6 +252,7 @@ config SND_SOC_MT8188_MT6359 select SND_SOC_NAU8315 select SND_SOC_NAU8825 select SND_SOC_RT5682S + select SND_SOC_ES8326 help This adds support for ASoC machine driver for MediaTek MT8188 boards with the MT6359 and other I2S audio codecs. diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 33d477cc2e54..e994faa3556b 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -34,6 +34,8 @@ #define NAU8825_HS_PRESENT BIT(0) #define RT5682S_HS_PRESENT BIT(1) +#define ES8326_HS_PRESENT BIT(2) +#define MAX98390_TWO_AMP BIT(3) /* * Maxim MAX98390 */ @@ -48,6 +50,11 @@ */ #define NAU8825_CODEC_DAI "nau8825-hifi" +/* + * ES8326 + */ +#define ES8326_CODEC_DAI "es8326-hifi" + #define SOF_DMA_DL2 "SOF_DMA_DL2" #define SOF_DMA_DL3 "SOF_DMA_DL3" #define SOF_DMA_UL4 "SOF_DMA_UL4" @@ -261,6 +268,17 @@ static struct snd_soc_jack_pin nau8825_jack_pins[] = { }, }; +static struct snd_soc_jack_pin es8326_jack_pins[] = { + { + .pin = "Headphone", + .mask = SND_JACK_HEADPHONE, + }, + { + .pin = "Headset Mic", + .mask = SND_JACK_MICROPHONE, + }, +}; + struct mt8188_card_data { const char *name; unsigned long quirk; @@ -943,6 +961,71 @@ static const struct snd_soc_ops mt8188_sof_be_ops = { .hw_params = mt8188_sof_be_hw_params, }; +static int mt8188_es8326_codec_init(struct snd_soc_pcm_runtime *rtd) +{ + struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); + struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv; + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; + struct snd_soc_jack *jack = &priv->headset_jack; + int ret; + + ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", + SND_JACK_HEADSET | SND_JACK_BTN_0 | + SND_JACK_BTN_1 | SND_JACK_BTN_2 | + SND_JACK_BTN_3, + jack, + es8326_jack_pins, + ARRAY_SIZE(es8326_jack_pins)); + if (ret) { + dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); + return ret; + } + + snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); + snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); + snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); + snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); + ret = snd_soc_component_set_jack(component, jack, NULL); + + if (ret) { + dev_err(rtd->dev, "Headset Jack call-back failed: %d\n", ret); + return ret; + } + + return ret; +}; + +static void mt8188_es8326_codec_exit(struct snd_soc_pcm_runtime *rtd) +{ + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; + + snd_soc_component_set_jack(component, NULL, NULL); +} + +static int mt8188_es8326_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) +{ + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); + struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); + unsigned int rate = params_rate(params); + int ret; + + /* Configure MCLK for codec */ + ret = snd_soc_dai_set_sysclk(codec_dai, 0, rate * 256, SND_SOC_CLOCK_IN); + if (ret < 0) { + dev_err(codec_dai->dev, "can't set MCLK %d\n", ret); + return ret; + } + + /* Configure MCLK for cpu */ + return snd_soc_dai_set_sysclk(cpu_dai, 0, rate * 256, SND_SOC_CLOCK_OUT); +} + +static const struct snd_soc_ops mt8188_es8326_ops = { + .hw_params = mt8188_es8326_hw_params, +}; + static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { /* FE */ [DAI_LINK_DL2_FE] = { @@ -1293,6 +1376,7 @@ static int mt8188_mt6359_dev_probe(struct platform_device *pdev) struct mt8188_card_data *card_data; struct snd_soc_dai_link *dai_link; bool init_mt6359 = false; + bool init_es8326 = false; bool init_nau8825 = false; bool init_rt5682s = false; bool init_max98390 = false; @@ -1399,7 +1483,9 @@ static int mt8188_mt6359_dev_probe(struct platform_device *pdev) strcmp(dai_link->name, "ETDM1_IN_BE") == 0 || strcmp(dai_link->name, "ETDM2_IN_BE") == 0) { if (!strcmp(dai_link->codecs->dai_name, MAX98390_CODEC_DAI)) { - dai_link->ops = &mt8188_max98390_ops; + if (!(card_data->quirk & MAX98390_TWO_AMP)) { + dai_link->ops = &mt8188_max98390_ops; + } if (!init_max98390) { dai_link->init = mt8188_max98390_codec_init; init_max98390 = true; @@ -1417,6 +1503,12 @@ static int mt8188_mt6359_dev_probe(struct platform_device *pdev) dai_link->init = mt8188_rt5682s_codec_init; dai_link->exit = mt8188_rt5682s_codec_exit; init_rt5682s = true; + } else if (!strcmp(dai_link->codecs->dai_name, ES8326_CODEC_DAI)) { + dai_link->ops = &mt8188_es8326_ops; + if (!init_es8326) { + dai_link->init = mt8188_es8326_codec_init; + dai_link->exit = mt8188_es8326_codec_exit; + init_es8326 = true; } } else { if (strcmp(dai_link->codecs->dai_name, "snd-soc-dummy-dai")) { @@ -1460,10 +1552,16 @@ static struct mt8188_card_data mt8188_rt5682s_card = { .quirk = RT5682S_HS_PRESENT, }; +static struct mt8188_card_data mt8188_es8326_card = { + .name = "mt8188_es8326", + .quirk = ES8326_HS_PRESENT | MAX98390_TWO_AMP, +}; + static const struct of_device_id mt8188_mt6359_dt_match[] = { { .compatible = "mediatek,mt8188-mt6359-evb", .data = &mt8188_evb_card, }, { .compatible = "mediatek,mt8188-nau8825", .data = &mt8188_nau8825_card, }, { .compatible = "mediatek,mt8188-rt5682s", .data = &mt8188_rt5682s_card, }, + { .compatible = "mediatek,mt8188-es8326", .data = &mt8188_es8326_card, }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mt8188_mt6359_dt_match); From patchwork Wed Nov 8 06:38:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Zhou X-Patchwork-Id: 13449586 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 22AD9C4332F for ; Wed, 8 Nov 2023 06:38:31 +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-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kIhheentrWUZUr9qMmdfImOeTcJiydkSSMmzKl0Spxo=; b=ZWR4QsYZJSWkiWc7Juq1GMuKmX ksc8uvj+bUjbtifmwXJi3fCV4wsx0Hg1QNNjZDvF9pEjtf9hfqDVn+KodIAHm1HcR95rBrWC6ixY4 u6gK3QDo9hleF2UP+RPwlK1WhfDRis6EHUkGyA0dzQWJuRovlfefV3UUE9ltPCtwFmZgD/fJi5rMN THmIxAExZgnQR38Xpm8lOf92SMGipEo72WPyNWBiNgfZ76MhHUCM7cC7BOgQVTy4o4kJStc7WCU4K REBKXgqQY6g5tj0KTxYGyqvyji8s0N301KgH98YHIxYLUPt1CJ1g8/coXT9LvwoDRnIjwvrcWAjpE JOmWdzyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCs-00369I-08; Wed, 08 Nov 2023 06:38:30 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0cCp-00367d-0h for linux-mediatek@lists.infradead.org; Wed, 08 Nov 2023 06:38:28 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3b2e72fe47fso4070285b6e.1 for ; Tue, 07 Nov 2023 22:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20230601.gappssmtp.com; s=20230601; t=1699425505; x=1700030305; darn=lists.infradead.org; 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=kIhheentrWUZUr9qMmdfImOeTcJiydkSSMmzKl0Spxo=; b=I/9L28DAky1DcBpfMKH5CbH4kLO0X82p1ewClDNlKHeqVR4PN1i9CQ5nIgsWY5yM7h rzezhruoD9q/rK57Kuh5IrKg7oUOBsIsCafIV2zwpyTywCr3q1NXR2JnLa1GR2cf/axz MtRgy/8jqaN+FLVfUhQUdHuMF5uR2H/G1zHNW2Si/PP40m8Fjjh0rKhG9P6rXrT2DD6W +LU79d7RmkfmAN9fA7h9HmGSb1ul7RW+uF8a8n24iTKM8xYHH0KxgshHkCC6IZOJt64X eWNLG1RIvXIGFRexgGzrA5FKd4rXSsrPGItCDGNxIAT+Nccx5aFovBkGa3B9kRIejjsl uDZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699425505; x=1700030305; 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=kIhheentrWUZUr9qMmdfImOeTcJiydkSSMmzKl0Spxo=; b=lAaH6otMTNCuXnYcohYq3I9r7e5zeqTwzQf1SrDjEFU2nHzLhxlb6287S9Er6k4Mpa bfaUtXAGQIpbwzNIAKLB+m54ypAv+3XpA36v7Bk7cbOvi2wsP3/ffWQxBg7ZPWCTutgO N8xgWMgljRmgatuTKrELCvhmmWd/CpKE280eYAw9rfIBas/1wpEh+6UtGgl2VkrmSTJK LI98OeFLouGqKQMzw2T4TLBXQikOewVMB5f4qVt26u81vTTnO0nzaWjbE2DuPGM3nCXr jzPPLIhxGBxml5Xx1cG/U6a5SMAlt6JXhJAazj5PyHnHdCl7Qam80YBwYG4x0PqXRL2Z qPSA== X-Gm-Message-State: AOJu0YxAkC6frC8GViN4YZuNqRBN/dAbiajJp/dCY7T03u84zZHdXACr VqMoslZBMajllPpKhT5eWymYLQ== X-Google-Smtp-Source: AGHT+IELqFwltznkymfD9hsryurCKid8oT9U0HpnclDEFjK+yWpOHhX6keI06fetTDKCg+G0bE6CWQ== X-Received: by 2002:a05:6808:1312:b0:3b5:8742:c091 with SMTP id y18-20020a056808131200b003b58742c091mr1375035oiv.49.1699425504846; Tue, 07 Nov 2023 22:38:24 -0800 (PST) Received: from localhost.localdomain ([101.78.151.194]) by smtp.gmail.com with ESMTPSA id u8-20020a627908000000b006baa1cf561dsm8588660pfc.0.2023.11.07.22.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 22:38:24 -0800 (PST) From: Rui Zhou To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, angelogioacchino.delregno@collabora.com, perex@perex.cz, allen-kh.cheng@mediatek.com, kuninori.morimoto.gx@renesas.com Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Rui Zhou Subject: [PATCH v3 3/3] ASoC: mediatek: mt8188-mt6359: Enable dual amp for mt8188-rt5682s Date: Wed, 8 Nov 2023 14:38:04 +0800 Message-Id: <20231108063804.592982-4-zhourui@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> References: <20231108063804.592982-1-zhourui@huaqin.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_223827_254981_F986F202 X-CRM114-Status: GOOD ( 11.70 ) 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 codec rt5682s uses dual amp max98390. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rui Zhou --- sound/soc/mediatek/mt8188/mt8188-mt6359.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index e994faa3556b..917640939621 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -1549,7 +1549,7 @@ static struct mt8188_card_data mt8188_nau8825_card = { static struct mt8188_card_data mt8188_rt5682s_card = { .name = "mt8188_rt5682s", - .quirk = RT5682S_HS_PRESENT, + .quirk = RT5682S_HS_PRESENT | MAX98390_TWO_AMP, }; static struct mt8188_card_data mt8188_es8326_card = {