From patchwork Tue May 7 04:33:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13656217 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2087.outbound.protection.outlook.com [40.107.113.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D89579CF for ; Tue, 7 May 2024 04:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715056412; cv=fail; b=S4cgUw3P53EKct3qNXiTEU5qHw0xzux7+qxZcOJ4pO7nijzBh8FT5tN/oGfoAKpfl9M6AXCj8G8PD6sQMO7luJpKGj6UIoLwKg4AjcJGDGGAkvXlwaw/g5ucsOcdPDPdO8SnI0AEjv4hH0cEd2cb4Cq4LMcIIydIMNgf6Za7oTk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715056412; c=relaxed/simple; bh=UlHQyGTEM25XSr3p5+bW3CoQw0OnSzjELwKTZ0swvc4=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=eV6vPIPFJ5eaRTP2JkBNMhncEeviTBmGXQ8bBXzg+99gbAoR3sA2sO8vNLfkrTRyaGe0y8r2kmgj0biGScr4Xaf3YMTIJqCPvtarsG3i8Pf2Gj4rnN5rKb5SUkh7euvbWDOIimnPfOok39OOMHY2/suOe6I26xA9DC0nleuQAWc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=KVWQ5hSO; arc=fail smtp.client-ip=40.107.113.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="KVWQ5hSO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n5aitSraDX0vuE743TxNqfsXlo8Q4RCO5HzMNo0k49UGVYm6hqkw8c7Asvvf13uNCu1ptnJNPqmeLcKYIGpW7Voye1khwy1JXGa4kILyFHCL71pgXAcSdXfqIql4aVYMhxX53PselmFpNKJkCCZAppYfeTvh225MZuH30AZLYNqxU/tx9Ord9+yHZSHd+nt3QZCO0fDG2uVuP2tM7CeYn0tbhBb+6vLulRD7xFMwIWbXAeej5VAgNHLcQe7FXHPXaFteQo/dzks5OmFmlsBOjs4QmZSxJ61XvWlH9nMWmRQ8uQtcB+WNuLS06n2FBpvrxnCIu5eV4CpIWJastUV1aQ== 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=Wor7/TYJgKI18gNii8iNrsHIxBN6Y8ysM4fkY0I5Z34=; b=Gg4hRucnB5OzQHB+bt04ZDQEzn+T08yD1mFCsrwf8oFx/tmELRHjA1V51Uvj+qAKqFUqtqlB0PhBvV7XEHOTKbv82DNzM6uOcJcDgb4CoWzj1Rvwd3fOafAnTjL1lWlb80uBvVPJFpAwte/He/SS2onq+kWBWHLFThIOcW/1HZirLBP5YSTEVp6PQJclHEW8BtUQCFJcrnKFnUM5mrtKhe8YwMu0DoSA45J/deiSwFSms0NloeU2Y2HQyS5Pq5Uod9UbrEl7rYl0boeY5jPbuTJCud36wYJZu+KAjnYnKKkxUsurDPdrb1wRBcCML7X6guexFAecHoQ8lkgLGW1DZA== 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=Wor7/TYJgKI18gNii8iNrsHIxBN6Y8ysM4fkY0I5Z34=; b=KVWQ5hSOdUVVPDiFC9qS067r4U8JPD1jDpftDeIDW8jNCcKiJ3NGf0StIl6L3GAFM4OgtQykFpUZZpU2Dlc+s7HBHL616STpRk34PAyTpV8ZRJ4gM5qGyP6i+qfNa8cTCfhKb6s8bYbQEB5o2fVVJvSbjm4zgqkb480DFWAbgH8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYBPR01MB5421.jpnprd01.prod.outlook.com (2603:1096:404:802e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Tue, 7 May 2024 04:33:22 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::2f40:537b:2694:7b76]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::2f40:537b:2694:7b76%7]) with mapi id 15.20.7544.041; Tue, 7 May 2024 04:33:22 +0000 Message-ID: <87v83qdywf.wl-kuninori.morimoto.gx@renesas.com> To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-sound@vger.kernel.org In-Reply-To: <87wmo6dyxg.wl-kuninori.morimoto.gx@renesas.com> References: <87wmo6dyxg.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/3] ASoC: soc-pcm: Indicate warning if dpcm_playback/capture were used for availability limition User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 7 May 2024 04:33:20 +0000 X-ClientProxiedBy: TYCP286CA0082.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b3::6) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYBPR01MB5421:EE_ X-MS-Office365-Filtering-Correlation-Id: 2196bebc-2ddb-404a-3ca5-08dc6e4ed410 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015|52116005|38350700005|921011; X-Microsoft-Antispam-Message-Info: 0obCyuvmGrKez9uKZhKVM0pbhVzXzbALSQwHvuAtTz0l5CFOkssMPKTNL+x15Q6406hU1b0BxXmx3FPE/rtAiepm8EO1oxUqp+zC2Jn4zHy8aOWIPq5P6puyiCcLZAMbLYy6PeWndGcixjChpKtHKe2esQt5ZhfnaXyItdiuPHp53Dudp97hvfD8iOuPTFRhpdBQQ9SRzhPonWvnhS7ipwxPG3AH/Ene95yE2p8kXUyzVv3/7JAGY52Ga77illfrfyqBmaH62AplIhTzXysz0nPXVE8yNkNxvnRlyYvNdwFuWiw0Aj4lGWLi6DAbhn7NvJqin2gelUdCv/ge4jMCStTRS588a+sEESJy4x2Bb496X95HcD+ZV7baY7kzS2fxTsB7VQ+4fOILFZot5boHtl5tbN2Upg3ivK9RqOeH2ZbrJYos1WyeZDmDEzbaC760a0PL0PHJFieKgs1sSqdehPDtIo3NgvjTOfchWxOCCafcgHKb3cSFUyMcOSfQaqXpDFenyO+VaTH90uF5PVNZ8DElvQTu6r6W/X1StAccDR+UB57SHQlZMdz2Jmjyob0rCYU6Gm/AoJ1DpH4lhPG3rND7YdK6TCrmtBjA4PK5KoNT9DzPGebA6G/oWudFJ0MuFKsZ3A0aGoUDgJDkjhO23k5pVm1FjcFM/qKM/96ei5ymo3oA221q77uSol7ecCkUm0ILTH2VdciKMUzYoKcBDpehuKRGIQwa9fHXiwKqHyQfCPW/Ma0E9djtMQxZvHeuDtJlbj5M6+vPc3dguLGxZYTA2RtPNgr0w/cN0peQQf3OdVPmsAAROCJ9ARcSua0GhM6Za20IK9oVwAU65VLm2+TlnxhscZ953TW5rra4mAG1u2KRT4te3Hpweaq6VD/exIvkSL0gUFWtmfVLyQC9Rt0jTY9y86M25OxYSJs7mooTc8/3ThEjchCbZMXD9cry2IVQ/xDGh1676u3ueA3OKrxuYtaigbsUBH4dpH5qQRiuOV4a3li5gHXSr/15h47SCfqQ3E83RXCtb6/m+ThPuFGTjpyB0Fu0jANE8BUWPpt8308muOVtI9XM6bxmF83pnJiXILtd6nZOhLvHjqtwpp6xd5EPnpVN2ki8lARrFNcGbopRxwdWrlRU6rrAxRRuGt8rOC3RBF084WrMKV8wnG3zFVWnUsnsh9FbYjbEwEZcf+y+i8JrohO93xm9JQKeBG3iLK8hOkQqSb6k9QVNUp2ltP1axQik0QgRpffZBRBaz7AZXIE66uWi1kHF8HHCbaOYJ3dTngG4KhaKqGSsPQ2l9ASS1ywDzI8ZCWdmjKM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015)(52116005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yrVxrtxSSf5VZJLpuVmXahSv9e7PCPZPi9sGKsRAX4Yt5UN8xI0uzP/oXvEd+lXrg5R8q4T5nPiKmI3rZbsMeB/izdm6LRWOVMoobj79zOUqMYWR0dMl21mgGfbZ6Azy5ZlwdJ2CfZHeisXM3+Rqqq2+kU8mF1mN+tVyLtOHYC8YBEyMZSoFPNfJT1DcQs+qhPTM+uF0DJPhw8dGHARNgXcj98lgcQ1TbGOYUCQYmPe+mc3pVLtjGk4VdDteX7gQ+LIbLRyQUn2erQtr/ObdqqOG3hHNUnO+PENmWgWv+MxvAYTqn5DriLWa2SzzSniru8S0LCbXGNPVNCqXoWNPubO/Qjq2zPPUf7kHJB5bqV5kWWU1CllSiLsEk32DT7st1ea0d3x1DJ/osFXngC8L7HHF2gvJja71aO3F4paRApEfRfJVBHh1RRL6zKfen8bpdq1gcNkrOtCHzaaaZOhF54FBgyDyZ/JhPLOdVB744eb8NPWRNjFMMfcu+oDXVLsxEJJOMswuurpTtxShtQcdA/vyG4vPWytjRpUM2LsbehrEWP9uqhLNcrwvA1nl4wY52JyvzPWi/3Ig6wh6oJzbF+IOCnrftHE9yGqTlQwCSR/G037Qth9gqv945/NCxz7s7m+cSi6jSo15bVXpm4qhfMXan5OG6PSM5BCyQK4AwyVupOvYAGLuHJz061GqfHmw17XhZKMQU9evYVnQ0mt/YCEOG4fInaga4tWinVXkczZk2R7EbozmWz/y5Cfy+JWFi2u0D9AeQDML9tzRMx2Qz509HYGX9Areg14F6BZiMmEOjx1fLfRLxOHTKrbWpPuQeENdhmCbwqg6QIAM4cEqSQUdmkU4c4tLc6TkIPttaWtMrm7AD/1a0bVsVn2p3FUDq4A1ztcdNtbHjK9XAreTz9PTRXtPIpLRxArHW7w/JngHA/lkh/zWEH/wR6K4EQv4qDviL4KmOER5MV6q/HU6S7GDrECYcPpZGO5b5acB58l9TDv/NoPUaUbD1hB0V7ZucfC9BXtocoBMNKK6llON7wdCeIts1QO8ppBrPv63e+YbiN/l0AKA5IQAWlR5IbePm5akFds4S5V70+7l8Y+9gnl5yFZ7MeKQpXxwkFT7c5LB40XQYKEsMFNIyzM056M6pUdSVm+rqJndq+PaBDG5UmRdtoXTyLhZNiK+UpdOHW4bJzr35vBi0UBC7UBaq2NAGMvy0DhAJk1ggt9GAvf7l/LXeSxePBrhA5U4Kw3k5x/RCrJc0QW+zZc+lRlc/aeIT+3lCru3jDGeLL+J8JbQvHy3wp3+l0+5CpalgB8fUWeQ3DovzK7vPrruuPxligfjE+u1S/dfROeJbKfxwFbAwh+OS151HHPdfeL9ly5da+pnQluhkltEToY95/+n/sCwJitirOWyeRdjbEX3oG+CFcfAUC3AeQL32iZ62V/fql/W/nXBQHvsS5JGi67yK38F9HhdzwE08J6gnrlzjWMGYW2a8//tJwJ0Jyy7WfVshquEjSmZrB/9409r65ayrvY1gi0yI6PVW43uOP0N7XH9Nuhs6zJPpLPGfxOyvZupHtvE2qffGukA09dTwq2DoON7+tpXolj4tZnQ3o3GjlGVQsHm6qGJUdqe7SO6JvEuo0A= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2196bebc-2ddb-404a-3ca5-08dc6e4ed410 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 04:33:22.5304 (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: og7fFRVmzzH201DyYsWNaJEjHj31PjGlkKva235VGunE3vkYE7eiZMFgAwnXlJi5wcX4bLdMEO6XafnEfHHED5bDqmYnCSMEA2a88xR6nznPVLTlLJv0QyjWTKGxClTr X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYBPR01MB5421 I have been wondering why DPCM needs special flag (= dpcm_playback/capture) to use it. Below is the history why it was added to ASoC. (A) In beginning, there was no dpcm_xxx flag on ASoC. It checks channels_min for DPCM, same as current non-DPCM. Let's name it as "validation check" here. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { if (cpu_dai->driver->playback.channels_min) playback = 1; if (cpu_dai->driver->capture.channels_min) capture = 1; (B) commit 1e9de42f4324 ("ASoC: dpcm: Explicitly set BE DAI link supported stream directions") force to use dpcm_xxx flag on DPCM. According to this commit log, this is because "Some BE dummy DAI doesn't set channels_min for playback/capture". But we don't know which DAI is it, and not know why it can't/don't have channels_min. Let's name it as "no_chan_DAI" here. According to the code and git-log, it is used as DCPM-BE and is CPU DAI. I think the correct solution was set channels_min on "no_chan_DAI" side, not update ASoC framework side. But everything is under smoke today. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { playback = rtd->dai_link->dpcm_playback; capture = rtd->dai_link->dpcm_capture; (C) commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported") checks channels_min (= validation check) again. Because DPCM availability was handled by dpcm_xxx flag at that time, but some Sound Card set it even though it wasn't available. Clearly there's a contradiction here. I think correct solution was update Sound Card side instead of ASoC framework. Sound Card side will be updated to handle this issue later (commit 25612477d20b ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")) if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { ... playback = rtd->dai_link->dpcm_playback && snd_soc_dai_stream_valid(cpu_dai, ...); capture = rtd->dai_link->dpcm_capture && snd_soc_dai_stream_valid(cpu_dai, ...); This (C) patch should have broken "no_chan_DAI" which doesn't have channels_min, but there was no such report during this 4 years. Possibilities case are as follows - No one is using "no_chan_DAI" - "no_chan_DAI" is no longer exist : was removed ? - "no_chan_DAI" is no longer exist : has channels_min ? Because of these history, this dpcm_xxx is unneeded flag today. But because we have been used it for 10 years since (B), it may have been used differently. For example some DAI available both playback/capture, but it set dpcm_playback flag only, in this case dpcm_xxx flag is used as availability limitation. We can use playback_only flag instead in this case, but it is very difficult to find such DAI today. Let's add grace time to remove dpcm_playback/capture flag. This patch don't use dpcm_xxx flag anymore, and indicates warning to use xxx_only flag if both playback/capture were available but using only one of dpcm_xxx flag, and not using xxx_only flag. Link: https://lore.kernel.org/r/87edaym2cg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 1 + sound/soc/soc-pcm.c | 65 ++++++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 33671437ee89..2a3da1d91377 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -815,6 +815,7 @@ struct snd_soc_dai_link { /* This DAI link can route to other DAI links at runtime (Frontend)*/ unsigned int dynamic:1; + /* REMOVE ME */ /* DPCM capture and Playback support */ unsigned int dpcm_capture:1; unsigned int dpcm_playback:1; diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 711b2f49ed88..c4d80cad5982 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2795,6 +2795,7 @@ 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; + struct snd_soc_dai_link_ch_map *ch_maps; int has_playback = 0; int has_capture = 0; int i; @@ -2805,43 +2806,51 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } if (dai_link->dynamic || dai_link->no_pcm) { - int stream; - if (dai_link->dpcm_playback) { - stream = SNDRV_PCM_STREAM_PLAYBACK; + for_each_rtd_ch_maps(rtd, i, ch_maps) { + cpu_dai = snd_soc_rtd_to_cpu(rtd, ch_maps->cpu); - 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 (snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK)) + has_playback = 1; + + if (snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE)) + has_capture = 1; } - if (dai_link->dpcm_capture) { - stream = SNDRV_PCM_STREAM_CAPTURE; - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_capture = 1; - break; - } + /* + * REMOVE ME + * + * dpcm_xxx flag will be removed soon, Indicates warning if dpcm_xxx flag was used + * as availability limition + */ + if (has_playback && has_capture) { + if ( dai_link->dpcm_playback && + !dai_link->dpcm_capture && + !dai_link->playback_only) { + dev_warn(rtd->card->dev, + "both playback/capture are available," + " but not using playback_only flag (%s)\n", + dai_link->stream_name); + dev_warn(rtd->card->dev, + "dpcm_playback/capture are no longer needed," + " please use playback/capture_only instead\n"); + has_capture = 0; } - if (!has_capture) { - dev_err(rtd->card->dev, - "No CPU DAIs support capture for stream %s\n", - dai_link->stream_name); - return -EINVAL; + if (!dai_link->dpcm_playback && + dai_link->dpcm_capture && + !dai_link->capture_only) { + dev_warn(rtd->card->dev, + "both playback/capture are available," + " but not using capture_only flag (%s)\n", + dai_link->stream_name); + dev_warn(rtd->card->dev, + "dpcm_playback/capture are no longer needed," + " please use playback/capture_only instead\n"); + has_playback = 0; } } } else { - struct snd_soc_dai_link_ch_map *ch_maps; struct snd_soc_dai *codec_dai; /* Adapt stream for codec2codec links */