diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-09 08:42:00 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-09 08:42:00 +0100 |
commit | 4aa01c408b7022c620241b373d4c3707a2ebeab6 (patch) | |
tree | 25df2a7453ec3bf7fc82f2871756b4efd6d3d283 /sound/usb | |
parent | 5371fc0ecdf55b6811ade8a198de8ace2f4e5861 (diff) | |
parent | a1f3f1ca66bd12c339b17a0c2ef93a093f90a277 (diff) | |
download | talos-op-linux-4aa01c408b7022c620241b373d4c3707a2ebeab6.tar.gz talos-op-linux-4aa01c408b7022c620241b373d4c3707a2ebeab6.zip |
Merge branch 'for-linus' into for-next
Merging the HD-audio fixes back to base devel branch for further
working on it.
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/line6/playback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/line6/playback.c b/sound/usb/line6/playback.c index 05dee690f487..97ed593f6010 100644 --- a/sound/usb/line6/playback.c +++ b/sound/usb/line6/playback.c @@ -39,7 +39,7 @@ static void change_volume(struct urb *urb_out, int volume[], for (; p < buf_end; ++p) { short pv = le16_to_cpu(*p); int val = (pv * volume[chn & 1]) >> 8; - pv = clamp(val, 0x7fff, -0x8000); + pv = clamp(val, -0x8000, 0x7fff); *p = cpu_to_le16(pv); ++chn; } @@ -54,7 +54,7 @@ static void change_volume(struct urb *urb_out, int volume[], val = p[0] + (p[1] << 8) + ((signed char)p[2] << 16); val = (val * volume[chn & 1]) >> 8; - val = clamp(val, 0x7fffff, -0x800000); + val = clamp(val, -0x800000, 0x7fffff); p[0] = val; p[1] = val >> 8; p[2] = val >> 16; @@ -126,7 +126,7 @@ static void add_monitor_signal(struct urb *urb_out, unsigned char *signal, short pov = le16_to_cpu(*po); short piv = le16_to_cpu(*pi); int val = pov + ((piv * volume) >> 8); - pov = clamp(val, 0x7fff, -0x8000); + pov = clamp(val, -0x8000, 0x7fff); *po = cpu_to_le16(pov); } } |