aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2024-02-13 12:12:47 +0200
committerMark Brown <broonie@kernel.org>2024-02-13 13:29:04 +0000
commit2065610b5ddd5b58eed1dc3b3c3db27a26ebd4b6 (patch)
treefa6e70ef60f49243ade41aec704e6b2f9549ff35 /sound/soc/sof
parentASoC: SOF: Intel: lnl: Do not use LNL specific wrappers in DSPless mode (diff)
downloadwireguard-linux-2065610b5ddd5b58eed1dc3b3c3db27a26ebd4b6.tar.xz
wireguard-linux-2065610b5ddd5b58eed1dc3b3c3db27a26ebd4b6.zip
ASoC: SOF: Intel: hda-dai: add support for dspless mode beyond HDAudio
For SoundWire/ALH, we need to have a dai configured, but we don't want to send a DMA_TLV to firmware. Add additional code branches. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://msgid.link/r/20240213101247.28887-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/intel/hda-dai.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c
index 4bffd9ea21a9..c1682bcdb5a6 100644
--- a/sound/soc/sof/intel/hda-dai.c
+++ b/sound/soc/sof/intel/hda-dai.c
@@ -83,6 +83,11 @@ hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai
sdev = widget_to_sdev(w);
+ if (!swidget) {
+ dev_err(sdev->dev, "%s: swidget is NULL\n", __func__);
+ return NULL;
+ }
+
if (sdev->dspless_mode_selected)
return hda_select_dai_widget_ops(sdev, swidget);
@@ -364,8 +369,11 @@ static int non_hda_dai_hw_params(struct snd_pcm_substream *substream,
return ret;
}
- /* get stream_id */
sdev = widget_to_sdev(w);
+ if (sdev->dspless_mode_selected)
+ goto skip_tlv;
+
+ /* get stream_id */
hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream);
if (!hext_stream) {
@@ -398,6 +406,7 @@ static int non_hda_dai_hw_params(struct snd_pcm_substream *substream,
dma_config->dma_stream_channel_map.device_count = 0; /* mapping not used */
dma_config->dma_priv_config_size = 0;
+skip_tlv:
return 0;
}