linux-stable/include
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
..
acpi Remove Intel compiler support 2023-03-05 10:49:37 -08:00
asm-generic Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
clocksource
crypto
drm Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
dt-bindings dt-bindings: soc: fsl: cpm_qe: Add TSA controller 2023-03-05 23:36:55 +00:00
keys
kunit
kvm
linux Bug fixes and regressions for ext4, the most serious of which is a 2023-03-12 08:55:55 -07:00
math-emu
media media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
memory
misc
net netfilter: tproxy: fix deadlock due to missing BH disable 2023-03-06 12:09:48 +01:00
pcmcia
ras
rdma
rv
scsi SCSI misc on 20230303 2023-03-03 14:41:50 -08:00
soc soc: fsl: cpm1: Add support for QMC 2023-03-05 23:37:03 +00:00
sound ASoC: soc-pcm.c: remove indirect runtime copy 2023-03-14 13:58:57 +00:00
target
trace f2fs-for-6.3-rc1 2023-02-27 16:18:51 -08:00
uapi ASoC: SOF: ipc4: Add support for formats per pins 2023-03-14 13:58:48 +00:00
ufs SCSI misc on 20230303 2023-03-03 14:41:50 -08:00
vdso
video
xen Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00