[PATCH] lsusb: fix iFeature position calculation for UAC2 feature units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel Mack <daniel@xxxxxxxx>
Reported-by: Ken McGuire <kenm@xxxxxxxxxx>
---
 lsusb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lsusb.c b/lsusb.c
index 3ccc2bd..5684041 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -1269,7 +1269,6 @@ static void dump_audiocontrol_interface(struct usb_dev_handle *dev, unsigned cha
 			if (buf[0] < 10)
 				printf("      Warning: Descriptor too short\n");
 			k = (buf[0] - 6) / 4;
-			get_string(dev, term, sizeof(term), buf[6+(k*4)]);
 			printf("        bUnitID             %5u\n"
 			       "        bSourceID           %5u\n",
 			       buf[3], buf[4]);
@@ -1281,8 +1280,9 @@ static void dump_audiocontrol_interface(struct usb_dev_handle *dev, unsigned cha
 				printf("        bmaControls(%2u)      0x%08x\n", i, chcfg);
 				dump_audio_bmcontrols("          ", chcfg, uac_fu_bmcontrols, protocol);
 			}
-			printf("        iFeature            %5u %s\n", buf[6+(k*4)], term);
-			dump_junk(buf, "        ", 7+(k*4));
+			get_string(dev, term, sizeof(term), buf[5+(k*4)]);
+			printf("        iFeature            %5u %s\n", buf[5+(k*4)], term);
+			dump_junk(buf, "        ", 6+(k*4));
 			break;
 		} /* switch (protocol) */
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux