Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: usb-audio: presonus s18xx uses little-endian

Use __le32 types for USB control transfers

Signed-off-by: fenugrec <fenugrec@mail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260111-preso_clean1-v2-1-44b4e5129a75@mail.com

authored by

fenugrec and committed by
Takashi Iwai
3ce03297 72919c57

+18 -18
+18 -18
sound/usb/mixer_s1810c.c
··· 82 82 * mixer and output but a different set for device. 83 83 */ 84 84 struct s1810c_ctl_packet { 85 - u32 a; 86 - u32 b; 87 - u32 fixed1; 88 - u32 fixed2; 89 - u32 c; 90 - u32 d; 91 - u32 e; 85 + __le32 a; 86 + __le32 b; 87 + __le32 fixed1; 88 + __le32 fixed2; 89 + __le32 c; 90 + __le32 d; 91 + __le32 e; 92 92 }; 93 93 94 94 #define SC1810C_CTL_LINE_SW 0 ··· 118 118 * being zero and different f1/f2. 119 119 */ 120 120 struct s1810c_state_packet { 121 - u32 fields[63]; 121 + __le32 fields[63]; 122 122 }; 123 123 124 124 #define SC1810C_STATE_48V_SW 58 ··· 140 140 struct s1810c_ctl_packet pkt = { 0 }; 141 141 int ret = 0; 142 142 143 - pkt.fixed1 = SC1810C_CMD_F1; 144 - pkt.fixed2 = SC1810C_CMD_F2; 143 + pkt.fixed1 = __cpu_to_le32(SC1810C_CMD_F1); 144 + pkt.fixed2 = __cpu_to_le32(SC1810C_CMD_F2); 145 145 146 - pkt.a = a; 147 - pkt.b = b; 148 - pkt.c = c; 149 - pkt.d = d; 150 - pkt.e = e; 146 + pkt.a = __cpu_to_le32(a); 147 + pkt.b = __cpu_to_le32(b); 148 + pkt.c = __cpu_to_le32(c); 149 + pkt.d = __cpu_to_le32(d); 150 + pkt.e = __cpu_to_le32(e); 151 151 152 152 ret = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 153 153 SC1810C_CMD_REQ, ··· 176 176 struct s1810c_state_packet pkt_in = { { 0 } }; 177 177 int ret = 0; 178 178 179 - pkt_out.fields[SC1810C_STATE_F1_IDX] = SC1810C_SET_STATE_F1; 180 - pkt_out.fields[SC1810C_STATE_F2_IDX] = SC1810C_SET_STATE_F2; 179 + pkt_out.fields[SC1810C_STATE_F1_IDX] = __cpu_to_le32(SC1810C_SET_STATE_F1); 180 + pkt_out.fields[SC1810C_STATE_F2_IDX] = __cpu_to_le32(SC1810C_SET_STATE_F2); 181 181 ret = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 182 182 SC1810C_SET_STATE_REQ, 183 183 SC1810C_SET_STATE_REQTYPE, ··· 197 197 return ret; 198 198 } 199 199 200 - (*field) = pkt_in.fields[field_idx]; 200 + (*field) = __le32_to_cpu(pkt_in.fields[field_idx]); 201 201 (*seqnum)++; 202 202 return 0; 203 203 }