From patchwork Mon May 29 01:02:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53301C7EE23 for ; Mon, 29 May 2023 01:04:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 06CFE3E; Mon, 29 May 2023 03:03:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 06CFE3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322275; bh=TvTYotcr4ZOu144Ecmw/NtiyUw1IkWxrJ0GVFOaUoro=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QRhpOJqDxHce+Shvmro4zqdIC0If+rXqXnNS+sMVmOA+96/S6oXfe3Seg+JGTckfR kWZGae+CfFqwGSNCl3LptqQ1M8jf4vVdklvmeM+GTOc3ey9V1LW7mYqpW3OQWOm6NC 4Q92q+IlN11j357TF3SVZSfpxIFVyiukdGipGfzQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6EBA2F8057B; Mon, 29 May 2023 03:03:11 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DC34FF80578; Mon, 29 May 2023 03:03:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66D2CF8055B; Mon, 29 May 2023 03:03:06 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20704.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::704]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4D77EF80551 for ; Mon, 29 May 2023 03:03:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4D77EF80551 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=NzPb6hHz ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AdqWYIkN1kWBY0rPWOreVx+FKz0o72WnpAHBdjQQ9O+skgZngtQ1iPSj1Q69AYSAyY9nBlI/v5314+Y+VwwCnIahlHZL/tQLMe2MpeC79/doaC08Tj4WXZCgGk9QwbNxomowIdAbUmgbi6klSTJMO4ddb3yAKqeXp74vzh8TvkFNRxMZGLyuPIua+XULjDt7yCKp8ugjdkMi8tn4xjpoT5+FcONPXLwJpMn6SQADdOeY/oi4049oTmhZOGNGm+bEmIznDXkziiI/BrTETJA6kVnvIOiuL7kF+Pe5mHx4+TTGk2LCFNK3foNAsS5cIzVxnY5irgNe9AEvimv2GSEFiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tbeDTQB35tZm8Y9PzzEs450v5znSklXmzYkAjOadlco=; b=nByqQ7GY9uFIMKqdA2nerrGM2i7TSxBc0TktSCtD6mVcCdIt9C3BUzwq9EEh8GAjjS+C6RUXbWDCek+5yodAakngJ7N4NCbbsTeB4iE4Zgpt/Mnn3hvcihu1S2FdSNRQW3AWgXBSiunoBi4Lst9wiyGxycFBQlg1lzEQbVkoYKVM+0KrIi5ixkuQjsG0FSlREr8ZbiiI+QXxmVUuNV68Zm6I+Zbo6TU9S0/NxiLfLNS5eHoiF7CPlBnmT9ge7MacWYdYON7GchAr6FR6+mJ53bN0fC3zPT6/qDwLhQ4nsl+S16ItdpGa2MFy05DgnXO9HtC3QY279e8S3tY7vzOkcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tbeDTQB35tZm8Y9PzzEs450v5znSklXmzYkAjOadlco=; b=NzPb6hHzngS+H+Y077tVyax4qEwG4D1in+Qm5jmyeXyWQ8noM138zQO8TsJLlVrrWkNC1sbfoiAYFgh9VKuYzeNqTQOBmaSntekXIHXaQZSOAYkFtgWkpFR9wcLhBPuy3EXV0sylcWK3C1+qxx5B4yHKRkXPVu39ycFgfj3/T6I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB11557.jpnprd01.prod.outlook.com (2603:1096:400:37d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:02:59 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:02:59 +0000 Message-ID: <87leh8lzjx.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 02/21] ASoC: soc-pcm.c: use dai_link on soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:02:58 +0000 X-ClientProxiedBy: TY2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:404:42::27) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB11557:EE_ X-MS-Office365-Filtering-Correlation-Id: a8f0373e-3d78-44da-e786-08db5fe071d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oGV4NPZnvo2MwYqtUJbZE98gIWt3jDGci/k6GustS1tY4YtYUrD0fmX0fNEPqwaexzWVEeVk2eLQoV1QBup7C0n3GKg7Mbkj0slZPVTjuloIiP70pHxIf+sVGB/YcHeucDlgDeApgwV+nlvzqaYB2NVKw41aHYuGIqxKiwkUZL6/5N5q/cTeyTU/HCK21k6TlSRsNhZY0bF7Yl4/rKFrglnn3SvIbuu21SQnvpLHBE7D+idJtvsTkMWO16qKRkV2AondtBOuq8goWdqjubtwvpnTdOGFkFyzw4RN4t+lMuoHXLWsdYvnbbR26702ZhEd/FMZR4qxM0pLex/4o8xvZ2Fl40qbroELLvO1BJVLLoag/JkAVtjOODQIt48xa4e9jDCTnzQYRhrDt7rRpCiub9hBtBYhZwZucuV3KLaynyW7K99bSyEujJN1Quwt862/yoLrR1q7bCd5slzoYzJhtaxTe1MNGtsNu3WL3f5wu8B5mqj71GwS7+eL0SEKjAazg615CFAF/zuDK8yHCaU2MBT9Q2SunAbhAsHiCNnPxmbGg1HwNGiDe8PlsQdxfOVVAx+IQ+YuuCkXjBag8o+9z6XvmdYZM79HmMpe8nbORQTk/8sZ+IR4uTGC4H5X5iNp5VNfXFAT7fOXMDSZP6fLeA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(366004)(346002)(39860400002)(396003)(376002)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(41300700001)(6486002)(52116002)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?la2xZtoTOSqq1FOTYBltWpc?= =?iso-8859-2?q?qEZwlGp+ZDeqYqcDopdrXc32jIj1UtZ5y6eeolwwU0sRKNQmPCut3EFLBUi3?= =?iso-8859-2?q?N7jQ+mPvsN3NAhPig+fbIESxh3U9trEuXMQP08PJZ4pktm3RuoJrUvvrvkj2?= =?iso-8859-2?q?kZd0l2bBYHZBvaNY/Kw0RGpor9/KgC3ENUPbX1STjCs4an4rZ7gwmSUlBTxm?= =?iso-8859-2?q?ktSe5Q2P8t+n/cG/+ylomMhzFKRwJBToq6rmF/vMGTB7gl7ymzGjfDxNWvuT?= =?iso-8859-2?q?egOYhahg8IvKzyslY3yr+hxGw4psdXB5xarz2g4z30RCney5O9BMXgX1Evsx?= =?iso-8859-2?q?WDjNPabxCdp17rXthe/Jdu8WCCp+J/hMlhtBkwupw51cpaHIp2wimXQXpogM?= =?iso-8859-2?q?pr5FgIYikv2p1P0DJsGl0RWINlhAGzLahl/cxbYgKSFd4fZ+e0eK5x4xQtkY?= =?iso-8859-2?q?Ow1hD9ozY8BaG3cEIqDn/JTlsK460mJPOj9iCt6B5MDRcHkoVhdkTXELYoHq?= =?iso-8859-2?q?CpDiTCqxVmgduL50rt/FzqoInAA2sxOj9xYn9s7EJlaHjioj2ZMt//xd4zqL?= =?iso-8859-2?q?+5rieIRwOZEzLzpOdKlOs8DK5ajjZGHcIJvWEern9aQgx+yiORVv+RHAjzAX?= =?iso-8859-2?q?CwxfWMsz/K9C8cdO8THeUW9PYGQlLHZ/HxXD0z28U+/MmK5qN5iTb8niWW1d?= =?iso-8859-2?q?gSppQUUNx6E5e+WEEeJH/rbMxp2hLSGedmepdYJgh2mO2UCwaEE17q+IU4BZ?= =?iso-8859-2?q?yy+/h5Q902YwOheuvqOdc6xfYmUsuPtGep+Pms4NK6THFZHRTuU0CVfFZHxO?= =?iso-8859-2?q?dub+jEFR4pxMbC18y4XmaWbOUlxCjKsaA1Upzz76eRVzCj60ivMv6YBJLlW3?= =?iso-8859-2?q?gqVqRGqthz7VIYNKrJOYKp3G9F2YqcpIEAbJuRjrmia+KL9p7ctUTSBFhsAB?= =?iso-8859-2?q?Kk1SfvvC9SC5BdMidtwmnAcOEUc13Uh3HNTrwbURSWTkpI7d7jB+DLNh3aLG?= =?iso-8859-2?q?pHzFtNmTARz2uqZlGEtN5I5ZVQbZVFqOtlLSQ/mkb5UOOALDdEeWvDTv5s9H?= =?iso-8859-2?q?WIZP3gTAoCel+xguL5VvfhR07MLgOyFXmCNGHjfV+JZVKsO05Lyy6BAnvC/V?= =?iso-8859-2?q?NIjvKss6/ADrF0J/MGiU7nqZQUPjGKJdNERtQG6B2E39241nIIjNfSze3/HV?= =?iso-8859-2?q?lzTmb4QT3puI9tC0+81hb9lhjJ7Sptz2eJqHxPA0GGrrka7bb79wWTrmkhxg?= =?iso-8859-2?q?l0OBs/3UdCyr76IJgBaZpxjgdrCUEftTByHnRz4TqT8ZyGg8Aci+VQvTHQ0W?= =?iso-8859-2?q?ezAni3EvpvYhBHh5vMzB0ZjQ48h6DQIRvHMHae6FD7FzP4sv3qR9EGJ5/tT6?= =?iso-8859-2?q?1lmyYdXU7flchS7wkLU60bnU1C7BxgfAXwvZ0iOuh/LEzFfuALDDVv2lF2v/?= =?iso-8859-2?q?iB1Q8pgHoAu0IyU8wTSk5ZK6hRDj4dtWz3LYbs+unEam8cUujFEby0tDFdFx?= =?iso-8859-2?q?a5isStb3lNIYJ/xdvQpKm6dmDbnGwwTbgOWSugd1O5/xS/pQTkQRBsSN2S1x?= =?iso-8859-2?q?IcR3V6C8BQfK5A9FTDIwL6KfOLGLwDtHuViWx83v7ITxlAE/xUE5Y4Ts8SD7?= =?iso-8859-2?q?/EjsBOzc+lTwDIrgGwmlalHvnON1Z7FaooKblxt3+QdklIln0ExOh3Q4+7Xk?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8f0373e-3d78-44da-e786-08db5fe071d3 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:02:59.0890 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3/1MiVPlTVfzeRMQKlfmY7TQoeqetrshbIH1QMbkVg4SptTsRw9mswfQ/SLgAwvBoVKZ0FDUiOgPC5hgqYa6kuDf5iK1FcgAv45/iGqclcdpBxrZu4sguMeb2x3y2fdE X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11557 Message-ID-Hash: A7ZMGISXXGOMKXV5EYYFJG4RKTQAFP3C X-Message-ID-Hash: A7ZMGISXXGOMKXV5EYYFJG4RKTQAFP3C X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() (A) is using rtd->dai_link->xxx everywhere. Because of that, 1 line is unnecessarily long and not readable. (A) static int soc_get_playback_capture(...) { if (rtd->dai_link->dynamic ...) { ^^^^^^^^^^^^^ ... } else { int cpu_capture = rtd->dai_link->c2c_params ? ^^^^^^^^^^^^^ ... } if (rtd->dai_link->playback_only) { ^^^^^^^^^^^^^ ... } ... } This patch uses variable "dai_link" to be clear code. Nothing changes the meanings. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index fe65994485f8..db3fbe1af2ce 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2731,19 +2731,20 @@ static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream) static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int *playback, int *capture) { + struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai; int i; - if (rtd->dai_link->dynamic && rtd->dai_link->num_cpus > 1) { + if (dai_link->dynamic && dai_link->num_cpus > 1) { dev_err(rtd->dev, "DPCM doesn't support Multi CPU for Front-Ends yet\n"); return -EINVAL; } - if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { + if (dai_link->dynamic || dai_link->no_pcm) { int stream; - if (rtd->dai_link->dpcm_playback) { + if (dai_link->dpcm_playback) { stream = SNDRV_PCM_STREAM_PLAYBACK; for_each_rtd_cpu_dais(rtd, i, cpu_dai) { @@ -2755,11 +2756,11 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (!*playback) { dev_err(rtd->card->dev, "No CPU DAIs support playback for stream %s\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } } - if (rtd->dai_link->dpcm_capture) { + if (dai_link->dpcm_capture) { stream = SNDRV_PCM_STREAM_CAPTURE; for_each_rtd_cpu_dais(rtd, i, cpu_dai) { @@ -2772,7 +2773,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (!*capture) { dev_err(rtd->card->dev, "No CPU DAIs support capture for stream %s\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } } @@ -2780,15 +2781,15 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *codec_dai; /* Adapt stream for codec2codec links */ - int cpu_capture = rtd->dai_link->c2c_params ? + int cpu_capture = dai_link->c2c_params ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; - int cpu_playback = rtd->dai_link->c2c_params ? + int cpu_playback = dai_link->c2c_params ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; for_each_rtd_codec_dais(rtd, i, codec_dai) { - if (rtd->dai_link->num_cpus == 1) { + if (dai_link->num_cpus == 1) { cpu_dai = asoc_rtd_to_cpu(rtd, 0); - } else if (rtd->dai_link->num_cpus == rtd->dai_link->num_codecs) { + } else if (dai_link->num_cpus == dai_link->num_codecs) { cpu_dai = asoc_rtd_to_cpu(rtd, i); } else { dev_err(rtd->card->dev, @@ -2805,19 +2806,19 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } } - if (rtd->dai_link->playback_only) { + if (dai_link->playback_only) { *playback = 1; *capture = 0; } - if (rtd->dai_link->capture_only) { + if (dai_link->capture_only) { *playback = 0; *capture = 1; } if (!*playback && !*capture) { dev_err(rtd->dev, "substream %s has no playback, no capture\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } From patchwork Mon May 29 01:03:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E513CC77B7E for ; Mon, 29 May 2023 01:05:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D6EB083B; Mon, 29 May 2023 03:04:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D6EB083B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322320; bh=ZuNMos54AIJNlqmD0jq22TXyOPV/7yJ53PYTpNN2gro=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GS6urPrGR54kUzlgVpZHdDr7atdUT8GLiWlk/Gxza4RAo59ngDwM7feseCHCoC2yQ n/yJd7/hAKJE2o7ir2qtskoOGs/BGkZstg7fXQxsPa7kbeepcqmh4dlHGZoVReG3BZ EJuAoMTm8d1AfGfz3OtlzemOBnVf1gwLG/yD8eHo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BA7A6F805B5; Mon, 29 May 2023 03:03:28 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2B796F805AF; Mon, 29 May 2023 03:03:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C827FF805B0; Mon, 29 May 2023 03:03:23 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20703.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::703]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 06486F8058C for ; Mon, 29 May 2023 03:03:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06486F8058C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=RCFnT7Mk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SZ5cfXu5H7VYQqM614DU5rhc4g2vBR5rmMZMKZys20kqBDjIZQ9taBVW6pjjHoDsiIUspAjg6n8Tdv9hz+NfcnlEctpHMNrz1Ci05l7zg/tEQDAozkq5FsV8pqg/CIB8fC625kYxuqPAcLXWrXp6f+hZxvxqG5Nc2lszHXIqG9Qe04rKr7okBuK9l6ge9MbU2mPLYhd468hpFXh01oPeRXH0GSvjXD2hrDJrZHY7rngr8yJQI+XTLocI/yMTXDE9S5ZO/2ciOzlyByLj5U37gJWd3F/hJdgvmgO1ihqyNqs68HfHgT3gyipbfVem6UQof0/h87Lpdp2xDfcIxBW3kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+oOkqhKbkTL/3SiEEeyds8HkZVDM28kI07WMjcz5kLc=; b=ay4uX9OiBH3lDZyhoHkx+Q9aCpAbua1gSTTySCeKU63NmjE6mVBQ2WIEDDS9gQZm3siIVSABU/nU08TfeZ3RZ1iNaosrLw7F/5Fs90NkBpSeD7powIo4a6fHT2MDNdKQs9t8gxpEvDwoqUonQiFGUvW7bKOjJ3kEXMQRlJ4VHvbZAcbZh6Y02nbUb9l9T7N1sPN7lwOciHdW3izb1eVVFv5De8wlW0bmFA6tEXRyMfTF85ROJeeJO5BrCcllTeI4uz+SxGBxUb2jm6xgvqyGOZMC78t7P1NGnQ1n7J+lGZkrQUKQoE7/n+mzGVB9QWQJtn+9L2prDJ2VKQfChOjdIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+oOkqhKbkTL/3SiEEeyds8HkZVDM28kI07WMjcz5kLc=; b=RCFnT7MkhDCTYS4vqvcf2q79a4iDPYad49/zb9gL8V1lCDt89n1LgcsZHtfARmQwEg+JWLX0WUzYw8cg4fWuHjWMbPus1T6InMeeEP6hfPj3Ukt80tCvOsDsN2pzkog13qliN1iI8g3UeEC1pJXpgZeUV+zrz23ZtFE1d08X2wQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB8658.jpnprd01.prod.outlook.com (2603:1096:400:15e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:03:14 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:03:14 +0000 Message-ID: <87ilcclzjh.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 04/21] ASoC: soc-pcm.c: use temporary variable at soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:03:14 +0000 X-ClientProxiedBy: TYWPR01CA0016.jpnprd01.prod.outlook.com (2603:1096:400:a9::21) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB8658:EE_ X-MS-Office365-Filtering-Correlation-Id: 35fe0a33-e22b-44e9-68f5-08db5fe07b34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ly72blHgvg/6i5LLxRqRNaHDDfI/qUEzkVkSPHJ+OaV2xiaI5fTB57P7FD8eJW4fMyAvlW7pOHch7EYWCzCnKwCTVaz7J24NfcFjqQPTWN9ESZQa8eKtNcmUC4AjWjK8HwC/pjZ20Q9AU0/WjIdsbW0VzcjsgNILhPPyQLvcCjPWqIN2fz8/1IajkLqFhWs6e6NapmeTuk/1a1BtJXxja3Mr/29J6sUIFA+RGEkLyPSbV+YnKYQbP14v6NP9i7iX5NkFlKD379mdZ3C96wgkSbOH5+DBelpevmDIW4EOFSdyzG/Og47nAyLmTsANUeuOu6kGeHrHPuuSXhaf5Lov7sKR8H/dQqGzI5i4e1qzTTiXbxGUCHNBoSZPWOnxC0Yt9sfY089rsodQg4nV9wS9NlE9bqLvwEhtOnEiA3E7kCtapD3226N/GaBUc7RnS6SZiWi6AsMLXd3ERdn8dSzocfD3jM9k4MM1mR4M1dcH2NmZQqfy9GgPllxQWh5cbDxxu2/LAfWwZcsI0JCuUYM2CXI/X6WQxt3NM8rLhcAKElWlkntYxGqtVxMDkw+tkA5kJSs/D+5cZk42M+hrwTSkiLwEN4pXx+WJ70vzAHK2cCLYt/CQUgyQcbuZc3qr/CDDmpZGPKv9qGB0Wq/6u2/3/Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(451199021)(26005)(38350700002)(38100700002)(41300700001)(52116002)(6486002)(83380400001)(186003)(6512007)(6506007)(2616005)(478600001)(110136005)(66946007)(66556008)(66476007)(4326008)(316002)(2906002)(5660300002)(8676002)(8936002)(86362001)(36756003)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rypZsQTYc9freb2HjGlUXhgRYMdBDbcVwa4bpZ62Wd3U44scb/DQA1nWS+BAgCuehSZx97fYYsHZMdPSRweUQVuuCxeYiXNjYsRI2k1OK4OXwJWOd5s9p/ciDP3BPamz/cwiqlwLV8E5/orjDnCvdiyLjoGzgsb5wLdIMPhNHnpQlGJOvZwVC3Z+MaUeKYib2NhqM72CL8bKWtLqFEo4lY4JYhyGl1si+z/NIAlBBSu3WKrF5fg8mjx1cjNymKSZowCaekNIxe6QDvN95axjIDB2F7Maqo5XqhYP71rJOq4uAD0mChQbnfq02nWDWPCBLmNKjMLnaJV/hO0e7rriWaUKsJcabdN/42LUJp1UQDLpsCEwkniAi/vH+G8TH9GkYu4Nd2yEZ0UH8zr3CQAf49W7LgZW+oFFoSKc9ToLQrAd9lunKg+iutoiQHcDLzzpg/adeyNmSw24cyG2TsQDabmsAef/w4Ivh6kLH1PiJAK7NXMvUDmNiAqNQH8RZmGyNrOZyDCnCBgMqDzdCO/vjUdY2bbGT6qdT4DUScui6W2Yh5bEwVLuyfzPoxS88mokiVLWopXFqr+G1bmL6cbSnIHw5IUVnCaTF11Jg41HxEaBKxLx/ejHuEdzURPJJgd9MiINrPLoenrkb+Pk/wNV4XegNCooeBep21sEuEfUz+dmA/l34W6Ru+jQngDTZcan7VCTJvIqlwzLbhQ1xEBmZ+2bQaCCLX7eqs9n3CUEYOiCFThn0+djGWg9gwdY7AkflHDrsH7pR93K/P82ouxI2PvA4WY3qO+RFRekC6Pl+ZDALqFTA2nikk3QNBA7/vHkcvSQZ3du+PbZV5MqpmCwTpARcNWZGzPNbN5T9uG6PSrR0gO/6sWOQegxu63Jx7KKsHfeGvrS33297Y21Mkjou1MJPlvrPjzEWoQ0CxZRuTkCwnsCoKWdRRxKLffTT8o5n3UutCh0dLvLxZS7CJ5zeQANgdm1anR/xvqOccHPErtzdHof370o75w8Wpeiko3Df+orHRYkhwvyccLb26nZ+1B3qevXkhqP2KdLy/2SrjKCuu11a2YB1GeMwaQojSplF4Vo6MtGgXK3A1OdRSkEpoV6U38KK9sPpw29mx4Uolaf6B0Sn9Ac8lKAkw384nomomuypat9trzLQvIprnmfhSaXnVVas4eQvFnEb0ZQpZt/+sMH28y7RhzPvSvQPvm5BIn6KmIv1uZ2lasi2iuRvwKx+byCTF5yffUWzzdWHVfcMh064CeaStrMfws+zBSYUok3ERkSuE83VU32NunALlMwVhvNgliUhhVLbgeXkbNMazHj+utW6RWioYmeF/vTmKuW7o+Ibxbsy1UuCAwCLdWtdsjrPYLnxEkZAsxJSBSF4pQYT1DuU+IJy5L/RlpVI6begx1QOhkANVI31SG8+j8pI4stGO/KOCXYQpoD7yn2erDIam/s6bVkNCFnQEuCFvz8oCHQmT8q8fsqMt/mLjjnCMmtbIEijmfUkDGoYFOehZMBHNJA19Wy2nXujV/TFa9h9CESKVi9PtySUYyL6eM5zQDGEhzCRgbEZoD0df5+sTODjIRX4jkHmeBo6nw4ys47qGQQg4qbuv5drUe7kOxagG3lMTTXPTs1DW63lrs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35fe0a33-e22b-44e9-68f5-08db5fe07b34 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:03:14.8402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jIT/Z/UhKkF6f6AoZhMWE+ge4Vpb72uhfFPkz2+VnkLHTxjsbDbwmIcsoRJ9ZTyEd0u6Si6foE0gXAu9hwJENux+PIkxAQy+4vLoCobNfHZw7od/0wHVgs+/VlydmNGh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8658 Message-ID-Hash: ZPDFS76B3LKTEP4BOGP7BPEI2CE6ZT6J X-Message-ID-Hash: ZPDFS76B3LKTEP4BOGP7BPEI2CE6ZT6J X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() (A) returns number of substreams for playback/capture (B). (A) static int soc_get_playback_capture(..., (B) int *playback, int *capture) { ... for_each_xxx(...) { if (xxx) return -EINVAL; => *playback = 1; ... => *capture = 1; ... } ... } But, it is directly updating playback/capture which is the result of this function even though it might be error. It should be updated in case of succeed only. This patch updates it. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-pcm.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 47da3be0ff46..b3d569e7ba61 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2733,6 +2733,8 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai; + int has_playback = 0; + int has_capture = 0; int i; if (dai_link->dynamic && dai_link->num_cpus > 1) { @@ -2748,11 +2750,11 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, for_each_rtd_cpu_dais(rtd, i, cpu_dai) { if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - *playback = 1; + has_playback = 1; break; } } - if (!*playback) { + if (!has_playback) { dev_err(rtd->card->dev, "No CPU DAIs support playback for stream %s\n", dai_link->stream_name); @@ -2764,12 +2766,12 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, for_each_rtd_cpu_dais(rtd, i, cpu_dai) { if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - *capture = 1; + has_capture = 1; break; } } - if (!*capture) { + if (!has_capture) { dev_err(rtd->card->dev, "No CPU DAIs support capture for stream %s\n", dai_link->stream_name); @@ -2798,30 +2800,33 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) - *playback = 1; + has_playback = 1; if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) - *capture = 1; + has_capture = 1; } } if (dai_link->playback_only) { - *playback = 1; - *capture = 0; + has_playback = 1; + has_capture = 0; } if (dai_link->capture_only) { - *playback = 0; - *capture = 1; + has_playback = 0; + has_capture = 1; } - if (!*playback && !*capture) { + if (!has_playback && !has_capture) { dev_err(rtd->dev, "substream %s has no playback, no capture\n", dai_link->stream_name); return -EINVAL; } + *playback = has_playback; + *capture = has_capture; + return 0; } From patchwork Mon May 29 01:03:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686964 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB140C77B7E for ; Mon, 29 May 2023 01:05:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6CFF6209; Mon, 29 May 2023 03:04:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6CFF6209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322347; bh=/2lVF24wvwt/EniRLlSW76B85oHGuFwZaRGEElduacM=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TGqFZ+oonM8XYvqPJt91CmFRQmd/iNjZ5Y+7a9GyWAy/KMP2FdtTDd+9/UAC31keB FDH+UWHaqHqdr68IrFg1SSthgiC3I9h9gQSYMbdgtOGiOVshigGIGfHe+voHDNE20l RP24L8+11Ax/wIh7SZFDPwlEu7ADJmTAY/ARuauE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 618AAF805C3; Mon, 29 May 2023 03:03:40 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D474CF80528; Mon, 29 May 2023 03:03:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9992F805C4; Mon, 29 May 2023 03:03:36 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20706.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::706]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EE331F805BB for ; Mon, 29 May 2023 03:03:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EE331F805BB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=nBfZaUXu ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJ5ZOnqtkhFaCU22Jf92rtqICWDuVfK6MiY1hBW/XVI+fslr30m1iqJTjURtlVK/+UNAf3GrUbFM94UXBG1WccsXNHrARa2FB1IoBQH+Op4RoOjZBd1qjfIvBFcsxc03YdidZxME8pYOa7XW7zhHUboNP0LIXQNr8Q84rt0avNKloCdTN7ImzAJwBpB5VvNjFqGNW/QW+4oIxm3nuyKMcpjw1pPizTYMWVbtGbakOrqliLLFBfhOXPO2RZkuf2HslkeNn3Aysn9Hxmao7QPzIvsZ87416fPLDTxbhE8CcBZvaHeyEsFlrlLi+GDrcQTJgt2jJZuzyAgZ6gAi7XunHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zP+GOkWNAvoqclT3V//3dZg8IFTrUhfGtd+lfR5Ea18=; b=hVryhkFwa0KsxAJmPW22AvXSyZN3qMaU1eGdo1dBfjBFKemPO63sNS6QkhSeI/H2BmPXaKVyhWqtZ3lw82Uw8szLYyQaSoqCvrnF+T3+sMAmVYEFe3ld4cdOkLy+Rq4e/hllWstMbx7/vJR+B6wsxe5MP0F7hlTbHVLtyFzN40cFhoNYh63Fc5rOsDd7TttQeCs2BP5/aXKOUFxZoxDDPan2og2SvKis+wnk2DC7DME8DZvNDoxCT/xU/oekounuDfAj1w2v3nYjwGu1L71W6697o/3717hSSI/+jMOZa2pxAryJ9wMuqLNEg/h+TtJwHo3v/5NzD84ATgMqshwTpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zP+GOkWNAvoqclT3V//3dZg8IFTrUhfGtd+lfR5Ea18=; b=nBfZaUXuHdfLSUBsrpAkmq5tu+Ov3MsCZXgeRpb3sdlWx1wic0U9lB4R4KzaV8j6nBnhmgswhAKB5r4b5siT9NeVW1iU2C0n6Jh7544L2ZEqKy+6asyydAr/5SJQWQnayWomiwhlvrYgLobGaGbStmggeZg57SX4LG7GZ+0q6dk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB8658.jpnprd01.prod.outlook.com (2603:1096:400:15e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:03:28 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:03:27 +0000 Message-ID: <87fs7glzj4.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 06/21] ASoC: soc-pcm.c: cleanup normal connection loop at soc_get_playback_capture() part1 User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:03:27 +0000 X-ClientProxiedBy: TYCP286CA0293.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c8::11) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB8658:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fe9a095-f275-4178-728e-08db5fe08304 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VAy2YfkSzys3l/3baluRwTi42T2Fkce/EtoqgUN8hIWBzhOXrn2GfR6/QNNLvfvv9MClJ+g/YG1FmnAbYZhwaT2JeV1Yk6qPi6w+oTDtMgXaBlyioYvJXFKO/VVPpD2RH2QsHHzvlCpFB0vS9766YwFG12dcf6SNU33xU/MIhA7A2UdN50G4xpg0X9l4OZdl70FrFTvW8h0Bi2HB/ZCmWIY4r77oNWzz0ZPXcxGdcj+Yn/FlhZ/hoH+833QIQbIS747d9keJfQ14hdDZlG3soqVTVhtJWEShrGVYrEdL2jmhB57DQujf5eH07u71X09nzD5aJ4uTeRjHvUt8v4AgFSO/9y88PtV7owdlX7vYtgxkvJW8/E+QkXw6l6GD0y8BmXFGyYx5KOxlAm596l+4HReKx/7plKGjmF50hVjWqIXXxvMUYAGVBQdMFKd2wHeodRnORe47xxBjZi6ShnVc/A7GPlBxH8x3l7GXGXLp1LUk9ltMqzqTYtTGOBMMBjncY4KPgcOTQ/KJOBICKVWlusmunbXVs/ShKyXC9GF3+sWyuyQAoMDwIJMehuipBXfQVeDynB2baNAuMiP46l0AO7EVS+7Ih9m1ByODtIb8Wsp4i8VarsMh9vluVHnVcQkgpqKdKxrD9lGCNcQFz8kJWA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(451199021)(26005)(38350700002)(38100700002)(41300700001)(52116002)(6486002)(83380400001)(186003)(6512007)(6506007)(2616005)(478600001)(110136005)(66946007)(66556008)(66476007)(4326008)(316002)(2906002)(5660300002)(8676002)(8936002)(86362001)(36756003)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?WOZvTT8Rgetd75L6LxzM+Gc?= =?iso-8859-2?q?PiLwc+xhXen2B8ZLIFFxZnYzayBSbi50qSNzT+awFnmcmLi1x2//Fp/crpf1?= =?iso-8859-2?q?cdTZfpQ7bzMXh1z7+AlDx0AGdkNHUkNvJw2Rksmji/RrhS0vy3O1mFEyAK9B?= =?iso-8859-2?q?jn9Eln7PTcFObJ7C8Yx7PddyQuecR15Ld3dNeRKT8MgEFevZVRHXmpAu7aH+?= =?iso-8859-2?q?SE01jLdhwroR8W6J86mdSdvJbaJ6Ku4cRmFIMcOvu+sH+6KQCdjp6u58IomM?= =?iso-8859-2?q?HYQLpdOi6DsVdLkgwJ0Bzfvcs0VFPlfll6Cqd8nm3IYm4+cLFOexolGvIQyh?= =?iso-8859-2?q?dv8+GeWDoHFwPtEYNmZe6tfw3t+57p0wcvyt3qS6mfqadj6LKmFzm4A+Jb8J?= =?iso-8859-2?q?7VUL863NajtY+lQY+HusqUXWGhomYAwqjQkK6++2IDuPR73Vy6zek1TiRcG/?= =?iso-8859-2?q?C9pN3TOFXMlk+I/W4rPqabk+XGQIblEGbFwzGEaRmXCR1fsz+HKnqiSMyM6e?= =?iso-8859-2?q?FXxi+WaRdE0eiQVuT5Lu3BCog4FJ3DWJTqCRRrUwmx1t50pcZTaKaxwIxolL?= =?iso-8859-2?q?TZTtxISkBlLhY9EBi7iEyAqsm4W8R5zlUSp1skcn7Bh8JzTAH8COjKz7aytl?= =?iso-8859-2?q?h0KGMgnRpqVl4f2gypvHhHkuCw/oJNZXouem7ZcbaZkmW6bKJycU/3uqPp3Q?= =?iso-8859-2?q?tucBLl+1E9tyzgoB1NIJNYC10qa99z6lHBAWlltU0tafxIKIMxTnATzwptGj?= =?iso-8859-2?q?kPEN4wN+o1I02TNNzTqMwkJxhoUTvB4Cswv4zOR59wqfub1xERr2Bnb7SF/a?= =?iso-8859-2?q?mrix5PAKNFruHFbtha4KxYLRzF6m+fUO51uz/Rd8GK+9QVj6/F/S5e+NABJd?= =?iso-8859-2?q?zc54qcCEV1d0eLEyFXrdIOJDBVd0XnE6kodC0Siqag+IOapUMDd2zgq0GBqc?= =?iso-8859-2?q?Dx0T69Hs++P8SNNOmms+h/OIyR5qc/V1FL6wlhJ59Wd50DufjUzD9i75ZB05?= =?iso-8859-2?q?bJrvxfnbaQUMIcYBx7ACWzKhBuEynqFm9klc3VEpLhfNV01NjbSJxW6DkYBc?= =?iso-8859-2?q?GVvbmbv13FpOrd22ypNCaNBUlk63HURApk4TjWXBHr5x1m2L3c1dXDyO+NMZ?= =?iso-8859-2?q?CEjEhwHxergrCGUiulDEHLQDSnVdAb3v6xdfjeOW2GDLK6wXEsb09+BXZ4ch?= =?iso-8859-2?q?dMHZu0+3IoPF1d6RXr/h4BlzLo79QDE2skTgxHIFwkx8+y/hP7u+9UmQLtiS?= =?iso-8859-2?q?a1xVhUT+uaTE+gmeS4/oj9Bn7Pa3pjWy3phPlpOZ3gHYSdziR5Lvw+TY2LA0?= =?iso-8859-2?q?RbEE+b3RUjjThcGK8kPRn+kDuf8jbXCvrpP2HpBg55TqZ/2/uLXx1EF19V22?= =?iso-8859-2?q?8KjW/fM0RYY45qCGe7zcyNJGD4Zt0DiBB4MqCqAmXenwnbeJqY71Qh6ipPyJ?= =?iso-8859-2?q?M1kW0edV9XTQMoGzFjKXhoFJQUID2oJspUeYDZpRPMP4EeFXh6PF8h4r9KNk?= =?iso-8859-2?q?890Ie0VY2t4Hkl/45RMkBukrIKHAyjcX2zQzpV7UUZF48h6CgJjgY+i7Go8u?= =?iso-8859-2?q?nxS09qIYPYx+TPdUb7Z5MpDd1NJeyG2gy7ZjEVhxReZ249TAGFc8kdRcvsO6?= =?iso-8859-2?q?KD7MWbtzw9bh1U4+zsnkMxqpe9IY9I8aO0RfqnVSeU5aUR0lmapzPGQbLmE0?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fe9a095-f275-4178-728e-08db5fe08304 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:03:27.9230 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q9uKVZopn2OBXRDQ9NegN0JNe+8cQ/r2WvOBLCBDwhQoJ0EjQPn7CWbc0Q4CSj5bTcJG3YO2PA7EYUU4ZYFjMSaYTltkyKEnSiv3EEYPdz7cUEakhaANy8FW9DMEEJ6l X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8658 Message-ID-Hash: F3BONPKVAXBYCKHHTCYHOZRWVOKW7N7F X-Message-ID-Hash: F3BONPKVAXBYCKHHTCYHOZRWVOKW7N7F X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() (A) is handling both DPCM (X) / Normal (Y) connection. (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic || dai_link->no_pcm) { (X) ... v ^ } else { | ... |(@) for_each_rtd_codec_dais(rtd, i, codec_dai) { | if (dai_link->num_cpus == 1) { |(a) cpu_dai = ... (Y) } else if (dai_link->num_cpus == dai_link->num_codecs) { |(b) cpu_dai = ... | } else { |(c) dev_err(...); | } | ... | } | ... v } ... } In Normal connection case (Y), it is checking number of CPU / Codec. (a) is for Single CPU case (b) is for Multi CPU case (c) is for other case (error) Because this loop (@) is not related to dai_link->num_xxx, we can judge (c) before entering this loop. And it is needed not only for Normal connection case (Y), but DPCM connection case (X) too. This patch moves (c) to top side. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 159670612de3..b99c0aa98d09 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2742,6 +2742,13 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, return -EINVAL; } + if (dai_link->num_cpus > 1 && + dai_link->num_cpus != dai_link->num_codecs) { + dev_err(rtd->dev, "%s: %d cpus to %d codecs link is not supported yet\n", + dai_link->name, dai_link->num_cpus, dai_link->num_codecs); + return -EINVAL; + } + if (dai_link->dynamic || dai_link->no_pcm) { int stream; @@ -2792,10 +2799,6 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, cpu_dai = asoc_rtd_to_cpu(rtd, 0); } else if (dai_link->num_cpus == dai_link->num_codecs) { cpu_dai = asoc_rtd_to_cpu(rtd, i); - } else { - dev_err(rtd->card->dev, - "N cpus to M codecs link is not supported yet\n"); - return -EINVAL; } if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && From patchwork Mon May 29 01:03:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13234C7EE23 for ; Mon, 29 May 2023 01:06:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 47047836; Mon, 29 May 2023 03:05:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 47047836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322374; bh=uRQ8TCjDDNb7JC+dQBrtep0rjoz2d8EgH5G1BEqi2e8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hYOkWtO8Qr2CTY+5yv5XiyqEmOGl3zGWsG9A61ONa+wzzdpyO7Rul8lG5Ch1obaWO 7D7g5rbU7AvCnqNhGuMXbQOVYo9RFqhSOxHCF7xXEv2ZcFu/428RuGCOhzdcHWTrrt eAq2468meoKIP5UIOG85rYeW1G+fT4BVAKAf8mag= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 33E6CF8057E; Mon, 29 May 2023 03:03:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C836CF80580; Mon, 29 May 2023 03:03:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D5061F8057E; Mon, 29 May 2023 03:03:54 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20706.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::706]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7189DF80552 for ; Mon, 29 May 2023 03:03:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7189DF80552 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=OuFpOdBd ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hD6BM0X/vCErCAKue2nB5aORMPs7z3eFE4grEy0yFuKOrkpuG6WB7bN9JS/7tCjFrCLAYcIuG09pddHHGoKP0sn2tgh1BQsaTGnwEwHrVQMCVo0dgc90yK2+HXQ7e/f7ZRiNYA4W5/zon/2sF75XqUf4T9wKszyoqg4uTW0iwBg/zEXHFvA9BiyORSC+is2MyM+DGCTJ95g7bzLj2PfF991hX9FMTit7ti4pXzGDXcvLxZRc2wMDBorPc3bfdMnzCQRk+n/7voCt5R+lP7TSJbTS6OQoK1s3a2D8qMe+JkUBYegHfDQ+S9+LrZRcn8qWMI+2DDcm1VC20vDfCyfsdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QgCmUKYOr2cJWLuBvqa8k/SYR9tr6UmuFgf7o8fsLmY=; b=FpmDpzikA9LQkuSbe8u9Zh3AF135OkYosp/+RQGZ7ni/oeMiXYUwxscN2g8L2fgaf4372C29Q58XB/J6K4iWjOd82oc+1kWcXEHYEqrGrpEacOZ1VjJ4HDCITgAu8dWHhiE7KlUSBlHS/LJ/o6FhL3stRa+5Y7JsuWFc3MsIvZL+s/Z0oXWYXsT9OzYZ0myhLN6nCsFbfblLb1bstKE99XgEEk0RFs0623/qOihj7aLcnKeuiLWmVOQojoq138+7kkSrvNpyTdDmT6rt+7d9V3Qawa44Gq9UQnrMQ0UA3kjEWbSVTmyYHlqCu/2ePeUUxRxNMvOuFtmrp1JX+yC+Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QgCmUKYOr2cJWLuBvqa8k/SYR9tr6UmuFgf7o8fsLmY=; b=OuFpOdBdvjYFhetl2W+kCF3VQsISvrbub83liW7mqdw17xnQFuz9scrroRO0XxuvhYOeFLzZr3rgpKPKrgxP9fwkJaKz36GB3wGgZC1JUzwpRQ4Wl98fB2wmi9j0NjgmKYPe4gv7V9egRfFfy45zUp4A8mc2oJFdFrPZZ5Y4JEY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB11557.jpnprd01.prod.outlook.com (2603:1096:400:37d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:03:47 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:03:47 +0000 Message-ID: <87cz2klzin.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 08/21] ASoC: soc-pcm.c: cleanup soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:03:45 +0000 X-ClientProxiedBy: TYCP286CA0155.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:383::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB11557:EE_ X-MS-Office365-Filtering-Correlation-Id: 0761c74b-e6d6-4efa-8ee1-08db5fe08d8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L9GHYHfXfrd2w5d7g3fmZEab+EaOAvIWD5adWJm3afQ95n0wa2u3uPEQ3BTZKz+YEP7xDX9sg7IR2jzn4uEI4vs+Dzb9VTxW4drQ7zP/oLkKXB+Wxps6HdUuBE/TlPDgGyGoEmQmmgPdhCUibz2511bDCroSKL32Y+2y2Iyx45VSIK79NdFvDO0FINaliIQ6VyuJ8VDqC5GCkZKvtDoKUt2cJW6IC/x+6tS3Z42RdIwEWijmaVI7EYmtr0QjmNHN6A5oUPe4hJgwhCzWahDJVTdhS84V3/FqdNBNvToxVs8PJBouuJS1ChuwjrtFsb+9G2KmXdv3rFxNpDX/I951dt8l2EbEpKH9d7Sdq/nufSMh4PvFgMd5dVx1QW/q8vOGAMF2PbiC1zKgdp2OgktW9ob/+lRMqEjeY1RmVaQlT9irCVoy11T2wmtz4PsCbkzvIxpbvN4FavrTdnRdD6PRo5pt4usRH83HGb2eBzoiC9a7IQU2vfvowwWI4F/Lh542rvwRu4jUIvUSsUbj+DbZ/tJ2DNJMIqi0+US+0JgqwuS31C32Pqy/vzjAMD5bcvfKuOcmfkaVLHZZFuFDB4XHiXH3e+f5StZoxLo6wOhmtGsjWJHWKiuDrprXOSXkRoJU X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(366004)(346002)(39860400002)(396003)(376002)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(66574015)(2616005)(38100700002)(41300700001)(6486002)(52116002)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?ZEMjvlfEz8I9fj26RdFbb3k?= =?iso-8859-2?q?iPENstOEP157PoxU5qFG/O+ldBuD2bkbCapYJuNWNLqchNaB9hRLDMMV0nAF?= =?iso-8859-2?q?5EDs//Wokc8d2wGRToBFRxSHWvVicUn/3SkadynoSN13tOt6fXhgz5i0Q1K4?= =?iso-8859-2?q?QbOVwFiSKwRk3jk/R9pVeg2kssiR/HV/0bYYGW3HJDr1G5Fs99Zus6sz/k57?= =?iso-8859-2?q?dZ97U5scRFuZWH+qz5pJFxQsSi8x86bQ9hzoD7tklfOzxG9Ev2vXs9l859mJ?= =?iso-8859-2?q?5hz5AmLDXaR6rllvRIaIEBO9NBXLzU6fUTV8uRxfj7j19gyFUjxw8jdmbETp?= =?iso-8859-2?q?d69ldUagvEC1lRlTLdtMgRAjo+7UQXb1lrTjXvLMETcN8wDZPnuK93ATVpEB?= =?iso-8859-2?q?k+WcWbpgUSXle9o5FdLtqYIsi25rj1PwbREm7PV6i0Yp6/deqz6bzSUuY5qs?= =?iso-8859-2?q?djlN4hjbmEkyCmVCQac3pQLDr4ls+l4bscYGfc4k/Eny34WkDgS7gAIf7ZWV?= =?iso-8859-2?q?bPshAfo4KW5fvo7/KfF+oa+ybS49obiYyzbFrS8RdFirFYIQ9saOzvSD6pX6?= =?iso-8859-2?q?QEYcDjKEn1Tz1YtpwmlY5RbOp/K2Rnuz0HqiX8ejrfyowgiZFhtJ8g4vwayx?= =?iso-8859-2?q?s//5dGVNM1ha1JpzYsdu0055/XBWARKCdIDcuMDqg99pIlzIfa96lAEsNI7v?= =?iso-8859-2?q?kR6Q1N7yR5hqFjyWXxsMceEBRr8q2kexOjOB9VBHzxWrbdG5c0qxknMW/9Wz?= =?iso-8859-2?q?k6bTdQUCBm3AmjfFAXlFfzY7u7mOsbuJXhENXYzfP13dXbFuz5L8Rhovwlr2?= =?iso-8859-2?q?ZId1c6tIJvmp4jc6OXx49N3b49AHo5Z0g6f64f2fyRtvFYTlkqoOP+RaIBOD?= =?iso-8859-2?q?pRKiQc/fdUsXcIOQJS95m13FWExfzone1cO950vg/xnAtcXsJQJST5Gg7xcf?= =?iso-8859-2?q?396N4XnT5K/9UZpZ47BIJ8uBHw0pdW+rsT7O44w7Fz9tghWpIoPu0FOjk9Tp?= =?iso-8859-2?q?CSwmB96sLDnn2qgdzb8NNXsOJMiUZykavx7tKKmAo5kKNqB+hrxWHnIJrdbT?= =?iso-8859-2?q?+GBkOV1pmOL1s06Ez8weV+8MuPW0Q406I27lRT2T8WPb/QiRAya7RFOnw0v/?= =?iso-8859-2?q?QjBdzlcEZtuuZ2j0vAa9IiqOqzXAOsoT/P4I08NtCEaZnVS90/2w/c6ZVEHQ?= =?iso-8859-2?q?U+nD98K3rCkuvPSBznip/DiEY3vioK7H51scK6gpMMaBMZLQBDWd9yuLMhg6?= =?iso-8859-2?q?vE9B2saK7bNHrlaD+KolB5XH9Vzm9N3xfY7BApVcHclOUOagGqVpXHbvYFhq?= =?iso-8859-2?q?MLy2RktET+j/qHtpqcKt58p/G6EJpLSzPFcRa5KAadz1jZTiDSvSWdEyDjDW?= =?iso-8859-2?q?fHJcG3WE+g0z85RikYKpYCll0rH1aUFFR7XgFDz8kOOHj6GfO85mtw6i39/s?= =?iso-8859-2?q?lEHA9s1PbPesBVKOnmfZTyDeyh3NzgQgw8R7Y177BLy8Vx4grLgPr/BjNXlH?= =?iso-8859-2?q?yBjIZdjQ3eynukVxyFt3WMO19NAZbApQBXFHQ8Ox7rms4ZuWhhqqnVmGszoz?= =?iso-8859-2?q?8L+FMRPnxYeR+AdPVWTlI4zVMmLOxuN+ZHpekhleKNwlJanKloRlLQt1aICD?= =?iso-8859-2?q?o3W7n/sLUijX3c2gO1KL8N68ruPKdJe3h9RwNV2Q0c6C08rGs46DGaklnRbA?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0761c74b-e6d6-4efa-8ee1-08db5fe08d8c X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:03:47.2719 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mrG7ZEQLFnESYtCkTokalcrS2dFsa/Frv6mHoEi+AM58JDF7aJZs0ejCVX4tKIg0MI74v1R5AH/Owh/NM5RfksjoSu5TBIz+GOIjILHRHDueTpvGwFTSNZx47JYCcJfI X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11557 Message-ID-Hash: PZLKHKJUNTQXN7B6HQQ3KSKA2AGLUSB3 X-Message-ID-Hash: PZLKHKJUNTQXN7B6HQQ3KSKA2AGLUSB3 X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Current soc_get_playback_capture() (A) is checking playback/capture availability for DPCM (X) / Normal (Y) / Codec2Codec (Z) connections. (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic || dai_link->no_pcm) { | ... |(a) if (dai_link->dpcm_playback) { | ... | ^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) { |(*) ... | v } | ... (X) } |(b) if (dai_link->dpcm_capture) { | ... | ^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) { |(*) ... | v } | ... v } } else { ^ ^ /* Adapt stream for codec2codec links */ |(Z) int cpu_capture = ... | v int cpu_playback = ... (Y) | ^ for_each_rtd_codec_dais(rtd, i, codec_dai) { |(*) ... v v } } ... } (*) part is checking each DAI's availability. At first, (X) part is for DPCM, and it checks playback/capture availability if dai_link has dpcm_playback/capture flag (a)(b). But we are already using playback/capture_only flag. for Normal (Y) and Codec2Codec (Z). We can use this flags for DPCM too. Before After dpcm_playback = 1; => /* no flags */ dpcm_capture = 1; dpcm_playback = 1; => playback_only = 1; dpcm_capture = 1; => capture_only = 1; This patch enables both flags case, but dpcm_playback/capture flags will be removed if all driver were switched to new playback/capture_only flags. Here, CPU <-> Codec relationship is like this DPCM [CPU/dummy]-[dummy/Codec] ^^^^ ^^^^^ Normal [CPU/Codec] ^^^^^^^^^^^ DPCM part (X) is checking only CPU DAI, and Normal part (Y) is checking both CPU/Codec DAI Here, validation check on dummy DAI is always true. We want to expand validation check to all cases, but unfortunately DPCM BE Codec validation check will breaks compatibility on some devices. This patch ignore it with comment. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 80 ++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 52 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index c1ddd3fc71b0..923a66a51b18 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2732,7 +2732,10 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int *playback, int *capture) { struct snd_soc_dai_link *dai_link = rtd->dai_link; + struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai; + int cpu_capture = SNDRV_PCM_STREAM_CAPTURE; + int cpu_playback = SNDRV_PCM_STREAM_PLAYBACK; int has_playback = 0; int has_capture = 0; int i; @@ -2749,61 +2752,34 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, return -EINVAL; } - if (dai_link->dynamic || dai_link->no_pcm) { - int stream; - - if (dai_link->dpcm_playback) { - stream = SNDRV_PCM_STREAM_PLAYBACK; + /* Adapt stream for codec2codec links */ + if (dai_link->c2c_params) { + cpu_capture = SNDRV_PCM_STREAM_PLAYBACK; + cpu_playback = SNDRV_PCM_STREAM_CAPTURE; + } - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_playback = 1; - break; - } - } - if (!has_playback) { - dev_err(rtd->card->dev, - "No CPU DAIs support playback for stream %s\n", - dai_link->stream_name); - return -EINVAL; - } - } - if (dai_link->dpcm_capture) { - stream = SNDRV_PCM_STREAM_CAPTURE; + /* REMOVE ME */ + if (dai_link->dpcm_playback && !dai_link->dpcm_capture) + dai_link->playback_only = 1; + if (!dai_link->dpcm_playback && dai_link->dpcm_capture) + dai_link->capture_only = 1; - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_capture = 1; - break; - } - } + for_each_rtd_cpu_dais(rtd, i, cpu_dai) { + codec_dai = asoc_rtd_to_codec(rtd, i); /* get paired codec */ - if (!has_capture) { - dev_err(rtd->card->dev, - "No CPU DAIs support capture for stream %s\n", - dai_link->stream_name); - return -EINVAL; - } - } - } else { - struct snd_soc_dai *codec_dai; - - /* Adapt stream for codec2codec links */ - int cpu_capture = dai_link->c2c_params ? - SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; - int cpu_playback = dai_link->c2c_params ? - SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; - - for_each_rtd_codec_dais(rtd, i, codec_dai) { - cpu_dai = asoc_rtd_to_cpu(rtd, i); - - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && - snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) - has_playback = 1; - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && - snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) - has_capture = 1; - } + /* + * FIXME + * + * DPCM BE Codec has been no checked before. + * It should be checked, but it breaks compatibility. + * It ignores BE Codec here, so far. + */ + if (snd_soc_dai_stream_valid(cpu_dai, cpu_playback) && + (dai_link->no_pcm || snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK))) + has_playback = 1; + if (snd_soc_dai_stream_valid(cpu_dai, cpu_capture) && + (dai_link->no_pcm || snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE))) + has_capture = 1; } if (dai_link->playback_only) From patchwork Mon May 29 01:04:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2A1BC77B7E for ; Mon, 29 May 2023 01:06:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8D425207; Mon, 29 May 2023 03:06:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8D425207 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322412; bh=gjEtTOuwdHygB00M0mSD28h7HCIjauQDLvcJrmQxA18=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=riX39M4ISEqBd0t2AZqVyWPFbyyom86lXhBaFup6M0B2FEOHRDGKpNnExkbA4aPo5 oVWc982XbFPc8Vrucgny/AI5/5BQkxGjfllf6nSHgKOd4k6iRZAYQ7eisMxfdfbiA+ GqdH1PKoxrD14vbYguFUqpqo7tXb1VLNIWhWebXc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20702F80587; Mon, 29 May 2023 03:04:43 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C4BDDF80563; Mon, 29 May 2023 03:04:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 82D95F8055C; Mon, 29 May 2023 03:04:39 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20706.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::706]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9C513F80551 for ; Mon, 29 May 2023 03:04:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9C513F80551 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=X6IhkrK3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QLls10CTYyUtfivA18OFWZ2m5V+2wOSMUtK/3xrYTTbO6rJXkzRoRI1pMeiETNbjpOQjruvE1t2yhVaoDjSbj1+PPVjgafvZWnPxP2s6QmjUypS5fNqwLhAoeLrr8LvV+FWzaRhLFlPmZ0xzaEdQgf2LgxRCPd7ulWkLsqFUDLD1mBgddYspOrwl+5HFsZs70OQUb7fjptqMy0dAdIZbMf1nISTu6VLvLNPSH4sSXI/E1UtkQoP+b8b27ScQUy91gD/7XTMB8E0nwNJKArmlCOERAZgyAXdI61FniLZjheycDqX/s30iXIrCHz6DpxlFmUlC84J155IHiXrzmESQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZHDmF0ep9pmzKKDyiOJ8g9YRx3vltGoaH3tV5Fj4OYA=; b=YHS56e7gREx4q8paDHknZiydjxUbID5W3AUKWBBtIaEVRR1UZr7OlD54wNhuRUmP7bM5yDGyfgOWoeqsJMZU39vAORSD4wY4mlHZuA4YR1F5PYT/Bz3Skgc5ZZqDGxdV21ZP9BqqjmM0TR5iE+cCc9a0uFwElQGGYuGQHlZ/xdkAbwwsFp/CoZHtivkv9iBhgN8f7h7jdZADR3VPOQdsCzks1l7MCGuNdNot+Agted072DY2vmJsQDbuGo94FklJAG1Af6PJLbvNxYFfWytPKH7KvYrpGOWmgYfrS7xcHcbnY204+4LLB9qEJeKJ+OhlDC9BmaudZBQkDIjAGe7Bkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZHDmF0ep9pmzKKDyiOJ8g9YRx3vltGoaH3tV5Fj4OYA=; b=X6IhkrK3aI7aoVxLSNGz1shTCB9n6LjAqLRaqqpKOfgd1++gXNCFjWbSvOoFwsvirrEDOs2/5W51j7zlkGxd5LAtdMP5XKiZvQj5oEPWlukqXocXwLd8nDoisdi2FsKnSEmPciVsXuu3X4sK/Kk1nAAsW4/NPuNC88FFhC91fc0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:04:24 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:04:24 +0000 Message-ID: <87a5xolzhk.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Xiubo Li Cc: Fabio Estevam , Nicolin Chen , Shengjiu Wang , alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 10/21] ASoC: fsl: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:04:24 +0000 X-ClientProxiedBy: TYAPR01CA0193.jpnprd01.prod.outlook.com (2603:1096:404:29::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: 55982121-3ea8-43b5-58ee-08db5fe0a4b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gWaFhy3P3LeVOdhzm60zH9VXYFjo8jU6Ohmz9tQ3gs5fi6qWUcO4PzTFEZxYW+523eRQuJspf5K2wwGyp1frAQ9zTBv2jJ4xHMcGOiYMu5AsOUJAsON0X74BYvQvgHYHUN1n5Hx+o81eFH0Sidt/68m2EyFCK8fuTcJGCwq6R67xaUNIfDCPTTdrf8/3lp+UR7/H3tNQp5WpkoDNxwoWYF1uqf6suCVM6AtlLuVRGU0jLKJ5/0itNTCUNQ4XOW4lVeKu6rHm0hw3K29T8VBIRcN/Dxoe+vo3lix7ECptEFjaraGrI2RSP3exJrLLEbNk7Aofn0/PNkDCBLqsk4TvDH/UjomZIBheTZLedRL7iPMsMwDw6J0wpkjAVCF8zPnVKvGjiMIE1t6Fqh+9eU6Z7rXD02tM+vBxY+89DSMdK8nOl3WZKEVe1Vofqw7vFP29bJykRw+0X81PJj/kjiZZpTOQx5Km8zMfeHNa79JFwnNnQya7Sp/WnSrdrfYfA4S2aGI4bTUx/UnC8M6uz4J2AbHAyVVrrbD5fuuRnAi3cLg+1MKYTIyMf9+gnfJFZZDVe+tYsq5mWyhFn5WuDASbwWKJAgc909Kgzg76GGjSKOv09ihkkbbl8TWOhqrnfiCO X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(54906003)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(7416002)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +x7rm1RcMPVhkt2uhgSAfIzY0JUhbolbxX13/9ya6vk1Ec72R8kkHYW8+GFzL5xHbd/4SpVPJJp078b+DfO2y1S5K7ZyG460pNnSJ9Al/nd3WH52mmmWpsmH0oolF1KWcrwcX48ARypjcAUxLYQPXPQY0/0Qm3nuchfRl5zralYaLuwN5s1JjW745OjrdgycfPAyxKhuU02M1o5XtY8qwUasW/VVrxSRQB851NFDdjOVs9Eo7V5xY6aCBiAmkaM0dWGXpb7kGu57sL9GszGGXkA/vEG85Z7lrqChrqsC9tiFijS0RLqdjMHcC1tCk+mq8AH34nyMCLSwZJFosTw+LGS9RDPfrVNN4lvvbxcxpTdIhrL7pNiJoSqfokexuvjznzrJYqmWcp/4qHDqdOZNrcOGRmpE7GY4MiSYiwDulHMZvYeErNDJvUwG9v0o+Yqq5FPZNwcmJO9OQl1FULVzfTsfQtKXhwNLu7t7XRtQht+3/4CbIZrwSpdjaKEQUgg/h/1muNraEXl9PXfeYwPCrvvKyZZ9UEHEhwy+JXnTi3nQ4xtg6HW3YyoXGYep7kBMrWqYYfcV54+PfS0oT1E7ybGFFv89prwX+dKO00SMVogks2t4NCynmJIf9t6gqby5UN8dXialA8kxtU6Qux0fehL3HwZzdbZOQfpn7RyRvt7/rrB7NIIgTm64dOMXqW1jmMOqp+bptF13NPE2xQIQjz9gCaspE1hp9yP6b5GZjKzGtcl09dELfzmULLp5cGZrGOcVZ4dNbxAifIJGq4/4Pjp3QKrY3THmRfcqa67KXFBmuTpclQ2PRdBDDJTSjz/4yj8lXfQYwZOSolwwe7jGHTTzQvZuufSJ9+JBQWSVu/HyqpVI5Y8KiUznQOQ9OjfViBmJwAHG1gzdiw3wPbv5nNc7Yb1DYe5zesz4qXp4DUUHvSEvBnTcWpErBJWLd8DMQwj2M3DfoNVEugDtDPeatqR0OxtIhGORhNATc/9UoNifQjFh6PorFfBH0nnFSOA3XpqzGfTPknA7UM3z6N96IgCkAUxEU3Op/IuMgVbv4OXFPXSinaBrkLgdOp+l6XmV09TGzLWgQ7bM22F8VYosckqx8yQgW82t4HpcByJmGmffkEm2LCcPXPK3Q0e224sRItqbpowLwUZzhDmaX7y98IYDFlz1cij/eXOENgSK9gkTNAgIsfRjRPIgqZLOacyOEDcLvab54+Vnc4U924qxbQyf/yJ9vjruugMDrXHweNJJo2FYRu84jg+tIfP23zAethA2F+sIUOrVrHF/s4ofPRDi5VLNLde5Xf2GRZUfgfnfJ8lI7rh3fqjd2pX0ZOiy/GmZtti10hNHGyPm+iyeMDdWDa4jY9HLq0dQvS43JrP0ZD1Q8CBLYiEJCJSPd5ghms6nR7S1pqqbfZkJMuA0EN/qB9uVq+QcOpgb9r9zB4N106SmE/0l7Kmx/xbdvQddQs0UzP2Q/LvvKYyiYrFrvCJx60sYQ+sFGOSXbJJSAa7P+z+24R89JDSZv+tbd20Ln5hBW6XMbsfJ9DJkXNFJnwshxwjuIeKvkOrR5gHEnj17p6RzWC9aN9mHp5RHrp3D/idmMekOzVXlC9lC5xVgnMT6wy2ViRp03PBNXh1Gcaw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55982121-3ea8-43b5-58ee-08db5fe0a4b0 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:04:24.4461 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hfbHOYczDsAb7bq9g//8MoBaRK2PAv8sTdts4qGZe8zdnFGqVFEHTFaH5/RqrKsBVepvRuqHR1/AwX3s61Tj8Qo3kLcJq/7agh+2E4wCsYTG6mp0ulapJRgqzt7jYfeo X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: IJ5R4QXSWWLP5VG3URTNIBBGNEPF3B3M X-Message-ID-Hash: IJ5R4QXSWWLP5VG3URTNIBBGNEPF3B3M X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/fsl-asoc-card.c | 16 ++++++---------- sound/soc/fsl/imx-audmix.c | 6 ++---- sound/soc/fsl/imx-card.c | 4 ++-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 40870668ee24..917d9da5c57f 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -311,8 +311,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = { { .name = "HiFi-ASRC-FE", .stream_name = "HiFi-ASRC-FE", - .dpcm_playback = 1, - .dpcm_capture = 1, .dynamic = 1, SND_SOC_DAILINK_REG(hifi_fe), }, @@ -321,8 +319,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = { .stream_name = "HiFi-ASRC-BE", .be_hw_params_fixup = be_hw_params_fixup, .ops = &fsl_asoc_card_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(hifi_be), }, @@ -633,8 +629,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } else if (of_device_is_compatible(np, "fsl,imx-audio-tlv320aic31xx")) { codec_dai_name = "tlv320dac31xx-hifi"; priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->cpu_priv.sysclk_dir[TX] = SND_SOC_CLOCK_OUT; priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT; priv->card.dapm_routes = audio_map_tx; @@ -660,15 +656,15 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBC_CFC | SND_SOC_DAIFMT_NB_NF; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8524")) { codec_dai_name = "wm8524-hifi"; priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->cpu_priv.slot_width = 32; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index efbcd4a65ca8..5cf7bb861698 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -255,10 +255,10 @@ static int imx_audmix_probe(struct platform_device *pdev) priv->dai[i].cpus->of_node = args.np; priv->dai[i].cpus->dai_name = dev_name(&cpu_pdev->dev); priv->dai[i].dynamic = 1; - priv->dai[i].dpcm_playback = 1; - priv->dai[i].dpcm_capture = (i == 0 ? 1 : 0); priv->dai[i].ignore_pmdown_time = 1; priv->dai[i].ops = &imx_audmix_fe_ops; + if (i) + priv->dai[i].playback_only = 1; /* Add AUDMIX Backend */ be_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, @@ -278,8 +278,6 @@ static int imx_audmix_probe(struct platform_device *pdev) priv->dai[num_dai + i].cpus->of_node = audmix_np; priv->dai[num_dai + i].cpus->dai_name = be_name; priv->dai[num_dai + i].no_pcm = 1; - priv->dai[num_dai + i].dpcm_playback = 1; - priv->dai[num_dai + i].dpcm_capture = 1; priv->dai[num_dai + i].ignore_pmdown_time = 1; priv->dai[num_dai + i].ops = &imx_audmix_be_ops; diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 78e2e3932ba5..6e3ce0817478 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -826,8 +826,8 @@ static int imx_card_probe(struct platform_device *pdev) } for_each_card_prelinks(&data->card, i, link) { if (link->dynamic == 1 && link_be) { - link->dpcm_playback = link_be->dpcm_playback; - link->dpcm_capture = link_be->dpcm_capture; + link->playback_only = link_be->playback_only; + link->capture_only = link_be->capture_only; } } } From patchwork Mon May 29 01:04:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4E0EC7EE23 for ; Mon, 29 May 2023 01:07:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7FFF0857; Mon, 29 May 2023 03:06:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7FFF0857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322435; bh=B3ftONP+YkmSQ3x01Xzt1nD+kxFPj9Y8w2brHu/tG4w=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ffLLuKD6FZRflomHYaHDsfDikcBy0MU+DnWymYS643iMdhRJ4AFc1sP0YW5vQLje4 +XeAIZdcHIOsxzL0Oz63BAwaR5Wo9AZvgwbA96G4FBjixzhNmOcAi+ETR+mGz/D2aS TnBBgO8854CD25iO/AkYeuFb4UQCbn9lP96WCqbE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A8CAEF805B6; Mon, 29 May 2023 03:05:12 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2004DF8055C; Mon, 29 May 2023 03:05:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C1AEF805B2; Mon, 29 May 2023 03:05:08 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2070d.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::70d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9DBF0F80557 for ; Mon, 29 May 2023 03:04:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9DBF0F80557 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=jPTy+KnH ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXWNkECTIV5Bwwdco1Z5tO7nUGQwUc+R4FySMvAJpQMlOHHQZMPq6lq7HhaVhvF0w9rVWgLbVJcekTnZEYb5yIryxMNj2ypOn7glklI4kSzmnOC4bmU9sKFa4WX2UnNU8R36mxP/a3GKDlJIydJBZcBSeUxRRIyPhWthk/sKHdMeok4JtEzrcdZKwgoMEtAavW2ZNchRYy+29BhvZPpU0eoDIIc2COeCCwElCIz8R+3hIJU7EuUs+IGr7evfWWQhfqedfrQNZMobQ9HC5XcxuEfEC7plpEo4H17l1tkz5XFmkCz+obS9Uq5CyTsA3UTbbTV3bDm5g3MW9Fi5o/olew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+9H9iKZmrQL9EcgiIFBJwF3X4RSUHdBusJ2Ue1tVZU4=; b=Uz5eonhkc1MvTCnijJa+bk4VLJw9sLgE7dlaFE4gz/1/OEBNAuZMu/bsJ3CUny3eaPdNsrYEnP3lB02vvKGuUQOuP5g/BCGZG528WWic3edLvc9R1V2V3xf46sYJcYqooil6ABIVE8pO0JwzN9MH0hwDjSYgJ+zRlaBZnqecKYF0DFzRLOAI6fshYiDf5Dmtvf2eixa9astInpKZ4xKBCdKn07tLoWgKDVjTPU7DOfM55eqgaGtfYVQKs3yDa+0jfDOcnyPkaEXhONRupPD1VhcCs7IgGK9bbKN5G7AuAF93iqE2bahWcMyw9lCQbuhRur5d3kFn6u0lBVG6985RlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+9H9iKZmrQL9EcgiIFBJwF3X4RSUHdBusJ2Ue1tVZU4=; b=jPTy+KnHnSAob1n7kBM674S8D4EX1Vfit7Xd/Yk42grEuvpQeWQD3Lr3xahdL5XILdeYyyWZh54EnkD/QUOFLpC9QUpjmALpTsXT2D75gsRW8vNf72p1jCVontpZ7EypvCLeA2tRS5wFll+ja6z5zFkM0ir0dJaOgy1LRWxCSRk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:04:50 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:04:50 +0000 Message-ID: <877csslzgt.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Liam Girdwood , Mark Brown , Neil Armstrong , Takashi Iwai Cc: Martin Blumenstingl , alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 12/21] ASoC: meson: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:04:50 +0000 X-ClientProxiedBy: TYAPR01CA0007.jpnprd01.prod.outlook.com (2603:1096:404::19) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: afaaafb7-de89-48c4-4b99-08db5fe0b45c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZWdKJ8wZoQuvWjGkTclG4pixtV9+OJGK5s2Iu0p8zgHUh/YYmTBBmSzwlV0ofv3u5NbTP6RbaB1ptFjOlV7Q+to4677JKZek/ExHId4AsH4Sl5JUCLvxb83jq3rgF5pCYEpIHF9D6+buPXGJmNoOCvxdTE0tdh/xmRD98KOQsC5uo70UzM6X2qUnRJZ9lCFTruwrXDiccogH6zZXWUDKxA7vgZunOmOP9nQqOEarL2ColnmFB/VNKXL6/fihHOidCbfsYI1vzr5JBsumr5Ztusw/rIEKaESzvV90SvFELeTS2GbwAfQlSiGKvQrjT4SQaX3S4KjTxvFaR4bczGHwCSTmxkQG8qoNxFaXTXEz/zZglouxWptEGORQ71vKOR7HxVK3SypNy/cI9bAGEb1CKh7GgrtI5aI1u25U3Bmhry2iyOVG7Zqg2qyvCONMZ71GDi7yL4ATjbWLDLhsNnnMWFUehHosUKvLlTByoy2/lfH/tXZZC825guY/X4ktXooyq8dcwt/CyUJTiwcU2++QwI0NSp+Tg9EWuTJJI6kGVxCtUVLPKnlKMmtJqxXbPgVzeZm4oQus+lJfciYYTolP7wAwpOl7I+MPe/iMdDl2MhWIez3I2ZP9+2d0kPsOBG4a X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RN6ybt2KvtdCUM+uOkaKQzQZ4HVPLsnoJDWNqfZz+A7ud8luARpm4IT1Tesh65q+qto2yzv4iUDeRRjBhfpgF7+c0qyI6smRCjuPANTxe5tF99ecLo9P/08Y3BObz0y3NHwGARTJOzUoMYXkAJ0qiZV79iDShhuAzX0Q0452cg+gR2VLS2GDaLbfKBURFWA7cBqNIsquSj7y8nZwE7TUSjrzHtQhf8Lr7IrqyD8SWNQsPyVpsUI2udRw4m4V99XraY6+DkF8yP3ihklGun+T4A18ChZJkv5DuBUNYNaEFGU0RTF8OWBhOyuDfx7b7GlwbbqQnK6oQgh/vc8nS7Ris2vkuYVzFPUzOE42rnbZWpO7JCng0fzgls6ArhkfXt9/VaN8+iXMrfcG4GqDpzJHulhWu/MEfYyNAuONKQLnYPTq+FYY0WoiQD1LtQLMv6DE//Iv+fMGO9PhZvuR7/JDbFmfEm9QAhJ4GOPxfN9wO8nBzytvF4SOnzUW86rozb5V/PCv0llSWm6gZ+P8ZYODm//rwC4S32NcsppjV7+z65GG1KAz4ZG5LsbKvUFPG6Y4uYpzDm5gXlKBkfA2tLNokidAs4OdDxvbdXJhcmIBpyJ1O0MhaYI7baY8/It7VgZ3WwYwtwLx04sQVTSA0zh/TE/8ybaqAmFt23cAFRMf+T4MEA6YFtIcbDWqpeS/hQHCFXBr0wkyXxPWCCieND6suAUAOobn2FHzUcJB8QjkuLmVtWveXJ3MTXaDr/d11gzDwVKEykQ/yQeBitXvX4n0Nzu7Sjrq9antQrsRiLBO5zcCQyZs/DptutkNahfwvA7w1E5a4xfBGeplNaxhCwa0H2vqjYzkgtXL0vP+SuVoKLOHxhsZfk5r52xX6vyzjBvrIHfB9VomCXxx9SyBV5vlScpZSL2/558EBgdqiK2yPmnH3ATpZAtX1gIoR4KMNBXELm5+qRlfV3ngqHX7Z5uXTv9/+RPABGzrdHGQuZXAA3jpMUUaq0QmAJaM0ZdOxR9HCiEh/GjKC8wUFzjkIZfRVVPqlujiZ4wsyme4+Gc0yIskGC858BqMbTi4kcwfcB9PfgVzO/mQ9DXxMfdzMGFxPrU08LqOfvDA2VKyMnNV0aj3ODT4xHg99XvR2Zqwzdea4JU6kvSS2TOA5deqXIY3h7P8MHuEomtaR4bplaPtXBVxhdna7TcGxwIYZPVcIYMawZ4l+BmijpATf98gz2iAB/EiMgrwWH3QZ2dyE3zYbmUxpDtyuizOKVdSWg+PKVI7/wJxAqH602UNE8k31wkVj+DNYmLyqOEC07amPnu41c/jm2fqrXnQN1RQdiVTHkHYhReNMyCaH9691UUegPjxKxWXtDvTnArTvZTwX2lNdhv3GBLtjY26uS3TLjBPL5tsvPFoBM/ySMGfUJ4KS8hOf6JpiQIi2REfUl+S7fOuYd4CPO3TcaqKmfO6rKLdXUSZm0QolWcaDPAsMxI1xnzEhqjmgg5SFkTJSh/+ABH0IVkQ0EsFbbQS9tbBF4mDkP9hDmtIYftGmcDPIlTEnQPDYvANanW9eTGI+vZY0CV49GtCRyIGIwyG8Sq8HINwd0EleVBGTNlBtu1f7VqIMonMrw8m+3VoFPH2EHBV/XrFLnk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: afaaafb7-de89-48c4-4b99-08db5fe0b45c X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:04:50.7143 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JX9ZW7ycvfN1YIqvZ/G+rFcWdhqhcZFmbyCBwpU06Z7/LLHjmCs9a2Bw2eRaLaxty9VgLPvp4pU7sjEEv/EGCVfoPxiPHNYO0hIT76pJOOI+KewJkHKqnyi6QmiJUf4u X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: 4HO5ZUW4FQ7SFCKCJXPCH3AF6K3M4QXX X-Message-ID-Hash: 4HO5ZUW4FQ7SFCKCJXPCH3AF6K3M4QXX X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto --- sound/soc/meson/axg-card.c | 8 ++++---- sound/soc/meson/meson-card-utils.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 74e7cf0ef8d5..2d62e1ae7425 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -132,7 +132,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, lb->stream_name = lb->name; lb->cpus->of_node = pad->cpus->of_node; lb->cpus->dai_name = "TDM Loopback"; - lb->dpcm_capture = 1; + lb->capture_only = 1; lb->no_pcm = 1; lb->ops = &axg_card_tdm_be_ops; lb->init = axg_card_tdm_dai_lb_init; @@ -176,7 +176,7 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable playback is the interface has no tx slots */ if (!tx) - link->dpcm_playback = 0; + link->capture_only = 1; for (i = 0, rx = 0; i < AXG_TDM_NUM_LANES; i++) { snprintf(propname, 32, "dai-tdm-slot-rx-mask-%d", i); @@ -186,7 +186,7 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable capture is the interface has no rx slots */ if (!rx) - link->dpcm_capture = 0; + link->playback_only = 1; /* ... but the interface should at least have one of them */ if (!tx && !rx) { @@ -275,7 +275,7 @@ static int axg_card_parse_tdm(struct snd_soc_card *card, return ret; /* Add loopback if the pad dai has playback */ - if (link->dpcm_playback) { + if (!link->capture_only) { ret = axg_card_add_tdm_loopback(card, index); if (ret) return ret; diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index ffc5111f9e3c..8a531ec8fad4 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -192,9 +192,9 @@ int meson_card_set_fe_link(struct snd_soc_card *card, link->dpcm_merged_rate = 1; if (is_playback) - link->dpcm_playback = 1; + link->playback_only = 1; else - link->dpcm_capture = 1; + link->capture_only = 1; return meson_card_set_link_name(card, link, node, "fe"); } From patchwork Mon May 29 01:05:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C11EC7EE23 for ; Mon, 29 May 2023 01:07:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 883C3820; Mon, 29 May 2023 03:07:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 883C3820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322476; bh=3UAWpJyK9GEvSTkQzT/uVHN+RWkQFnJpy2a5VbK9LO8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IKfOfNqqD1n2unZIuIBo4rRgLJb7njLGXMAuSJ3eP03DJXAOHHDXD7sNWldg6sVgn Oa2r6aOk3V8+NisjHXals5JaISnQvYmo3ERi5Np+LiKoN5dFBLO9+H/551THrTWFYO QNmLC/0G7znCrdaoOj37zLFyRYpRBwXffygOFn6c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61850F80557; Mon, 29 May 2023 03:05:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 573A5F805BE; Mon, 29 May 2023 03:05:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45CF0F805AF; Mon, 29 May 2023 03:05:29 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2072c.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::72c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5FD94F80589 for ; Mon, 29 May 2023 03:05:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FD94F80589 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=iWrXBpaS ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l8Wl0z5xrqOpI+oAmSZoJ9kM39hxl5Vb3eWRZK/2NzAqqwQn9f9fUwfEGwZOnVOK1fU726lFGum4RpkTjxnZymR+0bzZuaVuPgHWjbXC8qna1V2EyMNwADfZ4gPRZ2Iu6N1w91xMNJ0o5tM/PzlFh9rWE7/v+6jWPAGwnutA/M45fCpzz4c/HLxsYafSySYztYu0NCId7DRZyjiy0gbGI+I653brOBc6ObLX5GrLKSIpIDAS4losqtVNkMzgcfqawAr+oJ8ROD0aS2MSOQNFbcH07bQzIDQ4NJYoNrk+eNGGyJhSJzSxnN+x7O4D+JdB+FW9Ct4OgekymZWVGANKKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/KvGg+GtRs9ZSxrJdNNHMdnxhkoZHdRwXbE8vxwnTTQ=; b=LQPHroZZ9d1AmfRmfCi1V1m6G8NOyADQ0DmRBoeJb2MoDt9zGXo4TqVFtSSEQADGyNQ1p5AGLLxB7CwT08Gxq0yrbrr4xmHx7G8ORhWmcB4uxtviY68tzJbBuTJwjwPH/VYJGihCIxEe+4TjlFKVENdj++xwPzijLJvxnFrJE/auPxeqBuxcoD8JCa5dwq5yXh4GaiQ6a4sBvkodTcDx2wyRCqI0onFZnV3fzt27UaeiIJ1dR+/UQM56Mfzc7/3MEGQqRUfVL+rpS4W3IV4J+s+aw/XYWTKZ9fDkK+KaQYLLRIdLEPOVntOlTiIJIhMDungwzG1lQJQwWof1MVm1kQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/KvGg+GtRs9ZSxrJdNNHMdnxhkoZHdRwXbE8vxwnTTQ=; b=iWrXBpaSOnXvkvkEUE5AHSjhX3MYhW6OU2tWqD6y6VXi9fgkBR3NUu+Tt8vwLMUpPKbYPWcu17Aw36MPzxzhZAQzdz70g5cbIXyVmYqm+P9NbxwwQ9opH48QDDbH26ZDYDoq6M+/vBU32HAvKmyxRhPbtMuSD/rTNys8jY3NGuE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:05:06 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:05:06 +0000 Message-ID: <874jnwlzge.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Sylwester Nawrocki , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 14/21] ASoC: samsung: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:05:06 +0000 X-ClientProxiedBy: TYCPR01CA0176.jpnprd01.prod.outlook.com (2603:1096:400:2b2::18) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a584671-d898-41dd-544f-08db5fe0bda7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1NxmaOoEURYFnlwWITMwru9f7mdXr0uoI1CLtlffF5ca+Yru7LP1LMQhv74mJZ6QcccnYNysCN7lFVTpG4dxAtJE29OSXxBN6MPlGujG04vS/VuD7TNRh+YOFYmCZWoxLZIdCOgwyiMCAv+8G58/XMixC/PSDzZOEc+uRkxvcN/4Iy/cyMZPxc7EILvFxgP8hxXyiKHySAd4jvFtvVVDnmaHuTaa7r4h4ARd8HsM6W4U3Aw1WnaVGwfSHqj84FIskXFb/8H1wLw7X0qgmnfNTeNzq+poUeqLd3qr2mTEzOit0oL9WHqV4E9za/GUrmgeDNgEZf3X2bmi+olu7j2LHumJ7j/OzTwgbaxb8ykPhwc9CqgW8VF/zjRrYGoV34MVS419fcaHTNKkee16x+yZA886IQmSUrTTSuPgkR6fFi7reppDmMmsJiXTLAmd3TNRZEDBwovNMHfGN9cgfDEWML3AkaNlwQ9fkhe4Aauk8BrZaeDM7n73IhoFMOhiBzAWdmlUJYq0CEbMVW/Qfbbe16Q3afcYeAv+N9hKR/5Gv4hR9OzzbUB0VwWvnDGc4czOixy/WKbc1RtZcsmgyWdeZebeuu5/kYEICkAtOLJcMpFk0YSAWeYvu6ti/DZ7xCCD X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kUYzBngNvXvMlfEaCfuRHQu7luBdKMBhmIxyJLQAhxWazxiI6pJixM4rVv8ntFT8JColGwWNAoYsz43Hx7cQO+6+UJEahjrSWd2q2+p4IfF1EHLQ7qnpKeQGdcUQJpTt7VmDnTjiSviM+tUjAyvOmd19v2wh0mvydpRl2v5Z/2g0naqVuPl2OLPxsHHF/bmdQIzJtaTg2Q6DyXLBMz9BUZ8U1vcAwlikygrG5fiOMYIXAj9doSYLTeQmv2jhE07nZn4hrbi9LdNN4G72UA8PcZn5JuKcLacIK4DuRDSSkpJk7vWXBiV1/zrs2OGW1sxfmIg1FyIabFXS4HHUGPkSUWSbRGaJPP34XcZNNa4eRhDzaKl1XjtIIGQE3picSPcLNWpmR+0eexCdRa0g991vxDF4go8jh0vWvkxnDIm8k3Eoo5PpA41EH8abi28PsTKxxoq8FpEJ741Eh2m6l3W9DGzkxCJWEC44LaUbesDnKqC0BI5jydIfd9aa/NCSWbE0iApBnDDUHBDQODHcfxHC+dA1aCOJeoYpHluKHiJnEBYlPVWpyRiPrgxxojbKX2YqV+R/KeM2OD5L+uXtTiAJCLxzB3x/QMYibwuc2lEVyv4ak6e8ezU69fz2+rxU9VqPWJk+szD+pCUWVCi+IV/dDKILPe4iHIK6H+QZ2x5yYU3dCnDVGiAahfx8r/U52NmGiWruuulzKgeP5HGfyZGx63EOF5gT85DtmRV5NiqAGUH/6374dWpe22zC1aTLQRp+xtUMBBks6Ybws9nLa0POL1QZrVnsZMs/mDejc+mAUIAxnlkY/kReA239Xi9PN8Mf0XxODy5OkzQCT1HrBFqp159v5qJF5EGleUERKbBqI07qiFjd7YziRt1piYXtakD1zMzwpGJJ88fjbpLQVqL2TWYKlg72RFJSYcSuz+OruXrdICxhNSAoqaFTp9sqQOeSbqafHpG3KBTHYm2dPmyjayyEt3qcxQBwFlujBDX6QIEa7HVj6U2zPOKCsJe24t62kpSp9oxU+m25eCBz2ZXSrng0OzgB3Qjr9RMSRF2qrVGPN80PK65knSbmrIgYwVBVlC5K739ihcVRQ3KmtonQ97K6OY04ES+5hNP1g6IZi86addvMzodqRGd1mVXcb3wAyOQlzwWsz8NAH2F+VCGPd2V1UWw+cvWgfRkCQSlzJBHuNITa6MOpmqt5HyFEMH+UK39bAsbj3qOdjRIZrxROaDvsjzLW8bt8o2OETozqx86M1M+7HgIFEnVWq4o0v7RjGuPiyJ57AYkwCIbgNOwpbDOxr6Zvcw1/WD7UvbxAx/qyxx6b9x6LJS+KMWEee2E1ENzwBW1r9mG+fJNmG4O5VnKedXWsXINd4wUBuJtewT9Xscd3si4+NhcX30ePkHF7F01JmATviHyJ7rKbnLG8OAmkswgMkK1BiTMgIO5mLkPJzfkXcW1EprPwnQ7PFMu0X3NZvuadDZKM5mfKIhe/49Vx5vOzbkh82er0Kb7jcmwE3jH3xGuyOJNmTg1Wj5K/idCqhoGJ9htiWAQjSWXP/124rkdXCN9Yyyt02Sn2E84W0N/UtK1/H5XreKdqYkFv6MOcYjvfUA4WDgaYRAgnKJ7PKVNVZKkfGD/tO/ibAqA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a584671-d898-41dd-544f-08db5fe0bda7 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:05:06.3244 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hDskkO0zI8VTEq74qsfhwKJc+TNI5PKLeFhSfJd8QQ6xjanngHwY2abFiBm8T+uVRrarnItIc6+TZxKUnSAGb5ssjTCO4ygV1RohhAYGZYrB1cbWVVtS2vLAtq+Z34cC X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: 4DC7SQRU3FM4HBGIROKGH6SSB7FEAU4H X-Message-ID-Hash: 4DC7SQRU3FM4HBGIROKGH6SSB7FEAU4H X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto --- sound/soc/samsung/odroid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index fd95a79cc9fa..3fd6a8c2c0fe 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -173,14 +173,14 @@ static struct snd_soc_dai_link odroid_card_dais[] = { .name = "Primary", .stream_name = "Primary", .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(primary), }, { /* BE <-> CODECs link */ .name = "I2S Mixer", .ops = &odroid_card_be_ops, .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, SND_SOC_DAILINK_REG(mixer), @@ -191,7 +191,7 @@ static struct snd_soc_dai_link odroid_card_dais[] = { .name = "Secondary", .stream_name = "Secondary", .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(secondary), } }; @@ -293,8 +293,8 @@ static int odroid_audio_probe(struct platform_device *pdev) /* Set capture capability only for boards with the MAX98090 CODEC */ if (codec_link->num_codecs > 1) { - card->dai_link[0].dpcm_capture = 1; - card->dai_link[1].dpcm_capture = 1; + card->dai_link[0].capture_only = 1; + card->dai_link[1].capture_only = 1; } priv->sclk_i2s = of_clk_get_by_name(cpu_dai, "i2s_opclk1"); From patchwork Mon May 29 01:05:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90F24C77B7E for ; Mon, 29 May 2023 01:08:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1731C82A; Mon, 29 May 2023 03:07:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1731C82A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322504; bh=e1oNBFvYNx13CpFzcWIhv5aiDDj5e1g46SwokPM6oKU=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kAM7TQ+iai1OKBs5lfPwBc4HBYDABDFXvQPgaInT0PjQIbvrf5JFfwxagQe1XbvAI it2eLEYLxR7ziOcCnyFRXuvyd2ymcN6cIwPltB5EB9WNVkEihZm4v/5PzN78rJVZEk BSWLWd+EdrW+rsaYWzgZMCzBNyIdZqE2XCicK5n0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5380F805E1; Mon, 29 May 2023 03:05:43 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 47685F80549; Mon, 29 May 2023 03:05:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24B04F805C5; Mon, 29 May 2023 03:05:40 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2070f.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::70f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7C945F805A1 for ; Mon, 29 May 2023 03:05:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7C945F805A1 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=E7G+p7O4 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbuJgVwy+PBRYroLvz6QkfXzPjhqZRlflRrCwmoy076FARmlp2cgUZco68bJ6bFCqQWvSWYIRKCtV4LYWkAgDL7sezIvtULV7vSotPP8EFgR/diQJjujI2lJbZZb6Tw3hJ1X+BKkoop+UBUHQxYT6vmviYMv67gQS+QAPHWrJHzZ4+3zaIfOEKR1mCddo7a++eQ6EWpWP+vuHdAzTNJg+j9QQjTsBXvVhKDND7V/eMinBMqnhE6tD14+vXOc35qDXzymXqZa1OakQhWuAv0+e77q+9xiI06TcZHNsuaJSdRDEslK6/H1aSje+GyvcA3oFTPlZSICcUC8DBv0CAwyKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8lYcIvZjQwNMuF9FgkZ9no/ctFvPzcapRVEZRcODqrE=; b=arObKf1g8WLsHUaYwwZZn4RCEGrRMr6Nc/mUK8d7aT17F2ShxnzTz+JZMGFNoDe38hJjdrGYRleyqA+ek2x54cLqB/fuNXT/hpxeKHcx65jdISj7Xf+MYVMTEPT7H4qxWyuvnVZQIytVS4v2n5wWwfJOMKVzzbG9hgZtZreCo0ovTtOTsvB/2RpeJDAwgvdTziEcVdUOU3+1fFU0CUiNsuJ6psmx9qy4FrUh0M0bLpejNC4VJWMY8TXddljpQXW6W9vsKubCHOkkmsHdvPNlYH0hcsKHCv/5F2VRpGb21mO2mkoz/Jpejo7xDE1uYg4/aZocJhwiTHDZ3uq1Jurz+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8lYcIvZjQwNMuF9FgkZ9no/ctFvPzcapRVEZRcODqrE=; b=E7G+p7O4DbgdsFJcosvZtAXLUCE+5Et3QGlwS/wMUjqPqvzJXLgLs/H9ntE5NYZ4HCcTiNUYHNNItK7BfpeqHbSgvgm00035OZ49O9TnQwdBiJ3wAmLNcPUEF9U6r4arSz/xnVKy4hgWbB7O08tDInjmK8XATmEgJu8Gfdhk+TI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:05:16 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:05:16 +0000 Message-ID: <87353glzg4.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: =?iso-8859-1?q?=22N=C3=ADcolas_F=2E_R=2E_A=2E_Prado=22?= , "chunxu.li" , AngeloGioacchino Del Regno , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Mark Brown , Matthias Brugger , Takashi Iwai , Trevor Wu , Wang Yufen Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 15/21] ASoC: mediatek: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:05:16 +0000 X-ClientProxiedBy: TYCP286CA0284.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::15) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: e17c9030-a9e9-4736-69fe-08db5fe0c3b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w8yuIaGyzvb+a4Mob266Fs4GOpYDy+O6BKJ26WYyVAg8MFFeJ+Xc8oqleSRR5KXl3iPeP33bvilQxzHdO953l5YaQfRZGwm436emUm2r1igfGpDHmmsb7ph7ndTnuZe2okMz1Ej13WPQ5sv2A1AiQtqWuBwIQeZFEcf7yznTzHRGXXPxjNE50yRDnPVckGdZTVHRMgF+LpH4K4T10aVCngmhL4ErJSaEjBsDq20O0R6+ICSHSqdZK4GsOFEp/eepJWP+C9JgJL/zBP/vfxehJPZt7r+pvnRmETk9QsHkR04CYu2Dax+BDLUGDwMwVa+9BCOK+//FJyimOmE/F7VsDtOI/Uc+tNuqWHeEbIN/QLbXwFQLX0YnBsJGOQceeG7gAlEGVGEpllWLVVm2/5XFGylwR8NGOwmhz4u8B8G5kFEtjDO/Wmrx5GMxYT2aeaAPUbDxjhUFhddROAtPHwbi6luyvxiAI8rP4tBeJ5nS/VLot7ptEbrFoPclfiAJqP85BelMF2LQTuKvKxvI5Dzi2Hj6xqr2fA+p5xy/mwdtJEQ8GnP27BeiwhS4izg6+Cn5m+YrjkYWq+sClnuYUxGAtoooWgTvYC8x+rmdJZg627yV+ZkJDIoncGH12kMQjNlywhH+Pe3PVq8yFmEfzlXeaA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(30864003)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(921005)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(7416002)(36756003)(66476007)(66556008)(4326008)(579004)(559001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1g6kkZfpnoec0ey7uotFdldTlaApzokyh7PQmoc7oR0hAAmpy4eLUuT0OBV29VU4pkDMIFkaLT4aQdldwmx0tA8wS3gyOe5lGRXMbJsyq2omF0gDCaNWrjGIhZRyitUk9pswemxWtbg9Q+tHdDoiZFRSWC7527dkSsEwgRYSFHEWhPJJWxjDTXXWAOMj+1lvh/pRRL1aHE8xArJRhddFdG/bsWFXwgJhazpk6UfVVl7FgG26p72oJYnF4n5anv7fTQUWSetXBpR13QzX81m34PnJ75Pad3Vy6QP+ElHmHfUoaMusAeHrQnyJ71XdxjMrQrVPi6lXAEIowKRRHK71KVOxjFwxaeo32M0MCwLjlF90BU/nwq2T9T0ir7icWpbQcUjs2zAW5gDca5lApfx8AMKOxuJ2sr4jRF4yHLde/LH50JCwH469RzziJgQ89WON3Ra0yChYR2VHV9n8nGqsgjvoDcYrMSGEm+I93yVfRllYkU+fABOAYOTSm4wAvXfZjKyt+7lS3/pDVfZ9yuAv/P1DeSEe6a8BWmNI35qJFcuHmi/Cs9b5NJ10lFzrFZWrdJB9T0U6Fkt6I/xsLgwX6FXdbGMxyVglhj4TlC9iv3p+XaxMZc3wUZz21bjRZo3l/YgpTHWcv0Pn8acWXNDmlb7aN2DSPGNWBLTsT7zWVM/7Uky7jJJmDxKWujYlLBoBfrfhBeAfdfNV9C8EDXImUTufInzx2v4v6UoZwpE2KjgKOOOPENq96cSXu5Rid8Eu1X2SPp5TrMYJHpjwOWpCSXLftGK3O/gPSufFuD6qZX8yaBTF8M7qD5N1HCj13U+p/V7x+IubuXvKLf9v/sFb4m7LOHlH0MzM68lhWh+K9mFuThn7FltdcQPyIQDshFM7OPo/bue23naKg4hddnIS9GML5WOrhRmJbGwYnPa9CNdXILAaqX2S04qM/EGpHtiOv4QzyG/Kgk/DtxT+NfNv5IEgYuF3yrQFE2rvAS4iQTlZJeNe5k77rJmK+HPRuEMymTDi0zvnM2YsF36TgCbgZEHLdt2BYa+L6oAWQkkhH5lnVE6953UGui2mX32vs/96kz6ad67IRLoMl38Eh03oS5GirLKyfvlHkaD5RxjC/VNc4o4vcI92jMmPaTwKab2/3nZDgAd4qv2vl66oluMtv0Ay9hIN3/nfEnxUadvloCVG8XReKgyhaa8QAubQejE6gWKQr5PtGDh7y5eVACc6zNPX2a+pm0s1GiY3P2x85jMsCPyuGdm+QwjTdDiSZMRZ70SepDKk2vYbv9kLZn8EDZ3xD/a1cc603WCT1V3/6laSEXcddQeIOOh1OaPRI/jAeZmMnYUkeRRR74PFSTEbvR9TL3yB76MMecmLEJ3ODnQQDECx2gCjJ7aw3tz+LqaEgM/4XmNmA5CTWSbtAIPtxt3JKADK9pZK3MhdNW/iQDyxa9UyaVo+lxLIXXfmtBeFuHNHEi+i7UsMTXw97JPGlV5zmzN0oQZZcS1FnGVdyfs1J/c3/9QcSMY2HCcsEQkKzzv7jxalRCiJZJtK/4qJtHzp2Z65q+9METOKPzLPtMjJ3bEdClnSbLD6QPILiJUzFDLawDoB1nRmjhQ4qBlcZTa96dfk6gAZJBvaE0hl8iA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e17c9030-a9e9-4736-69fe-08db5fe0c3b2 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:05:16.4655 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qLkPEFKAvHeR7Ooh1L+WoIhfQpgS93ATHQVhVTDsFd6RXNpP4hZsmBjC25bbmneMoQWTEOzcwHQzmjahUMoIgmRJdks3p3wmeR7H61S5Dpaa+Pwe+g2my2wbYo2SNeVh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: 4L6ZQRU7JD2T2ADJWYFQ2WKQYN3DO5IZ X-Message-ID-Hash: 4L6ZQRU7JD2T2ADJWYFQ2WKQYN3DO5IZ X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto --- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 20 ++--- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 6 +- sound/soc/mediatek/mt6797/mt6797-mt6351.c | 24 ++---- sound/soc/mediatek/mt8173/mt8173-max98090.c | 6 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 6 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 10 +-- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 10 +-- .../mediatek/mt8183/mt8183-da7219-max98357.c | 34 +++----- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 34 +++----- .../mt8186/mt8186-mt6366-da7219-max98357.c | 86 +++++++------------ .../mt8186/mt8186-mt6366-rt1019-rt5682s.c | 86 +++++++------------ sound/soc/mediatek/mt8188/mt8188-mt6359.c | 48 +++++------ .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 78 ++++++++--------- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 60 +++++++------ 14 files changed, 204 insertions(+), 304 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c index 08ef109744c7..e71c23ebff62 100644 --- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c +++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c @@ -222,7 +222,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(fe_multi_ch_out), }, [DAI_LINK_FE_PCM0_IN] = { @@ -232,7 +232,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_pcm0_in), }, [DAI_LINK_FE_PCM1_IN] = { @@ -242,7 +242,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_pcm1_in), }, [DAI_LINK_FE_BT_OUT] = { @@ -251,7 +251,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(fe_bt_out), }, [DAI_LINK_FE_BT_IN] = { @@ -260,7 +260,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_bt_in), }, /* BE */ @@ -270,8 +270,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_i2s0), }, [DAI_LINK_BE_I2S1] = { @@ -280,8 +278,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_i2s1), }, [DAI_LINK_BE_I2S2] = { @@ -290,8 +286,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_i2s2), }, [DAI_LINK_BE_I2S3] = { @@ -300,15 +294,11 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_i2s3), }, [DAI_LINK_BE_MRG_BT] = { .name = "mt2701-cs42448-MRG-BT", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_mrg_bt), }, }; diff --git a/sound/soc/mediatek/mt2701/mt2701-wm8960.c b/sound/soc/mediatek/mt2701/mt2701-wm8960.c index a184032c15b6..24fd522d2d37 100644 --- a/sound/soc/mediatek/mt2701/mt2701-wm8960.c +++ b/sound/soc/mediatek/mt2701/mt2701-wm8960.c @@ -67,7 +67,7 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, { @@ -76,7 +76,7 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* BE */ @@ -86,8 +86,6 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_wm8960_be_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, }; diff --git a/sound/soc/mediatek/mt6797/mt6797-mt6351.c b/sound/soc/mediatek/mt6797/mt6797-mt6351.c index 784c201b8fd4..daad9544a8d4 100644 --- a/sound/soc/mediatek/mt6797/mt6797-mt6351.c +++ b/sound/soc/mediatek/mt6797/mt6797-mt6351.c @@ -78,7 +78,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_1), }, { @@ -87,7 +87,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_2), }, { @@ -96,7 +96,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_3), }, { @@ -105,7 +105,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_1), }, { @@ -114,7 +114,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_2), }, { @@ -123,7 +123,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_3), }, { @@ -132,7 +132,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono_1), }, { @@ -141,8 +141,6 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_lpbk), }, @@ -152,8 +150,6 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_speech), }, @@ -161,24 +157,18 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c index c2b0619b6158..02a7d1370731 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -105,7 +105,7 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .stream_name = "MAX98090 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, { @@ -113,7 +113,7 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .stream_name = "MAX98090 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ @@ -124,8 +124,6 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .ops = &mt8173_max98090_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(hifi), }, }; diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index f803f121659d..2a22a14f686d 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -128,7 +128,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { .stream_name = "rt5650_rt5514 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -136,7 +136,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { .stream_name = "rt5650_rt5514 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ @@ -148,8 +148,6 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_rt5514_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, }; diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index 8794720cea3a..8866abee6e35 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -160,7 +160,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "rt5650_rt5676 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -168,7 +168,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "rt5650_rt5676 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { @@ -176,7 +176,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "HDMI PCM", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_pcm), }, @@ -189,14 +189,12 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_rt5676_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_be), }, /* rt5676 <-> rt5650 intercodec link: Sets rt5676 I2S2 as master */ diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index e05f2b0231fe..617f5dbfa6be 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -199,7 +199,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "rt5650 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -207,7 +207,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "rt5650 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { @@ -215,7 +215,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "HDMI PCM", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_pcm), }, /* Back End DAI links */ @@ -227,14 +227,12 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .init = mt8173_rt5650_hdmi_init, SND_SOC_DAILINK_REG(hdmi_be), }, diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c index 87bb04846991..848fcd5341bc 100644 --- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c @@ -410,7 +410,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_da7219_max98357_ops, SND_SOC_DAILINK_REG(playback1), }, @@ -420,7 +420,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_da7219_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(playback2), }, @@ -430,7 +430,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, { @@ -439,7 +439,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_da7219_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -449,7 +449,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, { @@ -458,7 +458,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_da7219_max98357_ops, SND_SOC_DAILINK_REG(capture3), }, @@ -468,7 +468,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono), }, { @@ -477,38 +477,32 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, /* BE */ { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -517,7 +511,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -526,7 +520,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_da7219_i2s_ops, @@ -536,13 +530,13 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, }, { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -555,7 +549,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ignore = 1, diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index ce9aedde7e1e..0a0aea9b5337 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -430,7 +430,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_mt6358_ops, SND_SOC_DAILINK_REG(playback1), }, @@ -440,7 +440,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(playback2), }, @@ -450,7 +450,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, { @@ -459,7 +459,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -469,7 +469,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, { @@ -478,7 +478,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_mt6358_ops, SND_SOC_DAILINK_REG(capture3), }, @@ -488,7 +488,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono), }, { @@ -497,7 +497,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, { @@ -513,31 +513,25 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .ops = &mt8183_mt6358_i2s_ops, SND_SOC_DAILINK_REG(i2s0), @@ -545,7 +539,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -554,7 +548,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -564,13 +558,13 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, }, { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .ops = &mt8183_mt6358_i2s_ops, .init = &mt8183_bt_init, @@ -582,7 +576,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_tdm_ops, diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c index cdf54d1eb50d..b71e4c4b896f 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c @@ -567,7 +567,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -580,7 +580,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -589,7 +589,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -601,7 +601,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -614,7 +614,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -623,7 +623,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -632,7 +632,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -641,7 +641,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -650,7 +650,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -659,7 +659,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, { @@ -668,7 +668,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -681,7 +681,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -690,7 +690,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -703,7 +703,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -712,7 +712,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -724,7 +724,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -733,8 +733,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_lpbk), }, @@ -744,8 +742,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_fm), }, @@ -755,8 +751,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src1), }, @@ -766,8 +760,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src_bargein), }, @@ -777,7 +769,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_hw_gain_aaudio), }, @@ -787,8 +779,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src_aaudio), }, @@ -796,8 +786,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = mt8186_mt6366_init, SND_SOC_DAILINK_REG(adda), @@ -808,7 +796,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .init = mt8186_mt6366_da7219_max98357_hdmi_init, .be_hw_params_fixup = mt8186_anx7625_i2s_hw_params_fixup, @@ -817,7 +805,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .ops = &mt8186_da7219_i2s_ops, @@ -826,7 +814,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .init = mt8186_da7219_init, @@ -836,7 +824,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -844,39 +832,31 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "HW Gain 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain1), }, { .name = "HW Gain 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain2), }, { .name = "HW_SRC_1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src1), }, { .name = "HW_SRC_2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src2), }, { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, @@ -885,15 +865,13 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "TDM IN", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(tdm_in), }, @@ -901,35 +879,35 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "Hostless_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul1), }, { .name = "Hostless_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul2), }, { .name = "Hostless_UL3", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul3), }, { .name = "Hostless_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul5), }, { .name = "Hostless_UL6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul6), }, @@ -937,25 +915,25 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "AFE_SOF_DL1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL1), }, { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, { .name = "AFE_SOF_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL1), }, { .name = "AFE_SOF_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL2), }, }; diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c index 7538274641fd..523fe18cf904 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c @@ -635,7 +635,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -648,7 +648,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -657,7 +657,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -669,7 +669,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -682,7 +682,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -691,7 +691,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -700,7 +700,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -709,7 +709,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -718,7 +718,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -727,7 +727,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, { @@ -736,7 +736,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -749,7 +749,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -758,7 +758,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -771,7 +771,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -780,7 +780,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -792,7 +792,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -801,8 +801,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_lpbk), }, @@ -812,8 +810,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_fm), }, @@ -823,8 +819,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src1), }, @@ -834,8 +828,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src_bargein), }, @@ -845,7 +837,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_hw_gain_aaudio), }, @@ -855,8 +847,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_src_aaudio), }, @@ -864,8 +854,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = primary_codec_init, SND_SOC_DAILINK_REG(adda), @@ -876,7 +864,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .init = mt8186_mt6366_rt1019_rt5682s_hdmi_init, .be_hw_params_fixup = mt8186_it6505_i2s_hw_params_fixup, @@ -885,7 +873,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .ops = &mt8186_rt5682s_i2s_ops, @@ -894,7 +882,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .init = mt8186_rt5682s_init, @@ -904,7 +892,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -912,39 +900,31 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "HW Gain 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain1), }, { .name = "HW Gain 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain2), }, { .name = "HW_SRC_1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src1), }, { .name = "HW_SRC_2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src2), }, { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, @@ -953,15 +933,13 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "TDM IN", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(tdm_in), }, @@ -969,35 +947,35 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "Hostless_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul1), }, { .name = "Hostless_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul2), }, { .name = "Hostless_UL3", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul3), }, { .name = "Hostless_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul5), }, { .name = "Hostless_UL6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul6), }, @@ -1005,25 +983,25 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "AFE_SOF_DL1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL1), }, { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, { .name = "AFE_SOF_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL1), }, { .name = "AFE_SOF_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL2), }, }; diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 919d74ea1934..224a376680a2 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -435,7 +435,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback2), }, [DAI_LINK_DL3_FE] = { @@ -446,7 +446,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, [DAI_LINK_DL6_FE] = { @@ -457,7 +457,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, [DAI_LINK_DL7_FE] = { @@ -468,7 +468,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, [DAI_LINK_DL8_FE] = { @@ -479,7 +479,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, [DAI_LINK_DL10_FE] = { @@ -490,7 +490,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback10), }, [DAI_LINK_DL11_FE] = { @@ -501,7 +501,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback11), }, [DAI_LINK_UL1_FE] = { @@ -512,7 +512,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, [DAI_LINK_UL2_FE] = { @@ -523,7 +523,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, [DAI_LINK_UL3_FE] = { @@ -534,7 +534,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, [DAI_LINK_UL4_FE] = { @@ -545,7 +545,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture4), }, [DAI_LINK_UL5_FE] = { @@ -556,7 +556,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, [DAI_LINK_UL6_FE] = { @@ -567,7 +567,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture6), }, [DAI_LINK_UL8_FE] = { @@ -578,7 +578,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture8), }, [DAI_LINK_UL9_FE] = { @@ -589,7 +589,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture9), }, [DAI_LINK_UL10_FE] = { @@ -600,15 +600,13 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture10), }, /* BE */ [DAI_LINK_ADDA_BE] = { .name = "ADDA_BE", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = mt8188_mt6359_init, SND_SOC_DAILINK_REG(adda), }, @@ -617,7 +615,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .ops = &mt8188_dptx_ops, .be_hw_params_fixup = mt8188_dptx_hw_params_fixup, .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(dptx), }, [DAI_LINK_ETDM1_IN_BE] = { @@ -626,7 +624,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(etdm1_in), }, @@ -636,7 +634,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(etdm2_in), }, [DAI_LINK_ETDM1_OUT_BE] = { @@ -645,7 +643,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm1_out), }, [DAI_LINK_ETDM2_OUT_BE] = { @@ -654,7 +652,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm2_out), }, [DAI_LINK_ETDM3_OUT_BE] = { @@ -663,7 +661,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm3_out), }, [DAI_LINK_PCM1_BE] = { @@ -672,8 +670,6 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(pcm1), }, }; diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 5e163e23a207..cedf838249aa 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -689,7 +689,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback1), }, { @@ -698,7 +698,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -707,7 +707,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback2), }, { @@ -716,7 +716,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8192_mt6359_rt5682_ops, SND_SOC_DAILINK_REG(playback3), }, @@ -726,7 +726,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -735,7 +735,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -744,7 +744,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -753,7 +753,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -762,7 +762,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -771,7 +771,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback9), }, { @@ -780,7 +780,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8192_mt6359_capture1_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -790,7 +790,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8192_mt6359_rt5682_ops, SND_SOC_DAILINK_REG(capture2), }, @@ -800,7 +800,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -809,7 +809,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture4), }, { @@ -818,7 +818,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -827,7 +827,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture6), }, { @@ -836,7 +836,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -845,7 +845,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture8), }, { @@ -854,7 +854,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono1), }, { @@ -863,7 +863,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono2), }, { @@ -872,7 +872,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono3), }, { @@ -881,15 +881,13 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, /* Back End DAI links */ { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = mt8192_mt6359_init, SND_SOC_DAILINK_REG(primary_codec), @@ -897,29 +895,27 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "Primary Codec CH34", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec_ch34), }, { .name = "AP_DMIC", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(ap_dmic), }, { .name = "AP_DMIC_CH34", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(ap_dmic_ch34), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s0), @@ -927,7 +923,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s1), @@ -935,7 +931,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -943,7 +939,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s3), @@ -951,7 +947,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s5), @@ -959,7 +955,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s6), @@ -967,7 +963,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S7", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s7), @@ -975,7 +971,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S8", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .init = mt8192_rt5682_init, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, @@ -985,7 +981,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S9", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s9), @@ -994,23 +990,19 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, @@ -1020,7 +1012,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, .ignore = 1, diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index ceca882ecff7..f349ba27b9d0 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -1025,7 +1025,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL2_FE), }, @@ -1037,7 +1037,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL3_FE), }, @@ -1049,7 +1049,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL6_FE), }, @@ -1061,7 +1061,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(DL7_FE), }, [DAI_LINK_DL8_FE] = { @@ -1072,7 +1072,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL8_FE), }, @@ -1084,7 +1084,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_hdmitx_dptx_playback_ops, SND_SOC_DAILINK_REG(DL10_FE), }, @@ -1096,7 +1096,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL11_FE), }, @@ -1108,7 +1108,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL1_FE), }, [DAI_LINK_UL2_FE] = { @@ -1119,7 +1119,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL2_FE), }, @@ -1131,7 +1131,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL3_FE), }, @@ -1143,7 +1143,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL4_FE), }, @@ -1155,7 +1155,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL5_FE), }, @@ -1167,7 +1167,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL6_FE), }, [DAI_LINK_UL8_FE] = { @@ -1178,7 +1178,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL8_FE), }, @@ -1190,7 +1190,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL9_FE), }, @@ -1202,7 +1202,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL10_FE), }, @@ -1210,13 +1210,13 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { [DAI_LINK_DL_SRC_BE] = { .name = "DL_SRC_BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(DL_SRC_BE), }, [DAI_LINK_DPTX_BE] = { .name = "DPTX_BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_dptx_ops, .be_hw_params_fixup = mt8195_dptx_hw_params_fixup, SND_SOC_DAILINK_REG(DPTX_BE), @@ -1227,7 +1227,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(ETDM1_IN_BE), }, [DAI_LINK_ETDM2_IN_BE] = { @@ -1236,7 +1236,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_capture = 1, + .capture_only = 1, .init = mt8195_rt5682_init, .ops = &mt8195_rt5682_etdm_ops, .be_hw_params_fixup = mt8195_etdm_hw_params_fixup, @@ -1248,7 +1248,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_rt5682_etdm_ops, .be_hw_params_fixup = mt8195_etdm_hw_params_fixup, SND_SOC_DAILINK_REG(ETDM1_OUT_BE), @@ -1259,7 +1259,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ETDM2_OUT_BE), }, [DAI_LINK_ETDM3_OUT_BE] = { @@ -1268,7 +1268,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ETDM3_OUT_BE), }, [DAI_LINK_PCM1_BE] = { @@ -1277,48 +1277,46 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(PCM1_BE), }, [DAI_LINK_UL_SRC1_BE] = { .name = "UL_SRC1_BE", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL_SRC1_BE), }, [DAI_LINK_UL_SRC2_BE] = { .name = "UL_SRC2_BE", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL_SRC2_BE), }, /* SOF BE */ [DAI_LINK_SOF_DL2_BE] = { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, [DAI_LINK_SOF_DL3_BE] = { .name = "AFE_SOF_DL3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_DL3), }, [DAI_LINK_SOF_UL4_BE] = { .name = "AFE_SOF_UL4", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_UL4), }, [DAI_LINK_SOF_UL5_BE] = { .name = "AFE_SOF_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_UL5), }, From patchwork Mon May 29 01:05:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66C5DC77B7E for ; Mon, 29 May 2023 01:08:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C3B39851; Mon, 29 May 2023 03:08:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C3B39851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322533; bh=N/B4Y38hjWN36QyDhxmBfVcYZer2SdQFwlHsfgd9Bco=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Fcph6lW6Iiy98pznhM09K42hKqcv9lVS+tlSxccKD/GOvL3MvixwFPkFxZDxokb3z TEgOdVGCzjhqnXTa5Rta9U/6JQfAgisnDdovjlVH1b0wxS3KXJ8JqVhO+mtOEAjSEa Y+ztLWXHS8mQCn2DoLG0PdF0boMkj2KeaXoKtKyo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D6306F8057A; Mon, 29 May 2023 03:06:00 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F3B0AF805E9; Mon, 29 May 2023 03:05:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5514AF805C8; Mon, 29 May 2023 03:05:54 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::726]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5FDFFF804FC for ; Mon, 29 May 2023 03:05:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FDFFF804FC Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=p7ts8amz ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmXYU52Zf4VoInLkot2c7TDbgcRERdlngbjbPx0ilOtOmQuxJDyIOxdTucpkFw/KTRRmdaqhqRwTjgjyYhdIEc7X/SM1LPqFmvrbnWbYsGZ8i0StaqPsjftuieKi1ZbajmcRpKAHgmGrW/h3IxGU22YZ/IFxFa9JBBk4qBYKTFthgRzfQsreRu2NiJsA9+cogQ8o5fQpm9PdQWjJqSdg/KamRsDI6aRCt7qqopYcU+V+yUqLVKo1tl0T61dh1OFdsAvDmQlunCdk2c5tepTBqp7p+APWfgRdCBQvjxeva/ioxeBo2jOwt6PBddBuB6/LFk0iEP+PhyveJdgSWyI8Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ee6ivP1wWvXZ4wj3pxJ8Yls6cXQZCmml9pEsGukaNPs=; b=HDGBn+llgZ/F1Suxf8zOfmjADDhMF0YDoESRp8V1HKRxtqCgvL5/uAfGPQW3phNH0NlHFd5adls1DOn+sm3fT7qG12sjOibpI2OpVEPrcmfuBFydM7pakQxY7r4dUaUycFxzsKGeKtxUg4158b7PXPqXkOB1u0uNi5+qsphUVE6taLIXF41bTidqfNCLYPK2zH7L3OrjFDiizbvUe2ug4l8r4wUvuoKJu2Pdcno0/z4ZtpQ5X49+k2Jn+4znp+A9mjA6Kajb0LXYcNMx9ZMrFX0EHTS8KnMgleO1MrbhQarqeBfkaFnDqaxpK0XwmdM8u3p9cn3t90hfwEbORKXJZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ee6ivP1wWvXZ4wj3pxJ8Yls6cXQZCmml9pEsGukaNPs=; b=p7ts8amzcmGNALq6xkomkaTUzPUQVTjgdTWM5B4tN5R4D1fP5o0d9rPZO3M44lx9mM6m27gWIXOqa28tOjUTK6RM2e6iBsHg9W+4675H6yrcxmMELBAUPU5vW7BZ9gJrRX5AyJRhYqEzbnHvHy5ZUyyNDgb7FNlKLJH+4kY6m9U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:05:37 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:05:37 +0000 Message-ID: <87y1l8kkv2.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 18/21] ASoC: soc-core.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:05:37 +0000 X-ClientProxiedBy: TYWPR01CA0015.jpnprd01.prod.outlook.com (2603:1096:400:a9::20) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: c9f4c4fe-9703-46d5-ad05-08db5fe0d06a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZauE6QFccjAtgPOIF5jvdLFLCqH7fm6pfcRvDZazWZwCiDdc/BWqXsZ9n/xR+JlzldqsVl6ii+74widNaIIBPWAUA7jBc47bsR8J8sApG35cSl/smE5xgkDq3SAXrqvUA/TpwBu5b1hlRaNNS5LVaRPN6a76jbiTLZHRoB9p/RC2LOQ65BtlnwwOLgn15o82raG+6Y9fav9j2l1ni3zglLZMchMlDISP70FqzK2aw5C4XIFOq2C0rFzI5rYlc+mEX+JohiVBsDpjovSAMeg2sj0AzyysZxsw0PgahKbqQX/psmPoaY5J7i8xtW2ruKaCQZj3YgQdejvqIX3QIcYZQ4jqoayHhY2xwWeef0gNHNcWCLEgo03ivSamfmF7sJVyhlWU+IzjR5BzZbXIsCyN5OqqRz5SJ2u4OGhhxe/gYBTACX+fkvo6GM+55GeIFz4av5Jf9/x3YKNBzuoLlwgrXw6/S2A2crHm4huw4qd7LfPdkF0TtN+tjNcipgxSWzYJP8Hhshrrn4OpbYZ7irxg5RMTHhxMXqdfg+rc346PV0Hdik36QGBNzbsU8B6wzrYcElFEgQDyYJGZhrkuMua7vMoF3FbhELlBs2eAysEBkhkoO2yPf14E6/l+mUyQYmOj X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?+FJEIfRE9a7fMrxv2RfoqeR?= =?iso-8859-2?q?wqS6ETFmq8HERyET/L3HUWeQ1OhoojB46uTKDEb357XOMkcrJCTest7uW6tO?= =?iso-8859-2?q?mdrmXyrVa20E30bWyiur1fSUQ0YxoJgeF+9zysAzFnWbEehHnLgg1epS/jWC?= =?iso-8859-2?q?i5ns1Uv7hc5FpqQlKIg04wQ+EzEjmhWPkDfaL8b1XiPJadXBLwtJVzPr5TUO?= =?iso-8859-2?q?BKfXBRjrw7qf7kftJpu+yQyZqdcm3IqbAhARRpUZkwvH/DQ/P4v0FSj95/Tv?= =?iso-8859-2?q?0JfQs0gda5vwc7FQnCqfAnDAxDEAbCUIj47QUAnsW62CqiPPrYUQTOoVDSxp?= =?iso-8859-2?q?p8qNT/iQfMPr6T3NiCD5PMTqt4ueOBCdCdo8qoM/iTa5FU9kjF4uxV3S+UHj?= =?iso-8859-2?q?VOn07Q4NQPzAu23UXIHiJRxaid5MVNU7r+rv7t6Tjdp+sm8nSGphIB1I3vtS?= =?iso-8859-2?q?HRYovAI9buhjFEmchVOYeKcMcHIm45csMKCuKz4CJRU57WX12JjGH32cFoGB?= =?iso-8859-2?q?KcK0sJ/PLVGnNjqVj5H06Ez1kGBSE+cHcAvGNM2+HsvbspXaPQ8gIshIe1mF?= =?iso-8859-2?q?2syVuAfcc/UlMstjHbJKMjBmqcQifYgh3D2E07LPVwItWK+xpq7Ye5KrQ/s8?= =?iso-8859-2?q?Y7xDnD8PJgSLgppIaOlvPbjY2Fm/jxV6Ds2nCoevYLjkMsKmt3iPBDddZSR+?= =?iso-8859-2?q?v37KeVZdSjFc9woOXJykUyMrmAaRfxCZqYZq3JpxGZfna12FhNYSvIEyFi+a?= =?iso-8859-2?q?BVuCpV3CaeVdMefOUTYdMr4y1fm8a1du1Fk9s28h6rD5EYO82rjkAmhcHOau?= =?iso-8859-2?q?BEU5RYwa8a7GznPZTTfLqfJF9GnM2JutI/Raju8iiYyB6HS59o/aCj/p/RZC?= =?iso-8859-2?q?IFGSe89zcmefgf4I2rUiYKA8QZgCKy9iYFPeE6B7mvAqKTX/rn9VRpAUNrb2?= =?iso-8859-2?q?RO3wq24/dP87l4UkMKwFj28F/bKf0X+011FKBVUHIDiZlsutxWuWM7+DBbUG?= =?iso-8859-2?q?Z1m2dECYsbwTGrdfmjhiKRMOSqCUq3ulTvUBKBRVOr4T4ehrsRtJN0ZnOLLq?= =?iso-8859-2?q?0xRDHcGMHXtXQFaE0tz8CB9zP59vMJzzY1+8F0pJI0cjtjHxlRcXqIANvysu?= =?iso-8859-2?q?PWxU8MmMmyDsnFynL3DyYoansS8KoMxKVh8Uni95QreocTXVPuuI6qSOk1w2?= =?iso-8859-2?q?8aB/BeuG+EIte+QUjdPJv1m7iZs6wXMI9kU8KAsE7Xk9N94B8Br3M5A1COm1?= =?iso-8859-2?q?O5A4AeDqpzJs9iNHIJ1EoPiG8F0vTmnjHKVjpcmWMIZDEM+5GOle+KORqPX8?= =?iso-8859-2?q?cKJL1gxraP2mQ5gI0rE3ddZZSGPQmUwsxeYdRFhduG5eQLaVxnZEzk1KvN2k?= =?iso-8859-2?q?k/DZvTikRh2nY33hkN/D6Dx5zsI/JqW2aHwWXoKm6eU5MLBvHX1GOFQzaBJF?= =?iso-8859-2?q?d6fzfzk01+0zstcouAEDIYlq0p3vpiEijLztkx7X+D5rsroMtw8XL7duWQiE?= =?iso-8859-2?q?/EBamurgSvFuzHdTaTkt1PkCVfhTG5VSg65y+d0tygzSrxs3Yc2xhaMINBqp?= =?iso-8859-2?q?9uC7CgcSX4eEGsLc3FDFImXS7fLxYrAoA6kM14Hi4kH1FBGITYofg0iM1/gk?= =?iso-8859-2?q?XZTBue090Sxz6eayiEYBC52NFrz0vrmUkSeSD0GlVh6kfgJ9B/d3Uob8H5cY?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9f4c4fe-9703-46d5-ad05-08db5fe0d06a X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:05:37.8106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kAVFvmY9d5XlVj/kIhoM6IPQdTBTIEaQC+iJCUSUXb/nDktu0UNrmm+FzfGdAUTssJp7V3D2V7JmwMFMPikuAXmdgfHpYTXW24H8lC5I37DmMkUCA+mqN4krrFtb6hNx X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: AI7FHTV4QCMDNA2SJWVTJJVOP3VPTE7D X-Message-ID-Hash: AI7FHTV4QCMDNA2SJWVTJJVOP3VPTE7D X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-core.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b48efc3a08d2..f57911e4e4d5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1781,25 +1781,7 @@ static void soc_check_tplg_fes(struct snd_soc_card *card) dai_link->platforms->name = component->name; /* convert non BE into BE */ - if (!dai_link->no_pcm) { - dai_link->no_pcm = 1; - - if (dai_link->dpcm_playback) - dev_warn(card->dev, - "invalid configuration, dailink %s has flags no_pcm=0 and dpcm_playback=1\n", - dai_link->name); - if (dai_link->dpcm_capture) - dev_warn(card->dev, - "invalid configuration, dailink %s has flags no_pcm=0 and dpcm_capture=1\n", - dai_link->name); - - /* convert normal link into DPCM one */ - if (!(dai_link->dpcm_playback || - dai_link->dpcm_capture)) { - dai_link->dpcm_playback = !dai_link->capture_only; - dai_link->dpcm_capture = !dai_link->playback_only; - } - } + dai_link->no_pcm = 1; /* * override any BE fixups From patchwork Mon May 29 01:05:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FE11C77B7E for ; Mon, 29 May 2023 01:09:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9512FA4C; Mon, 29 May 2023 03:08:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9512FA4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685322576; bh=6xB7EQYzattNpDgPEkkaA5Rf27rpG9qFS5ykOi1y318=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ECK6beRCrsIN/Cr8RnroT1GbYN8OC6NL3+kHdv8OWpVOybd3atHQR7p1RjL0tSqiW k3w0wZztS5YZXgiDHqtrs3P9MWG9Mr3SgzqYidRz9n5aYaKOtOozLQA9gywV7MaPJL Cjx/D1Vc/Pfs6uk0NSCaeFnDwBcYsA0zr3b9GO6g= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C8F3F80588; Mon, 29 May 2023 03:06:14 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AE73BF80510; Mon, 29 May 2023 03:06:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6F2E7F80612; Mon, 29 May 2023 03:06:08 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2071b.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::71b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8C4C7F8026A for ; Mon, 29 May 2023 03:05:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C4C7F8026A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=hYe8QOz0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AU/2lPZGD4NotSQIiELzUb3kVCOUBFw5kYzZndTKye8KLDpECo108k8JUPTY2SEmTkTJNiwB9/67a8turfwlosKmEJylGpwNOVD2uO4avHpZrYvNLmTNqTyFEfXkSxfnLN/zIzSncRmmMzPmz1N8Ykqx8tJiWgp9KmsQHFiYz3hwP52b6Sov284uYyewoIU5e/no8hn/I5gmAT9X6mbWU6l4j/wca7YkIwHzspz2f9m6lGjonW+4/o8W5TxEz83wXgIf6Zzmm88OoXqirsW08yUlFdXUm3qfNiE8nHL+gIsXd/oVkFmhh8m4oj+RjOmMYhghcHUzGl4ZA1DN0vQPNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UEa9MSp/pEhMaa4tNifWlD+mJo+k1OHTpkFn9Br8cNM=; b=iTGd6wRyvpEUuNGqVRiLmvwiUaMdw5VJC0s3yXtmhvBOK2DuoO2vXBE82CBe0WsQKpGmmqjFXmQwj3UjYQMkTLLEz5UmD8YRt7NpoLeuGpfCzu3Lnmw3RthA97OmNRD6rLh3BQFMf4/eZVUo9JyKuAz7emwnXe0K2HSmbin+gJtC69tYW6Qm0EXpGR89S1L+ApJdwdd3LxN+i1E/ecyK4tinaxLIiAf4p9hRJY7s7FwfkOQzLdRjrOWh3zHEpPnUgPh8lEOPTT0JSKDzt2Mmdxv3RsOH/TWvj5QeoAvOaG6oVoJP9bAfHW42BTXWgz6/V65ftwnZYe6X0+64BQBcag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UEa9MSp/pEhMaa4tNifWlD+mJo+k1OHTpkFn9Br8cNM=; b=hYe8QOz0MSCzrdrX6kplSE48b86FM5OLy2Nt2oli9QuMtoComkocFb7PWXqMb9PL5onn79XvyWssIiAoch/y8pe4OfYN9fO9F9S+uY9JWjCeviw2uoJBvnmHT4K5o8MZ5cNDk6ArEy1sUM87ojSFnZVwg2vBmvZ/NgDX6kfQm/0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYYPR01MB7952.jpnprd01.prod.outlook.com (2603:1096:400:fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 01:05:50 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%7]) with mapi id 15.20.6433.022; Mon, 29 May 2023 01:05:50 +0000 Message-ID: <87v8gckkup.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai , Vinod Koul Cc: alsa-devel@alsa-project.org In-Reply-To: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> References: <87o7m4lzl3.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 20/21] ASoC: soc-compress.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 29 May 2023 01:05:50 +0000 X-ClientProxiedBy: TY2PR01CA0009.jpnprd01.prod.outlook.com (2603:1096:404:a::21) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYYPR01MB7952:EE_ X-MS-Office365-Filtering-Correlation-Id: ab4e18ff-d2ae-404b-ffef-08db5fe0d80a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ty3aGlzgCJswppBBGnv0Eg8qFVvFFVGq8VxZ2KsjsBRYjcHH7sZXzX+rJ0f9Pe4x9ZrLJ3W0Psj8hTOQY669GinCZp8IhIcpVFmFFECOK+kZSa3JbHX9WyMoDCX1U2Ez6VWuTB3ri1wqqpQEx4MFSLc3XwOQChN50/mhPL+0EPg49SD6cFs+lCge0WB4+Rt73D8LmFjWeHrHHzbJctMUSTCDWHXEcj8+6Sdsh2q9v1tyFGozJvdiQkhdWJoepwYZb2N8dnk+3sWgYzy77NySyPjpeFxaNpH4ynBMhCW7bLB4VxMJv2BQ0yxEgbdcBJyusLyNS/UMdzMThv83x+RHA6WOTJtSXfsW2YfdpdysET0nqsCLE8iNm8bC5R+kA04pFZhH61xo97nhRyCCyaOUScWv8hdcEkiEPUNtwLVLS5YfjORFj3dBF7ktRdsc12p36FshIjh0irlSOzUhaR+xHAND5l9iFWDENW+1jnv9F6q38xHT/qJV91RM7qEevajH4TryTJg8R2P+OvWeSdzV4LhbgB28ACsukvWUVG58jjDF9mkvz1ws+a7ZzSQhaDS0ElXLujGGq/rm3uWracgvPvUUKLtUYw5DUgcgzLt0pxmkF9KVbtRCUDPMgqBHsbrm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199021)(2906002)(186003)(6506007)(6512007)(26005)(5660300002)(478600001)(8936002)(110136005)(8676002)(38350700002)(83380400001)(2616005)(38100700002)(52116002)(6486002)(41300700001)(86362001)(316002)(66946007)(36756003)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?9vY2sFDf/mbsAJOlAGUF1kc?= =?iso-8859-2?q?XUyjU9ZuBnimkjJdiBEnIkx773JVTQQElXUenNrlpdOP6bCDiq9Teny//SlM?= =?iso-8859-2?q?0C6/EcKf314VGfj+jSe7BNiJLCHWwz3HDxudIofxlakAiLSWLAdXDS3J+fmQ?= =?iso-8859-2?q?4VabQXtCNaA2GCTe0MMX/3095IjuepKIgkLibdhFnVSndeZImrBjdo2STBIm?= =?iso-8859-2?q?iQvSnAIe58XsfjQKCFqfi0u9Pw3ry1hP3R2bSoq0uLZoAmK7mhSPIR7h9Lmv?= =?iso-8859-2?q?SbY6E72iCttdzK6OVRRAKdJ60TzgLha7EEbDXs0A0VhbTeKCzc6Iu2OXT+64?= =?iso-8859-2?q?ksiG3juY0pEpsxoCFX/ucdOov4ppo5Q19MGOdalmPsz54fP7OSSkvc53h73R?= =?iso-8859-2?q?pP9boydCHv2/39/LVuDNfHUbYiJ+2QhrqfeSkbH0obKN6Cukb1TsilgZFUcZ?= =?iso-8859-2?q?XFPhvCQ4EZ01mU+rrYkWv8QUBMsgffD4z7RfPSvbBDPmXlEwS7wN5RFun45G?= =?iso-8859-2?q?NpsMJQt4Ke/t0MP+XrRjyedt73FJGDNFoG1/QnTuoT80QU/beTfkItthSaCA?= =?iso-8859-2?q?D1B+LiVs4/IiKLVNOFugJPKH6WT424YiFAwZYpu6unuHKzZdmb5gi2JeCOQK?= =?iso-8859-2?q?561VPmi2dAEej0TONrVKXwm8mmIKnpsY2/IHeOSTpEzUfUtcJKybn+ZJOpaR?= =?iso-8859-2?q?sNjh5RZ3O8AcUbgEq1EMcW7/0jM4rR1ZO0fncz/vdKG2riGgi4RpnxexB4wl?= =?iso-8859-2?q?LNHs30QweWVnGDTyrP1xlKwkvSlE4ena/qHu2kCcZBK+o0CjK8SRRx7WIKMq?= =?iso-8859-2?q?ua2Padmvo/1qK77lNNbo/nLwXxF57HHTUAXggYsbVG6giDuoQwenT5NyMxEp?= =?iso-8859-2?q?3YiMMC6wiM0xCecQmuAFPtqs/3NV1QrcgyPd0IV4PMV0e5Ad/c7LiBJU3KNy?= =?iso-8859-2?q?AtPlCHuR/fqbVmx+xcpD9UvP4FAvoKqVmdsQ4JFxp4bzeo+/96+0K0wDAvC5?= =?iso-8859-2?q?o+UVXDeepkOBEk7TvafG79/ckIJXT77maDs9SwlZc4kbJfyGBfB2uwPl6meo?= =?iso-8859-2?q?vcOwC3jSsS3cZBsFGM1v488Y9kaSMeFbXhOyD6nmNuok2+Diwbc8WeZEvZ5i?= =?iso-8859-2?q?ZQbi8Jqz8ovcRRQgCKOTaQEBgaHNPPjvDOXjOw6kbJAkb0WMUptjQbZxUOju?= =?iso-8859-2?q?lIECEksQx+ajSgaPY01h07BmFZZXQsAJmnnSwlhRls/bEr8cxiDTVqhecDa2?= =?iso-8859-2?q?gLisXR6i+WytS/kfD45b9O1PY0eOZmxE9OsOgtc0hWtmO4BmyFNGSWl/3Lq4?= =?iso-8859-2?q?kwdXh8r/dG3vEkINdToAl8hp67MC6y2ZcFPvN4MX5T1hUk+zojVebyJGQhAu?= =?iso-8859-2?q?0Muc6ROeV66pjSTIqeT9R4bIeNUfXOEl6OuLv2A2Hm7wc4pi6qRCwLiDyGzy?= =?iso-8859-2?q?tR4ehu4s1RFsG5nW63AFqInvSpLvWYh9gg/ZFBCTodhBePr0mZNv/+sWlaFL?= =?iso-8859-2?q?JGTP8DeM8ctHYy5ot616CE1c52Idv95+CQg/CJMdZhg1ZmN/tqXSgoqCDZsX?= =?iso-8859-2?q?rnHASktFukHx8Bn6cfHc7lvMj+JImiLBY0llTAGX4jGZgsE0V06CETrqADD+?= =?iso-8859-2?q?zsz1O2Gl7h7PYNf8xDx6IWbc1YLAxg2r0tRQqOyuRFhzI0ulbGUn0+HBALyM?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab4e18ff-d2ae-404b-ffef-08db5fe0d80a X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 01:05:50.5796 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fqRIdnsqucfrCIkg2JlTaHDlFt6Ns9AW3LDaPL0mdetZGqwPwsLopKMtXfyW9BxQVyyRR9RLG4WaKBMMJ6MycYMN8M3X/VOGDk8W0rDEBVca3biLn9roiRsogBSl+TWb X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYPR01MB7952 Message-ID-Hash: H6FBD6HI6HDBYCFPKWV5JLXKCQRLON43 X-Message-ID-Hash: H6FBD6HI6HDBYCFPKWV5JLXKCQRLON43 X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-compress.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index d8715db5e415..cf3cab7a648f 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -602,12 +602,15 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) return -ENOMEM; if (rtd->dai_link->dynamic) { + int playback = !rtd->dai_link->capture_only; + int capture = !rtd->dai_link->playback_only; + snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, - rtd->dai_link->dpcm_playback, - rtd->dai_link->dpcm_capture, &be_pcm); + playback, capture, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, "Compress ASoC: can't create compressed for %s: %d\n", @@ -620,9 +623,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->pcm = be_pcm; rtd->fe_compr = 1; - if (rtd->dai_link->dpcm_playback) + if (playback) be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; - if (rtd->dai_link->dpcm_capture) + if (capture) be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else {