summaryrefslogtreecommitdiffstats
path: root/sound/usb/card.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-11-23 09:53:40 +0100
committerTakashi Iwai <tiwai@suse.de>2020-11-23 15:16:37 +0100
commit89fa3f686c10c9edde0f41e5a1c71afa0e43ff87 (patch)
tree561571bc3c90b9ce14edc12c05067f01fab4f73d /sound/usb/card.h
parent53837b4ac2bd33ede5cd799940341ce5ea7b2902 (diff)
downloadlinux-89fa3f686c10c9edde0f41e5a1c71afa0e43ff87.tar.gz
linux-89fa3f686c10c9edde0f41e5a1c71afa0e43ff87.tar.bz2
linux-89fa3f686c10c9edde0f41e5a1c71afa0e43ff87.zip
ALSA: usb-audio: Use unsigned char for iface and altsettings fields
Just for consistency, use unsigned char for iface and altsetting in allover places. Also rearrange the field positions of snd_usb_endpiont and tidy up with some comments. Tested-by: Keith Milner <kamilner@superlative.org> Tested-by: Dylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-35-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r--sound/usb/card.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 3e16b9288693..6a027c349194 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -16,7 +16,7 @@ struct audioformat {
unsigned int fmt_type; /* USB audio format type (1-3) */
unsigned int fmt_bits; /* number of significant bits */
unsigned int frame_size; /* samples per frame for non-audio */
- int iface; /* interface number */
+ unsigned char iface; /* interface number */
unsigned char altsetting; /* corresponding alternate setting */
unsigned char altset_idx; /* array index of altenate setting */
unsigned char attributes; /* corresponding attributes of cs endpoint */
@@ -63,7 +63,12 @@ struct snd_usb_endpoint {
atomic_t running; /* running status */
int ep_num; /* the referenced endpoint number */
int type; /* SND_USB_ENDPOINT_TYPE_* */
- unsigned long flags;
+
+ unsigned char iface; /* interface number */
+ unsigned char altsetting; /* corresponding alternate setting */
+ unsigned char ep_idx; /* endpoint array index */
+
+ unsigned long flags; /* running bit flags */
void (*prepare_data_urb) (struct snd_usb_substream *subs,
struct urb *urb);
@@ -112,8 +117,6 @@ struct snd_usb_endpoint {
unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */
unsigned char silence_value;
unsigned int stride;
- int iface, altsetting;
- unsigned char ep_idx; /* endpoint array index */
int skip_packets; /* quirks for devices to ignore the first n packets
in a stream */
bool implicit_fb_sync; /* syncs with implicit feedback */