diff options
author | Chunxu Li <chunxu.li@mediatek.com> | 2022-09-17 10:26:10 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-20 00:16:17 +0100 |
commit | 78091edc1c7806846049e1d480f6a8051507ed94 (patch) | |
tree | 5e70280428ab4e655d92e0ca2409db1f1e9ea983 /sound | |
parent | 5ba3522cf8b9f3a9f6cbbde1d1e9217e518e0e0a (diff) | |
download | linux-stable-78091edc1c7806846049e1d480f6a8051507ed94.tar.gz linux-stable-78091edc1c7806846049e1d480f6a8051507ed94.tar.bz2 linux-stable-78091edc1c7806846049e1d480f6a8051507ed94.zip |
ASoC: SOF: mediatek: add pcm_hw_params callback for mt8186
add pcm_hw_params callback for mt8186 to support continue
update dma host position
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220917022610.594-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/mediatek/mt8186/mt8186.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index a1be5d74f40b..9ec89fc7fec0 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -460,6 +460,16 @@ static int mt8186_get_bar_index(struct snd_sof_dev *sdev, u32 type) return type; } +static int mt8186_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 struct snd_soc_dai_driver mt8186_dai[] = { { .name = "SOF_DL1", @@ -526,6 +536,7 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = { /* stream callbacks */ .pcm_open = sof_stream_pcm_open, + .pcm_hw_params = mt8186_pcm_hw_params, .pcm_close = sof_stream_pcm_close, /* firmware loading */ |