mirror of https://gitee.com/openkylin/linux.git
ASoC: omap-mcbsp: Fix latency value calculation for pm_qos
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>
This commit is contained in:
parent
a3e620f842
commit
dd2f52d899
|
@ -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