projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e620f
)
ASoC: omap-mcbsp: Fix latency value calculation for pm_qos
author
Peter Ujfalusi
<
[email protected]
>
Wed, 14 Nov 2018 11:06:21 +0000
(13:06 +0200)
committer
Mark Brown
<
[email protected]
>
Fri, 23 Nov 2018 14:04:37 +0000
(14:04 +0000)
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 <
[email protected]
>
Acked-by: Jarkko Nikula <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/omap/omap-mcbsp.c
patch
|
blob
|
history
diff --git
a/sound/soc/omap/omap-mcbsp.c
b/sound/soc/omap/omap-mcbsp.c
index d0ebb6b9bfac3a38ed320cb957a32cb71788b418..2d6decbfc99efc021bb19f5bd1eecc9b333a6b77 100644
(file)
--- a/
sound/soc/omap/omap-mcbsp.c
+++ b/
sound/soc/omap/omap-mcbsp.c
@@
-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);