Commit 4a3fa2a5 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Greg Kroah-Hartman

ASoC: omap-mcbsp: Fix latency value calculation for pm_qos

[ Upstream commit dd2f52d8 ]

The latency number is in usec for the pm_qos. Correct the calculation to
give us the time in usec
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a625d3e3
......@@ -308,9 +308,9 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
pkt_size = channels;
}
latency = ((((buffer_size - pkt_size) / channels) * 1000)
/ (params->rate_num / params->rate_den));
latency = (buffer_size - pkt_size) / channels;
latency = latency * USEC_PER_SEC /
(params->rate_num / params->rate_den);
mcbsp->latency[substream->stream] = latency;
omap_mcbsp_set_threshold(substream, pkt_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment