From patchwork Tue Dec 1 13:26:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4191BC64E7A for ; Tue, 1 Dec 2020 13:28:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5824F20770 for ; Tue, 1 Dec 2020 13:28:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="B1p4+heY"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="sBiTWiAS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5824F20770 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 BD1A717B2; Tue, 1 Dec 2020 14:27:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BD1A717B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829297; bh=1Rtn3YVm1OW3lOwDdvYUJdJvIMgVb9zeLxwrRUgY9ww=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=B1p4+heYCc7RZvDgf24fSxuR7txjQJNcKJkqujIEqkO0XsXyRluWN8Acq/MHUu6p4 ZUIY19fQjh2yrTdZ269geoTlGnRucMeVWLtlCxM7ez5TQqL8d/JbVOV4/ZXNaJNYtk HcJSvdx8hultbDMFU0AKOWgM8E3hMry7L+Oq05ZA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 21029F80276; Tue, 1 Dec 2020 14:26:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89AC7F8016D; Tue, 1 Dec 2020 14:26:39 +0100 (CET) Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 919F1F80168 for ; Tue, 1 Dec 2020 14:26:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 919F1F80168 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sBiTWiAS" Received: by mail-qv1-xf49.google.com with SMTP id y8so1161938qvu.22 for ; Tue, 01 Dec 2020 05:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=zeBdGQi7aQ2RzZ5oYC/vR5oem1skz7Qr9Eoewd69/U0=; b=sBiTWiASpLsq3LJ8BDI2Y+60ZFuYshHMzBf38x4k4bX+31eAuJo+nB4DKrsFFjNV8C aH6xszV0gPiWyCE7ttEknJVSpMVfJBLlGpWRLsaTynYSTYQgzTUdPKPMnCRkB6X9pjwX ZPrP1ZFeJFV7qDHQ5slC/nQBs6ee872uARmhXyzKsLK0wNHAT11Jeg/eQLAcWeBHEB4h N7Pd2bIi9J2+zXLcqomlijYMrJRxxp7PC8NJdBuAYLQm5V8AQWJQ7AmKF48GLEHdxdxL WYS1vlpMeFShxIP1uBG2JwcNJ/clnTOJw4CcQ7+4YZphepi4SGqtCaeDeLclMjvRjAXw I0xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=zeBdGQi7aQ2RzZ5oYC/vR5oem1skz7Qr9Eoewd69/U0=; b=e6eCPDB4LpEhuAuw6txZKGDpPjnLiYdVr79njkt9Y/9p75Ha+meoEn+yXmZQlW07qv IqO6evv4oPeovYzo3ctc+xjBdu6TyH9I6vgvx6r6F/cX7N1iuAt6xZpaOx/0kZ5xFExv 0v1x5mxLsTEAI5EhjpUQqvUqAdXQIr+MD41Dpq0a9nWjNsmOv38xiLfnMeEAAQLdM1BI u3G13Du4mxavZIAj4ih3oVsxyyIx54SIcr0q8Qy0h7naSZGBUE0DCrhuLecnSglOc9iZ xScCOK7y3PpSvAT3uJ0kyqKiju0L/5uYAFZQ7brk6tPFN+ZKuj/7y1AFEG86F7etKv8r yFfQ== X-Gm-Message-State: AOAM5319mlKz3F8AxjCTJYTcPajHYCMEumbRn/cd1VrBNaItFKTKncXo vX1Oa2IZoQG2uQmH/uagwrnRtQsEJzeW X-Google-Smtp-Source: ABdhPJw7TIM5HCPYLlaI5fQSrFU+itpyEW1viJIZMc/uUz1qwlLjP7916UEQrhWQ+oPDWZ9PvierfZBvcJXv X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a0c:f4d0:: with SMTP id o16mr2778113qvm.45.1606829191708; Tue, 01 Dec 2020 05:26:31 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:09 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-2-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 1/6] ASoC: mediatek: mt8192: rename common symbols From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Renames common symbols from "mt8192_mt6359_rt1015_rt5682" to "mt8192_mt6359". They will share between a few machine drivers on MT8192 and MT6359 with some different audio components. Signed-off-by: Tzung-Bi Shih --- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index b7f42a530d06..253c028c1630 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -631,7 +631,7 @@ SND_SOC_DAILINK_DEFS(tdm, DAILINK_COMP_ARRAY(COMP_DUMMY()), DAILINK_COMP_ARRAY(COMP_EMPTY())); -static struct snd_soc_dai_link mt8192_mt6359_rt1015_rt5682_dai_links[] = { +static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { /* Front End DAI links */ { .name = "Playback_1", @@ -986,8 +986,8 @@ static struct snd_soc_codec_conf rt1015_amp_conf[] = { static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_soc_card = { .name = "mt8192_mt6359_rt1015_rt5682", .owner = THIS_MODULE, - .dai_link = mt8192_mt6359_rt1015_rt5682_dai_links, - .num_links = ARRAY_SIZE(mt8192_mt6359_rt1015_rt5682_dai_links), + .dai_link = mt8192_mt6359_dai_links, + .num_links = ARRAY_SIZE(mt8192_mt6359_dai_links), .controls = mt8192_mt6359_rt1015_rt5682_controls, .num_controls = ARRAY_SIZE(mt8192_mt6359_rt1015_rt5682_controls), .dapm_widgets = mt8192_mt6359_rt1015_rt5682_widgets, @@ -998,7 +998,7 @@ static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_soc_card = { .num_configs = ARRAY_SIZE(rt1015_amp_conf), }; -static int mt8192_mt6359_rt1015_rt5682_dev_probe(struct platform_device *pdev) +static int mt8192_mt6359_dev_probe(struct platform_device *pdev) { struct snd_soc_card *card = &mt8192_mt6359_rt1015_rt5682_soc_card; struct device_node *platform_node; @@ -1029,32 +1029,32 @@ static int mt8192_mt6359_rt1015_rt5682_dev_probe(struct platform_device *pdev) } #ifdef CONFIG_OF -static const struct of_device_id mt8192_mt6359_rt1015_rt5682_dt_match[] = { +static const struct of_device_id mt8192_mt6359_dt_match[] = { {.compatible = "mediatek,mt8192_mt6359_rt1015_rt5682",}, {} }; #endif -static const struct dev_pm_ops mt8192_mt6359_rt1015_rt5682_pm_ops = { +static const struct dev_pm_ops mt8192_mt6359_pm_ops = { .poweroff = snd_soc_poweroff, .restore = snd_soc_resume, }; -static struct platform_driver mt8192_mt6359_rt1015_rt5682_driver = { +static struct platform_driver mt8192_mt6359_driver = { .driver = { - .name = "mt8192_mt6359_rt1015_rt5682", + .name = "mt8192_mt6359", #ifdef CONFIG_OF - .of_match_table = mt8192_mt6359_rt1015_rt5682_dt_match, + .of_match_table = mt8192_mt6359_dt_match, #endif - .pm = &mt8192_mt6359_rt1015_rt5682_pm_ops, + .pm = &mt8192_mt6359_pm_ops, }, - .probe = mt8192_mt6359_rt1015_rt5682_dev_probe, + .probe = mt8192_mt6359_dev_probe, }; -module_platform_driver(mt8192_mt6359_rt1015_rt5682_driver); +module_platform_driver(mt8192_mt6359_driver); /* Module information */ -MODULE_DESCRIPTION("MT8192-MT6359-RT1015-RT5682 ALSA SoC machine driver"); +MODULE_DESCRIPTION("MT8192-MT6359 ALSA SoC machine driver"); MODULE_AUTHOR("Jiaxin Yu "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("mt8192_mt6359_rt1015_rt5682 soc card"); +MODULE_ALIAS("mt8192_mt6359 soc card"); From patchwork Tue Dec 1 13:26:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE520C64E7A for ; Tue, 1 Dec 2020 13:28:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EDE2420770 for ; Tue, 1 Dec 2020 13:28:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="a9VCF5Qd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="r6Z9Qdqi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDE2420770 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 75F1217B3; Tue, 1 Dec 2020 14:27:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 75F1217B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829310; bh=u6Jwv0VMLtSJJ2xG8u1Yr1VRjB9ITuCbj5wIMxgNsbU=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=a9VCF5QdKO3URT5671BJn+qIGpC6eRbA6rw6TUyUag7UNOOn+385Vw94aLx0wqTD9 mYJMNqgu6PPYPPK3gBgPb+zcRRLiW2z7bdGEDOOsCc6m53Qt6kmC/wv7inpzutGY+b zFjXm1y0RWF+TBpqdOJY9uFJyyNm77R1QCARNeTo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D84EF804CA; Tue, 1 Dec 2020 14:26:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52C6CF804CB; Tue, 1 Dec 2020 14:26:42 +0100 (CET) Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 88293F80168 for ; Tue, 1 Dec 2020 14:26:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 88293F80168 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="r6Z9Qdqi" Received: by mail-yb1-xb4a.google.com with SMTP id r4so2395373ybs.1 for ; Tue, 01 Dec 2020 05:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=xpmr0QppfKaZgs1QfZTCXWDbMOfoG2eoYaqppx7TWQc=; b=r6Z9QdqiHKrH2BBNE9kdnblSzW428RnZuze83cE+mVbwyWpOHxsA5P09JZ7L2GUUVC ACVaWCWrCv7+9oSBwwUE8Nm0VRYzvwtyK1UR99JUDaC4SUIzdCdM68JjJUHD8lyvKEx1 Vzv/hL8bvwrH9VMdjJUMkuWNcSH9LtYEOzVscsRP7L1lJY4X/ftCl2YCWeJVPVg/o/hx eeJwP8e7C9FqSB8jVUwJTbmc0vbuqBhSnZGjdwqBrpB6ztsYOde/AMblg/Hzwzh1eMIU U3pFx3Ug4x4bmC6SmkicAY45hZ7BJ3FLm4QHtnkFH6bMp2BF0EgVb8qB0Na2JB5xsPSJ KEMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=xpmr0QppfKaZgs1QfZTCXWDbMOfoG2eoYaqppx7TWQc=; b=uWzNTtN+I5hERMraZJLU6E5QhWGhMLTUr9NzVhv4PkHhAejq0427ieWnrBohTH8H2P 16adq/9TldYqqGOpvOGUUL8EQSXInUK6XG0E3mkCkIXd2MWfimlrP+F3jtjob05RlAfJ 2YIA9iVBcTh+AxJKqEUFkO5ICc0sNDh5s6QFpiiVUghvvbEVLDActH1BOjNDNERZ0N44 T/OShObmk3T5SU2YRJO8Cpm5qZQqPXdJo3bCnUvEv/cooccg5OPGSDu8Nt2bK/OdhISV 6pYE/dpdVVoNl1g9goAyTMo1DGrVLuMWIjTzYxS+xvEwo3eYYtIxUQqeIKNbfGSwoqXI AnRA== X-Gm-Message-State: AOAM531CjRofQ4jNmCc8yW9M3UvPyOw1ztZV7vsenKgdBk9Ih8qKcmI6 tBo41IzFqmzfsjC6lONSIGSrK+W/XHl3 X-Google-Smtp-Source: ABdhPJzXQvl3KcxrG86zIVoJaYcMhh/XfXutz/bOaV5brDNIpgEdVe6dLzgpGlUSZPp0zI3OYxltaRwpylIW X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a25:bf82:: with SMTP id l2mr3503068ybk.1.1606829195340; Tue, 01 Dec 2020 05:26:35 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:10 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-3-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 2/6] ASoC: mediatek: mt8192: extract rt1015_rt5682 specific DAI link From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Extracts rt1015_rt5682 specific DAI link from the common one. Fills the DAI link data according to of_match. Signed-off-by: Tzung-Bi Shih --- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 253c028c1630..e841fd32e8cc 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -576,7 +577,7 @@ SND_SOC_DAILINK_DEFS(i2s2, DAILINK_COMP_ARRAY(COMP_DUMMY()), DAILINK_COMP_ARRAY(COMP_EMPTY())); -SND_SOC_DAILINK_DEFS(i2s3, +SND_SOC_DAILINK_DEFS(i2s3_rt1015, DAILINK_COMP_ARRAY(COMP_CPU("I2S3")), DAILINK_COMP_ARRAY(COMP_CODEC(RT1015_DEV0_NAME, RT1015_CODEC_DAI), @@ -894,8 +895,6 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, - SND_SOC_DAILINK_REG(i2s3), - .ops = &mt8192_rt1015_i2s_ops, }, { .name = "I2S5", @@ -983,7 +982,7 @@ static struct snd_soc_codec_conf rt1015_amp_conf[] = { }, }; -static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_soc_card = { +static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_card = { .name = "mt8192_mt6359_rt1015_rt5682", .owner = THIS_MODULE, .dai_link = mt8192_mt6359_dai_links, @@ -1000,12 +999,11 @@ static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_soc_card = { static int mt8192_mt6359_dev_probe(struct platform_device *pdev) { - struct snd_soc_card *card = &mt8192_mt6359_rt1015_rt5682_soc_card; + struct snd_soc_card *card; struct device_node *platform_node; int ret, i; struct snd_soc_dai_link *dai_link; - - card->dev = &pdev->dev; + const struct of_device_id *match; platform_node = of_parse_phandle(pdev->dev.of_node, "mediatek,platform", 0); @@ -1014,7 +1012,29 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) return -EINVAL; } + match = of_match_device(pdev->dev.driver->of_match_table, &pdev->dev); + if (!match || !match->data) + return -EINVAL; + + card = (struct snd_soc_card *)match->data; + card->dev = &pdev->dev; + for_each_card_prelinks(card, i, dai_link) { + if (strcmp(dai_link->name, "I2S3") == 0) { + if (card == &mt8192_mt6359_rt1015_rt5682_card) { + dai_link->ops = &mt8192_rt1015_i2s_ops; + dai_link->cpus = i2s3_rt1015_cpus; + dai_link->num_cpus = + ARRAY_SIZE(i2s3_rt1015_cpus); + dai_link->codecs = i2s3_rt1015_codecs; + dai_link->num_codecs = + ARRAY_SIZE(i2s3_rt1015_codecs); + dai_link->platforms = i2s3_rt1015_platforms; + dai_link->num_platforms = + ARRAY_SIZE(i2s3_rt1015_platforms); + } + } + if (!dai_link->platforms->name) dai_link->platforms->of_node = platform_node; } @@ -1030,7 +1050,10 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) #ifdef CONFIG_OF static const struct of_device_id mt8192_mt6359_dt_match[] = { - {.compatible = "mediatek,mt8192_mt6359_rt1015_rt5682",}, + { + .compatible = "mediatek,mt8192_mt6359_rt1015_rt5682", + .data = &mt8192_mt6359_rt1015_rt5682_card, + }, {} }; #endif From patchwork Tue Dec 1 13:26:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EE7FC64E7A for ; Tue, 1 Dec 2020 13:29:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 06BA8207FF for ; Tue, 1 Dec 2020 13:29:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ZrUKuSKn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="b8SIL1ah" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06BA8207FF Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 3EFBD17A0; Tue, 1 Dec 2020 14:28:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3EFBD17A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829348; bh=qoqYo6GF9T2jOKtn4cIJjlat/DQdgNLsXAPIDDPnY90=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZrUKuSKntDl+8qzylEtXlK0GfcgLrSnZbjdKhEff1Kfk/MtbHlS5TifbHa8NQkS4I gRHK1rao8SvgZU82n9j/Sd496Yynx9k/tSXA5eHnIPhRUkwKbehBhdB6QsQiMps0Cj CvEIx/hPzlKiZ8Puk63pw2fheFpLApBYNvkfeobc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 93522F804D8; Tue, 1 Dec 2020 14:26:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 33041F804D8; Tue, 1 Dec 2020 14:26:47 +0100 (CET) Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 78F41F80168 for ; Tue, 1 Dec 2020 14:26:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 78F41F80168 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="b8SIL1ah" Received: by mail-pl1-x649.google.com with SMTP id 9so1185293plj.10 for ; Tue, 01 Dec 2020 05:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=Y0+xH3UGiixm7l2bnHVG2So+xIAjdFpqflSxFA1Eik0=; b=b8SIL1ahSDDGUQ+5ZihBBJeGgWjEpbPbg2yISAfdYMgJPH3MlaXrLwwL/dLSRncgu1 r6F+B+ECCIzwnUvwa2WBdzeTMNgyoNQKyDiII5/O8qh89JCrE8nM1dAn7WvznQjAdLvH QheAb4gUwhEJyWpkbPU8zdUzfm9BhLijxDDB2EbJL9gDs21ip1tM5BsGM8EAPJlUNnuN pz36CUbHf6EoZ+Nyhfk/7Ye8RQgCQ11D88Qo1RPCEAsNy0B42IAFCTXlothueNaMAWmG ykprODVCJ/rKfKmKdr7qA0jxtv2Ef64kWxlLHi+lIFdjNOs5/3J16p8InkZwgrAkxq6I CH6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Y0+xH3UGiixm7l2bnHVG2So+xIAjdFpqflSxFA1Eik0=; b=bpwazk3DWfMx+sBDFeS9iApKqVHYfACyVlzkEx+FWUXBKa88Kl8vEQftpTR/pdyoil GFhoUqxZWXaj0VnKwerc11UwxeWCLwv4SSLbJ2s4niNded5tKJQeQZNhpfVvFFfUGBhZ 2nRzimAH/XAs+q5fVeV9/9xou5lLPwFK7Zb+0wQkLay1ysUEoTA5HeSkHon7JM0yl16I ielfiaGBtccxUrOQlZSzXtX2EhUArcRJN6WAJtZqarB0FRa190Kno0zKbYiAJV9PHPhE bQ2ec6zQPLRXJAfRDKyTKS0cBbjjkf+xBmg0Uvh+pSBcV1KnoIj9G7Tp07GWSBG49sRN jmrw== X-Gm-Message-State: AOAM530eKIOtCoguUC3CE7lYvMLZZgtdCV7TNu/sA2GGc9VCPqCf4G9B zUbAlqDRcdUPztFhArRIc3J4meg0epmL X-Google-Smtp-Source: ABdhPJxtqbPJs83UWd/SREUWwdihnnM1qCVhKWtIhJAJTyQJf5ajt+m6NRpMyEfnIXMm4P2hXs2Nv0n/cyxm X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:aa7:8a90:0:b029:19b:1166:2a22 with SMTP id a16-20020aa78a900000b029019b11662a22mr2400107pfc.31.1606829199180; Tue, 01 Dec 2020 05:26:39 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:11 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-4-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 3/6] ASoC: mediatek: mt8192: move rt1015_rt5682 specific data From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Moves rt1015_rt5682 specific data right before the snd_soc_card definition for neat purpose. Signed-off-by: Tzung-Bi Shih --- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index e841fd32e8cc..0d2cc6800f08 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -33,31 +33,6 @@ static struct snd_soc_jack headset_jack; -static const struct snd_soc_dapm_widget -mt8192_mt6359_rt1015_rt5682_widgets[] = { - SND_SOC_DAPM_SPK("Left Spk", NULL), - SND_SOC_DAPM_SPK("Right Spk", NULL), - SND_SOC_DAPM_HP("Headphone Jack", NULL), - SND_SOC_DAPM_MIC("Headset Mic", NULL), -}; - -static const struct snd_soc_dapm_route mt8192_mt6359_rt1015_rt5682_routes[] = { - /* speaker */ - { "Left Spk", NULL, "Left SPO" }, - { "Right Spk", NULL, "Right SPO" }, - /* headset */ - { "Headphone Jack", NULL, "HPOL" }, - { "Headphone Jack", NULL, "HPOR" }, - { "IN1P", NULL, "Headset Mic" }, -}; - -static const struct snd_kcontrol_new mt8192_mt6359_rt1015_rt5682_controls[] = { - SOC_DAPM_PIN_SWITCH("Left Spk"), - SOC_DAPM_PIN_SWITCH("Right Spk"), - SOC_DAPM_PIN_SWITCH("Headphone Jack"), - SOC_DAPM_PIN_SWITCH("Headset Mic"), -}; - static int mt8192_rt1015_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -971,6 +946,31 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { }, }; +static const struct snd_soc_dapm_widget +mt8192_mt6359_rt1015_rt5682_widgets[] = { + SND_SOC_DAPM_SPK("Left Spk", NULL), + SND_SOC_DAPM_SPK("Right Spk", NULL), + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), +}; + +static const struct snd_soc_dapm_route mt8192_mt6359_rt1015_rt5682_routes[] = { + /* speaker */ + { "Left Spk", NULL, "Left SPO" }, + { "Right Spk", NULL, "Right SPO" }, + /* headset */ + { "Headphone Jack", NULL, "HPOL" }, + { "Headphone Jack", NULL, "HPOR" }, + { "IN1P", NULL, "Headset Mic" }, +}; + +static const struct snd_kcontrol_new mt8192_mt6359_rt1015_rt5682_controls[] = { + SOC_DAPM_PIN_SWITCH("Left Spk"), + SOC_DAPM_PIN_SWITCH("Right Spk"), + SOC_DAPM_PIN_SWITCH("Headphone Jack"), + SOC_DAPM_PIN_SWITCH("Headset Mic"), +}; + static struct snd_soc_codec_conf rt1015_amp_conf[] = { { .dlc = COMP_CODEC_CONF(RT1015_DEV0_NAME), From patchwork Tue Dec 1 13:26:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942969 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A76FEC64E7A for ; Tue, 1 Dec 2020 13:29:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CC81B20857 for ; Tue, 1 Dec 2020 13:29:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FObjzSYf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="sYku0+yI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC81B20857 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 4320517D2; Tue, 1 Dec 2020 14:29:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4320517D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829395; bh=a45LvJEi5yUW32woI20swc9c1EFIK39Wx3AULm3q9Eg=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FObjzSYfqOdMpwW1cKnrwx5Lca9PIH74saeN4S82rZQ85QDvXevRSIieUK1CtOHg6 I+lT/RT3QmdX58n3SdIsHs1DIImiA/0X+AsWkcamJ009tD0FSQMIb0kPwaxshfbIh2 uxXnidTH9G7FGOhagAJYCZrjIrXlwMrIkTMhNuAY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CF1DFF804E6; Tue, 1 Dec 2020 14:26:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6268F804E3; Tue, 1 Dec 2020 14:26:51 +0100 (CET) Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 91C17F804E0 for ; Tue, 1 Dec 2020 14:26:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91C17F804E0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sYku0+yI" Received: by mail-qt1-x84a.google.com with SMTP id t1so933304qtr.19 for ; Tue, 01 Dec 2020 05:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=YyZbO8wYD/ijX6J9aI2QPdV/RaONINl7Yn5VzMFPwgs=; b=sYku0+yIV+TpbWJs23S2nPniHCKLiIqZbltuaDx0QiZwXcTkCn4I3lEwMP64DZcTYE vKkE56FOjRuPVAIxPhZhSdsRVYMhWRU6S0AI474h68Tji0/RvTc8IapXx4IhZPlleZ5F OH+R9cWBXn/YXPniJubnJX4XQdqHeG/WIk6Os9yx9+0P9gH3sr/WJLJMwr50ZPvGH3x1 PHhBnpJhoajXVbmY6ma7RYgf/eT/9sS4EhcO8CBKmyGh0qzBjvNmHqstppQK252Rf6gb o17zo98nGp/25YnbNyJI9GAnUfPV1Ah/oHH5KD1q6rh0jEkoCLBPedf7UPrz9/3XwMKl P6Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=YyZbO8wYD/ijX6J9aI2QPdV/RaONINl7Yn5VzMFPwgs=; b=hBjAjmLqx/AJCC5bcEWN8YmbxaHf3N81EcLHlg0t1CutPT3V1z3WeVwpFm3yxdz8Wo VUnuSX3E/rlam1cMVSvdKBRqC6hCp5li7wvAh8XEMfVvriCGzPhir4W1fLc1/7RzhSvi vxBB0330ODq1pmaHVEt4pMOkCZiZj78dDkjC9sXTq76nI+WzKyP4T6EX+dmoN67OptUY 4m/tCb/E+WQc20wn7MyFH7uQ883bovImTC6O/FO/UT4b85IzQApePOmu8G7volrzFBKm amYVzLY58Bkou2ptaJVL1rDd4f/oLeMDpivq+3ti5Edg+DNEVj9fQ3Zld7OfOK45ysg+ goFg== X-Gm-Message-State: AOAM530+XMn/P2z+ARyIL9qyuImYojbTlnZqiEQK/IPc2SfTc2CqSijE PDUARDy3fUlRb9UGS6zfzdwx8XIFbde/ X-Google-Smtp-Source: ABdhPJzbKgwauq201Rit1w4qEPd73jwpCpDpUdjUQsesLo5XUsbzwVoULzf/ttBPz6/cxR1bTNFkm7IAoABy X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a0c:916d:: with SMTP id q100mr2847720qvq.29.1606829203011; Tue, 01 Dec 2020 05:26:43 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:12 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-5-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 4/6] ASoC: dt-bindings: mt8192-mt6359: fix typo in the example From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Both driver "sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c" and DT binding property use underscore version compatible string. Fixes the typo in the example. Signed-off-by: Tzung-Bi Shih --- .../devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml index 342232a61cfb..b336a42bbb16 100644 --- a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml +++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml @@ -31,7 +31,7 @@ examples: - | sound: mt8192-sound { - compatible = "mediatek,mt8192-mt6359-rt1015-rt5682"; + compatible = "mediatek,mt8192_mt6359_rt1015_rt5682"; mediatek,platform = <&afe>; pinctrl-names = "aud_clk_mosi_off", "aud_clk_mosi_on"; From patchwork Tue Dec 1 13:26:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942967 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA33FC64E7B for ; Tue, 1 Dec 2020 13:29:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D820F20770 for ; Tue, 1 Dec 2020 13:29:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="casrxe8L"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="gawY4KvQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D820F20770 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 443C817D1; Tue, 1 Dec 2020 14:28:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 443C817D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829355; bh=05IqQkYYtx7yVBkhV1sKnCol6I3wx97VPaj9k9sz9HQ=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=casrxe8LoQPKNX8pK1385uvNqlW7S3O6Uui4nhykId6TqodM8KVplc66HCp1lLVcZ cbgcqz7fCxWGhhOi5sonInaJqikHlOWJ8ikpwhPw4YDPjxXYWKbZXYY7+Q8riqGuuI bCnzPkMJ3cqpUHg7eVyu3CHX09TIgaZdRY4IgKCc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3F041F804E0; Tue, 1 Dec 2020 14:26:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64C40F804E4; Tue, 1 Dec 2020 14:26:50 +0100 (CET) Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E5501F804E1 for ; Tue, 1 Dec 2020 14:26:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E5501F804E1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gawY4KvQ" Received: by mail-yb1-xb4a.google.com with SMTP id z83so2392258ybz.2 for ; Tue, 01 Dec 2020 05:26:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=JYH8VKIBKyMDH0Ua+cEyxJiCIfU2UCkNUgqzQ0+FSHQ=; b=gawY4KvQYxLnXVich4sbLw4qZ9XnWAQ4QG9MRpYRMH0NA364UkmMfMAXOyqTnz4HMB MRRtqt6Ca9aEuvg70c59TRXpiUL4Egt60CUyC6VrhSI07ZTSQ2eVNxUg2MxQkNITa2vf BvvVQ03fRcdoHp9v9Zk9zsTF9Teg1Ag1ysXQykRkrASYX6l+dHutNRUR5rS3wm2Ekgy0 BVLtI0YI1+tIT2kcj72wExA4Hr28x5EIk8K1TQyWPPKxCq9C7jZcl351gk0jQ6HZqwS+ jZSHcm76s7ONapIcKwWzAsiQcNKmKYhLufxermjPGeFuu8w1fH9+vFIb/vQYnU+laqQy HMcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=JYH8VKIBKyMDH0Ua+cEyxJiCIfU2UCkNUgqzQ0+FSHQ=; b=HvNlDNEK5xzsSEn7Mo/cglQmDVwZZ8yYAz4cA/HZYoLnlgpKCjAjkdV4LX1G19xmU3 JEK/S1uTAC9wZdw+Pt3BjLXRmB8f+BnjIf9MmJ+tBkk+Duz/KNeDdWrkeIEw6nQMyPb2 YcMccEuIcW3t29ZenjUdWeRsQSJDyGT4MUJnk10mjDqtkvgZWeDRHHVZVSy35YvSqlbk r8RtyeuPRYCAH4kgVbPyOAPWSWzXWacXt1Mip68xMR4RRr+1YYDlJquixCQ/cxzL163E 15k3x13e6+LiyvivX5x6Sz5o+Xjysbxz0EClHj9AUCEF2tDftQoAy9cJqt3/4drLTpm5 jeMA== X-Gm-Message-State: AOAM532JGFo9EGyiIWFe/ssKQsqt4EvrG3qXi2MrRvssakmvGUsLvRvJ O2LI7l7rk2MiiCeVFuRhACGWoqdiqCNn X-Google-Smtp-Source: ABdhPJz2mgI11dnyDE96PGO73oIHHV1Zfer/vm0OidGuO2eh2yboOBrF6DVQOJRJR//vJyspsAv1lfxx3jbs X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a25:5ce:: with SMTP id 197mr3913927ybf.53.1606829206732; Tue, 01 Dec 2020 05:26:46 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:13 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-6-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 5/6] ASoC: dt-bindings: mt8192-mt6359: add new compatible for using rt1015p From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Adds new compatible string "mt8192_mt6359_rt1015p_rt5682" for machines with rt1015p and rt5682. Signed-off-by: Tzung-Bi Shih --- .../bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml index b336a42bbb16..bf8c8ba25009 100644 --- a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml +++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml @@ -15,7 +15,9 @@ description: properties: compatible: - const: mediatek,mt8192_mt6359_rt1015_rt5682 + enum: + - mediatek,mt8192_mt6359_rt1015_rt5682 + - mediatek,mt8192_mt6359_rt1015p_rt5682 mediatek,platform: $ref: "/schemas/types.yaml#/definitions/phandle" From patchwork Tue Dec 1 13:26:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11942971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 463A7C64E7B for ; Tue, 1 Dec 2020 13:30:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 613FA20770 for ; Tue, 1 Dec 2020 13:30:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="pCb9ePF4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="P+0WQ1ph" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 613FA20770 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 564B017DC; Tue, 1 Dec 2020 14:29:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 564B017DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1606829401; bh=k8NR5XKvM3eZqA9cBL/lGpKp3+xtQCAzKDgPKM4l4rw=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pCb9ePF4y7c/tAmm3yqeoEImqgRT3XUGSqkbe7JtWT5JWf2dnBoj4PMx65LvbcdU6 lzFJA4NtFCORMtMAUdOHTqX1QL4unz0v92tcz4DgPKpFnZC7ZS9nb+aR1mBG1O7Yq2 rGQqH9kRYFXP52k46NRzB2FAz+rcpyyvKJJvPQ50= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 89809F804EB; Tue, 1 Dec 2020 14:27:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7DBCF804F1; Tue, 1 Dec 2020 14:26:58 +0100 (CET) Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0D252F804EB for ; Tue, 1 Dec 2020 14:26:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0D252F804EB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="P+0WQ1ph" Received: by mail-pj1-x1049.google.com with SMTP id cm17so1053459pjb.2 for ; Tue, 01 Dec 2020 05:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=SQuaclQlbq8ZR5gX0U6eAnPIjuDHifr/n0O8Gkw3oUU=; b=P+0WQ1phBJO1qp5WKeFAKy04MY9rRx4Edu4MF2zM+0Z18+QN9jK+WYmhaxsvb6HRw6 n9xnnsqZM07DyTXbBerMEyjrF94sAzO7a5JE9kqJcz+tlMJq3mAZHQ5Rq2ok+hEOlMvv MaWL2YIwSDMXAfuzMhI1zHB8YVHp8GBIxS3BWsUOS9X9v8tiueSizWJfr5NbauebWbhA E3thCrfSOrA8//jRhgqLAnzTGImpwUvlmL/YW43hPp1PyxaG0SrtOPv9jVeVkqNWEGN5 Q5mcGhHWiMhuweoBIIli6dzHyhm5XWpW1aVORGSPLC632WfvbQmU4boOnMN92wYckdMi 1hYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=SQuaclQlbq8ZR5gX0U6eAnPIjuDHifr/n0O8Gkw3oUU=; b=A3iqjs7RPWmgNpbFfMR5Q/LQvANGQA8HNg6PMMPdHWxLDudnw1XVCqL7TCvuTBfiqK E7g2x+FJ4eWE0Eel0stooBqL0B2gy6GlJVnrYcy1m7t39WlnkUjB22pHkvnDE86CFRmS X7tCV85dAJZZXrEuVSVm47iuZkbDnq7A7IXkiEu4zGGNR15r1FlLYnchQ4BA0jUdohjM CqDgwr7I8fy5HWTdP3giiUWG82SmvqeFlOyWDanWLFBDuxef0hbabqQJsEO6V/3IPEEK vThhhRN/ETu5dk53w/EXnBkddnvZNTFOSrThWB0I2W6mbpR9KybvjHarbi5ttKmxFu7i Mr0Q== X-Gm-Message-State: AOAM531ctNvSF0A1WlLdro0uJnvVw19eCpS3NhtpzqFc8XAylGyuZrTY vVw3JzRNrU/zoYOr8YLlN1wAg5Pl6V8f X-Google-Smtp-Source: ABdhPJxd09EeTMvgoN7wMG5sCX3SEvxsILCwYqI54xEA2B9ORVM8M4ipscINbd9qpITlRVIgZbEJKOoZv57O X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a17:90a:17a4:: with SMTP id q33mr295837pja.0.1606829210557; Tue, 01 Dec 2020 05:26:50 -0800 (PST) Date: Tue, 1 Dec 2020 21:26:14 +0800 In-Reply-To: <20201201132614.1691352-1-tzungbi@google.com> Message-Id: <20201201132614.1691352-7-tzungbi@google.com> Mime-Version: 1.0 References: <20201201132614.1691352-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [RESEND PATCH 6/6] ASoC: mediatek: mt8192: support rt1015p_rt5682 From: Tzung-Bi Shih To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@google.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" Supports machines with rt1015p and rt5682. Uses new proposed compatible string "mt8192_mt6359_rt1015p_rt5682". Signed-off-by: Tzung-Bi Shih --- sound/soc/mediatek/Kconfig | 1 + .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index 49772dfc92c7..8d3dcfb6a580 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -175,6 +175,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 depends on SND_SOC_MT8192 select SND_SOC_MT6359 select SND_SOC_RT1015 + select SND_SOC_RT1015P select SND_SOC_RT5682_I2C select SND_SOC_DMIC help diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 0d2cc6800f08..716fbb4126b5 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -560,6 +560,11 @@ SND_SOC_DAILINK_DEFS(i2s3_rt1015, RT1015_CODEC_DAI)), DAILINK_COMP_ARRAY(COMP_EMPTY())); +SND_SOC_DAILINK_DEFS(i2s3_rt1015p, + DAILINK_COMP_ARRAY(COMP_CPU("I2S3")), + DAILINK_COMP_ARRAY(COMP_CODEC("rt1015p", "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + SND_SOC_DAILINK_DEFS(i2s5, DAILINK_COMP_ARRAY(COMP_CPU("I2S5")), DAILINK_COMP_ARRAY(COMP_DUMMY()), @@ -997,6 +1002,41 @@ static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_card = { .num_configs = ARRAY_SIZE(rt1015_amp_conf), }; +static const struct snd_soc_dapm_widget +mt8192_mt6359_rt1015p_rt5682_widgets[] = { + SND_SOC_DAPM_SPK("Speakers", NULL), + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), +}; + +static const struct snd_soc_dapm_route mt8192_mt6359_rt1015p_rt5682_routes[] = { + /* speaker */ + { "Speakers", NULL, "Speaker" }, + /* headset */ + { "Headphone Jack", NULL, "HPOL" }, + { "Headphone Jack", NULL, "HPOR" }, + { "IN1P", NULL, "Headset Mic" }, +}; + +static const struct snd_kcontrol_new mt8192_mt6359_rt1015p_rt5682_controls[] = { + SOC_DAPM_PIN_SWITCH("Speakers"), + SOC_DAPM_PIN_SWITCH("Headphone Jack"), + SOC_DAPM_PIN_SWITCH("Headset Mic"), +}; + +static struct snd_soc_card mt8192_mt6359_rt1015p_rt5682_card = { + .name = "mt8192_mt6359_rt1015p_rt5682", + .owner = THIS_MODULE, + .dai_link = mt8192_mt6359_dai_links, + .num_links = ARRAY_SIZE(mt8192_mt6359_dai_links), + .controls = mt8192_mt6359_rt1015p_rt5682_controls, + .num_controls = ARRAY_SIZE(mt8192_mt6359_rt1015p_rt5682_controls), + .dapm_widgets = mt8192_mt6359_rt1015p_rt5682_widgets, + .num_dapm_widgets = ARRAY_SIZE(mt8192_mt6359_rt1015p_rt5682_widgets), + .dapm_routes = mt8192_mt6359_rt1015p_rt5682_routes, + .num_dapm_routes = ARRAY_SIZE(mt8192_mt6359_rt1015p_rt5682_routes), +}; + static int mt8192_mt6359_dev_probe(struct platform_device *pdev) { struct snd_soc_card *card; @@ -1032,6 +1072,16 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) dai_link->platforms = i2s3_rt1015_platforms; dai_link->num_platforms = ARRAY_SIZE(i2s3_rt1015_platforms); + } else if (card == &mt8192_mt6359_rt1015p_rt5682_card) { + dai_link->cpus = i2s3_rt1015p_cpus; + dai_link->num_cpus = + ARRAY_SIZE(i2s3_rt1015p_cpus); + dai_link->codecs = i2s3_rt1015p_codecs; + dai_link->num_codecs = + ARRAY_SIZE(i2s3_rt1015p_codecs); + dai_link->platforms = i2s3_rt1015p_platforms; + dai_link->num_platforms = + ARRAY_SIZE(i2s3_rt1015p_platforms); } } @@ -1054,6 +1104,10 @@ static const struct of_device_id mt8192_mt6359_dt_match[] = { .compatible = "mediatek,mt8192_mt6359_rt1015_rt5682", .data = &mt8192_mt6359_rt1015_rt5682_card, }, + { + .compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682", + .data = &mt8192_mt6359_rt1015p_rt5682_card, + }, {} }; #endif