Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp23650pxb; Wed, 30 Mar 2022 21:49:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjAyO/4oFMZpPXiLg5NTIRHR1qD5aQcEEeHaKQ0C+b+H01DMBAqoGNp2FvImKb0Yp7eQ4r X-Received: by 2002:a63:6f85:0:b0:398:3e74:bdd8 with SMTP id k127-20020a636f85000000b003983e74bdd8mr9286414pgc.423.1648702173808; Wed, 30 Mar 2022 21:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648702173; cv=none; d=google.com; s=arc-20160816; b=fhhjp+M7Sp0AUko2VBw8zCRYMnY2+ME8muIRoWCHf0S8SZzegzw6vY+zPuxXo+0GBB 9zmwGkww3dpj/Velgtzi80ZI55y4dUJ2wdDGnTaiVS2PPIYE4h/qFdNTRe+rj+SwVhZd TgyhHkGcoMIRO5ByJ3bRf+3q5r78MvfCm4DH90TA6hagAOTe2XzvmBN1QrMD6fjvqILj 5fx0Prwrw/ZugyMtNZERagx0TdtxUIl1WCLiJaiAB5wC25QYVgMeiMLkZJlbl5YyHy/b hOMYCExkNYNe7OAzjmXwCkgEa5/o5sOfhV0npMVoLDLCAbic7JTeckw48ZjEjIxAsWi0 x9FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :from; bh=SeiIUiZeJW/WU1eEvgOIqMuWCeT5CiLubwaCNwTIB44=; b=rg8bLzEMQp4MRGNiSw0+EXgWq10WPWBM3bjwtW+wUi5ncFyAqq1roTNHDoe3jeJ09w kHGz5+j3EN4nSTTPm1eicEKsEFP47Qw0H2cEieg9QILOWV6r5tXGEFJDFemOmK38rLSd wy7HuUlS6EN8s/kIc97XJ7EP0TCTjXqT6lg+gEGMdIjMegyWcVgVmg0ND/svrxbNmvW0 LoFk+FnBmM/AfmSlP2QxrlyECpj9FgCz9XZnSCuJFF4Nhs4GMh/wu85/a+3Zemg1bYx3 nbUzRU8Ekb2Bu13WAUt8bwxnoxsS80DnxtEZbWII8XnC+0Knn0Ec7J1IdsmjX7RPbU+w tiSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b="aN/8a0qf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g1-20020a17090a3c8100b001c9b9aa700fsi2039216pjc.94.2022.03.30.21.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:49:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b="aN/8a0qf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A80AE1FDFD8; Wed, 30 Mar 2022 20:29:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352021AbiCaAHe (ORCPT + 99 others); Wed, 30 Mar 2022 20:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiCaAHV (ORCPT ); Wed, 30 Mar 2022 20:07:21 -0400 Received: from hutie.ust.cz (hutie.ust.cz [185.8.165.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A0C2BB18; Wed, 30 Mar 2022 17:05:33 -0700 (PDT) From: =?UTF-8?q?Martin=20Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1648685132; bh=SeiIUiZeJW/WU1eEvgOIqMuWCeT5CiLubwaCNwTIB44=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aN/8a0qfTlacb8dkUsL9qNzNhslN5RAhSevBw6Ynn92QaDWLBR/+XW0cT6sDqo6Mk E2/xOWMdeUhPjHnUAIK+KYx93csU11L+jqfr5v7cswdYDU5sktP9sBxD8hG1hNDJkl I7PW6+g6HIA4W7v9ejkAvnTSXoyvnLB22q6pz2To= To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai Cc: =?UTF-8?q?Martin=20Povi=C5=A1er?= , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis , Hector Martin , Sven Peter Subject: [RFC PATCH 3/5] HACK: ASoC: Tolerate N-cpus-to-M-codecs links Date: Thu, 31 Mar 2022 02:04:47 +0200 Message-Id: <20220331000449.41062-4-povik+lin@cutebit.org> In-Reply-To: <20220331000449.41062-1-povik+lin@cutebit.org> References: <20220331000449.41062-1-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tolerate N-to-M DAI links while using the first CPU DAI to decide playback/capture abilities. Signed-off-by: Martin PoviĊĦer --- sound/soc/soc-pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 9a954680d492..770cf367a147 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2781,9 +2781,12 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } else if (rtd->num_cpus == rtd->num_codecs) { cpu_dai = asoc_rtd_to_cpu(rtd, i); } else { +#if 0 dev_err(rtd->card->dev, "N cpus to M codecs link is not supported yet\n"); return -EINVAL; +#endif + cpu_dai = asoc_rtd_to_cpu(rtd, 0); } if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && -- 2.33.0