lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220917022610.594-1-chunxu.li@mediatek.com>
Date:   Sat, 17 Sep 2022 10:26:10 +0800
From:   Chunxu Li <chunxu.li@...iatek.com>
To:     <broonie@...nel.org>, <pierre-louis.bossart@...ux.intel.com>,
        <peter.ujfalusi@...ux.intel.com>, <lgirdwood@...il.com>,
        <angelogioacchino.delregno@...labora.com>, <daniel.baluta@....com>
CC:     <matthias.bgg@...il.com>, <yc.hung@...iatek.com>,
        <linux-kernel@...r.kernel.org>, <alsa-devel@...a-project.org>,
        <sound-open-firmware@...a-project.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>,
        <project_global_chrome_upstream_group@...iatek.com>,
        Chunxu Li <chunxu.li@...iatek.com>
Subject: [PATCH] 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@...iatek.com>
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ