aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-02-10 05:52:58 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:32:06 -0400
commite6a92a7445cc33bbfe2775eb50473fb43bb3a2da (patch)
tree37e52d3c906102cd52a73ef7449881961abe13fa
parent222036765ccbdb1ff4feef22d8e2fc687a9cdcfd (diff)
[media] gspca - sonixj: Simplify GPIO setting when audio present
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/sonixj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index b7a7e96d3bd8..bfc09b97b061 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -1789,7 +1789,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
1789{ 1789{
1790 struct sd *sd = (struct sd *) gspca_dev; 1790 struct sd *sd = (struct sd *) gspca_dev;
1791 const u8 *sn9c1xx; 1791 const u8 *sn9c1xx;
1792 u8 regGpio[] = { 0x29, 0x74 }; /* with audio */ 1792 u8 regGpio[] = { 0x29, 0x70 }; /* no audio */
1793 u8 regF1; 1793 u8 regF1;
1794 1794
1795 /* setup a selector by bridge */ 1795 /* setup a selector by bridge */
@@ -1801,6 +1801,8 @@ static int sd_init(struct gspca_dev *gspca_dev)
1801 if (gspca_dev->usb_err < 0) 1801 if (gspca_dev->usb_err < 0)
1802 return gspca_dev->usb_err; 1802 return gspca_dev->usb_err;
1803 PDEBUG(D_PROBE, "Sonix chip id: %02x", regF1); 1803 PDEBUG(D_PROBE, "Sonix chip id: %02x", regF1);
1804 if (gspca_dev->audio)
1805 regGpio[1] |= 0x04; /* with audio */
1804 switch (sd->bridge) { 1806 switch (sd->bridge) {
1805 case BRIDGE_SN9C102P: 1807 case BRIDGE_SN9C102P:
1806 case BRIDGE_SN9C105: 1808 case BRIDGE_SN9C105:
@@ -1840,7 +1842,6 @@ static int sd_init(struct gspca_dev *gspca_dev)
1840 reg_w1(gspca_dev, 0x02, 0x62); 1842 reg_w1(gspca_dev, 0x02, 0x62);
1841 break; 1843 break;
1842 case BRIDGE_SN9C120: 1844 case BRIDGE_SN9C120:
1843 regGpio[1] = 0x70; /* no audio */
1844 reg_w(gspca_dev, 0x01, regGpio, 2); 1845 reg_w(gspca_dev, 0x01, regGpio, 2);
1845 break; 1846 break;
1846 } 1847 }