Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Koro Chen <koro.chen@mediatek.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Subject: Re: [PATCH] ASoC: dapm: Don't add prefix to widget stream name
Date: Tue, 21 Jul 2015 16:54:02 +0200	[thread overview]
Message-ID: <55AE5D0A.7030800@metafoo.de> (raw)
In-Reply-To: <1437486892.30798.14.camel@mtksdaap41>

On 07/21/2015 03:54 PM, Koro Chen wrote:
> On Tue, 2015-07-21 at 11:51 +0200, Lars-Peter Clausen wrote:
>> Commit fdb6eb0a1287 ("ASoC: dapm: Modify widget stream name according to
>> prefix") fixed the case where a DAPM route between a DAI widget and a
>> DAC/ADC/AIF widget with a matching stream name was not created when the
>> DAPM context was using a prefix.
>>
>> Unfortunately the patch introduced a few issues on its own like leaking the
>> dynamically allocated stream name memory and also not checking whether the
>> allocation succeeded in the first place.
>>
>> It is also incomplete in that it still does not handle the case where
>> stream name of the widget is a substring of the stream name of the DAI,
>> which is explicitly allowed and works fine if no DAPM prefix is used.
>>
> I think your solution looks reasonable.
> However, just curious, why didn't we use strstr(dai_w->name, w->sname)
> in the first place?

It's probably just an oversight when the code was developed initially.

  reply	other threads:[~2015-07-21 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  9:51 [PATCH] ASoC: dapm: Don't add prefix to widget stream name Lars-Peter Clausen
2015-07-21 10:49 ` Applied "ASoC: dapm: Don't add prefix to widget stream name" to the asoc tree Mark Brown
2015-07-21 13:54 ` [PATCH] ASoC: dapm: Don't add prefix to widget stream name Koro Chen
2015-07-21 14:54   ` Lars-Peter Clausen [this message]
2015-07-21 15:58     ` Mark Brown

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=55AE5D0A.7030800@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.mouiche@invoxia.com \
    --cc=broonie@kernel.org \
    --cc=koro.chen@mediatek.com \
    --cc=lgirdwood@gmail.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