Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit dd2f52d8 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

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: 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>
parent a3e620f8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);