aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r--sound/usb/usbaudio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index a75695045f29..b5e734d975e0 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -212,7 +212,7 @@ static snd_usb_audio_t *usb_chip[SNDRV_CARDS];
212 * convert a sampling rate into our full speed format (fs/1000 in Q16.16) 212 * convert a sampling rate into our full speed format (fs/1000 in Q16.16)
213 * this will overflow at approx 524 kHz 213 * this will overflow at approx 524 kHz
214 */ 214 */
215inline static unsigned get_usb_full_speed_rate(unsigned int rate) 215static inline unsigned get_usb_full_speed_rate(unsigned int rate)
216{ 216{
217 return ((rate << 13) + 62) / 125; 217 return ((rate << 13) + 62) / 125;
218} 218}
@@ -221,19 +221,19 @@ inline static unsigned get_usb_full_speed_rate(unsigned int rate)
221 * convert a sampling rate into USB high speed format (fs/8000 in Q16.16) 221 * convert a sampling rate into USB high speed format (fs/8000 in Q16.16)
222 * this will overflow at approx 4 MHz 222 * this will overflow at approx 4 MHz
223 */ 223 */
224inline static unsigned get_usb_high_speed_rate(unsigned int rate) 224static inline unsigned get_usb_high_speed_rate(unsigned int rate)
225{ 225{
226 return ((rate << 10) + 62) / 125; 226 return ((rate << 10) + 62) / 125;
227} 227}
228 228
229/* convert our full speed USB rate into sampling rate in Hz */ 229/* convert our full speed USB rate into sampling rate in Hz */
230inline static unsigned get_full_speed_hz(unsigned int usb_rate) 230static inline unsigned get_full_speed_hz(unsigned int usb_rate)
231{ 231{
232 return (usb_rate * 125 + (1 << 12)) >> 13; 232 return (usb_rate * 125 + (1 << 12)) >> 13;
233} 233}
234 234
235/* convert our high speed USB rate into sampling rate in Hz */ 235/* convert our high speed USB rate into sampling rate in Hz */
236inline static unsigned get_high_speed_hz(unsigned int usb_rate) 236static inline unsigned get_high_speed_hz(unsigned int usb_rate)
237{ 237{
238 return (usb_rate * 125 + (1 << 9)) >> 10; 238 return (usb_rate * 125 + (1 << 9)) >> 10;
239} 239}