Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Alex Natalsson <harmoniesworlds@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	linux-sound@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Subject: Re: Sound not working after commit bbf7d3b1c4f40eb02dd1dffb500ba00b0bff0303 on Amlogic A311D device
Date: Tue, 12 Jul 2022 11:00:30 +0300	[thread overview]
Message-ID: <48a9865b-9cf8-f99a-235f-565da9c0529d@linux.intel.com> (raw)
In-Reply-To: <b3e3d969-606f-dede-0319-7b8ed2a975f7@linux.intel.com>



On 11/07/2022 17:33, Pierre-Louis Bossart wrote:
> 
> 
> On 7/9/22 06:19, Alex Natalsson wrote:
>>>> +       if (!fe_substream) {
>>>> +               dev_err(fe->dev, "%s: fe_substream not initialized\n",
>>>> __func__);
>>>> +               return -EINVAL;
>>>> +       }
>>>> +       if (!be_substream) {
>>>> +               dev_err(be->dev, "%s: be_substream not initialized\n",
>>>> __func__);
>>>> +               return -EINVAL;
>>>> +       }
>>>> +
>>
>> Will be this in upstream or needing bugzilla reporting message?
> I created a patch based on this, see
> https://github.com/thesofproject/linux/pull/3735
> 
> I am not sure however if this is the 'right' fix. There was a comment
> from Peter Ujfalusi that a BE substream may be initialized later, but if
> that's the case then the atomicity check that was introduced is done in
> the wrong location.

fwiw, the dpcm_apply_symmetry() have this check at line 1822:

/* A backend may not have the requested substream */
if (!be_substream)
	continue;

both dpcm_be_connect() and dpcm_apply_symmetry() are called via
dpcm_fe_dai_open() line 2736-2739:

/* calculate valid and active FE <-> BE dpcms */
dpcm_process_paths(fe, stream, &list, 1);

ret = dpcm_fe_dai_startup(fe_substream);

dpcm_fe_dai_open -> dpcm_process_paths -> dpcm_add_paths > dpcm_be_connect

dpcm_fe_dai_open -> dpcm_fe_dai_startup -> dpcm_apply_symmetry

If the check was added by
6246f283d5e02 ("ASoC: dpcm: skip missing substream while applying symmetry")

It looks like that it is not uncommon to not have be_substream at this
point...

> Takashi, we could use your guidance here.
> Thanks
> -Pierre

-- 
Péter

  reply	other threads:[~2022-07-12  8:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADs9LoPZH_D+eJ9qjTxSLE5jGyhKsjMN7g2NighZ16biVxsyKw@mail.gmail.com>
2022-06-27 15:12 ` Sound not working after commit bbf7d3b1c4f40eb02dd1dffb500ba00b0bff0303 on Amlogic A311D device Pierre-Louis Bossart
2022-06-27 16:52   ` Mark Brown
     [not found]   ` <CADs9LoN-L0X1Dr1sP2K7xrcWm7dpHW6MhF47c2eBB0moLNnPRQ@mail.gmail.com>
2022-06-28 22:47     ` Pierre-Louis Bossart
     [not found]       ` <CADs9LoOZjK=cUuNSEELtgxYoA+yHVFKM_Y9YLcY74smqx8XsjQ@mail.gmail.com>
     [not found]         ` <c554b69c-0c73-158d-85d8-95a0375babeb@linux.intel.com>
2022-07-01 15:47           ` Alex Natalsson
2022-07-01 16:42             ` Pierre-Louis Bossart
2022-07-01 22:17               ` Alex Natalsson
2022-07-09 11:19                 ` Alex Natalsson
2022-07-11 14:33                   ` Pierre-Louis Bossart
2022-07-12  8:00                     ` Péter Ujfalusi [this message]
2022-07-12  9:29                     ` Takashi Iwai
2022-07-12 13:05                       ` Alex Natalsson

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=48a9865b-9cf8-f99a-235f-565da9c0529d@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=harmoniesworlds@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox