Commit 0b2dca55 authored by Geoffrey D. Bennett's avatar Geoffrey D. Bennett Committed by Takashi Iwai

ALSA: scarlett2: Convert meter levels from little-endian

Add missing conversion from little-endian data to CPU-endian in
scarlett2_usb_get_meter_levels().

Fixes: 3473185f ("ALSA: scarlett2: Remap Level Meter values")
Signed-off-by: default avatarGeoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/ZYsBIE3DSKdi4YC/@m.b4.vuSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4e7914eb
......@@ -1966,7 +1966,7 @@ static int scarlett2_usb_get_meter_levels(struct usb_mixer_interface *mixer,
__le16 num_meters;
__le32 magic;
} __packed req;
u32 resp[SCARLETT2_MAX_METERS];
__le32 resp[SCARLETT2_MAX_METERS];
int i, err;
req.pad = 0;
......@@ -1979,7 +1979,7 @@ static int scarlett2_usb_get_meter_levels(struct usb_mixer_interface *mixer,
/* copy, convert to u16 */
for (i = 0; i < num_meters; i++)
levels[i] = resp[i];
levels[i] = le32_to_cpu(resp[i]);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment