linux/sound/soc
Kuninori Morimoto 0d3a5178c2
ASoC: soc-pcm.c: remove indirect runtime copy
substream->runtime will be attached when substream was opened
at snd_pcm_attach_substream(). When it uses DPCM,
FE substream->runtime is attached, but BE substream->runtime is not.
Thus, we are copying FE substream->runtime to BE.

But, we are copyig FE substream->runtime to FE dpcm->runtime first (A),
and copy it to BE dpcm->runtime (B), and copy it to
BE substream->runtime (C).

	static int dpcm_fe_dai_open(...) {
		...
(A)		fe->dpcm[stream].runtime = fe_substream->runtime;
		...
	}

	static int dpcm_be_connect(...) {
		...
(B)		be->dpcm[stream].runtime = fe->dpcm[stream].runtime;
		...
	}

	int dpcm_be_dai_startup(...) {
		...
(C)		be_substream->runtime = be->dpcm[stream].runtime;
		...
	}

It is too roundabout and troublesome.
OTOH, it is directly copying fe_substream->runtime at dpcm_be_reparent()
without using be->dpcm[stream].runtime.

	static void dpcm_be_reparent(...)
	{
		...
		for_each_dpcm_fe(be, stream, dpcm) {
			...
=>			be_substream->runtime = fe_substream->runtime;
			break;
		}
	}

This patch removes indirect copying.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v8je64dh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-14 13:58:57 +00:00
..
adi
amd ASoC: amd: vangogh: Add components prefix in structs and function names 2023-03-05 23:37:25 +00:00
apple ASoC: apple: mca: Improve handling of unavailable DMA channels 2023-02-24 16:31:20 +00:00
atmel ASoC: mchp-pdmc: avoid casting to/from void pointer 2023-03-05 23:37:45 +00:00
au1x
bcm
cirrus sound updates for 6.3-rc1 2023-02-22 10:29:05 -08:00
codecs ASoC: mediatek: fix coverity problems 2023-03-13 19:06:05 +00:00
dwc
fsl ASoC: Merge up fixes as a dependency for future SOF work 2023-03-13 14:07:37 +00:00
generic ASoC: Use of_property_present() for testing DT property presence 2023-03-11 12:18:54 +00:00
hisilicon
img
intel ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682 2023-03-13 19:08:06 +00:00
jz4740 ASoC: jz4740-i2s: Remove .set_sysclk() 2022-10-31 13:20:14 +00:00
kirkwood ASoC: kirkwood: Iterate over array indexes instead of using pointer math 2023-01-28 10:51:05 +00:00
mediatek ASoC: mediatek: mt9195-mt6359: fix UNINIT problem 2023-03-13 14:08:37 +00:00
meson ASoC: meson: use helper function 2023-01-31 11:05:03 +00:00
mxs ASoC: Use of_property_present() for testing DT property presence 2023-03-11 12:18:54 +00:00
pxa - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
qcom ASoC: Merge up fixes as a dependency for future SOF work 2023-03-13 14:07:37 +00:00
rockchip ASoC: rockchip: use helper function 2023-01-31 11:05:04 +00:00
samsung ASoC: Use of_property_present() for testing DT property presence 2023-03-11 12:18:54 +00:00
sh ASoC: Use of_property_read_bool() for boolean properties 2023-03-11 12:18:55 +00:00
sof ASoC: SOF: ipc4: Add support for formats per pins 2023-03-14 13:58:48 +00:00
spear ASoC: spear: use helper function 2023-01-31 11:04:59 +00:00
sprd
sti
stm ASoC: Use of_property_present() for testing DT property presence 2023-03-11 12:18:54 +00:00
sunxi ASoC: sunxi: use devm_platform_get_and_ioremap_resource() 2022-11-14 11:30:31 +00:00
tegra ASoC: Use of_property_present() for testing DT property presence 2023-03-11 12:18:54 +00:00
ti sound updates for 6.3-rc1 2023-02-22 10:29:05 -08:00
uniphier ASoC: uniphier: aio-core: Make some read-only arrays static const 2022-12-05 14:05:40 +00:00
ux500 ASoC: ux500: remove stedma40 references 2023-01-20 12:05:57 +00:00
xilinx
xtensa
Kconfig
Makefile
soc-ac97.c ASoC: soc-ac97: Return correct error codes 2023-02-15 16:09:07 +00:00
soc-acpi.c
soc-card.c
soc-component.c ASoC: soc-component: add get_jack_type 2023-01-27 12:20:55 +00:00
soc-compress.c ASoC: soc-pcm.c: remove indirect runtime copy 2023-03-14 13:58:57 +00:00
soc-core.c ASoC: soc-core.c: remove useless dev_dbg() 2023-03-06 13:49:38 +00:00
soc-dai.c ASoC: soc-dai.c: add missing flag check at snd_soc_pcm_dai_probe() 2023-03-14 13:58:56 +00:00
soc-dapm.c ASoC: soc-dapm.c: use helper function 2023-01-31 11:05:08 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
soc-jack.c ASoC: jack: allow multiple interrupt per gpio 2023-03-05 23:38:38 +00:00
soc-link.c
soc-ops.c ASoC: ops: Correct bounds check for second channel on SX controls 2022-11-25 16:29:33 +00:00
soc-pcm.c ASoC: soc-pcm.c: remove indirect runtime copy 2023-03-14 13:58:57 +00:00
soc-topology-test.c
soc-topology.c ASoC: Updates for v6.3 2023-02-16 14:32:04 +01:00
soc-utils-test.c
soc-utils.c ASoC: soc-utils: Remove __exit for snd_soc_util_exit() 2022-11-07 13:37:04 +00:00