aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorChunxu Li <chunxu.li@mediatek.com>2022-09-24 11:35:58 +0800
committerMark Brown <broonie@kernel.org>2022-09-26 16:10:27 +0100
commit978a7144ae8497b40d833a3c0110b18810499f95 (patch)
tree9f5fda2e5f6a41912a1652a010ac5a7ac1978dc9 /sound/soc
parentASoC: SOF: ipc4/Intel: Improve and enable IPC error dump (diff)
downloadlinux-dev-978a7144ae8497b40d833a3c0110b18810499f95.tar.xz
linux-dev-978a7144ae8497b40d833a3c0110b18810499f95.zip
ASoC: SOF: mediatek: mt8195: Add pcm_hw_params callback
Add pcm_hw_params callback for mt8195 to support continue update dma host position Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220924033559.26599-2-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sof/mediatek/mt8195/mt8195.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c
index c12192c8a6f8..882fde741cf5 100644
--- a/sound/soc/sof/mediatek/mt8195/mt8195.c
+++ b/sound/soc/sof/mediatek/mt8195/mt8195.c
@@ -496,6 +496,16 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type)
return type;
}
+static int mt8195_pcm_hw_params(struct snd_sof_dev *sdev,
+ struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_sof_platform_stream_params *platform_params)
+{
+ platform_params->cont_update_posn = 1;
+
+ return 0;
+}
+
static void mt8195_adsp_dump(struct snd_sof_dev *sdev, u32 flags)
{
u32 dbg_pc, dbg_data, dbg_bus0, dbg_bus1, dbg_inst;
@@ -588,6 +598,7 @@ static struct snd_sof_dsp_ops sof_mt8195_ops = {
/* stream callbacks */
.pcm_open = sof_stream_pcm_open,
+ .pcm_hw_params = mt8195_pcm_hw_params,
.pcm_close = sof_stream_pcm_close,
/* firmware loading */