linux-stable/sound/soc
Lars-Peter Clausen a798c24a69 ASoC: dapm: Don't add prefix to widget stream name
Commit fdb6eb0a12 ("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.

Revert the commit and take a slightly different approach to solving the
issue. Instead of comparing the widget's stream name to the name of the DAI
widget compare it to the stream name of the DAI widget. The stream name of
the DAI widget is identical to the name of the DAI widget except that it
wont have the DAPM prefix added. So this approach behaves identical
regardless to whether the DAPM context uses a prefix or not.

We don't have to worry about potentially matching with a widget with the
same stream name, but from a different DAPM context with a different
prefix, since the code already makes sure that both the DAI widget and the
matched widget are from the same DAPM context.

Fixes: fdb6eb0a12 ("ASoC: dapm: Modify widget stream name according to prefix")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-21 11:32:00 +01:00
..
adi
atmel Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/adav80x', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next 2015-06-05 18:54:49 +01:00
au1x ASoC: au1x: Constify platform_device_id 2015-05-01 17:46:15 +01:00
bcm
blackfin
cirrus ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal 2015-04-27 19:26:07 +01:00
codecs Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc/topic/zx' into asoc-next 2015-06-05 18:55:07 +01:00
davinci Merge remote-tracking branches 'asoc/topic/davinci' and 'asoc/topic/dpcm' into asoc-next 2015-06-05 18:54:52 +01:00
dwc
fsl Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi' and 'asoc/topic/gpio-jack' into asoc-next 2015-06-05 18:54:53 +01:00
generic ASoC: simple-card: support platform in dts parse 2015-05-04 14:59:04 +01:00
intel Merge remote-tracking branches 'asoc/topic/gpiod-flags', 'asoc/topic/gtm601', 'asoc/topic/intel', 'asoc/topic/lm3857' and 'asoc/topic/max98090' into asoc-next 2015-06-05 18:54:55 +01:00
jz4740
kirkwood Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/kirkwood' into asoc-next 2015-04-12 19:49:03 +01:00
mxs
nuc900
omap Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next 2015-06-05 18:54:57 +01:00
pxa ASoC: z2: Automatically disconnect non-connected pins 2015-05-08 12:05:07 +01:00
qcom Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next 2015-06-05 18:54:57 +01:00
rockchip
samsung Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next 2015-06-05 18:54:59 +01:00
sh Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next 2015-06-05 18:54:57 +01:00
sirf
spear
tegra ASoC: tegra_wm9712: Use card DAPM context to access widgets 2015-04-08 21:10:01 +01:00
txx9
ux500 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2015-06-05 18:54:45 +01:00
xtensa
zte ASoC: zx: fix platform_no_drv_owner.cocci warnings 2015-06-04 18:16:40 +01:00
Kconfig ASoC: zx: Add zx296702 SPDIF support 2015-06-04 13:05:07 +01:00
Makefile Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc/topic/zx' into asoc-next 2015-06-05 18:55:07 +01:00
soc-ac97.c
soc-cache.c
soc-compress.c
soc-core.c ASoC: Free card DAPM context on snd_soc_instantiate_card() error path 2015-07-08 22:16:51 +01:00
soc-dapm.c ASoC: dapm: Don't add prefix to widget stream name 2015-07-21 11:32:00 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal 2015-04-27 19:26:07 +01:00
soc-io.c
soc-jack.c ASoC: jack - add_gpiods accepts filled descriptors 2015-05-25 13:11:45 +01:00
soc-ops.c
soc-pcm.c ASoC: soc-pcm: DPCM cares BE format 2015-05-22 13:38:40 +01:00
soc-topology.c ASoC: topology: Add topology core 2015-06-04 09:40:03 +01:00
soc-utils.c