Lines Matching refs:vol

240 	int vol, ret, uservol, buf;  in setvolume()  local
245 vol = uservol & 0xff; in setvolume()
246 if (vol > 100) in setvolume()
247 vol = 100; in setvolume()
248 vol = SCALE(100, 0x20, vol); in setvolume()
249 if ((buf=aci_write_cmd(left_index, 0x20 - vol))<0) in setvolume()
251 ret = SCALE(0x20, 100, vol); in setvolume()
255 vol = (uservol >> 8) & 0xff; in setvolume()
256 if (vol > 100) in setvolume()
257 vol = 100; in setvolume()
258 vol = SCALE(100, 0x20, vol); in setvolume()
259 if ((buf=aci_write_cmd(right_index, 0x20 - vol))<0) in setvolume()
261 ret |= SCALE(0x20, 100, vol) << 8; in setvolume()
271 int vol; in getvolume() local
277 vol = SCALE(0x20, 100, buf < 0x20 ? 0x20-buf : 0); in getvolume()
282 vol |= SCALE(0x20, 100, buf < 0x20 ? 0x20-buf : 0) << 8; in getvolume()
284 __put_user(vol, (int *)arg); in getvolume()
294 static inline unsigned int eq_oss2aci(unsigned int vol) in eq_oss2aci() argument
299 if (vol > 100) in eq_oss2aci()
300 vol = 100; in eq_oss2aci()
301 if (vol > 50) { in eq_oss2aci()
302 vol -= 51; in eq_oss2aci()
306 ret=SCALE(49, 0x7e, vol)+1; in eq_oss2aci()
308 ret=0xff - SCALE(50, 0x7f, vol); in eq_oss2aci()
312 static inline unsigned int eq_aci2oss(unsigned int vol) in eq_aci2oss() argument
314 if (vol < 0x80) in eq_aci2oss()
315 return SCALE(0x7f, 50, vol) + 50; in eq_aci2oss()
317 return SCALE(0x7f, 50, 0xff-vol); in eq_aci2oss()
325 unsigned int vol; in setequalizer() local
327 __get_user(vol, (int *)arg); in setequalizer()
330 if ((buf=aci_write_cmd(left_index, eq_oss2aci(vol & 0xff)))<0) in setequalizer()
334 if ((buf=aci_write_cmd(right_index, eq_oss2aci((vol>>8) & 0xff)))<0) in setequalizer()
345 unsigned int vol; in getequalizer() local
350 vol = eq_aci2oss(buf); in getequalizer()
355 vol |= eq_aci2oss(buf) << 8; in getequalizer()
357 __put_user(vol, (int *)arg); in getequalizer()
364 int vol, buf; in aci_mixer_ioctl() local
400 __get_user(vol, (int *)arg); in aci_mixer_ioctl()
401 vol = vol & 0xff; in aci_mixer_ioctl()
402 if (vol > 100) in aci_mixer_ioctl()
403 vol = 100; in aci_mixer_ioctl()
404 vol = SCALE(100, 3, vol); in aci_mixer_ioctl()
405 if ((buf=aci_write_cmd(ACI_WRITE_IGAIN, vol))<0) in aci_mixer_ioctl()
407 aci_micpreamp = vol; in aci_mixer_ioctl()
408 vol = SCALE(3, 100, vol); in aci_mixer_ioctl()
409 vol |= (vol << 8); in aci_mixer_ioctl()
410 __put_user(vol, (int *)arg); in aci_mixer_ioctl()
419 vol = 1; in aci_mixer_ioctl()
421 vol = 0; in aci_mixer_ioctl()
422 if ((buf=aci_write_cmd(ACI_SET_POWERAMP, vol))<0) in aci_mixer_ioctl()
424 aci_amp = vol; in aci_mixer_ioctl()
438 vol = !(buf & SOUND_MASK_PCM); in aci_mixer_ioctl()
439 if ((buf=aci_write_cmd(ACI_SET_SOLOMODE, vol))<0) in aci_mixer_ioctl()
441 aci_solo = vol; in aci_mixer_ioctl()
508 if ((vol=aci_rw_cmd(ACI_STATUS, in aci_mixer_ioctl()
510 return vol; in aci_mixer_ioctl()
511 if (vol & 0x20) in aci_mixer_ioctl()
568 vol = SCALE(3, 100, buf <= 3 ? buf : 3); in aci_mixer_ioctl()
569 vol |= vol << 8; in aci_mixer_ioctl()
570 __put_user(vol, (int *)arg); in aci_mixer_ioctl()