]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - sound/soc/codecs/tlv320dac33.c
ASoC: tlv320dac33: Limit the US_TO_SAMPLES macro
[net-next-2.6.git] / sound / soc / codecs / tlv320dac33.c
index fed14582b49845afe49fa3e91aae10b5beb70f8b..c47c20d21ea57446e88f36b3a75ac88b4cbe214b 100644 (file)
@@ -58,7 +58,7 @@
        (1000000000 / ((rate * 1000) / samples))
 
 #define US_TO_SAMPLES(rate, us) \
-       (rate / (1000000 / us))
+       (rate / (1000000 / (us < 1000000 ? us : 1000000)))
 
 #define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \
        ((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate)))