mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02: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:
parent
1f1aedd6b1
commit
abf7201316
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user