From patchwork Sun May 23 23:44:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 446243 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,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 4E680C47082 for ; Sun, 23 May 2021 23:46:01 +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 A4C9861185 for ; Sun, 23 May 2021 23:45:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4C9861185 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 485241661; Mon, 24 May 2021 01:45:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 485241661 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621813557; bh=B4GjxRrA4q22aGVA/Kbe0k8HucpOg9DAVXr1sGESfOI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ai/UAU+SeT2ciea+jvcJZ2frjiPOZcwS7yt+N8zsa0YJDYZmdjlGQ/SEiP6hQ48X1 1QBvBljvd7yUwWYv2aCWbyaPY8SVleVAuZlX0X4c3ltW6KmcYO2dV35zOPotwKZ394 RGKVniZPI77yw531JwU5fv5krU55KhiJNkCSj0JQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C60EFF8019D; Mon, 24 May 2021 01:45:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BB1FDF80212; Mon, 24 May 2021 01:45:05 +0200 (CEST) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 A36D3F8016D for ; Mon, 24 May 2021 01:45:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A36D3F8016D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FiNhKb7C" Received: by mail-lf1-x12e.google.com with SMTP id a2so38026306lfc.9 for ; Sun, 23 May 2021 16:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xVuavUbxhP/h5ufdXkl/W8pz1JR/yQ3WYtl07Hx+SBA=; b=FiNhKb7C+Fzp2BKv9q4Z0Sl16sEuxUtVhjivKNgx6P9coFik56+NT902uOn9jGxskH WSQ4Jpmf7NWawnXxnDzaTqhrqinmobYRzq+2kVx0yXaEBaUfUlhuYUtewNS9fHNywjLI MX47rSSSnNBVed2ne9hIaHm4CEj9tP79W5nwGKb9bkKNreT/JEstC+xXcFdziHOKhY0v jAyaWrFMG2KSWTDxmube7n2emqe6xOfY9z7mo2I3rBFGOJ1Jbtte0tlr4W/Zci6+VFKf lpJcoP0NRTKwRgl3DdSTyuK4i9LHYPq1msPwwtAd7J9sMHuXy1KSttzdHztKQAlM18ou EhMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xVuavUbxhP/h5ufdXkl/W8pz1JR/yQ3WYtl07Hx+SBA=; b=bsOGLrRlANZTY48cyheLp3kkSiLGwiszEEKYBZrIWJ3fSqRCn0NfuvFM8SdsA+IhiN kFQkmdWNZd5UEZf9ebTBktT2HT0Ol+sfDMEI8vMAVnQti75KdxDdGIsdEJHczxYeH7vj vwqGk908FMapnG/PyAGgj+UQ0lx7EpTV7ApR29FQQFOGjcqvrTl1PhbM7dMkbUssL62G f1rlaHgYRbbG9qmrP8TI9tcFSfGNSAyrGcYyVtfSvbdtUzwRqSSzi2enRY0z7bV07hoY NWZ00gDbtubjW2hf21udAmB7/R6FrNXQhLzwqITKPOVfbkb9QeDgPGHCX5uDjCUOo8T6 Exiw== X-Gm-Message-State: AOAM531/bLoI6uVKibFqoYBL9VaBnMQPyaHm2xSyCTIylqoS28QtkF9x IFvVHHC8PykNmueVO10sCxc= X-Google-Smtp-Source: ABdhPJw27HQEsg5vivuUmrrHXm3FHoxSkRVzLf+016MTENSQbYaozAFMm7C64o3oBpHTdQBYPTl5Fw== X-Received: by 2002:a05:6512:10cc:: with SMTP id k12mr2326606lfg.621.1621813500051; Sun, 23 May 2021 16:45:00 -0700 (PDT) Received: from localhost.localdomain (109-252-193-110.dynamic.spd-mgts.ru. [109.252.193.110]) by smtp.gmail.com with ESMTPSA id u11sm1269054lfg.243.2021.05.23.16.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 16:44:59 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Ion Agorria , Svyatoslav Ryhel , Liam Girdwood Subject: [PATCH v3 1/4] ASoC: tegra: Set driver_name=tegra for all machine drivers Date: Mon, 24 May 2021 02:44:34 +0300 Message-Id: <20210523234437.25077-2-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210523234437.25077-1-digetx@gmail.com> References: <20210523234437.25077-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise Tegra UCMs don't match by the path/name. All Tegra machine drivers are specifying the card's name, but it has no effect if model name is specified in the device-tree since it overrides the card's name. We need to set the driver_name to "tegra" in order to get a usable lookup path for the updated ALSA UCMs. The new UCM lookup path has a form of driver_name/card_name. The old lookup paths that are based on driver module name continue to work as before. Note that UCM matching never worked for Tegra ASoC drivers if they were compiled as built-in, this is fixed by supporting the new naming scheme. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra_alc5632.c | 1 + sound/soc/tegra/tegra_max98090.c | 1 + sound/soc/tegra/tegra_rt5640.c | 1 + sound/soc/tegra/tegra_rt5677.c | 1 + sound/soc/tegra/tegra_sgtl5000.c | 1 + sound/soc/tegra/tegra_wm8753.c | 1 + sound/soc/tegra/tegra_wm8903.c | 1 + sound/soc/tegra/tegra_wm9712.c | 1 + sound/soc/tegra/trimslice.c | 1 + 9 files changed, 9 insertions(+) diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 0a0efd24e4b0..81ea6ceba689 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c @@ -139,6 +139,7 @@ static struct snd_soc_dai_link tegra_alc5632_dai = { static struct snd_soc_card snd_soc_tegra_alc5632 = { .name = "tegra-alc5632", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_alc5632_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index 00c19704057b..5a649810c0c8 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -182,6 +182,7 @@ static struct snd_soc_dai_link tegra_max98090_dai = { static struct snd_soc_card snd_soc_tegra_max98090 = { .name = "tegra-max98090", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_max98090_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index 9afba37a3b08..3344f16258be 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -132,6 +132,7 @@ static struct snd_soc_dai_link tegra_rt5640_dai = { static struct snd_soc_card snd_soc_tegra_rt5640 = { .name = "tegra-rt5640", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_rt5640_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c index d30f8b6deda4..0f03e97d9355 100644 --- a/sound/soc/tegra/tegra_rt5677.c +++ b/sound/soc/tegra/tegra_rt5677.c @@ -175,6 +175,7 @@ static struct snd_soc_dai_link tegra_rt5677_dai = { static struct snd_soc_card snd_soc_tegra_rt5677 = { .name = "tegra-rt5677", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_rt5677_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c index 885332170c77..ef6a553e0b7d 100644 --- a/sound/soc/tegra/tegra_sgtl5000.c +++ b/sound/soc/tegra/tegra_sgtl5000.c @@ -97,6 +97,7 @@ static struct snd_soc_dai_link tegra_sgtl5000_dai = { static struct snd_soc_card snd_soc_tegra_sgtl5000 = { .name = "tegra-sgtl5000", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_sgtl5000_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index efd793886689..27089077f2ea 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -101,6 +101,7 @@ static struct snd_soc_dai_link tegra_wm8753_dai = { static struct snd_soc_card snd_soc_tegra_wm8753 = { .name = "tegra-wm8753", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_wm8753_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index e4863fa37b0c..f219c26d66a3 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -235,6 +235,7 @@ static struct snd_soc_dai_link tegra_wm8903_dai = { static struct snd_soc_card snd_soc_tegra_wm8903 = { .name = "tegra-wm8903", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_wm8903_dai, .num_links = 1, diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index 4f09a178049d..c66da161c85a 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -54,6 +54,7 @@ static struct snd_soc_dai_link tegra_wm9712_dai = { static struct snd_soc_card snd_soc_tegra_wm9712 = { .name = "tegra-wm9712", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &tegra_wm9712_dai, .num_links = 1, diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c index 6c1cc3d0ac33..cb4c8f72e4e6 100644 --- a/sound/soc/tegra/trimslice.c +++ b/sound/soc/tegra/trimslice.c @@ -94,6 +94,7 @@ static struct snd_soc_dai_link trimslice_tlv320aic23_dai = { static struct snd_soc_card snd_soc_trimslice = { .name = "tegra-trimslice", + .driver_name = "tegra", .owner = THIS_MODULE, .dai_link = &trimslice_tlv320aic23_dai, .num_links = 1, From patchwork Sun May 23 23:44:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 446242 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,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 EF1F8C47082 for ; Sun, 23 May 2021 23:46:54 +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 702A660C41 for ; Sun, 23 May 2021 23:46:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 702A660C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 D98121664; Mon, 24 May 2021 01:46:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D98121664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621813612; bh=JrnYCZL0eEryRCaOYHbj17ORxK3gCCBNOm28PhsUG+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=ZMhM95N60WRAARwnqgGms78oN/HJ0B27LYxlOXEhCti291NzLwDsIwz2hBazcrhko Ub0Gy/apKv3Zlm2TRP19rJzBrGS0K65hc8kM6rPt+mHLruk9Jq8jPUgxHHLVHJ4k94 wHACAJnIuNBMKjaH5F9Y3QZJpI9sXbpv+1yT1StM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EB5FAF80425; Mon, 24 May 2021 01:45:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 13A00F80425; Mon, 24 May 2021 01:45:10 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 ACB74F801F5 for ; Mon, 24 May 2021 01:45:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ACB74F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AogWYbp2" Received: by mail-lf1-x130.google.com with SMTP id a2so38026352lfc.9 for ; Sun, 23 May 2021 16:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C/YzaFVHHjWNgRf6nbKhMfyavNiyvMnhUpV/Qwaqx/s=; b=AogWYbp2571hXKwtIuF4bCZiBf3P0LLL8n/tk5gItLQkDYA1OMnqjybNK/f/UA/XmM V8BPFNu6wC6r545xqZ42lVU+1Ch7Y+AkeOterZrhXk053Xg0hHQzULJO5W5skYhJYGh9 iEczqLo0ZyyGOw1V5QLoUUeTvNuVLM7h/vcUjbiW7VxAbPkfsfzGuJtAjryX+uYkZ8gS wShFf5vu/DzsxLazK2HF3y/hdEVKyh7UW51exsl30jDxghWfLAszc72H7lVxr6Bdolpx r2VwGo+mfehQmr01jWrffSV5ush0yDsZIi8V1fAs2ymDllggPFXozNua+VxcxEbCH6tf hmaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C/YzaFVHHjWNgRf6nbKhMfyavNiyvMnhUpV/Qwaqx/s=; b=BQtiStQClCMMXF//4WOFzOFL4Qwdx6whihx9deQRKJrekkWUJ1S5ItJXmNZX0+ivVG YPz9mFdHgHmP9hce/qsVsoE18PzlwSagsqc1GnnFpIWE+g6fsKI3w7dKd8140ljcu2zE c1brCBpUk8pR5ZDabkm26asVVTpxKHoqvEbtgpQOOlMCy1lB9T+EGB8rPKv1J/y9ufD5 RNobBjRzbUnXqRm5Fbspl6nNzJsIk160hqV2AZssbUcB+Y9Wp2b7J0q+gyXIglBgSjlQ lO9mNHEqh6C+IJQeMzVikUL3WqRCfZQmL7ayRhZG5obrsI/jmnXrVchTllw45heq3AQe /3RQ== X-Gm-Message-State: AOAM532Zx6z4Ni8sA9dXb49gWjG10lPnaGcBDZaxSkebPsf1i4EW4MVs iwVUMdiX4eCBLrUrA0kIY2o= X-Google-Smtp-Source: ABdhPJwYX7c2QidUiFvbyA6SfWUONiARQmi6QnR3vrM84BTIdW1DjUk+HWswv9Nf11lrcyqtTGrP6g== X-Received: by 2002:a05:6512:3f28:: with SMTP id y40mr8881209lfa.136.1621813501584; Sun, 23 May 2021 16:45:01 -0700 (PDT) Received: from localhost.localdomain (109-252-193-110.dynamic.spd-mgts.ru. [109.252.193.110]) by smtp.gmail.com with ESMTPSA id u11sm1269054lfg.243.2021.05.23.16.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 16:45:01 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Ion Agorria , Svyatoslav Ryhel , Liam Girdwood Subject: [PATCH v3 3/4] ASoC: tegra: Specify components string for each card Date: Mon, 24 May 2021 02:44:36 +0300 Message-Id: <20210523234437.25077-4-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210523234437.25077-1-digetx@gmail.com> References: <20210523234437.25077-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" Specify components string for each card of each supported device. It's a free form string that describes audio hardware configuration. This information is useful for ALSA UCM rules. It allows to generalize UCM rules, potentially removing a need to add new UCM rule for each device. This patch also adds asoc->components hook that allows to specify components description per device. Suggested-by: Jaroslav Kysela Signed-off-by: Dmitry Osipenko Acked-by: Jaroslav Kysela --- sound/soc/tegra/tegra_asoc_machine.c | 9 +++++++++ sound/soc/tegra/tegra_asoc_machine.h | 1 + sound/soc/tegra/tegra_wm8903.c | 1 + 3 files changed, 11 insertions(+) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 17579decceda..a81f2ebfc00c 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -399,6 +399,8 @@ int tegra_asoc_machine_probe(struct platform_device *pdev) if (asoc->add_common_snd_ops) card->dai_link->ops = &tegra_machine_snd_ops; + if (asoc->components) + card->components = asoc->components; if (!card->owner) card->owner = THIS_MODULE; @@ -434,6 +436,7 @@ static struct snd_soc_dai_link tegra_wm8753_dai = { }; static struct snd_soc_card snd_soc_tegra_wm8753 = { + .components = "codec:wm8753", .dai_link = &tegra_wm8753_dai, .num_links = 1, .fully_routed = true, @@ -466,6 +469,7 @@ static struct snd_soc_dai_link tegra_wm9712_dai = { }; static struct snd_soc_card snd_soc_tegra_wm9712 = { + .components = "codec:wm9712", .dai_link = &tegra_wm9712_dai, .num_links = 1, .fully_routed = true, @@ -527,6 +531,7 @@ static struct snd_soc_dai_link tegra_sgtl5000_dai = { }; static struct snd_soc_card snd_soc_tegra_sgtl5000 = { + .components = "codec:sgtl5000", .dai_link = &tegra_sgtl5000_dai, .num_links = 1, .fully_routed = true, @@ -569,6 +574,7 @@ static struct snd_soc_dai_link tegra_tlv320aic23_dai = { }; static struct snd_soc_card snd_soc_tegra_trimslice = { + .components = "codec:tlv320aic23", .dai_link = &tegra_tlv320aic23_dai, .num_links = 1, .dapm_widgets = trimslice_dapm_widgets, @@ -616,6 +622,7 @@ static struct snd_soc_dai_link tegra_rt5677_dai = { }; static struct snd_soc_card snd_soc_tegra_rt5677 = { + .components = "codec:rt5677", .dai_link = &tegra_rt5677_dai, .num_links = 1, .fully_routed = true, @@ -649,6 +656,7 @@ static struct snd_soc_dai_link tegra_rt5640_dai = { }; static struct snd_soc_card snd_soc_tegra_rt5640 = { + .components = "codec:rt5640", .dai_link = &tegra_rt5640_dai, .num_links = 1, .fully_routed = true, @@ -681,6 +689,7 @@ static struct snd_soc_dai_link tegra_rt5632_dai = { }; static struct snd_soc_card snd_soc_tegra_rt5632 = { + .components = "codec:rt5632", .dai_link = &tegra_rt5632_dai, .num_links = 1, .fully_routed = true, diff --git a/sound/soc/tegra/tegra_asoc_machine.h b/sound/soc/tegra/tegra_asoc_machine.h index 080c1a26073a..fa325bfb2c8a 100644 --- a/sound/soc/tegra/tegra_asoc_machine.h +++ b/sound/soc/tegra/tegra_asoc_machine.h @@ -15,6 +15,7 @@ struct snd_soc_pcm_runtime; struct tegra_asoc_data { unsigned int (*mclk_rate)(unsigned int srate); struct snd_soc_card *card; + const char *components; unsigned int mclk_id; bool hp_jack_gpio_active_low; bool add_common_dapm_widgets; diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index a3ec1f50bcb8..3f4f582fb02f 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -108,6 +108,7 @@ static struct snd_soc_dai_link tegra_wm8903_dai = { }; static struct snd_soc_card snd_soc_tegra_wm8903 = { + .components = "codec:wm8903", .owner = THIS_MODULE, .dai_link = &tegra_wm8903_dai, .num_links = 1, From patchwork Sun May 23 23:44:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 446241 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=-10.9 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,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 14058C47082 for ; Sun, 23 May 2021 23:48:12 +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 872CB611CB for ; Sun, 23 May 2021 23:48:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 872CB611CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 CB343167B; Mon, 24 May 2021 01:47:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CB343167B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621813689; bh=yQKHwEJzaLz0gmkUlvWUy4i9UmuBoOzkMP8NDDj12zI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hNqBoRSvKQxqitDyLQfeqNOpl3Q+NNpCxncYaigZ5AG9BNAR7wkbAyuxKBABKzCdR AopZ4MGyRKH0h4aGLdqWGOXw6sAXkZhVS4Qa2ZjHp3nR7STMEowArmGSoVDbwHWVP4 WBz1HawbPuE2WhZNVW1yJHoEKqHIVkUdeYBr8ZVo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DFBF9F8016D; Mon, 24 May 2021 01:45:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89D90F804BD; Mon, 24 May 2021 01:45:58 +0200 (CEST) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 357B4F8016D for ; Mon, 24 May 2021 01:45:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 357B4F8016D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJA0RuH/" Received: by mail-lj1-x22a.google.com with SMTP id f12so31212688ljp.2 for ; Sun, 23 May 2021 16:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/lnkbAwGfOTfE0faI+z2uEvnE5UMJQap5u4jnvd3/0c=; b=IJA0RuH/sxS2Z+PU8lnm6gg+AWa/osTuuDRLJBja5ZoFA/Rc0S+ZwBtUg3qXdDpVBr 5p+HtqqpAvYYWbfD6yEZ2HkFsXyGeAFoM3Wl9wiEFPDWsU6bTX6rmRy/swrN9QMYao+W C8BpL+mkpawvSfh9Phg6zRVSs7ksdmWh7fXp1dpgfKGbWU14aXvvxbkVBMCmgqj2gafh RMzK0def2t0xL+uiy1NFRU5l3USxqw60mG8iasWkM6z4nwwKuUfoynXDTec6T9vh6gun gLMPVmOgMmio00vgbLkh3Nx0ku2iEjnkmi88G7KwNyp/kGhkUQw+WSljXtD7ZJMhu75u U0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/lnkbAwGfOTfE0faI+z2uEvnE5UMJQap5u4jnvd3/0c=; b=L6ZDTqwp5z6R+iOVFHDeEFXixj6SVxApTfRI5RKU5aTOIX7BVsFs/BZkoaQlJB3Yep UATiwHSeCmG5qIxiDGm5MnI4PpXcqZWeO+xFoVUCEyNf/Q4S/UHk+k0GmwcEZa6E8mH4 F3zCDZ/IELTVj7CyV2Cgfz4IevkOlVq04G2jCgZwVj6OUGZobEiJjnwjEOqUbmRQKgjd x5lyctOinVpvd5U7mvpd/Seji8pk5eKHVl5KXtY/BSj+RE+6Ao/Oc4NXPsRyu1Cik14u OC6C+GHFAGLKNnRpMpjigV6SaeSb/pqpuVM4JDOzcyTk7lUxjVVJBmdyd/SrzqToMmW7 EFTA== X-Gm-Message-State: AOAM533QRB1aYPV9Fwaos7JRI0IcJTIhg3CRNzYDlV8sx3JBN2tocu6/ 3jogBwVc9rVdNXacGcRFs1k= X-Google-Smtp-Source: ABdhPJzkNA0BZJDWAFB/SC7LMu5UUqSITysCieeLViToB3wz26EiSa2n/a1EqfTgwH9wnsir3JLQbw== X-Received: by 2002:a2e:9cc:: with SMTP id 195mr14750317ljj.291.1621813502210; Sun, 23 May 2021 16:45:02 -0700 (PDT) Received: from localhost.localdomain (109-252-193-110.dynamic.spd-mgts.ru. [109.252.193.110]) by smtp.gmail.com with ESMTPSA id u11sm1269054lfg.243.2021.05.23.16.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 16:45:02 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Ion Agorria , Svyatoslav Ryhel , Liam Girdwood Subject: [PATCH v3 4/4] ASoC: tegra: Specify components string for Nexus 7 Date: Mon, 24 May 2021 02:44:37 +0300 Message-Id: <20210523234437.25077-5-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210523234437.25077-1-digetx@gmail.com> References: <20210523234437.25077-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" Specify components string for Nexus 7 using the Intel BayTrail components format. This may allow us to create a more generic UCM for RT5640 codec. Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra_asoc_machine.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index a81f2ebfc00c..87e0a47040a5 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -671,6 +671,24 @@ static const struct tegra_asoc_data tegra_rt5640_data = { .add_hp_jack = true, }; +/* + * Speaker: Connected to SPO L/R P/N pins, stereo. + * Internal Microphone: Digital, connected to DMIC1_DAT IN2P/N pins. + * Headphones: Connected to HPOL/R pins. + * Headset Microphone: Unconnected. + * + * IF2_DAC/ADC are unpopulated. + */ +static const struct tegra_asoc_data tegra_rt5640_grouper_data = { + .components = "codec:rt5640 cfg-spk:2 cfg-mic:dmic1 aif:1", + .mclk_rate = tegra_machine_mclk_rate_256, + .card = &snd_soc_tegra_rt5640, + .add_common_dapm_widgets = true, + .add_common_controls = true, + .add_common_snd_ops = true, + .add_hp_jack = true, +}; + /* RT5632 machine */ SND_SOC_DAILINK_DEFS(rt5632_hifi, @@ -712,6 +730,7 @@ static const struct of_device_id tegra_machine_of_match[] = { { .compatible = "nvidia,tegra-audio-wm8753", .data = &tegra_wm8753_data }, { .compatible = "nvidia,tegra-audio-rt5677", .data = &tegra_rt5677_data }, { .compatible = "nvidia,tegra-audio-rt5640", .data = &tegra_rt5640_data }, + { .compatible = "nvidia,tegra-audio-rt5640-grouper", .data = &tegra_rt5640_grouper_data }, { .compatible = "nvidia,tegra-audio-alc5632", .data = &tegra_rt5632_data }, {}, };