mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ASoC: omap-mcbsp: Fix latency value calculation for pm_qos
[ Upstream commit dd2f52d899 ]
The latency number is in usec for the pm_qos. Correct the calculation to
give us the time in usec
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a625d3e3ce
commit
4a3fa2a5fe
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user