summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorGeoffrey D. Bennett <g@b4.vu>2023-12-27 03:06:48 +1030
committerTakashi Iwai <tiwai@suse.de>2023-12-29 15:38:26 +0100
commit0b2dca555d78c296de39c0ce29c997e55889d76a (patch)
treef676655418f006b756de282e482920cd52df0e88 /sound
parent4e7914eb1dae377b8e6de59c96b0653aacb47646 (diff)
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: 3473185f31df ("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>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer_scarlett2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index f7c57a2c3028..33a3d1161885 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -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;
}