@@ -92,9 +92,9 @@ static struct uac_input_terminal_descriptor usb_out_it_desc = {
9292 .bDescriptorType = USB_DT_CS_INTERFACE ,
9393 .bDescriptorSubtype = UAC_INPUT_TERMINAL ,
9494 .bTerminalID = USB_OUT_IT_ID ,
95- .wTerminalType = UAC_TERMINAL_STREAMING ,
95+ .wTerminalType = cpu_to_le16 ( UAC_TERMINAL_STREAMING ) ,
9696 .bAssocTerminal = 0 ,
97- .wChannelConfig = 0x3 ,
97+ .wChannelConfig = cpu_to_le16 ( 0x3 ) ,
9898};
9999
100100#define IO_OUT_OT_ID 2
@@ -103,7 +103,7 @@ static struct uac1_output_terminal_descriptor io_out_ot_desc = {
103103 .bDescriptorType = USB_DT_CS_INTERFACE ,
104104 .bDescriptorSubtype = UAC_OUTPUT_TERMINAL ,
105105 .bTerminalID = IO_OUT_OT_ID ,
106- .wTerminalType = UAC_OUTPUT_TERMINAL_SPEAKER ,
106+ .wTerminalType = cpu_to_le16 ( UAC_OUTPUT_TERMINAL_SPEAKER ) ,
107107 .bAssocTerminal = 0 ,
108108 .bSourceID = USB_OUT_IT_ID ,
109109};
@@ -114,9 +114,9 @@ static struct uac_input_terminal_descriptor io_in_it_desc = {
114114 .bDescriptorType = USB_DT_CS_INTERFACE ,
115115 .bDescriptorSubtype = UAC_INPUT_TERMINAL ,
116116 .bTerminalID = IO_IN_IT_ID ,
117- .wTerminalType = UAC_INPUT_TERMINAL_MICROPHONE ,
117+ .wTerminalType = cpu_to_le16 ( UAC_INPUT_TERMINAL_MICROPHONE ) ,
118118 .bAssocTerminal = 0 ,
119- .wChannelConfig = 0x3 ,
119+ .wChannelConfig = cpu_to_le16 ( 0x3 ) ,
120120};
121121
122122#define USB_IN_OT_ID 4
@@ -125,7 +125,7 @@ static struct uac1_output_terminal_descriptor usb_in_ot_desc = {
125125 .bDescriptorType = USB_DT_CS_INTERFACE ,
126126 .bDescriptorSubtype = UAC_OUTPUT_TERMINAL ,
127127 .bTerminalID = USB_IN_OT_ID ,
128- .wTerminalType = UAC_TERMINAL_STREAMING ,
128+ .wTerminalType = cpu_to_le16 ( UAC_TERMINAL_STREAMING ) ,
129129 .bAssocTerminal = 0 ,
130130 .bSourceID = IO_IN_IT_ID ,
131131};
@@ -174,7 +174,7 @@ static struct uac1_as_header_descriptor as_out_header_desc = {
174174 .bDescriptorSubtype = UAC_AS_GENERAL ,
175175 .bTerminalLink = USB_OUT_IT_ID ,
176176 .bDelay = 1 ,
177- .wFormatTag = UAC_FORMAT_TYPE_I_PCM ,
177+ .wFormatTag = cpu_to_le16 ( UAC_FORMAT_TYPE_I_PCM ) ,
178178};
179179
180180static struct uac1_as_header_descriptor as_in_header_desc = {
@@ -183,7 +183,7 @@ static struct uac1_as_header_descriptor as_in_header_desc = {
183183 .bDescriptorSubtype = UAC_AS_GENERAL ,
184184 .bTerminalLink = USB_IN_OT_ID ,
185185 .bDelay = 1 ,
186- .wFormatTag = UAC_FORMAT_TYPE_I_PCM ,
186+ .wFormatTag = cpu_to_le16 ( UAC_FORMAT_TYPE_I_PCM ) ,
187187};
188188
189189DECLARE_UAC_FORMAT_TYPE_I_DISCRETE_DESC (1 );
@@ -605,8 +605,8 @@ static int f_audio_bind(struct usb_configuration *c, struct usb_function *f)
605605 if (status )
606606 goto fail ;
607607
608- audio -> out_ep_maxpsize = as_out_ep_desc .wMaxPacketSize ;
609- audio -> in_ep_maxpsize = as_in_ep_desc .wMaxPacketSize ;
608+ audio -> out_ep_maxpsize = le16_to_cpu ( as_out_ep_desc .wMaxPacketSize ) ;
609+ audio -> in_ep_maxpsize = le16_to_cpu ( as_in_ep_desc .wMaxPacketSize ) ;
610610 audio -> params .c_chmask = audio_opts -> c_chmask ;
611611 audio -> params .c_srate = audio_opts -> c_srate ;
612612 audio -> params .c_ssize = audio_opts -> c_ssize ;
0 commit comments