[media] gspca - sonixj, zc3xx: Let some bandwidth for audio when USB 1.1
authorJean-François Moine <moinejf@free.fr>
Thu, 10 Feb 2011 11:10:50 +0000 (08:10 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:32:07 +0000 (20:32 -0300)
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/sonixj.c
drivers/media/video/gspca/zc3xx.c

index eb7b2613ab455c95dd975dd856e12c2621619c3c..a1f82a92833d3569aee2f19f50c29ed98e26d882 100644 (file)
@@ -1777,6 +1777,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
        sd->ag_cnt = -1;
        sd->quality = QUALITY_DEF;
 
+       /* if USB 1.1, let some bandwidth for the audio device */
+       if (gspca_dev->audio && gspca_dev->dev->speed < USB_SPEED_HIGH)
+               gspca_dev->nbalt--;
+
        INIT_WORK(&sd->work, qual_upd);
 
        return 0;
index 47236a58bf335f00419fed7a2b58b3fa02e5d4d3..b2014915f9c1d9a67cb4455f59033a0934bd9bd5 100644 (file)
@@ -6414,6 +6414,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
        gspca_dev->cam.ctrls = sd->ctrls;
        sd->quality = QUALITY_DEF;
 
+       /* if USB 1.1, let some bandwidth for the audio device */
+       if (gspca_dev->audio && gspca_dev->dev->speed < USB_SPEED_HIGH)
+               gspca_dev->nbalt--;
+
        return 0;
 }