aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c8
-rw-r--r--sound/usb/usbmixer.c4
2 files changed, 6 insertions, 6 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}
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index e73c1c9d3e73..fa7056f5caaf 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -363,7 +363,7 @@ static int get_cur_ctl_value(usb_mixer_elem_info_t *cval, int validx, int *value
363} 363}
364 364
365/* channel = 0: master, 1 = first channel */ 365/* channel = 0: master, 1 = first channel */
366inline static int get_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int *value) 366static inline int get_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int *value)
367{ 367{
368 return get_ctl_value(cval, GET_CUR, (cval->control << 8) | channel, value); 368 return get_ctl_value(cval, GET_CUR, (cval->control << 8) | channel, value);
369} 369}
@@ -399,7 +399,7 @@ static int set_cur_ctl_value(usb_mixer_elem_info_t *cval, int validx, int value)
399 return set_ctl_value(cval, SET_CUR, validx, value); 399 return set_ctl_value(cval, SET_CUR, validx, value);
400} 400}
401 401
402inline static int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int value) 402static inline int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, int value)
403{ 403{
404 return set_ctl_value(cval, SET_CUR, (cval->control << 8) | channel, value); 404 return set_ctl_value(cval, SET_CUR, (cval->control << 8) | channel, value);
405} 405}