From mboxrd@z Thu Jan 1 00:00:00 1970 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 66E88CDB474 for ; Tue, 17 Oct 2023 23:28:03 +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 665C0E0D; Wed, 18 Oct 2023 01:27:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 665C0E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697585281; bh=+nR7voVu9E6cM5UVFVpm5Nh+7Uh8hmXLmgaIcz+rKVA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DFxtkMw6RcXwfiErho4yueHE/lncazKhFLSIKZag4bPxKmMj8Fuh62m67z+ZvihgU J+cC+xF8+Lnw6Mg5v4Q7BsYq+djUYl0fsBaQHMuW3Qq2LqfAqLFEwhHmooTrHfoAuM 6ivkLNXJGYWgwqNdw2QbzPFpwqf2l/Nm9dc8SDJ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9CEB1F80611; Wed, 18 Oct 2023 01:23:57 +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 47C2FF8060B; Wed, 18 Oct 2023 01:23:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D2B0F805BF; Wed, 18 Oct 2023 01:23:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) (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 4D292F80571 for ; Wed, 18 Oct 2023 01:23:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4D292F80571 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QK2QUIAF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697585015; x=1729121015; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=+nR7voVu9E6cM5UVFVpm5Nh+7Uh8hmXLmgaIcz+rKVA=; b=QK2QUIAFk3tPZHY8voARSb3Dh5sHe/WP2tJvDKqB29tZB6bwRqT7OAOg s7eArPYBxxe4ZltUtMZ2oF8sZd4dif/OtNPSuMBcQXWdgkF99fSpGt/LP FAQP+/Cqq8/ICDZ5UoZpfczyuKoLFygItaKhC4ERZpie94ANmcBQkT11z uFS/s4/sQsWwmrqWz3RrcH0/3buep+IFiMMqVe03KN4xJwp24DMhgeFjh LmmfZXdcLbPP/mssVmuneYgORq8w1Y5QGOOubYbd8zykvbw87b8sYXLvn M8M0h/ANGn6Q5tK3ESs3Nxxdh2CU5apLMAzocZu2IacESf0gE1uQ+ta2I Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="384778258" X-IronPort-AV: E=Sophos;i="6.03,233,1694761200"; d="scan'208";a="384778258" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 16:23:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="826637534" X-IronPort-AV: E=Sophos;i="6.03,233,1694761200"; d="scan'208";a="826637534" Received: from asprado-mobl2.amr.corp.intel.com (HELO [10.212.55.179]) ([10.212.55.179]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 16:23:32 -0700 Message-ID: <5667241d-6976-4b44-8edd-79ee426415eb@linux.intel.com> Date: Tue, 17 Oct 2023 18:16:18 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/4] ASoC: makes CPU/Codec channel connection map more generic Content-Language: en-US To: Kuninori Morimoto Cc: Mark Brown , Bard Liao , bard.liao@intel.com, Conor Dooley , Krzysztof Kozlowski , Rob Herring , Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org References: <87zg0jwdnz.wl-kuninori.morimoto.gx@renesas.com> <87y1g3wdng.wl-kuninori.morimoto.gx@renesas.com> <874jiokg1r.wl-kuninori.morimoto.gx@renesas.com> From: Pierre-Louis Bossart In-Reply-To: <874jiokg1r.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID-Hash: I4TLZJYNFNPZHAEATKA22CUANNWP7RAE X-Message-ID-Hash: I4TLZJYNFNPZHAEATKA22CUANNWP7RAE X-MailFrom: pierre-louis.bossart@linux.intel.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: On 10/17/23 18:03, Kuninori Morimoto wrote: > > Hi Pierre-Louis > > Thank you for your test. > >>> /* >>> * construct cpu channel mask by combining ch_mask of each >>> * codec which maps to the cpu. >>> + * see >>> + * soc.h :: [dai_link->ch_maps Image sample] >>> */ >>> - for_each_rtd_codec_dais(rtd, j, codec_dai) { >>> - if (rtd->dai_link->codec_ch_maps[j].connected_cpu_id == i) >>> - ch_mask |= rtd->dai_link->codec_ch_maps[j].ch_mask; >>> + if (rtd->dai_link->num_cpus >= rtd->dai_link->num_codecs) { >>> + /* .ch_map is from CPU */ >>> + ch_mask = rtd->dai_link->ch_maps[i].ch_mask; >> >> ... and for a FE dailink there's no ch_maps so this results in a kernel >> oops. > > Hmm... this is strange... > > New snd_soc_compensate_connection_map() will add default ch_maps for all > dai_link... > > Oh, is it using topology or something which doesn't call > snd_soc_bind_card() ? If so could you please try to call > snd_soc_compensate_connection_map() ? > (I guess it is using soc_tplg_fe_link_create() ?) > > If it could solve your issue, v5 will handle it. Sorry, not following what the suggestion is. Yes all our solutions are based on the topology, and I don't really understand the benefit of a ch_map for an FE? the codec_dai is a dummy one...