mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
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: 3473185f31 ("ALSA: scarlett2: Remap Level Meter values")
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/ZYsBIE3DSKdi4YC/@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
4e7914eb1d
commit
0b2dca555d
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user