summaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-mcbsp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-12-13 17:36:46 +0300
committerMark Brown <broonie@kernel.org>2018-12-13 17:36:46 +0300
commit8fe8915b6c0b5298fa547be21957b3860c39c46e (patch)
treef16772eef6506fa40fe43f53b416cd4cd4eccf6b /sound/soc/omap/omap-mcbsp.c
parent1b46ed96961db1a826b3e5cadac18c7c4857f054 (diff)
parenta01b8d1d24451bfc00d3a975d107f9b1590bf826 (diff)
downloadlinux-8fe8915b6c0b5298fa547be21957b3860c39c46e.tar.xz
Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep
Diffstat (limited to 'sound/soc/omap/omap-mcbsp.c')
-rw-r--r--sound/soc/omap/omap-mcbsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index e0ef4774c710..a395598f1f20 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -999,9 +999,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);