Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp375560pxb; Mon, 25 Apr 2022 11:43:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHZtrV1IyJdbaeBoQbtfVY06qgPJT8ibVjLi5nmQPTEQ21AoBFuzpKt2kDlNPggi3z7pAQ X-Received: by 2002:a17:907:a429:b0:6f3:88cf:2e94 with SMTP id sg41-20020a170907a42900b006f388cf2e94mr8617257ejc.550.1650912230125; Mon, 25 Apr 2022 11:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650912230; cv=none; d=google.com; s=arc-20160816; b=waelLiynbFc9UELi3Rl/tixnwjACoshhEjktP4dx1n6BsAG2G2sL5dmLYftU5WewRL 4WkHwvGtobrj77zLjzdmXQlwFRffh0dm+Wv+WrRTHMlEKtGx5hWDlyLWlMQnY94qfK2A WY31rIkGAQfcGnbqJVYVS2vHr9jd3WZfa2VtvDGSiNi1Wl9CNL/6Ysqw6PY6m5K5J+8G TdEcCUf0ZWVZnRWiQwMBn2tjuZKtmh8tWvgnJMCmYjOtHSsqAKD3a0cJbfgoeLYJ30og zW9Y4ujb+lI6dX+UIe8kJ9kA20UuqYakTWeTuIBTEFhl4GJ8r5TAw9kft14/KUqjWx6I 4+KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=/hL2s+lh63ESjiRaWWsxzMR/f4Yu9cM9nehZyfa7E0g=; b=0UdHqJYO9r88FFLSa+t9oWaYE6MCBaCQWPybuuLigN0GtWN2jLmVyzCHN//r7/MQtJ CWZuyOU8ALqtFiBTxsQ8bGU3XNwfX5t2fFbcZUYDO33r2StVShTLuhMKf3SwAiktqzdq QvQRTt49uxh+2spxDH7agSixHnBqe5aWNxepNXTUQAb4VEfPDOu1pt1hdWh2NB1Q1DS5 T/9sEz4EGN35OYbsRiqEibTFLfvUQQg7xAOZrFfeQ1GSNYQsD2AmBgScvH1ow+OvRS5E k0Oe8lwowzVYGt/2k1egBMyoLMWB3kur2mYUMX8XJDlaJrp6HBLDzDpiqoOnVgmOPMGi y74Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=nFr8CC12; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk17-20020a170906c9d100b006e8cb4353d9si13740896ejb.290.2022.04.25.11.43.25; Mon, 25 Apr 2022 11:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=nFr8CC12; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241800AbiDYNOt (ORCPT + 99 others); Mon, 25 Apr 2022 09:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241937AbiDYNOW (ORCPT ); Mon, 25 Apr 2022 09:14:22 -0400 Received: from hutie.ust.cz (hutie.ust.cz [185.8.165.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A9A222A0; Mon, 25 Apr 2022 06:11:17 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1650892275; bh=/hL2s+lh63ESjiRaWWsxzMR/f4Yu9cM9nehZyfa7E0g=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=nFr8CC12dlvYY0ye7Cw0D5/WM1QFzo3/SRqKTUxMe0my0I7ZZ4f4xN63aMSAhhq2V OgPLAz4XUoeMd0sgXUnHtJxv0EqXekSKCJIIp1n11uLXZByvyi8+OxY5VoUmh4xT5z V4a8aqsvCFfG35Gz9e1wkkDP63AmJJdfBJEfXrw0= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [RFC PATCH 3/5] HACK: ASoC: Tolerate N-cpus-to-M-codecs links From: =?utf-8?Q?Martin_Povi=C5=A1er?= In-Reply-To: Date: Mon, 25 Apr 2022 15:11:14 +0200 Cc: =?utf-8?Q?Martin_Povi=C5=A1er?= , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis , Hector Martin , Sven Peter Content-Transfer-Encoding: quoted-printable Message-Id: <4CF6B0A7-F218-4798-BB21-18D563309D5C@cutebit.org> References: <20220331000449.41062-1-povik+lin@cutebit.org> <20220331000449.41062-4-povik+lin@cutebit.org> <904EB8A1-5561-4555-8030-B85703E24F2E@cutebit.org> <9F8BCBA8-5EE3-4F87-9518-91CB7AB4E077@cutebit.org> To: Mark Brown X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 25. 4. 2022, at 14:55, Mark Brown wrote: >=20 > On Mon, Apr 25, 2022 at 02:34:33PM +0200, Martin Povi=C5=A1er wrote: >>> On 25. 4. 2022, at 14:25, Mark Brown wrote: >=20 >>> If you register two separate DAIs (well, links) with the API without >>> doing anything else the API will just expose them to userspace as = two >>> separate things with no indication that they're related. >=20 >> Sure, but what I am addressing here is a single DAI link with = multiple >> CPU DAIs, invoked in DT like this: >=20 >> dai-link@0 { >> link-name =3D "Speakers"; >> mclk-fs =3D <256>; >>=20 >> cpu { >> sound-dai =3D <&mca 0>, <&mca 1>; >> }; >> codec { >> sound-dai =3D <&speaker_left_woof1>, >> <&speaker_right_woof1>, >> <&speaker_left_tweet>, >> <&speaker_right_tweet>, >> <&speaker_left_woof2>, >> <&speaker_right_woof2>; >> }; >> }; >=20 > You could parse this into two separate links for the benefit of the > framewokr if you're using a custom machine driver (which I suspect you > probably have to). Yeah, this is parsed by the =E2=80=98macaudio=E2=80=99 machine driver = from the series. >>>> What about this interim solution: In case of N-to-M links we put in >>>> the most restrictive condition for checking capture/playback stream >>>> validity: we check all of the CPU DAIs. Whatever ends up being the >>>> proper solution later can only be less restrictive than this. >=20 >>> That's not the issue here? >=20 >> Well to me it looks like it is. Because if I invoke the DAI link like >> I quoted above, and the platform driver supports it, the = playback/capture >> stream validity check is the only place it breaks down. = Notwithstanding >> this may be the wrong API as you wrote. >=20 > I am surprised that doesn't otherwise explode TBH - at the very least > I'd expect it to show two PCMs to userspace which if I'm understanding > your description correctly isn't really what's going on. I fill in a single snd_soc_dai_link, it exposes a single PCM and works like a charm. That is as long as I patch the playback/capture check in question. I read that to be the clear intention of ASoC code: a DAI link becomes one snd_soc_pcm_runtime.