1. 14 Mar, 2023 4 commits
    • Kuninori Morimoto's avatar
      ASoC: soc-pcm.c: remove indirect runtime copy · 0d3a5178
      Kuninori Morimoto authored
      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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87v8je64dh.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      0d3a5178
    • Kuninori Morimoto's avatar
      ASoC: soc-dai.c: add missing flag check at snd_soc_pcm_dai_probe() · 5c5a7521
      Kuninori Morimoto authored
      dai->probed is used at snd_soc_pcm_dai_probe/remove(),
      and used to call real remove() function only when it was probed.
      
      	int snd_soc_pcm_dai_probe(...)
      	{
      		...
      		for_each_rtd_dais(rtd, i, dai) {
      			...
      
      			if (dai->driver->probe) {
      (A)				int ret = dai->driver->probe(dai);
      
      				if (ret < 0)
      					return soc_dai_ret(dai, ret);
      			}
      
      =>			dai->probed = 1;
      		}
      		...
      	}
      
      	int snd_soc_pcm_dai_remove(...)
      	{
      		...
      		for_each_rtd_dais(rtd, i, dai) {
      			...
      =>			if (dai->probed &&
      			    ...) {
      				...
      			}
      
      =>			dai->probed = 0;
      		}
      		...
      	}
      
      But on probe() case, we need to check dai->probed before calling
      real probe() function at (A), otherwise real probe() might be called
      multi times (but real remove() will be called only once).
      This patch checks it at probe().
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87wn3u64e6.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      5c5a7521
    • Mark Brown's avatar
      ASoC: SOF: ipc4: Add support for formats per pins · 9c3bd790
      Mark Brown authored
      Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
      
      The modules in IPC4 can have multiple 'pins' on their input and output
      and these pins can receive or output audio in different formats.
      Currently we assume that all pins are using the same format which is a
      limitation that needs to be lifted in order to support more complex
      components.
      
      This series will extend and rework the format handling to allow
      different formats on pins.
      9c3bd790
    • Mark Brown's avatar
      ASoC: SOF: ipc4: Add support for bytes control · bec88efd
      Mark Brown authored
      Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
      
      This series will add support for bytes control and topology types.
      With IPC4 only the binary payload is sent to the firmware via LARGE_CONFIG
      message (which does similar multi-part message handling as the IPC3 control
      message did).
      
      The bytes payload itself is not checked by the kernel but user space expected to
      wrap it in sof_abi_hdr struct in order to get the target information of the
      binary data.
      
      The SOF firmware and sof-ctl have been updated to support blobs used in IPC4
      setups.
      bec88efd
  2. 13 Mar, 2023 33 commits
  3. 12 Mar, 2023 3 commits