[alsa-devel] [FT C400, PATCH RFC, v3 1/9] usb-audio: replace hardcoded value with const

Eldad Zack eldad at fogrefinery.com
Tue Nov 27 17:00:50 CET 2012


In this context, 0x01 is USB_ENDPOINT_XFER_ISOC.

Signed-off-by: Eldad Zack <eldad at fogrefinery.com>
---
 sound/usb/pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index ef6fa24..ff8cbbf 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -381,7 +381,7 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
 		/* ... and check descriptor size before accessing bSynchAddress
 		   because there is a version of the SB Audigy 2 NX firmware lacking
 		   the audio fields in the endpoint descriptors */
-		if ((get_endpoint(alts, 1)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != 0x01 ||
+		if ((get_endpoint(alts, 1)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_ISOC ||
 		    (get_endpoint(alts, 1)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
 		     get_endpoint(alts, 1)->bSynchAddress != 0 &&
 		     !implicit_fb)) {
-- 
1.7.8.6



More information about the Alsa-devel mailing list