LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sameer Pujar <spujar@nvidia.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	<broonie@kernel.org>, <lgirdwood@gmail.com>, <robh+dt@kernel.org>,
	<thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
	<catalin.marinas@arm.com>, <will@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>, <kuninori.morimoto.gx@renesas.com>
Cc: <devicetree@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<linux-kernel@vger.kernel.org>, <sharadg@nvidia.com>,
	<linux-tegra@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 01/13] ASoC: soc-pcm: Don't reconnect an already active BE
Date: Mon, 4 Oct 2021 10:08:01 +0530	[thread overview]
Message-ID: <ce796f36-11df-7f9c-55aa-9c0833f28b93@nvidia.com> (raw)
In-Reply-To: <40f098c8-b9e3-8da6-849a-eb9a39fefdb0@linux.intel.com>



On 10/1/2021 12:30 AM, Pierre-Louis Bossart wrote:
>> 1. The original issue at my end was not just a configuration redundancy.
>> I realize now that with more stream addition following error print is seen.
>>     "ASoC: too many users playback at open 4"
>>
>>     This is because the max DPCM users is capped at 8. Increasing this
>> may help (need to see what number is better), but does not address the
>> redundancy problem.
> Going back to this DPCM_MAX_BE_USERS definition, it seems rather
> arbitrary and not so useful indeed.

>          /* first time the dpcm is open ? */
>          if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) {
>                  dev_err(be->dev, "ASoC: too many users %s at open %d\n",
>                          stream ? "capture" : "playback",
>                          be->dpcm[stream].state);
>                  continue;
>          }
>
> The comment is no longer aligned with the code, wondering if this is a
> feature or a bug.

Looks like the comment is misplaced and the intention might have been to 
place it like below?

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e30cb5a..5cb5019 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1508,7 +1508,6 @@ int dpcm_be_dai_startup(struct snd_soc_pcm_runtime 
*fe, int stream)
                 if (!snd_soc_dpcm_be_can_update(fe, be, stream))
                         continue;

-               /* first time the dpcm is open ? */
                 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) {
                         dev_err(be->dev, "ASoC: too many users %s at 
open %d\n",
                                 stream ? "capture" : "playback",
@@ -1516,6 +1515,7 @@ int dpcm_be_dai_startup(struct snd_soc_pcm_runtime 
*fe, int stream)
                         continue;
                 }

+               /* first time the dpcm is open ? */
                 if (be->dpcm[stream].users++ != 0)
                         continue;

>   There's no reason to arbitrarily restrict the number
> of users of a BE, or the check would need to use platform-specific
> information such as the number of inputs/outputs supported by a mixer/demux.
>
> Maybe Morimoto-san can comment since this was added in:
>
> 1db19c151819 ('ASoC: soc-pcm: fixup dpcm_be_dai_startup() user count')
>
> We're not done with soc-pcm.c cleanups :-)


  reply	other threads:[~2021-10-04  4:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  9:33 [PATCH 00/13] Extend AHUB audio support for Tegra210 and later Sameer Pujar
2021-08-27  9:33 ` [PATCH 01/13] ASoC: soc-pcm: Don't reconnect an already active BE Sameer Pujar
2021-09-28 21:25   ` Pierre-Louis Bossart
2021-09-29  7:43     ` Sameer Pujar
     [not found]       ` <2f96f1aa-74f2-8ea8-3f43-e4da97400fde@linux.intel.com>
2021-09-29 14:52         ` Pierre-Louis Bossart
2021-09-30  7:57           ` Sameer Pujar
2021-09-30 14:34             ` Pierre-Louis Bossart
2021-09-30 15:35               ` Sameer Pujar
2021-09-30 16:13                 ` Pierre-Louis Bossart
2021-09-30 19:00       ` Pierre-Louis Bossart
2021-10-04  4:38         ` Sameer Pujar [this message]
2021-08-27  9:33 ` [PATCH 02/13] ASoC: simple-card-utils: Increase maximum DAI links limit to 512 Sameer Pujar
2021-08-27  9:33 ` [PATCH 03/13] ASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link Sameer Pujar
2021-08-27  9:33 ` [PATCH 04/13] ASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules Sameer Pujar
2021-08-31 20:21   ` Rob Herring
2021-09-01  7:09     ` Sameer Pujar
2021-08-27  9:33 ` [PATCH 05/13] ASoC: tegra: Add routes for few " Sameer Pujar
2021-08-27  9:33 ` [PATCH 06/13] ASoC: tegra: Add Tegra210 based MVC driver Sameer Pujar
2021-09-03 18:13   ` Mark Brown
     [not found]     ` <7b248062-9a62-524c-4c96-295685e211b1@nvidia.com>
     [not found]       ` <86fc49a3-4cac-78c7-2c0c-eaee8e49d387@nvidia.com>
2021-09-09 14:20         ` Mark Brown
     [not found]     ` <29c785d0-cc70-7cce-c205-77059c11e0e1@nvidia.com>
2021-09-13 14:23       ` Mark Brown
2021-08-27  9:33 ` [PATCH 07/13] ASoC: tegra: Add Tegra210 based SFC driver Sameer Pujar
2021-08-27  9:33 ` [PATCH 08/13] ASoC: tegra: Add Tegra210 based AMX driver Sameer Pujar
2021-08-27  9:33 ` [PATCH 09/13] ASoC: tegra: Add Tegra210 based ADX driver Sameer Pujar
2021-08-27  9:33 ` [PATCH 10/13] ASoC: tegra: Add Tegra210 based Mixer driver Sameer Pujar
2021-08-27  9:33 ` [PATCH 11/13] arm64: defconfig: Enable few Tegra210 based AHUB drivers Sameer Pujar
2021-08-27  9:33 ` [PATCH 12/13] arm64: tegra: Add few AHUB devices for Tegra210 and later Sameer Pujar
2021-08-27  9:33 ` [PATCH 13/13] arm64: tegra: Extend APE audio support on Jetson platforms Sameer Pujar
2021-09-08  4:56 ` [PATCH 00/13] Extend AHUB audio support for Tegra210 and later Sameer Pujar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce796f36-11df-7f9c-55aa-9c0833f28b93@nvidia.com \
    --to=spujar@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=sharadg@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    --cc=will@kernel.org \
    --subject='Re: [PATCH 01/13] ASoC: soc-pcm: Don'\''t reconnect an already active BE' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).