[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8802 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig   |2 +-
 linux/drivers/media/video/mt9m111.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r e2196aab3e6a -r c7d8eeb5f548 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Fri Aug 29 20:16:31 2008 +0200
+++ b/linux/drivers/media/video/Kconfig Fri Aug 29 18:40:09 2008 -0300
@@ -822,7 +822,7 @@ config VIDEO_PXA27x
 
 config VIDEO_SH_MOBILE_CEU
tristate SuperH Mobile CEU Interface driver
-   depends on VIDEO_DEV  SOC_CAMERA
+   depends on VIDEO_DEV  SOC_CAMERA  HAS_DMA
select VIDEOBUF_DMA_CONTIG
---help---
  This is a v4l2 driver for the SuperH Mobile CEU Interface
diff -r e2196aab3e6a -r c7d8eeb5f548 linux/drivers/media/video/mt9m111.c
--- a/linux/drivers/media/video/mt9m111.c   Fri Aug 29 20:16:31 2008 +0200
+++ b/linux/drivers/media/video/mt9m111.c   Fri Aug 29 18:40:09 2008 -0300
@@ -755,7 +755,7 @@ static int mt9m111_set_control(struct so
return ret;
 }
 
-int mt9m111_restore_state(struct soc_camera_device *icd)
+static int mt9m111_restore_state(struct soc_camera_device *icd)
 {
struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd);
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c7d8eeb5f5489349dc81a9923a002135e4cf271b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/cleanups

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8806 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/cleanups


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/mt2131.c|2 +-
 linux/drivers/media/common/tuners/mt2131.h|2 +-
 linux/drivers/media/common/tuners/mt2131_priv.h   |2 +-
 linux/drivers/media/common/tuners/mxl5005s.c  |4 ++--
 linux/drivers/media/common/tuners/mxl5005s.h  |2 +-
 linux/drivers/media/common/tuners/xc5000.c|2 +-
 linux/drivers/media/common/tuners/xc5000.h|2 +-
 linux/drivers/media/common/tuners/xc5000_priv.h   |2 +-
 linux/drivers/media/dvb/frontends/au8522.c|2 +-
 linux/drivers/media/dvb/frontends/au8522.h|2 +-
 linux/drivers/media/dvb/frontends/cx22702.c   |2 +-
 linux/drivers/media/dvb/frontends/cx22702.h   |2 +-
 linux/drivers/media/dvb/frontends/cx24123.c   |2 +-
 linux/drivers/media/dvb/frontends/cx24123.h   |2 +-
 linux/drivers/media/dvb/frontends/s5h1409.c   |3 ++-
 linux/drivers/media/dvb/frontends/s5h1409.h   |2 +-
 linux/drivers/media/dvb/frontends/s5h1411.c   |3 ++-
 linux/drivers/media/dvb/frontends/s5h1411.h   |2 +-
 linux/drivers/media/dvb/frontends/tda10048.c  |2 +-
 linux/drivers/media/dvb/frontends/tda10048.h  |2 +-
 linux/drivers/media/video/au0828/au0828-cards.c   |2 +-
 linux/drivers/media/video/au0828/au0828-cards.h   |2 +-
 linux/drivers/media/video/au0828/au0828-core.c|4 ++--
 linux/drivers/media/video/au0828/au0828-dvb.c |2 +-
 linux/drivers/media/video/au0828/au0828-i2c.c |2 +-
 linux/drivers/media/video/au0828/au0828-reg.h |2 +-
 linux/drivers/media/video/au0828/au0828.h |2 +-
 linux/drivers/media/video/cx18/cx18-dvb.c |2 +-
 linux/drivers/media/video/cx18/cx18-dvb.h |2 +-
 linux/drivers/media/video/cx23885/cx23885-417.c   |2 +-
 linux/drivers/media/video/cx23885/cx23885-cards.c |2 +-
 linux/drivers/media/video/cx23885/cx23885-core.c  |4 ++--
 linux/drivers/media/video/cx23885/cx23885-dvb.c   |2 +-
 linux/drivers/media/video/cx23885/cx23885-i2c.c   |2 +-
 linux/drivers/media/video/cx23885/cx23885-reg.h   |2 +-
 linux/drivers/media/video/cx23885/cx23885-vbi.c   |2 +-
 linux/drivers/media/video/cx23885/cx23885-video.c |4 ++--
 linux/drivers/media/video/cx23885/cx23885.h   |2 +-
 linux/drivers/media/video/cx25840/cx25840-core.c  |2 +-
 39 files changed, 45 insertions(+), 43 deletions(-)

diff -r c7d8eeb5f548 -r b794d300ab2e linux/drivers/media/common/tuners/mt2131.c
--- a/linux/drivers/media/common/tuners/mt2131.cFri Aug 29 18:40:09 
2008 -0300
+++ b/linux/drivers/media/common/tuners/mt2131.cFri Aug 29 18:44:28 
2008 -0300
@@ -1,7 +1,7 @@
 /*
  *  Driver for Microtune MT2131 QAM/8VSB single chip tuner
  *
- *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
+ *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -r c7d8eeb5f548 -r b794d300ab2e linux/drivers/media/common/tuners/mt2131.h
--- a/linux/drivers/media/common/tuners/mt2131.hFri Aug 29 18:40:09 
2008 -0300
+++ b/linux/drivers/media/common/tuners/mt2131.hFri Aug 29 18:44:28 
2008 -0300
@@ -1,7 +1,7 @@
 /*
  *  Driver for Microtune MT2131 QAM/8VSB single chip tuner
  *
- *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
+ *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -r c7d8eeb5f548 -r b794d300ab2e 
linux/drivers/media/common/tuners/mt2131_priv.h
--- a/linux/drivers/media/common/tuners/mt2131_priv.h   Fri Aug 29 18:40:09 
2008 -0300
+++ b/linux/drivers/media/common/tuners/mt2131_priv.h   Fri Aug 29 18:44:28 
2008 -0300
@@ -1,7 +1,7 @@
 /*
  *  Driver for Microtune MT2131 QAM/8VSB single chip tuner
  *
- *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
+ *  Copyright (c) 2006 Steven Toth [EMAIL PROTECTED]
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff -r c7d8eeb5f548 -r b794d300ab2e 
linux/drivers/media/common/tuners/mxl5005s.c
--- a/linux/drivers/media/common/tuners/mxl5005s.c  Fri Aug 29 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/cx23885-leadtek

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8808 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/cx23885-leadtek




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.cx23885  |1 
 linux/drivers/media/video/cx23885/Kconfig |1 
 linux/drivers/media/video/cx23885/cx23885-cards.c |   42 ++
 linux/drivers/media/video/cx23885/cx23885-dvb.c   |   26 
 linux/drivers/media/video/cx23885/cx23885.h   |1 
 5 files changed, 60 insertions(+), 11 deletions(-)

diff -r b794d300ab2e -r 7d34ba657fa8 
linux/Documentation/video4linux/CARDLIST.cx23885
--- a/linux/Documentation/video4linux/CARDLIST.cx23885  Fri Aug 29 18:44:28 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.cx23885  Fri Aug 29 18:48:28 
2008 -0300
@@ -10,3 +10,4 @@
   9 - Hauppauge WinTV-HVR1400 [0070:8010]
  10 - DViCO FusionHDTV7 Dual Express  [18ac:d618]
  11 - DViCO FusionHDTV DVB-T Dual Express [18ac:db78]
+ 12 - Leadtek Winfast PxDVR3200 H [107d:6681]
diff -r b794d300ab2e -r 7d34ba657fa8 linux/drivers/media/video/cx23885/Kconfig
--- a/linux/drivers/media/video/cx23885/Kconfig Fri Aug 29 18:44:28 2008 -0300
+++ b/linux/drivers/media/video/cx23885/Kconfig Fri Aug 29 18:48:28 2008 -0300
@@ -15,6 +15,7 @@ config VIDEO_CX23885
select DVB_S5H1409 if !DVB_FE_CUSTOMISE
select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE
+   select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE
select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE
diff -r b794d300ab2e -r 7d34ba657fa8 
linux/drivers/media/video/cx23885/cx23885-cards.c
--- a/linux/drivers/media/video/cx23885/cx23885-cards.c Fri Aug 29 18:44:28 
2008 -0300
+++ b/linux/drivers/media/video/cx23885/cx23885-cards.c Fri Aug 29 18:48:28 
2008 -0300
@@ -155,6 +155,10 @@ struct cx23885_board cx23885_boards[] = 
.portb  = CX23885_MPEG_DVB,
.portc  = CX23885_MPEG_DVB,
},
+   [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = {
+   .name   = Leadtek Winfast PxDVR3200 H,
+   .portc  = CX23885_MPEG_DVB,
+   },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -230,6 +234,10 @@ struct cx23885_subid cx23885_subids[] = 
.subvendor = 0x18ac,
.subdevice = 0xdb78,
.card  = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP,
+   }, {
+   .subvendor = 0x107d,
+   .subdevice = 0x6681,
+   .card  = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H,
},
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -349,21 +357,18 @@ int cx23885_tuner_callback(void *priv, i
case CX23885_BOARD_HAUPPAUGE_HVR1400:
case CX23885_BOARD_HAUPPAUGE_HVR1500:
case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
+   case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
/* Tuner Reset Command */
-   if (command == 0)
-   bitmask = 0x04;
+   bitmask = 0x04;
break;
case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
-   if (command == 0) {
-
-   /* Two identical tuners on two different i2c buses,
-* we need to reset the correct gpio. */
-   if (port-nr == 0)
-   bitmask = 0x01;
-   else if (port-nr == 1)
-   bitmask = 0x04;
-   }
+   /* Two identical tuners on two different i2c buses,
+* we need to reset the correct gpio. */
+   if (port-nr == 0)
+   bitmask = 0x01;
+   else if (port-nr == 1)
+   bitmask = 0x04;
break;
}
 
@@ -491,6 +496,19 @@ void cx23885_gpio_setup(struct cx23885_d
cx_clear(GP0_IO, 0x000f);
mdelay(20);
cx_set(GP0_IO, 0x000f000f);
+   break;
+   case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
+   /* GPIO-2  xc3028 tuner reset */
+
+   /* The following GPIO's are on the internal AVCore (cx25840) */
+   /* GPIO-?  zl10353 demod reset 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8836 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge:  http://linuxtv.org/hg/~jfrancois/gspca/


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt|2 
 linux/drivers/media/video/gspca/conex.c  |   20 
 linux/drivers/media/video/gspca/etoms.c  |   24 
 linux/drivers/media/video/gspca/gspca.c  |  108 -
 linux/drivers/media/video/gspca/gspca.h  |   17 
 linux/drivers/media/video/gspca/mars.c   |   43 
 linux/drivers/media/video/gspca/ov519.c  | 1165 +--
 linux/drivers/media/video/gspca/pac207.c |   94 
 linux/drivers/media/video/gspca/pac7311.c|  664 +++---
 linux/drivers/media/video/gspca/pac_common.h |   60 
 linux/drivers/media/video/gspca/sonixb.c |  533 ++---
 linux/drivers/media/video/gspca/sonixj.c |  104 
 linux/drivers/media/video/gspca/spca500.c|   16 
 linux/drivers/media/video/gspca/spca501.c|   12 
 linux/drivers/media/video/gspca/spca505.c|   12 
 linux/drivers/media/video/gspca/spca506.c|   16 
 linux/drivers/media/video/gspca/spca508.c|   17 
 linux/drivers/media/video/gspca/spca561.c|   19 
 linux/drivers/media/video/gspca/stk014.c |   16 
 linux/drivers/media/video/gspca/sunplus.c|  167 -
 linux/drivers/media/video/gspca/t613.c   |   33 
 linux/drivers/media/video/gspca/tv8532.c |   16 
 linux/drivers/media/video/gspca/vc032x.c |   27 
 linux/drivers/media/video/gspca/zc3xx.c  |   88 
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h |   13 
 linux/drivers/media/video/zc0301/zc0301_sensor.h |   19 
 linux/include/linux/videodev2.h  |6 
 27 files changed, 1643 insertions(+), 1668 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/b66774e706dca25f6ab14b0901dd375b76faa99f

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/bristol

2008-08-29 Thread Patch from Mauro Carvalho Chehab
The patch number 8841 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/bristol


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/dib0700_devices.c |9 +++--
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h |1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff -r 8c6ae18ddf9d -r 3f3fb810f3fc 
linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Wed Aug 27 14:46:39 
2008 +0100
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Fri Aug 29 19:39:52 
2008 -0300
@@ -1117,7 +1117,8 @@ struct usb_device_id dib0700_usb_id_tabl
{ USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_HT_EXPRESS) },
{ USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_T_XXS) },
{ USB_DEVICE(USB_VID_LEADTEK,   USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) 
},
-   { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009) 
},
+/* 35 */{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009) 
},
+   { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_3) },
{ 0 }   /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -1373,7 +1374,7 @@ struct dvb_usb_device_properties dib0700
}
},
 
-   .num_device_descs = 3,
+   .num_device_descs = 4,
.devices = {
{   DiBcom STK7070PD reference design,
{ dib0700_usb_id_table[17], NULL },
@@ -1385,6 +1386,10 @@ struct dvb_usb_device_properties dib0700
},
{   Hauppauge Nova-TD Stick (52009),
{ dib0700_usb_id_table[35], NULL },
+   { NULL },
+   },
+   {   Hauppauge Nova-TD-500 (84xxx),
+   { dib0700_usb_id_table[36], NULL },
{ NULL },
}
}
diff -r 8c6ae18ddf9d -r 3f3fb810f3fc 
linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Wed Aug 27 14:46:39 
2008 +0100
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Fri Aug 29 19:39:52 
2008 -0300
@@ -131,6 +131,7 @@
 #define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301
 #define USB_PID_HAUPPAUGE_NOVA_T_500   0x9941
 #define USB_PID_HAUPPAUGE_NOVA_T_500_2 0x9950
+#define USB_PID_HAUPPAUGE_NOVA_T_500_3 0x8400
 #define USB_PID_HAUPPAUGE_NOVA_T_STICK 0x7050
 #define USB_PID_HAUPPAUGE_NOVA_T_STICK_2   0x7060
 #define USB_PID_HAUPPAUGE_NOVA_T_STICK_3   0x7070


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/3f3fb810f3fc7b9bf677078064219370f7884201

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-08-30 Thread Patch from Mauro Carvalho Chehab
The patch number 8851 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/bt856.c   |8 ++---
 linux/drivers/media/video/cpia.c|1 
 v4l/compat.h|   11 +--
 v4l/firmware/Makefile   |   11 +++
 v4l/scripts/headers_convert.pl  |   30 
 v4l2-apps/Makefile  |   17 ++-
 v4l2-apps/lib/Makefile  |2 -
 v4l2-apps/lib/frequencies.c |2 -
 v4l2-apps/lib/libv4l/libv4l1/Makefile   |2 -
 v4l2-apps/lib/libv4l/libv4l2/Makefile   |2 -
 v4l2-apps/lib/libv4l/libv4lconvert/Makefile |2 -
 v4l2-apps/test/Makefile |2 -
 v4l2-apps/test/ioctl-test.c |2 -
 v4l2-apps/util/Makefile |   10 +++---
 v4l2-apps/util/qv4l2/qv4l2.pro  |2 -
 v4l2-apps/util/rds/Makefile |2 -
 v4l2-apps/util/xc3028-firmware/Makefile |2 -
 17 files changed, 78 insertions(+), 30 deletions(-)

diff -r c825b93c54fe -r 32044c2a0440 linux/drivers/media/video/bt856.c
--- a/linux/drivers/media/video/bt856.c Fri Aug 29 22:57:10 2008 +0200
+++ b/linux/drivers/media/video/bt856.c Sat Aug 30 07:06:39 2008 -0300
@@ -69,8 +69,8 @@ MODULE_PARM_DESC(debug, Debug level (0-
 
 /* --- */
 
-#define REG_OFFSET 0xDA
-#define BT856_NR_REG   6
+#define BT856_REG_OFFSET   0xDA
+#define BT856_NR_REG   6
 
 struct bt856 {
unsigned char reg[BT856_NR_REG];
@@ -90,7 +90,7 @@ bt856_write (struct i2c_client *client,
 {
struct bt856 *encoder = i2c_get_clientdata(client);
 
-   encoder-reg[reg - REG_OFFSET] = value;
+   encoder-reg[reg - BT856_REG_OFFSET] = value;
return i2c_smbus_write_byte_data(client, reg, value);
 }
 
@@ -104,7 +104,7 @@ bt856_setbit (struct i2c_client *client,
 
return bt856_write(client, reg,
   (encoder-
-   reg[reg - REG_OFFSET]  ~(1  bit)) |
+   reg[reg - BT856_REG_OFFSET]  ~(1  bit)) |
(value ? (1  bit) : 0));
 }
 
diff -r c825b93c54fe -r 32044c2a0440 linux/drivers/media/video/cpia.c
--- a/linux/drivers/media/video/cpia.c  Fri Aug 29 22:57:10 2008 +0200
+++ b/linux/drivers/media/video/cpia.c  Sat Aug 30 07:06:39 2008 -0300
@@ -44,6 +44,7 @@
 #endif
 
 #include cpia.h
+#include compat.h
 
 static int video_nr = -1;
 
diff -r c825b93c54fe -r 32044c2a0440 v4l/compat.h
--- a/v4l/compat.h  Fri Aug 29 22:57:10 2008 +0200
+++ b/v4l/compat.h  Sat Aug 30 07:06:39 2008 -0300
@@ -230,6 +230,11 @@ static inline int list_is_singular(const
 {
return !list_empty(head)  (head-next == head-prev);
 }
-#endif
-
-#endif
+
+#endif
+
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
+#define current_uid() (current-uid)
+#endif
+
+#endif
diff -r c825b93c54fe -r 32044c2a0440 v4l/firmware/Makefile
--- a/v4l/firmware/Makefile Fri Aug 29 22:57:10 2008 +0200
+++ b/v4l/firmware/Makefile Sat Aug 30 07:06:39 2008 -0300
@@ -7,27 +7,26 @@ default: $(TARGETS)
 default: $(TARGETS)
 
 clean:
-   @for i in $(TARGETS); do if [ -e $$i ]; then rm $$i; fi; done
+   -rm -f $(TARGETS)
 
 distclean: clean
-   @for i in $(DIR); do if [ -d $$i ]; then rmdir $$i; fi; done
+   -for i in $(DIRS); do if [ -d $$i ]; then rmdir $$i; fi; done
 
 install: default
-   -for i in $(DIRS); do if mkdir /lib/firmware/$$i; done
+   -for i in $(DIRS); do if [ ! -d /lib/firmware/$$i ]; then mkdir -p 
/lib/firmware/$$i; fi; done
-for i in $(TARGETS); do cp $$i /lib/firmware/$$i; done
-   
+
 
 ##
 
 mkdir:
-   -mkdir $(DIRS)
+   -for i in $(DIRS); do if [ ! -d $$i ]; then mkdir -p $$i; fi; done
 
 
 ihex2fw: ../../linux/firmware/ihex2fw.c
gcc -Wall -o $@ $
 
 vicam/firmware.fw: ../../linux/firmware/vicam/firmware.H16 mkdir
-   -mkdir vicam
./ihex2fw -w $ $@
 
 dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir
diff -r c825b93c54fe -r 32044c2a0440 v4l/scripts/headers_convert.pl
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/v4l/scripts/headers_convert.plSat Aug 30 07:06:39 2008 -0300
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+#
+# headers_install prepare the listed header files for use in
+# user space and copy the files to their destination.
+#
+

[linuxtv-commits] [hg:v4l-dvb] Backport changes on arch

2008-08-30 Thread Patch from Mauro Carvalho Chehab
The patch number 8854 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Backport changes on arch


kernel-sync:

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/arch/arm/mach-pxa/devices.c  |   16 
 linux/arch/arm/mach-pxa/pcm990-baseboard.c |   17 +
 2 files changed, 33 insertions(+)

diff -r 7f2b60cdc267 -r 6032ecd6ad7e linux/arch/arm/mach-pxa/devices.c
--- a/linux/arch/arm/mach-pxa/devices.c Sat Aug 30 07:43:57 2008 -0300
+++ b/linux/arch/arm/mach-pxa/devices.c Sat Aug 30 11:07:04 2008 -0300
@@ -4,6 +4,7 @@
 #include linux/platform_device.h
 #include linux/dma-mapping.h
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
 #include asm/arch/gpio.h
 #include asm/arch/udc.h
 #include asm/arch/pxafb.h
@@ -17,6 +18,21 @@
 #include asm/arch/camera.h
 #include asm/arch/audio.h
 #include asm/arch/pxa3xx_nand.h
+#else
+#include mach/gpio.h
+#include mach/udc.h
+#include mach/pxafb.h
+#include mach/mmc.h
+#include mach/irda.h
+#include mach/i2c.h
+#include mach/mfp-pxa27x.h
+#include mach/ohci.h
+#include mach/pxa27x_keypad.h
+#include mach/pxa2xx_spi.h
+#include mach/camera.h
+#include mach/audio.h
+#include mach/pxa3xx_nand.h
+#endif
 
 #include devices.h
 #include generic.h
diff -r 7f2b60cdc267 -r 6032ecd6ad7e linux/arch/arm/mach-pxa/pcm990-baseboard.c
--- a/linux/arch/arm/mach-pxa/pcm990-baseboard.cSat Aug 30 07:43:57 
2008 -0300
+++ b/linux/arch/arm/mach-pxa/pcm990-baseboard.cSat Aug 30 11:07:04 
2008 -0300
@@ -22,16 +22,24 @@
 
 #include linux/irq.h
 #include linux/platform_device.h
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
 #include linux/ide.h
+#endif
 #include linux/i2c.h
 #include linux/pwm_backlight.h
 
 #include media/soc_camera.h
 
 #include asm/gpio.h
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
 #include asm/arch/i2c.h
 #include asm/arch/camera.h
+#else
+#include mach/i2c.h
+#include mach/camera.h
+#endif
 #include asm/mach/map.h
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
 #include asm/arch/pxa-regs.h
 #include asm/arch/audio.h
 #include asm/arch/mmc.h
@@ -39,6 +47,15 @@
 #include asm/arch/pcm990_baseboard.h
 #include asm/arch/pxafb.h
 #include asm/arch/mfp-pxa27x.h
+#else
+#include mach/pxa-regs.h
+#include mach/audio.h
+#include mach/mmc.h
+#include mach/ohci.h
+#include mach/pcm990_baseboard.h
+#include mach/pxafb.h
+#include mach/mfp-pxa27x.h
+#endif
 
 #include devices.h
 #include generic.h


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6032ecd6ad7e0a6b2568766d7dd05a36d2d976e4

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-09-02 Thread Patch from Mauro Carvalho Chehab
The patch number 8875 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/sonixb.c |  120 +++
 linux/drivers/media/video/gspca/spca561.c|   88 ++--
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h |8 
 3 files changed, 159 insertions(+), 57 deletions(-)

diff -r 2f69e8c7306f -r 9ab7fa3b7e4c linux/drivers/media/video/gspca/sonixb.c
--- a/linux/drivers/media/video/gspca/sonixb.c  Tue Sep 02 06:01:57 2008 -0300
+++ b/linux/drivers/media/video/gspca/sonixb.c  Tue Sep 02 06:07:32 2008 -0300
@@ -20,6 +20,26 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+/* Some documentation on known sonixb registers:
+
+RegUse
+0x10   high nibble red gain low nibble blue gain
+0x11   low nibble green gain
+0x12   hstart
+0x13   vstart
+0x15   hsize (hsize = register-value * 16)
+0x16   vsize (vsize = register-value * 16)
+0x17   bit 0 toggle compression quality (according to sn9c102 driver)
+0x18   bit 7 enables compression, bit 4-5 set image down scaling:
+   00 scale 1, 01 scale 1/2, 10, scale 1/4
+0x19   high-nibble is sensor clock divider, changes exposure on sensors which
+   use a clock generated by the bridge. Some sensors have their own clock.
+0x1c   auto_exposure area (for avg_lum) startx (startx = register-value * 32)
+0x1d   auto_exposure area (for avg_lum) starty (starty = register-value * 32)
+0x1e   auto_exposure area (for avg_lum) stopx (hsize = (0x1e - 0x1c) * 32)
+0x1f   auto_exposure area (for avg_lum) stopy (vsize = (0x1f - 0x1d) * 32)
+*/
+
 #define MODULE_NAME sonixb
 
 #include gspca.h
@@ -32,6 +52,7 @@ struct sd {
 struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
atomic_t avg_lum;
+   int prev_avg_lum;
 
unsigned char gain;
unsigned char exposure;
@@ -74,10 +95,10 @@ struct sensor_data {
 /* sensor_data flags */
 #define F_GAIN 0x01/* has gain */
 #define F_SIF  0x02/* sif or vga */
-#define F_RAW  0x04/* sensor tested ok with raw bayer mode */
 
 /* priv field of struct v4l2_pix_format flags (do not use low nibble!) */
 #define MODE_RAW 0x10  /* raw bayer mode */
+#define MODE_REDUCED_SIF 0x20  /* vga mode (320x240 / 160x120) on sif cam */
 
 /* ctrl_dis helper macros */
 #define NO_EXPO ((1  EXPOSURE_IDX) | (1  AUTOGAIN_IDX))
@@ -231,6 +252,16 @@ static struct v4l2_pix_format vga_mode[]
.priv = 0},
 };
 static struct v4l2_pix_format sif_mode[] = {
+   {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
+   .bytesperline = 160,
+   .sizeimage = 160 * 120,
+   .colorspace = V4L2_COLORSPACE_SRGB,
+   .priv = 1 | MODE_RAW | MODE_REDUCED_SIF},
+   {160, 120, V4L2_PIX_FMT_SN9C10X, V4L2_FIELD_NONE,
+   .bytesperline = 160,
+   .sizeimage = 160 * 120 * 5 / 4,
+   .colorspace = V4L2_COLORSPACE_SRGB,
+   .priv = 1 | MODE_REDUCED_SIF},
{176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 176 * 144,
@@ -241,6 +272,11 @@ static struct v4l2_pix_format sif_mode[]
.sizeimage = 176 * 144 * 5 / 4,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1},
+   {320, 240, V4L2_PIX_FMT_SN9C10X, V4L2_FIELD_NONE,
+   .bytesperline = 320,
+   .sizeimage = 320 * 240 * 5 / 4,
+   .colorspace = V4L2_COLORSPACE_SRGB,
+   .priv = 0 | MODE_REDUCED_SIF},
{352, 288, V4L2_PIX_FMT_SN9C10X, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288 * 5 / 4,
@@ -267,7 +303,7 @@ static const __u8 initOv6650[] = {
0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x0a, 0x16, 0x12, 0x68, 0x8b,
-   0x10, 0x1d, 0x10, 0x00, 0x06, 0x1f, 0x00
+   0x10, 0x1d, 0x10, 0x02, 0x02, 0x09, 0x07
 #else
 /* old version? */
0x64, 0x44, 0x28, 0x00, 0x00, 0x00, 0x00, 0x10,
@@ -342,7 +378,7 @@ static const __u8 initOv7630_3[] = {
 static const __u8 initOv7630_3[] = {
0x44, 0x44, 0x00, 0x1a, 0x20, 0x20, 0x20, 0x80, /* r01 .. r08 */
0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* r09 .. r10 */
-   0x00, 0x01, 0x01, 0x0a, /* r11 .. r14 */
+   0x00, 0x02, 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-09-02 Thread Patch from Mauro Carvalho Chehab
The patch number 8882 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/conex.c   |4 ++--
 linux/drivers/media/video/gspca/spca561.c |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r 2746374494cf -r 910ba7d707d4 linux/drivers/media/video/gspca/conex.c
--- a/linux/drivers/media/video/gspca/conex.c   Mon Sep 01 20:28:23 2008 +0200
+++ b/linux/drivers/media/video/gspca/conex.c   Tue Sep 02 08:39:29 2008 -0300
@@ -731,13 +731,13 @@ static void cx11646_jpeg(struct gspca_de
reg_w_val(gspca_dev, 0x, 0x00);
/* wait for completion */
retry = 50;
-   while (retry--) {
+   do {
reg_r(gspca_dev, 0x0002, 1);
/* 0x07 until 0x00 */
if (gspca_dev-usb_buf[0] == 0x00)
break;
reg_w_val(gspca_dev, 0x0053, 0x00);
-   }
+   } while (--retry);
if (retry == 0)
PDEBUG(D_ERR, Damned Errors sending jpeg Table);
/* send the qtable now */
diff -r 2746374494cf -r 910ba7d707d4 linux/drivers/media/video/gspca/spca561.c
--- a/linux/drivers/media/video/gspca/spca561.c Mon Sep 01 20:28:23 2008 +0200
+++ b/linux/drivers/media/video/gspca/spca561.c Tue Sep 02 08:39:29 2008 -0300
@@ -223,11 +223,11 @@ static int i2c_read(struct gspca_dev *gs
reg_w_val(gspca_dev-dev, 0x8804, 0x92);
reg_w_val(gspca_dev-dev, 0x8801, reg);
reg_w_val(gspca_dev-dev, 0x8802, (mode | 0x01));
-   while (retry--) {
+   do {
reg_r(gspca_dev, 0x8803, 1);
if (!gspca_dev-usb_buf)
break;
-   }
+   } while (--retry);
if (retry == 0)
return -1;
reg_r(gspca_dev, 0x8800, 1);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/910ba7d707d44d2ee1393ce89f4728aec2759e64

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~endriss/v4l-dvb

2008-09-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8891 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~endriss/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/tdhd1.h |   73 +
 linux/drivers/media/dvb/ttpci/Kconfig |1 
 linux/drivers/media/dvb/ttpci/av7110.c|  115 +-
 linux/drivers/media/dvb/ttpci/av7110.h|1 
 linux/drivers/media/dvb/ttpci/av7110_av.c |3 
 linux/drivers/media/dvb/ttpci/budget.c|   18 +++
 6 files changed, 185 insertions(+), 26 deletions(-)

diff -r ce254eb5215c -r 7c0633d429df linux/drivers/media/dvb/frontends/tdhd1.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/dvb/frontends/tdhd1.h Fri Sep 05 09:52:29 2008 -0300
@@ -0,0 +1,73 @@
+/*
+ * tdhd1.h - ALPS TDHD1-204A tuner support
+ *
+ * Copyright (C) 2008 Oliver Endriss [EMAIL PROTECTED]
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ *
+ *
+ * The project's page is at http://www.linuxtv.org
+ */
+
+#ifndef TDHD1_H
+#define TDHD1_H
+
+#include tda1004x.h
+
+static int alps_tdhd1_204_request_firmware(struct dvb_frontend *fe, const 
struct firmware **fw, char *name);
+
+static struct tda1004x_config alps_tdhd1_204a_config = {
+   .demod_address = 0x8,
+   .invert = 1,
+   .invert_oclk = 0,
+   .xtal_freq = TDA10046_XTAL_4M,
+   .agc_config = TDA10046_AGC_DEFAULT,
+   .if_freq = TDA10046_FREQ_3617,
+   .request_firmware = alps_tdhd1_204_request_firmware
+};
+
+static int alps_tdhd1_204a_tuner_set_params(struct dvb_frontend *fe, struct 
dvb_frontend_parameters *params)
+{
+   struct i2c_adapter *i2c = fe-tuner_priv;
+   u8 data[4];
+   struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 
sizeof(data) };
+   u32 div;
+
+   div = (params-frequency + 3616) / 16;
+
+   data[0] = (div  8)  0x7f;
+   data[1] = div  0xff;
+   data[2] = 0x85;
+
+   if (params-frequency = 17400  params-frequency = 23000)
+   data[3] = 0x02;
+   else if (params-frequency = 47000  params-frequency = 
82300)
+   data[3] = 0x0C;
+   else if (params-frequency  82300  params-frequency = 
86200)
+   data[3] = 0x8C;
+   else
+   return -EINVAL;
+
+   if (fe-ops.i2c_gate_ctrl)
+   fe-ops.i2c_gate_ctrl(fe, 1);
+   if (i2c_transfer(i2c, msg, 1) != 1)
+   return -EIO;
+
+   return 0;
+}
+
+#endif /* TDHD1_H */
diff -r ce254eb5215c -r 7c0633d429df linux/drivers/media/dvb/ttpci/Kconfig
--- a/linux/drivers/media/dvb/ttpci/Kconfig Thu Sep 04 10:23:06 2008 -0400
+++ b/linux/drivers/media/dvb/ttpci/Kconfig Fri Sep 05 09:52:29 2008 -0300
@@ -86,6 +86,7 @@ config DVB_BUDGET
select DVB_TDA10086 if !DVB_FE_CUSTOMISE
select DVB_TDA826X if !DVB_FE_CUSTOMISE
select DVB_LNBP21 if !DVB_FE_CUSTOMISE
+   select DVB_TDA1004X if !DVB_FE_CUSTOMISE
help
  Support for simple SAA7146 based DVB cards (so called Budget-
  or Nova-PCI cards) without onboard MPEG2 decoder, and without
diff -r ce254eb5215c -r 7c0633d429df linux/drivers/media/dvb/ttpci/av7110.c
--- a/linux/drivers/media/dvb/ttpci/av7110.cThu Sep 04 10:23:06 2008 -0400
+++ b/linux/drivers/media/dvb/ttpci/av7110.cFri Sep 05 09:52:29 2008 -0300
@@ -88,6 +88,7 @@ static int wss_cfg_4_3 = 0x4008;
 static int wss_cfg_4_3 = 0x4008;
 static int wss_cfg_16_9 = 0x0007;
 static int tv_standard;
+static int full_ts;
 
 module_param_named(debug, av7110_debug, int, 0644);
 MODULE_PARM_DESC(debug, debug level (bitmask, default 0));
@@ -106,6 +107,8 @@ MODULE_PARM_DESC(volume, initial volume
 MODULE_PARM_DESC(volume, initial volume: default 255 (range 0-255));
 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-09-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8908 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/af9005-remote.c|2 
 linux/drivers/media/dvb/dvb-usb/af9005-script.h|2 
 linux/drivers/media/dvb/dvb-usb/af9005.c   |   23 ++-
 linux/drivers/media/dvb/frontends/cx24110.h|   15 +++-
 linux/drivers/media/dvb/frontends/dib7000m.c   |3 
 linux/drivers/media/dvb/frontends/dvb_dummy_fe.c   |4 -
 linux/drivers/media/dvb/frontends/sp887x.c |3 
 linux/drivers/media/dvb/ttpci/av7110.c |   18 ++---
 linux/drivers/media/video/cpia2/cpia2_core.c   |   10 +--
 linux/drivers/media/video/cpia2/cpia2_usb.c|2 
 linux/drivers/media/video/cx23885/cx23885-417.c|2 
 linux/drivers/media/video/cx23885/cx23885-vbi.c|9 +-
 linux/drivers/media/video/cx23885/cx23885-video.c  |   31 +++---
 linux/drivers/media/video/cx88/cx88-blackbird.c|1 
 linux/drivers/media/video/em28xx/em28xx-dvb.c  |2 
 linux/drivers/media/video/em28xx/em28xx-i2c.c  |7 +-
 linux/drivers/media/video/em28xx/em28xx.h  |4 -
 linux/drivers/media/video/gspca/sonixb.c   |2 
 linux/drivers/media/video/gspca/vc032x.c   |1 
 linux/drivers/media/video/ov511.c  |2 
 linux/drivers/media/video/ovcamchip/ovcamchip_core.c   |6 -
 linux/drivers/media/video/ovcamchip/ovcamchip_priv.h   |6 +
 linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c   |2 
 linux/drivers/media/video/s2255drv.c   |2 
 linux/drivers/media/video/sn9c102/sn9c102_core.c   |   20 ++
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h   |   20 --
 linux/drivers/media/video/sn9c102/sn9c102_hv7131d.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_hv7131r.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_mi0343.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_mi0360.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_mt9v111.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_ov7630.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_ov7660.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_pas106b.c|1 
 linux/drivers/media/video/sn9c102/sn9c102_pas202bcb.c  |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5110c1b.c |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5110d.c   |1 
 linux/drivers/media/video/sn9c102/sn9c102_tas5130d1b.c |1 
 linux/drivers/media/video/zoran_device.c   |2 
 linux/drivers/media/video/zoran_device.h   |8 ++
 linux/drivers/media/video/zoran_driver.c   |6 -
 v4l2-apps/util/v4l2-ctl.cpp|   16 ++---
 42 files changed, 127 insertions(+), 116 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/637a4d8cc61af16ea20bbdc9e69f582feff52eb0

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-09-10 Thread Patch from Mauro Carvalho Chehab
The patch number 8934 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt |2 
 linux/drivers/media/video/gspca/gspca.c   |   25 +-
 linux/drivers/media/video/gspca/pac207.c  |1 
 linux/drivers/media/video/gspca/sonixj.c  |   51 +-
 linux/drivers/media/video/gspca/zc3xx.c   |4 -
 5 files changed, 67 insertions(+), 16 deletions(-)

diff -r ed5ea7c1bc82 -r e3f4b17fead0 linux/Documentation/video4linux/gspca.txt
--- a/linux/Documentation/video4linux/gspca.txt Mon Sep 08 07:54:27 2008 -0300
+++ b/linux/Documentation/video4linux/gspca.txt Wed Sep 10 23:34:19 2008 -0300
@@ -42,6 +42,7 @@ zc3xx 0458:700c   Genius VideoCam V3
 zc3xx  0458:700c   Genius VideoCam V3
 zc3xx  0458:700f   Genius VideoCam Web V2
 sonixj 0458:7025   Genius Eye 311Q
+sonixj 0458:702e   Genius Slim 310 NB
 sonixj 045e:00f5   MicroSoft VX3000
 sonixj 045e:00f7   MicroSoft VX1000
 ov519  045e:028c   Micro$oft xbox cam
@@ -181,6 +182,7 @@ pac207  093a:2470   Genius GF112
 pac207 093a:2470   Genius GF112
 pac207 093a:2471   Genius VideoCam ge111
 pac207 093a:2472   Genius VideoCam ge110
+pac207 093a:2476   Genius e-Messenger 112
 pac7311093a:2600   PAC7311 Typhoon
 pac7311093a:2601   Philips SPC 610 NC
 pac7311093a:2603   PAC7312
diff -r ed5ea7c1bc82 -r e3f4b17fead0 linux/drivers/media/video/gspca/gspca.c
--- a/linux/drivers/media/video/gspca/gspca.c   Mon Sep 08 07:54:27 2008 -0300
+++ b/linux/drivers/media/video/gspca/gspca.c   Wed Sep 10 23:34:19 2008 -0300
@@ -47,7 +47,7 @@ MODULE_DESCRIPTION(GSPCA USB Camera Dri
 MODULE_DESCRIPTION(GSPCA USB Camera Driver);
 MODULE_LICENSE(GPL);
 
-#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 2, 0)
+#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 3, 0)
 
 static int video_nr = -1;
 
@@ -195,7 +195,7 @@ static void bulk_irq(struct urb *urb
 {
struct gspca_dev *gspca_dev = (struct gspca_dev *) urb-context;
struct gspca_frame *frame;
-   int j, ret;
+   int j;
 
PDEBUG(D_PACK, bulk irq);
if (!gspca_dev-streaming)
@@ -222,11 +222,6 @@ static void bulk_irq(struct urb *urb
urb-transfer_buffer,
urb-actual_length);
}
-   /* resubmit the URB */
-   urb-status = 0;
-   ret = usb_submit_urb(urb, GFP_ATOMIC);
-   if (ret  0)
-   PDEBUG(D_ERR|D_PACK, usb_submit_urb() ret %d, ret);
 }
 
 /*
@@ -512,20 +507,20 @@ static int create_urbs(struct gspca_dev 
PDEBUG(D_STREAM,
isoc %d pkts size %d = bsize:%d,
npkt, psize, bsize);
+   nurbs = DEF_NURBS;
} else {
npkt = 0;
bsize = psize;
PDEBUG(D_STREAM, bulk bsize:%d, bsize);
-   }
-
-   nurbs = DEF_NURBS;
+   nurbs = 1;
+   }
+
gspca_dev-nurbs = nurbs;
for (n = 0; n  nurbs; n++) {
urb = usb_alloc_urb(npkt, GFP_KERNEL);
if (!urb) {
err(usb_alloc_urb failed);
-   for (i = 0; i  n; i++)
-   usb_free_urb(gspca_dev-urb[i]);
+   destroy_urbs(gspca_dev);
return -ENOMEM;
}
urb-transfer_buffer = usb_buffer_alloc(gspca_dev-dev,
@@ -535,8 +530,8 @@ static int create_urbs(struct gspca_dev 
 
if (urb-transfer_buffer == NULL) {
usb_free_urb(urb);
+   err(usb_buffer_urb failed);
destroy_urbs(gspca_dev);
-   err(usb_buffer_urb failed);
return -ENOMEM;
}
gspca_dev-urb[n] = urb;
@@ -593,6 +588,10 @@ static int gspca_init_transfer(struct gs
gspca_dev-sd_desc-start(gspca_dev);
gspca_dev-streaming = 1;
atomic_set(gspca_dev-nevent, 0);
+
+   /* start the bulk transfer is done by the subdriver */
+   if (gspca_dev-bulk)
+   break;
 
/* submit the URBs */
for (n = 0; n  gspca_dev-nurbs; n++) {
diff -r 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~dougsland/patches-em28xx

2008-09-10 Thread Patch from Mauro Carvalho Chehab
The patch number 8938 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~dougsland/patches-em28xx


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.em28xx |4 -
 linux/drivers/media/video/em28xx/em28xx-cards.c |   24 
 linux/drivers/media/video/em28xx/em28xx-i2c.c   |   28 +++--
 linux/drivers/media/video/em28xx/em28xx-video.c |   45 +---
 4 files changed, 64 insertions(+), 37 deletions(-)

diff -r e3f4b17fead0 -r 479798b5b965 
linux/Documentation/video4linux/CARDLIST.em28xx
--- a/linux/Documentation/video4linux/CARDLIST.em28xx   Wed Sep 10 23:34:19 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.em28xx   Wed Sep 10 23:38:15 
2008 -0300
@@ -1,5 +1,5 @@
   0 - Unknown EM2800 video grabber (em2800)[eb1a:2800]
-  1 - Unknown EM2750/28xx video grabber(em2820/em2840) 
[eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883]
+  1 - Unknown EM2750/28xx video grabber(em2820/em2840) 
[eb1a:2820,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883]
   2 - Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
   3 - Pinnacle PCTV USB 2  (em2820/em2840) [2304:0208]
   4 - Hauppauge WinTV USB 2(em2820/em2840) 
[2040:4200,2040:4201]
@@ -12,7 +12,7 @@
  11 - Terratec Hybrid XS   (em2880)[0ccd:0042]
  12 - Kworld PVR TV 2800 RF(em2820/em2840)
  13 - Terratec Prodigy XS  (em2880)[0ccd:0047]
- 14 - Pixelview Prolink PlayTV USB 2.0 (em2820/em2840)
+ 14 - Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) [eb1a:2821]
  15 - V-Gear PocketTV  (em2800)
  16 - Hauppauge WinTV HVR 950  (em2883)
[2040:6513,2040:6517,2040:651b,2040:651f]
  17 - Pinnacle PCTV HD Pro Stick   (em2880)[2304:0227]
diff -r e3f4b17fead0 -r 479798b5b965 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Sep 10 23:34:19 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Sep 10 23:38:15 
2008 -0300
@@ -94,28 +94,6 @@ struct em28xx_board em28xx_boards[] = {
.amux = 0,
} },
},
-   [EM2800_BOARD_KWORLD_USB2800] = {
-   .name = Kworld USB2800,
-   .valid= EM28XX_BOARD_NOT_VALIDATED,
-   .is_em2800= 1,
-   .vchannels= 3,
-   .tuner_type   = TUNER_PHILIPS_FCV1236D,
-   .tda9887_conf = TDA9887_PRESENT,
-   .decoder  = EM28XX_SAA7113,
-   .input  = { {
-   .type = EM28XX_VMUX_TELEVISION,
-   .vmux = SAA7115_COMPOSITE2,
-   .amux = 0,
-   }, {
-   .type = EM28XX_VMUX_COMPOSITE1,
-   .vmux = SAA7115_COMPOSITE0,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = SAA7115_SVIDEO3,
-   .amux = 1,
-   } },
-   },
[EM2820_BOARD_KWORLD_PVRTV2800RF] = {
.name = Kworld PVR TV 2800 RF,
.is_em2800= 0,
@@ -1123,7 +1101,7 @@ struct usb_device_id em28xx_id_table [] 
{ USB_DEVICE(0xeb1a, 0x2820),
.driver_info = EM2820_BOARD_UNKNOWN },
{ USB_DEVICE(0xeb1a, 0x2821),
-   .driver_info = EM2820_BOARD_UNKNOWN },
+   .driver_info = EM2820_BOARD_PROLINK_PLAYTV_USB2 },
{ USB_DEVICE(0xeb1a, 0x2860),
.driver_info = EM2820_BOARD_UNKNOWN },
{ USB_DEVICE(0xeb1a, 0x2861),
diff -r e3f4b17fead0 -r 479798b5b965 
linux/drivers/media/video/em28xx/em28xx-i2c.c
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c Wed Sep 10 23:34:19 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c Wed Sep 10 23:38:15 
2008 -0300
@@ -336,8 +336,11 @@ static int em28xx_i2c_eeprom(struct em28
 
/* Check if board has eeprom */
err = i2c_master_recv(dev-i2c_client, buf, 0);
-   if (err  0)
-   return -1;
+   if (err  0) {
+   em28xx_errdev(%s: i2c_master_recv failed! err [%d]\n,
+   __func__, err);
+   return err;
+   }
 
buf = 0;
 
@@ 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/xc2028

2008-09-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8969 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/xc2028


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/tuner-xc2028.h |1 +
 linux/drivers/media/dvb/dvb-usb/cxusb.c  |2 +-
 linux/drivers/media/video/cx23885/cx23885-dvb.c  |8 
 linux/drivers/media/video/cx88/cx88-dvb.c|2 +-
 linux/drivers/media/video/em28xx/em28xx-cards.c  |5 -
 5 files changed, 11 insertions(+), 7 deletions(-)

diff -r a50800712eb7 -r f9d11c3a066d 
linux/drivers/media/common/tuners/tuner-xc2028.h
--- a/linux/drivers/media/common/tuners/tuner-xc2028.h  Wed Sep 24 09:56:24 
2008 -0300
+++ b/linux/drivers/media/common/tuners/tuner-xc2028.h  Wed Sep 24 09:59:57 
2008 -0300
@@ -10,6 +10,7 @@
 #include dvb_frontend.h
 
 #define XC2028_DEFAULT_FIRMWARE xc3028-v27.fw
+#define XC3028L_DEFAULT_FIRMWARE xc3028L-v36.fw
 
 /*  Dmoduler   IF (kHz) */
 #defineXC3028_FE_DEFAULT   0   /* Don't load SCODE */
diff -r a50800712eb7 -r f9d11c3a066d linux/drivers/media/dvb/dvb-usb/cxusb.c
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c   Wed Sep 24 09:56:24 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c   Wed Sep 24 09:59:57 2008 -0300
@@ -773,7 +773,7 @@ static int cxusb_dvico_xc3028_tuner_atta
.callback  = dvico_bluebird_xc2028_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028-v27.fw,
+   .fname   = XC2028_DEFAULT_FIRMWARE,
.max_len = 64,
.demod   = XC3028_FE_ZARLINK456,
};
diff -r a50800712eb7 -r f9d11c3a066d 
linux/drivers/media/video/cx23885/cx23885-dvb.c
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c   Wed Sep 24 09:56:24 
2008 -0300
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c   Wed Sep 24 09:59:57 
2008 -0300
@@ -408,7 +408,7 @@ static int dvb_register(struct cx23885_t
.callback  = cx23885_tuner_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028-v27.fw,
+   .fname   = XC2028_DEFAULT_FIRMWARE,
.max_len = 64,
.scode_table = XC3028_FE_OREN538,
};
@@ -448,7 +448,7 @@ static int dvb_register(struct cx23885_t
.callback  = cx23885_tuner_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028L-v36.fw,
+   .fname   = XC3028L_DEFAULT_FIRMWARE,
.max_len = 64,
.demod   = 5000,
.d2633   = 1
@@ -490,7 +490,7 @@ static int dvb_register(struct cx23885_t
.callback  = cx23885_tuner_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028-v27.fw,
+   .fname   = XC2028_DEFAULT_FIRMWARE,
.max_len = 64,
.demod   = XC3028_FE_ZARLINK456,
};
@@ -517,7 +517,7 @@ static int dvb_register(struct cx23885_t
.callback  = cx23885_tuner_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028-v27.fw,
+   .fname   = XC2028_DEFAULT_FIRMWARE,
.max_len = 64,
.demod   = XC3028_FE_ZARLINK456,
};
diff -r a50800712eb7 -r f9d11c3a066d linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Wed Sep 24 09:56:24 2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Wed Sep 24 09:59:57 2008 -0300
@@ -838,7 +838,7 @@ static int dvb_register(struct cx8802_de
.callback  = cx88_pci_nano_callback,
};
static struct xc2028_ctrl ctl = {
-   .fname   = xc3028-v27.fw,
+   .fname   = XC2028_DEFAULT_FIRMWARE,
.max_len = 64,
  

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~anttip/af9015

2008-09-24 Thread Patch from Mauro Carvalho Chehab
The patch number 8977 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~anttip/af9015


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/tuners/mt2060.c  |   38 
 linux/drivers/media/dvb/dvb-usb/Kconfig |   12 
 linux/drivers/media/dvb/dvb-usb/Makefile|3 
 linux/drivers/media/dvb/dvb-usb/af9015.c| 1474 +
 linux/drivers/media/dvb/dvb-usb/af9015.h|  524 
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h   |   20 
 linux/drivers/media/dvb/frontends/Kconfig   |6 
 linux/drivers/media/dvb/frontends/Makefile  |1 
 linux/drivers/media/dvb/frontends/af9013.c  | 1687 
 linux/drivers/media/dvb/frontends/af9013.h  |  107 +
 linux/drivers/media/dvb/frontends/af9013_priv.h |  869 
 11 files changed, 4738 insertions(+), 3 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f40647e91b15d3cab9f88b2caa8a805bc99293b5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] saa7134: Add support for Avermedia PCI pure analog (M135A)

2008-09-29 Thread Patch from Mauro Carvalho Chehab
The patch number 9060 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
saa7134: Add support for Avermedia PCI pure analog (M135A)


Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring
this development.

Signed-off-by: Gilberto [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.saa7134  |1 
 linux/drivers/media/common/ir-keymaps.c   |   50 ++
 linux/drivers/media/video/saa7134/saa7134-cards.c |   41 +++
 linux/drivers/media/video/saa7134/saa7134-input.c |6 +
 linux/drivers/media/video/saa7134/saa7134.h   |1 
 linux/include/media/ir-common.h   |1 
 6 files changed, 100 insertions(+)

diff -r 3c9137f45d73 -r fa0de4f2637a 
linux/Documentation/video4linux/CARDLIST.saa7134
--- a/linux/Documentation/video4linux/CARDLIST.saa7134  Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.saa7134  Thu Jun 26 17:03:00 
2008 -0300
@@ -147,3 +147,4 @@ 146 - ASUSTeK P7131 Analog
 146 - ASUSTeK P7131 Analog
 147 - Asus Tiger 3in1  [1043:4878]
 148 - Encore ENLTV-FM v5.3 [1a7f:2008]
+149 - Avermedia PCI pure analog (M135A)[1461:f11d]
diff -r 3c9137f45d73 -r fa0de4f2637a linux/drivers/media/common/ir-keymaps.c
--- a/linux/drivers/media/common/ir-keymaps.c   Thu Jun 26 17:03:00 2008 -0300
+++ b/linux/drivers/media/common/ir-keymaps.c   Thu Jun 26 17:03:00 2008 -0300
@@ -103,6 +103,56 @@ IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[I
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt);
+
+/* Mauro Carvalho Chehab [EMAIL PROTECTED] */
+IR_KEYTAB_TYPE ir_codes_avermedia_m135a[IR_KEYTAB_SIZE] = {
+   [0x00] = KEY_POWER2,
+   [0x2e] = KEY_DOT,   /* '.' */
+   [0x01] = KEY_MODE,  /* TV/FM */
+
+   [0x05] = KEY_1,
+   [0x06] = KEY_2,
+   [0x07] = KEY_3,
+   [0x09] = KEY_4,
+   [0x0a] = KEY_5,
+   [0x0b] = KEY_6,
+   [0x0d] = KEY_7,
+   [0x0e] = KEY_8,
+   [0x0f] = KEY_9,
+   [0x11] = KEY_0,
+
+   [0x13] = KEY_RIGHT, /* - */
+   [0x12] = KEY_LEFT,  /* - */
+
+   [0x17] = KEY_SLEEP, /* Capturar Imagem */
+   [0x10] = KEY_SHUFFLE,   /* Amostra */
+
+   /* FIXME: The keys bellow aren't ok */
+
+   [0x43] = KEY_CHANNELUP,
+   [0x42] = KEY_CHANNELDOWN,
+   [0x1f] = KEY_VOLUMEUP,
+   [0x1e] = KEY_VOLUMEDOWN,
+   [0x0c] = KEY_ENTER,
+
+   [0x14] = KEY_MUTE,
+   [0x08] = KEY_AUDIO,
+
+   [0x03] = KEY_TEXT,
+   [0x04] = KEY_EPG,
+   [0x2b] = KEY_TV2,   /* TV2 */
+
+   [0x1d] = KEY_RED,
+   [0x1c] = KEY_YELLOW,
+   [0x41] = KEY_GREEN,
+   [0x40] = KEY_BLUE,
+
+   [0x1a] = KEY_PLAYPAUSE,
+   [0x19] = KEY_RECORD,
+   [0x18] = KEY_PLAY,
+   [0x1b] = KEY_STOP,
+};
+EXPORT_SYMBOL_GPL(ir_codes_avermedia_m135a);
 
 /* Attila Kondoros [EMAIL PROTECTED] */
 IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
diff -r 3c9137f45d73 -r fa0de4f2637a 
linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jun 26 17:03:00 
2008 -0300
@@ -3710,6 +3710,40 @@ struct saa7134_board saa7134_boards[] = 
.tv = 1,
}},
},
+   [SAA7134_BOARD_AVERMEDIA_M135A] = {
+   .name   = Avermedia PCI pure analog (M135A),
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_PHILIPS_TDA8290,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .tuner_config   = 2,
+   .gpiomask   = 0x02020,
+   .inputs = {{
+   .name = name_tv,
+   .vmux = 1,
+   .amux = TV,
+   .tv   = 1,
+   }, {
+   .name = name_comp1,
+   .vmux = 3,
+   .amux = LINE1,
+   }, {
+   .name = name_svideo,
+   .vmux = 8,
+   .amux = LINE1,
+   } },
+   .radio = {
+   .name = name_radio,
+   .amux = TV,
+   .gpio = 0x0020,
+   },
+   .mute = {
+

[linuxtv-commits] [hg:v4l-dvb] saa7134: Add support for Real Audio 220

2008-09-29 Thread Patch from Mauro Carvalho Chehab
The patch number 9061 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
saa7134: Add support for Real Audio 220


Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring
this development.

Signed-off-by: Gilberto [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.saa7134  |1 
 linux/drivers/media/common/ir-keymaps.c   |   40 ++
 linux/drivers/media/video/saa7134/saa7134-cards.c |   36 
 linux/drivers/media/video/saa7134/saa7134-input.c |6 ++
 linux/drivers/media/video/saa7134/saa7134.h   |1 
 linux/include/media/ir-common.h   |2 
 6 files changed, 85 insertions(+), 1 deletion(-)

diff -r fa0de4f2637a -r fcd3cebe7d42 
linux/Documentation/video4linux/CARDLIST.saa7134
--- a/linux/Documentation/video4linux/CARDLIST.saa7134  Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.saa7134  Thu Jun 26 17:03:00 
2008 -0300
@@ -146,5 +146,6 @@ 145 - AVerMedia MiniPCI DVB-T Hybrid M1
 145 - AVerMedia MiniPCI DVB-T Hybrid M103  [1461:f636]
 146 - ASUSTeK P7131 Analog
 147 - Asus Tiger 3in1  [1043:4878]
+147 - Zogis Real Angel 220
 148 - Encore ENLTV-FM v5.3 [1a7f:2008]
 149 - Avermedia PCI pure analog (M135A)[1461:f11d]
diff -r fa0de4f2637a -r fcd3cebe7d42 linux/drivers/media/common/ir-keymaps.c
--- a/linux/drivers/media/common/ir-keymaps.c   Thu Jun 26 17:03:00 2008 -0300
+++ b/linux/drivers/media/common/ir-keymaps.c   Thu Jun 26 17:03:00 2008 -0300
@@ -2431,3 +2431,43 @@ IR_KEYTAB_TYPE ir_codes_encore_enltv_fm5
[0x47] = KEY_SLEEP, /* shutdown */
 };
 EXPORT_SYMBOL_GPL(ir_codes_encore_enltv_fm53);
+
+/* Zogis Real Audio 220 - 32 keys IR */
+IR_KEYTAB_TYPE ir_codes_real_audio_220_32_keys[IR_KEYTAB_SIZE] = {
+   [0x1c] = KEY_RADIO,
+   [0x12] = KEY_POWER2,
+
+   [0x01] = KEY_1,
+   [0x02] = KEY_2,
+   [0x03] = KEY_3,
+   [0x04] = KEY_4,
+   [0x05] = KEY_5,
+   [0x06] = KEY_6,
+   [0x07] = KEY_7,
+   [0x08] = KEY_8,
+   [0x09] = KEY_9,
+   [0x00] = KEY_0,
+
+   [0x0c] = KEY_VOLUMEUP,
+   [0x18] = KEY_VOLUMEDOWN,
+   [0x0b] = KEY_CHANNELUP,
+   [0x15] = KEY_CHANNELDOWN,
+   [0x16] = KEY_ENTER,
+
+   [0x11] = KEY_LIST,  /* Source */
+   [0x0d] = KEY_AUDIO, /* stereo */
+
+   [0x0f] = KEY_PREVIOUS,  /* Prev */
+   [0x1b] = KEY_PAUSE, /* Timeshift */
+   [0x1a] = KEY_NEXT,  /* Next */
+
+   [0x0e] = KEY_STOP,
+   [0x1f] = KEY_PLAY,
+   [0x1e] = KEY_PLAYPAUSE, /* Pause */
+
+   [0x1d] = KEY_RECORD,
+   [0x13] = KEY_MUTE,
+   [0x19] = KEY_SHUFFLE,   /* Snapshot */
+
+};
+EXPORT_SYMBOL_GPL(ir_codes_real_audio_220_32_keys);
diff -r fa0de4f2637a -r fcd3cebe7d42 
linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jun 26 17:03:00 
2008 -0300
@@ -4550,6 +4550,41 @@ struct saa7134_board saa7134_boards[] = 
.name = name_radio,
.amux = TV,
.gpio = 0x020,
+   },
+   },
+   [SAA7134_BOARD_REAL_ANGEL_220] = {
+   .name   = Zogis Real Angel 220,
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_TNF_5335MF,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .gpiomask   = 0x801a8087,
+   .inputs = { {
+   .name   = name_tv,
+   .vmux   = 3,
+   .amux   = LINE2,
+   .tv = 1,
+   .gpio   = 0x624000,
+   }, {
+   .name   = name_comp1,
+   .vmux   = 1,
+   .amux   = LINE1,
+   .gpio   = 0x624000,
+   }, {
+   .name   = name_svideo,
+   .vmux   = 1,
+   .amux   = LINE1,
+   .gpio   = 0x624000,
+   } },
+   .radio = {
+   .name   = name_radio,
+   .amux   = LINE2,
+   .gpio   = 0x624001,
+   },
+   .mute = {
+  

[linuxtv-commits] [hg:v4l-dvb] Add support for Prolink Pixelview Global Extreme

2008-09-29 Thread Patch from Mauro Carvalho Chehab
The patch number 9062 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add support for Prolink Pixelview Global Extreme


Thanks to Sidney Matias [EMAIL PROTECTED] for getting GPIO
values and testing on this device.

Priority: normal

CC: Sidney Matias [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.cx88 |1 
 linux/drivers/media/video/cx88/cx88-cards.c   |   39 +-
 linux/drivers/media/video/cx88/cx88-input.c   |1 
 linux/drivers/media/video/cx88/cx88.h |1 
 4 files changed, 41 insertions(+), 1 deletion(-)

diff -r fcd3cebe7d42 -r 34c047b382c1 
linux/Documentation/video4linux/CARDLIST.cx88
--- a/linux/Documentation/video4linux/CARDLIST.cx88 Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.cx88 Mon Sep 29 12:08:29 
2008 -0300
@@ -72,3 +72,4 @@
  71 - Omicom SS4 DVB-S/S2 PCI [A044:2011]
  72 - TBS 8920 DVB-S/S2   [8920:]
  73 - TeVii S420 DVB-S[d420:9022]
+ 74 - Prolink Pixelview Global Extreme[1554:4976]
diff -r fcd3cebe7d42 -r 34c047b382c1 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c   Thu Jun 26 17:03:00 
2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-cards.c   Mon Sep 29 12:08:29 
2008 -0300
@@ -1663,6 +1663,36 @@ static const struct cx88_board cx88_boar
.radio = {
.type   = CX88_RADIO,
.gpio2 = 0x0cfb,
+   },
+   },
+   [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
+   .name   = Prolink Pixelview Global Extreme,
+   .tuner_type = TUNER_XC2028,
+   .tuner_addr = 0x61,
+   .input  = { {
+   .type   = CX88_VMUX_TELEVISION,
+   .vmux   = 0,
+   .gpio0 = 0x04fb,
+   .gpio1 = 0x04080,
+   .gpio2 = 0x0cf7,
+   }, {
+   .type   = CX88_VMUX_COMPOSITE1,
+   .vmux   = 1,
+   .gpio0 = 0x04fb,
+   .gpio1 = 0x04080,
+   .gpio2 = 0x0cfb,
+   }, {
+   .type   = CX88_VMUX_SVIDEO,
+   .vmux   = 2,
+   .gpio0 = 0x04fb,
+   .gpio1 = 0x04080,
+   .gpio2 = 0x0cfb,
+   } },
+   .radio = {
+   .type   = CX88_RADIO,
+   .gpio0 = 0x04ff,
+   .gpio1 = 0x04080,
+   .gpio2 = 0x0cf7,
},
},
/* Both radio, analog and ATSC work with this board.
@@ -2162,6 +2192,10 @@ static const struct cx88_subid cx88_subi
.subvendor = 0x1554,
.subdevice = 0x4935,
.card  = CX88_BOARD_PROLINK_PV_8000GT,
+   }, {
+   .subvendor = 0x1554,
+   .subdevice = 0x4976,
+   .card  = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
}, {
.subvendor = 0x17de,
.subdevice = 0x08c1,
@@ -2466,6 +2500,7 @@ static int cx88_xc2028_tuner_callback(st
return cx88_xc3028_geniatech_tuner_callback(core,
command, arg);
case CX88_BOARD_PROLINK_PV_8000GT:
+   case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
return cx88_pv_8000gt_callback(core, command, arg);
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
@@ -2619,6 +2654,7 @@ static void cx88_card_setup_pre_i2c(stru
udelay(1000);
break;
 
+   case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
case CX88_BOARD_PROLINK_PV_8000GT:
cx_write(MO_GP2_IO, 0xcf7);
mdelay(50);
@@ -2666,9 +2702,10 @@ void cx88_setup_xc3028(struct cx88_core 
case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
ctl-demod = XC3028_FE_OREN538;
break;
+   case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
case CX88_BOARD_PROLINK_PV_8000GT:
/*
-* This board uses non-MTS firmware
+* Those boards uses non-MTS firmware
 */
break;
default:
diff -r fcd3cebe7d42 -r 34c047b382c1 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/s2

2008-10-01 Thread Patch from Mauro Carvalho Chehab
The patch number 9073 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/s2




Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dm1105/Kconfig  |2 
 linux/drivers/media/dvb/dvb-core/dvb_frontend.c |   21 ++
 linux/drivers/media/dvb/dvb-usb/Kconfig |1 
 linux/drivers/media/video/cx88/cx88-video.c |5 
 linux/drivers/media/video/cx88/cx88.h   |1 
 linux/include/linux/dvb/frontend.h  |  116 +++-
 linux/include/linux/dvb/version.h   |4 
 7 files changed, 80 insertions(+), 70 deletions(-)

diff -r f054dabf8971 -r 4db9722caf4f linux/drivers/media/dvb/dm1105/Kconfig
--- a/linux/drivers/media/dvb/dm1105/KconfigFri Sep 05 14:33:54 2008 -0300
+++ b/linux/drivers/media/dvb/dm1105/KconfigWed Oct 01 13:13:56 2008 -0300
@@ -3,6 +3,8 @@ config DVB_DM1105
depends on DVB_CORE  PCI  I2C
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_STV0299 if !DVB_FE_CUSTOMISE
+   select DVB_STV0288 if !DVB_FE_CUSTOMISE
+   select DVB_STB6000 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
select DVB_SI21XX if !DVB_FE_CUSTOMISE
help
diff -r f054dabf8971 -r 4db9722caf4f 
linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Fri Sep 05 14:33:54 
2008 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Wed Oct 01 13:13:56 
2008 -0300
@@ -45,6 +45,7 @@
 #include dvb_frontend.h
 #include dvbdev.h
 #include compat.h
+#include linux/dvb/version.h
 
 static int dvb_frontend_debug;
 static int dvb_shutdown_timeout;
@@ -906,6 +907,11 @@ struct dtv_cmds_h dtv_cmds[] = {
.set= 0,
},
 #endif
+   [DTV_API_VERSION] = {
+   .name   = DTV_API_VERSION,
+   .cmd= DTV_API_VERSION,
+   .set= 0,
+   },
 };
 
 void dtv_property_dump(struct dtv_property *tvp)
@@ -1210,6 +1216,9 @@ int dtv_property_process_get(struct dvb_
case DTV_TONE:
tvp-u.data = fe-dtv_property_cache.sectone;
break;
+   case DTV_API_VERSION:
+   tvp-u.data = (DVB_API_VERSION  8) | DVB_API_VERSION_MINOR;
+   break;
default:
r = -1;
}
@@ -1377,8 +1386,10 @@ static int dvb_frontend_ioctl_properties
goto out;
}
 
-   for (i = 0; i  tvps-num; i++)
-   err |= dtv_property_process_set(fe, tvp + i, inode, 
file);
+   for (i = 0; i  tvps-num; i++) {
+   (tvp + i)-result = dtv_property_process_set(fe, tvp + 
i, inode, file);
+   err |= (tvp + i)-result;
+   }
 
if(fe-dtv_property_cache.state == DTV_TUNE) {
printk(%s() Property cache is full, tuning\n, 
__FUNCTION__);
@@ -1410,8 +1421,10 @@ static int dvb_frontend_ioctl_properties
goto out;
}
 
-   for (i = 0; i  tvps-num; i++)
-   err |= dtv_property_process_get(fe, tvp + i, inode, 
file);
+   for (i = 0; i  tvps-num; i++) {
+   (tvp + i)-result = dtv_property_process_get(fe, tvp + 
i, inode, file);
+   err |= (tvp + i)-result;
+   }
 
if (copy_to_user(tvps-props, tvp, tvps-num * sizeof(struct 
dtv_property))) {
err = -EFAULT;
diff -r f054dabf8971 -r 4db9722caf4f linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Fri Sep 05 14:33:54 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Wed Oct 01 13:13:56 2008 -0300
@@ -254,6 +254,7 @@ config DVB_USB_DW2102
select DVB_PLL if !DVB_FE_CUSTOMISE
select DVB_STV0299 if !DVB_FE_CUSTOMISE
select DVB_CX24116 if !DVB_FE_CUSTOMISE
+   select DVB_SI21XX if !DVB_FE_CUSTOMISE
help
  Say Y here to support the DvbWorld DVB-S/S2 USB2.0 receivers
  and the TeVii S650.
diff -r f054dabf8971 -r 4db9722caf4f linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c   Fri Sep 05 14:33:54 
2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-video.c   Wed Oct 01 13:13:56 
2008 -0300
@@ -1065,6 +1065,8 @@ static int video_open(struct inode *inod
}
unlock_kernel();
 
+   atomic_inc(core-users);
+
return 0;
 }
 
@@ -1152,7 +1154,8 @@ static int 

[linuxtv-commits] [hg:v4l-dvb] Whitespace cleanups

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9098 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Whitespace cleanups


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/dw2102.c   |2 +-
 linux/drivers/media/dvb/frontends/Kconfig  |2 +-
 linux/drivers/media/dvb/frontends/si21xx.c |2 +-
 linux/drivers/media/video/gspca/spca561.c  |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff -r 714e3f5cf708 -r c1b3d40a35fe linux/drivers/media/dvb/dvb-usb/dw2102.c
--- a/linux/drivers/media/dvb/dvb-usb/dw2102.c  Sat Oct 04 14:17:02 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dw2102.c  Sat Oct 04 14:18:37 2008 -0300
@@ -1,4 +1,4 @@
-/* DVB USB framework compliant Linux driver for the 
+/* DVB USB framework compliant Linux driver for the
 *  DVBWorld DVB-S 2101, 2102, DVB-S2 2104 Card
 *
 * Copyright (C) 2008 Igor M. Liplianin ([EMAIL PROTECTED])
diff -r 714e3f5cf708 -r c1b3d40a35fe linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Sat Oct 04 14:17:02 2008 -0300
+++ b/linux/drivers/media/dvb/frontends/Kconfig Sat Oct 04 14:18:37 2008 -0300
@@ -48,7 +48,7 @@ config DVB_STV0288
depends on DVB_CORE  I2C
default m if DVB_FE_CUSTOMISE
help
- A DVB-S tuner module. Say Y when you want to support this frontend.   
   
+ A DVB-S tuner module. Say Y when you want to support this frontend.
 
 config DVB_STB6000
tristate ST STB6000 silicon tuner
diff -r 714e3f5cf708 -r c1b3d40a35fe linux/drivers/media/dvb/frontends/si21xx.c
--- a/linux/drivers/media/dvb/frontends/si21xx.cSat Oct 04 14:17:02 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/si21xx.cSat Oct 04 14:18:37 
2008 -0300
@@ -989,7 +989,7 @@ static struct dvb_frontend_ops si21xx_op
.diseqc_send_burst = si21xx_send_diseqc_burst,
.set_tone = si21xx_set_tone,
.set_voltage = si21xx_set_voltage,
-   
+
.set_property = si21xx_set_property,
.get_property = si21xx_get_property,
.set_frontend = si21xx_set_frontend,
diff -r 714e3f5cf708 -r c1b3d40a35fe linux/drivers/media/video/gspca/spca561.c
--- a/linux/drivers/media/video/gspca/spca561.c Sat Oct 04 14:17:02 2008 -0300
+++ b/linux/drivers/media/video/gspca/spca561.c Sat Oct 04 14:18:37 2008 -0300
@@ -1080,7 +1080,7 @@ static struct ctrl sd_ctrls_12a[] = {
{
.id = V4L2_CID_DO_WHITE_BALANCE,
.type = V4L2_CTRL_TYPE_INTEGER,
-  .name = White Balance,
+   .name = White Balance,
.minimum = WHITE_MIN,
.maximum = WHITE_MAX,
.step = 1,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c1b3d40a35fef28599c12310b7f4037b19af235a

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~dougsland/em28xx-310u

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9100 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~dougsland/em28xx-310u


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.em28xx |2 
 linux/drivers/media/video/em28xx/em28xx-cards.c |   55 ++--
 linux/drivers/media/video/em28xx/em28xx-dvb.c   |9 ++
 3 files changed, 46 insertions(+), 20 deletions(-)

diff -r c1b3d40a35fe -r 8fea10e413c0 
linux/Documentation/video4linux/CARDLIST.em28xx
--- a/linux/Documentation/video4linux/CARDLIST.em28xx   Sat Oct 04 14:18:37 
2008 -0300
+++ b/linux/Documentation/video4linux/CARDLIST.em28xx   Sat Oct 04 14:33:11 
2008 -0300
@@ -46,7 +46,7 @@
  45 - Pinnacle PCTV DVB-T  (em2870)
  46 - Compro, VideoMate U3 (em2870)[185b:2870]
  47 - KWorld DVB-T 305U(em2880)[eb1a:e305]
- 48 - KWorld DVB-T 310U(em2880)
+ 48 - KWorld DVB-T 310U(em2880)[eb1a:e310]
  49 - MSI DigiVox A/D  (em2880)[eb1a:e310]
  50 - MSI DigiVox A/D II   (em2880)[eb1a:e320]
  51 - Terratec Hybrid XS Secam (em2880)[0ccd:004c]
diff -r c1b3d40a35fe -r 8fea10e413c0 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Sat Oct 04 14:18:37 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Sat Oct 04 14:33:11 
2008 -0300
@@ -931,22 +931,23 @@ struct em28xx_board em28xx_boards[] = {
},
[EM2880_BOARD_KWORLD_DVB_310U] = {
.name = KWorld DVB-T 310U,
-   .valid= EM28XX_BOARD_NOT_VALIDATED,
-   .vchannels= 3,
-   .tuner_type   = TUNER_XC2028,
-   .decoder  = EM28XX_TVP5150,
-   .input  = { {
-   .type = EM28XX_VMUX_TELEVISION,
-   .vmux = TVP5150_COMPOSITE0,
-   .amux = 0,
-   }, {
-   .type = EM28XX_VMUX_COMPOSITE1,
-   .vmux = TVP5150_COMPOSITE1,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = TVP5150_SVIDEO,
-   .amux = 1,
+   .vchannels= 3,
+   .tuner_type   = TUNER_XC2028,
+   .has_dvb  = 1,
+   .mts_firmware = 1,
+   .decoder  = EM28XX_TVP5150,
+   .input  = { {
+   .type = EM28XX_VMUX_TELEVISION,
+   .vmux = TVP5150_COMPOSITE0,
+   .amux = EM28XX_AMUX_VIDEO,
+   }, {
+   .type = EM28XX_VMUX_COMPOSITE1,
+   .vmux = TVP5150_COMPOSITE1,
+   .amux = EM28XX_AMUX_AC97_LINE_IN,
+   }, {/* S-video has not been tested yet */
+   .type = EM28XX_VMUX_SVIDEO,
+   .vmux = TVP5150_SVIDEO,
+   .amux = EM28XX_AMUX_AC97_LINE_IN,
} },
},
[EM2881_BOARD_DNT_DA2_HYBRID] = {
@@ -1118,6 +1119,10 @@ struct usb_device_id em28xx_id_table [] 
.driver_info = EM2880_BOARD_KWORLD_DVB_305U },
{ USB_DEVICE(0xeb1a, 0xe310),
.driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
+#if 0
+   { USB_DEVICE(0xeb1a, 0xe310),
+   .driver_info = EM2880_BOARD_KWORLD_DVB_310U },
+#endif
{ USB_DEVICE(0xeb1a, 0xa316),
.driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 },
{ USB_DEVICE(0xeb1a, 0xe320),
@@ -1184,9 +1189,6 @@ struct usb_device_id em28xx_id_table [] 
.driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
{ USB_DEVICE(0x093b, 0xa005),
.driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
-#if 0
-   EM2880_BOARD_KWORLD_DVB_310U },
-#endif
{ },
 };
 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
@@ -1264,6 +1266,7 @@ static struct em28xx_hash_table em28xx_e
 static struct em28xx_hash_table em28xx_eeprom_hash [] = {
/* P/N: SA 60002070465 Tuner: TVF7533-MF */
{0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
+   {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
 };
 
 /* I2C 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~dougsland/radio-mr800/

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9102 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~dougsland/radio-mr800/


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/radio/Kconfig   |   12 
 linux/drivers/media/radio/Makefile  |1 
 linux/drivers/media/radio/radio-mr800.c |  628 
 3 files changed, 641 insertions(+)

diff -r 8fea10e413c0 -r e317974cdcf3 linux/drivers/media/radio/Kconfig
--- a/linux/drivers/media/radio/Kconfig Sat Oct 04 14:33:11 2008 -0300
+++ b/linux/drivers/media/radio/Kconfig Sat Oct 04 14:38:09 2008 -0300
@@ -361,4 +361,16 @@ config USB_SI470X
  To compile this driver as a module, choose M here: the
  module will be called radio-silabs.
 
+config USB_MR800
+   tristate AverMedia MR 800 USB FM radio support
+   depends on USB  VIDEO_V4L2
+   ---help---
+ Say Y here if you want to connect this type of radio to your
+ computer's USB port. Note that the audio is not digital, and
+ you must connect the line out connector to a sound card or a
+ set of speakers.
+
+ To compile this driver as a module, choose M here: the
+ module will be called radio-mr800.
+
 endif # RADIO_ADAPTERS
diff -r 8fea10e413c0 -r e317974cdcf3 linux/drivers/media/radio/Makefile
--- a/linux/drivers/media/radio/MakefileSat Oct 04 14:33:11 2008 -0300
+++ b/linux/drivers/media/radio/MakefileSat Oct 04 14:38:09 2008 -0300
@@ -18,5 +18,6 @@ obj-$(CONFIG_RADIO_MAESTRO) += radio-mae
 obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o
 obj-$(CONFIG_USB_DSBR) += dsbr100.o
 obj-$(CONFIG_USB_SI470X) += radio-si470x.o
+obj-$(CONFIG_USB_MR800) += radio-mr800.o
 
 EXTRA_CFLAGS += -Isound
diff -r 8fea10e413c0 -r e317974cdcf3 linux/drivers/media/radio/radio-mr800.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/radio/radio-mr800.c   Sat Oct 04 14:38:09 2008 -0300
@@ -0,0 +1,628 @@
+/*
+ * A driver for the AverMedia MR 800 USB FM radio. This device plugs
+ * into both the USB and an analog audio input, so this thing
+ * only deals with initialization and frequency setting, the
+ * audio data has to be handled by a sound driver.
+ *
+ * Copyright (c) 2008 Alexey Klimov [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Big thanks to authors of dsbr100.c and radio-si470x.c
+ *
+ * When work was looked pretty good, i discover this:
+ * http://av-usbradio.sourceforge.net/index.php
+ * http://sourceforge.net/projects/av-usbradio/
+ * Latest release of theirs project was in 2005.
+ * Probably, this driver could be improved trough using their
+ * achievements (specifications given).
+ * So, we have smth to begin with.
+ *
+ * History:
+ * Version 0.01:   First working version.
+ * It's required to blacklist AverMedia USB Radio
+ * in usbhid/hid-quirks.c
+ *
+ * Many things to do:
+ * - Correct power managment of device (suspend  resume)
+ * - Make x86 independance (little-endian and big-endian stuff)
+ * - Add code for scanning and smooth tuning
+ * - Checked and add stereomono stuff
+ * - Add code for sensitivity value
+ * - Correct mistakes
+ * - In Japan another FREQ_MIN and FREQ_MAX
+ */
+
+/* kernel includes */
+#include linux/kernel.h
+#include linux/module.h
+#include linux/init.h
+#include linux/slab.h
+#include linux/input.h
+#include linux/videodev2.h
+#include media/v4l2-common.h
+#include media/v4l2-ioctl.h
+#include linux/usb.h
+#include linux/version.h /* for KERNEL_VERSION MACRO */
+
+/* driver and module definitions */
+#define DRIVER_AUTHOR Alexey Klimov [EMAIL PROTECTED]
+#define DRIVER_DESC AverMedia MR 800 USB FM radio driver
+#define DRIVER_VERSION 0.01
+#define RADIO_VERSION KERNEL_VERSION(0, 0, 1)
+
+MODULE_AUTHOR(DRIVER_AUTHOR);

[linuxtv-commits] [hg:v4l-dvb] merge: http://hg.jannau.net/v4l-dvb

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9106 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://hg.jannau.net/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 5165156c7cef -r 2d412fcf8a38 linux/drivers/media/dvb/frontends/Makefile
--- a/linux/drivers/media/dvb/frontends/MakefileSat Oct 04 14:40:20 
2008 -0300
+++ b/linux/drivers/media/dvb/frontends/MakefileSat Oct 04 14:42:43 
2008 -0300
@@ -53,5 +53,5 @@ obj-$(CONFIG_DVB_AF9013) += af9013.o
 obj-$(CONFIG_DVB_AF9013) += af9013.o
 obj-$(CONFIG_DVB_CX24116) += cx24116.o
 obj-$(CONFIG_DVB_SI21XX) += si21xx.o
-obj-$(CONFIG_DVB_STV0299) += stv0288.o
+obj-$(CONFIG_DVB_STV0288) += stv0288.o
 obj-$(CONFIG_DVB_STB6000) += stb6000.o


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/2d412fcf8a38c841a99d1d35ca6f7f4898e7f2c2

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~dougsland/em28xx-hvr

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9104 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~dougsland/em28xx-hvr


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-audio.c |4 ++--
 linux/drivers/media/video/em28xx/em28xx-cards.c |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r e317974cdcf3 -r 5165156c7cef 
linux/drivers/media/video/em28xx/em28xx-audio.c
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c   Sat Oct 04 14:38:09 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c   Sat Oct 04 14:40:20 
2008 -0300
@@ -127,10 +127,10 @@ static void em28xx_audio_isocirq(struct 
 
if (oldptr + length = runtime-buffer_size) {
unsigned int cnt =
-   runtime-buffer_size - oldptr - 1;
+   runtime-buffer_size - oldptr;
memcpy(runtime-dma_area + oldptr * stride, cp,
   cnt * stride);
-   memcpy(runtime-dma_area, cp + cnt,
+   memcpy(runtime-dma_area, cp + cnt * stride,
   length * stride - cnt * stride);
} else {
memcpy(runtime-dma_area + oldptr * stride, cp,
diff -r e317974cdcf3 -r 5165156c7cef 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Sat Oct 04 14:38:09 
2008 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Sat Oct 04 14:40:20 
2008 -0300
@@ -578,7 +578,7 @@ struct em28xx_board em28xx_boards[] = {
}, {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = TVP5150_COMPOSITE1,
-   .amux = 1,
+   .amux = 3,
}, {
.type = EM28XX_VMUX_SVIDEO,
.vmux = TVP5150_SVIDEO,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/5165156c7cef9075508cc105acd44d57c2793211

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~tmerle/cinergyT2

2008-10-04 Thread Patch from Mauro Carvalho Chehab
The patch number 9109 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~tmerle/cinergyT2


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/Kconfig  |1 
 linux/drivers/media/dvb/cinergyT2/Kconfig|   85 -
 linux/drivers/media/dvb/cinergyT2/Makefile   |3 
 linux/drivers/media/dvb/cinergyT2/cinergyT2.c| 1150 ---
 linux/drivers/media/dvb/dvb-usb/Kconfig  |8 
 linux/drivers/media/dvb/dvb-usb/Makefile |4 
 linux/drivers/media/dvb/dvb-usb/cinergyT2-core.c |  268 +++
 linux/drivers/media/dvb/dvb-usb/cinergyT2-fe.c   |  351 
 linux/drivers/media/dvb/dvb-usb/cinergyT2.h  |   95 +
 9 files changed, 726 insertions(+), 1239 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d4dfe28158ea55153e67a497219e4b15c1db483c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] af9013/m5602: Fix compilation at in-kernel

2008-10-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9115 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
af9013/m5602: Fix compilation at in-kernel


This patch fixes a few errors that were breaking in-kernel compilation.

The first one were at m5602 that were including gspca.h from another
directory. A trivial change at m5602/Makefile fixed the issue.

A harder to fix error were caused by the fact that both af9013 and m5602
were declaring an external var called 'debug'. If you compile both
modules in-kernel, you'll have troubles. This is even worse, since there
are two other drivers outside the subsystem with a similar mistake.

To make things worse, gcc do a very great job of fooling the developers,
by blaming the wrong lines anf files when such error occurs.

So, I was having errors like:

drivers/media/dvb/built-in.o: In function `dvb_usercopy':
/home/v4l/tokernel/git/drivers/media/dvb/dvb-core/dvbdev.c:403: multiple 
definition of `debug'
drivers/media/video/built-in.o:/home/v4l/tokernel/git/drivers/media/video/bt819.c:264:
 first defined here

or:

drivers/media/dvb/built-in.o: In function `dvb_usercopy':
/home/v4l/tokernel/git/drivers/media/dvb/dvb-core/dvbdev.c:403: multiple 
definition of `debug'
drivers/media/video/built-in.o:/home/v4l/tokernel/git/drivers/media/video/vpx3220.c:125:
 first defined here

The two above errors caused by m5602 driver.

After fixing m5602, I got this:

drivers/built-in.o: In function `SiS_SetGroup2':
/home/v4l/tokernel/git/drivers/video/sis/init301.c:6996: multiple definition of 
`debug'
arch/x86/kernel/built-in.o:/home/v4l/tokernel/git/arch/x86/kernel/entry_32.S:810:
 first defined here

This one caused by af9013.

This patch fixes those erros by prefixing the debug vars with the name
of the module, without changing the name of the parameter.

Next time, please prepend all extern vars with the name of the module.

To avoid bisect troubles, I've folded those changes with the
original commits that added those modules at my -git tree.



kernel-sync:

CC: Jean-Francois Moine [EMAIL PROTECTED]
CC: Antti Palosaari [EMAIL PROTECTED]
CC: Erik Andr?n [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/Makefile  |2 +-
 linux/drivers/media/dvb/frontends/af9013.c|4 ++--
 linux/drivers/media/dvb/frontends/af9013_priv.h   |4 ++--
 linux/drivers/media/video/gspca/m5602/Makefile|3 +++
 linux/drivers/media/video/gspca/m5602/m5602_bridge.h  |2 +-
 linux/drivers/media/video/gspca/m5602/m5602_core.c|4 ++--
 linux/drivers/media/video/gspca/m5602/m5602_mt9m111.h |2 +-
 linux/drivers/media/video/gspca/m5602/m5602_ov9650.h  |2 +-
 linux/drivers/media/video/gspca/m5602/m5602_po1030.h  |2 +-
 linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.h  |2 +-
 linux/drivers/media/video/gspca/m5602/m5602_s5k83a.h  |2 +-
 11 files changed, 16 insertions(+), 13 deletions(-)

diff -r 5ecdeaaa5171 -r 30d0f84ff4d9 linux/drivers/media/dvb/Makefile
--- a/linux/drivers/media/dvb/Makefile  Mon Oct 06 11:07:48 2008 -0400
+++ b/linux/drivers/media/dvb/Makefile  Sat Oct 11 08:47:28 2008 -0300
@@ -2,4 +2,4 @@
 # Makefile for the kernel multimedia device drivers.
 #
 
-obj-y:= dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ 
bt8xx/ cinergyT2/ dvb-usb/ pluto2/ siano/ dm1105/
+obj-y:= dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ 
bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/
diff -r 5ecdeaaa5171 -r 30d0f84ff4d9 linux/drivers/media/dvb/frontends/af9013.c
--- a/linux/drivers/media/dvb/frontends/af9013.cMon Oct 06 11:07:48 
2008 -0400
+++ b/linux/drivers/media/dvb/frontends/af9013.cSat Oct 11 08:47:28 
2008 -0300
@@ -34,7 +34,7 @@
 #include af9013_priv.h
 #include af9013.h
 
-int debug;
+int af9013_debug;
 
 struct af9013_state {
struct i2c_adapter *i2c;
@@ -1679,7 +1679,7 @@ static struct dvb_frontend_ops af9013_op
.read_ucblocks = af9013_read_ucblocks,
 };
 
-module_param(debug, int, 0644);
+module_param_named(debug, af9013_debug, int, 0644);
 MODULE_PARM_DESC(debug, Turn on/off frontend debugging (default:off).);
 
 MODULE_AUTHOR(Antti Palosaari [EMAIL PROTECTED]);
diff -r 5ecdeaaa5171 -r 30d0f84ff4d9 
linux/drivers/media/dvb/frontends/af9013_priv.h
--- a/linux/drivers/media/dvb/frontends/af9013_priv.h   Mon Oct 06 11:07:48 
2008 -0400
+++ b/linux/drivers/media/dvb/frontends/af9013_priv.h   Sat Oct 11 08:47:28 
2008 -0300
@@ -25,7 +25,7 @@
 #define _AF9013_PRIV_
 
 #define LOG_PREFIX af9013
-extern int debug;
+extern int 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-10-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9128 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/gspca/Kconfig   |   15 
 linux/drivers/media/video/gspca/Makefile  |2 
 linux/drivers/media/video/gspca/gspca.c   |   11 
 linux/drivers/media/video/gspca/m5602/m5602_bridge.h  |   12 
 linux/drivers/media/video/gspca/m5602/m5602_core.c|  359 ++--
 linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c |2 
 linux/drivers/media/video/gspca/m5602/m5602_ov9650.h  |6 
 linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.h  |6 
 linux/drivers/media/video/gspca/m5602/m5602_s5k83a.c  |   92 +
 linux/drivers/media/video/gspca/m5602/m5602_s5k83a.h  |   58 
 linux/drivers/media/video/gspca/sonixj.c  |6 
 linux/drivers/media/video/gspca/t613.c|  885 +-
 12 files changed, 818 insertions(+), 636 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/28568be11a14b2cd7dcdc275f02925b17539c616

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-move-zoran

2008-10-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9130 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-move-zoran


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig  |   74 
 linux/drivers/media/video/Makefile |6 
 linux/drivers/media/video/videocodec.c |  408 -
 linux/drivers/media/video/videocodec.h |  359 -
 linux/drivers/media/video/zoran.h  |  510 -
 linux/drivers/media/video/zoran/Kconfig|   73 
 linux/drivers/media/video/zoran/Makefile   |6 
 linux/drivers/media/video/zoran/videocodec.c   |  408 +
 linux/drivers/media/video/zoran/videocodec.h   |  359 +
 linux/drivers/media/video/zoran/zoran.h|  510 +
 linux/drivers/media/video/zoran/zoran_card.c   | 1671 ++
 linux/drivers/media/video/zoran/zoran_card.h   |   55 
 linux/drivers/media/video/zoran/zoran_device.c | 1753 ++
 linux/drivers/media/video/zoran/zoran_device.h |  103 
 linux/drivers/media/video/zoran/zoran_driver.c | 4714 +
 linux/drivers/media/video/zoran/zoran_procfs.c |  235 
 linux/drivers/media/video/zoran/zoran_procfs.h |   36 
 linux/drivers/media/video/zoran/zr36016.c  |  530 +
 linux/drivers/media/video/zoran/zr36016.h  |  111 
 linux/drivers/media/video/zoran/zr36050.c  |  904 +++
 linux/drivers/media/video/zoran/zr36050.h  |  184 
 linux/drivers/media/video/zoran/zr36057.h  |  168 
 linux/drivers/media/video/zoran/zr36060.c  | 1014 +++
 linux/drivers/media/video/zoran/zr36060.h  |  220 
 linux/drivers/media/video/zoran_card.c | 1671 --
 linux/drivers/media/video/zoran_card.h |   55 
 linux/drivers/media/video/zoran_device.c   | 1753 --
 linux/drivers/media/video/zoran_device.h   |  103 
 linux/drivers/media/video/zoran_driver.c   | 4714 -
 linux/drivers/media/video/zoran_procfs.c   |  235 
 linux/drivers/media/video/zoran_procfs.h   |   36 
 linux/drivers/media/video/zr36016.c|  530 -
 linux/drivers/media/video/zr36016.h|  111 
 linux/drivers/media/video/zr36050.c|  904 ---
 linux/drivers/media/video/zr36050.h|  184 
 linux/drivers/media/video/zr36057.h|  168 
 linux/drivers/media/video/zr36060.c| 1014 ---
 linux/drivers/media/video/zr36060.h|  220 
 38 files changed, 13056 insertions(+), 13053 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/939fd525bfa49b6cdc91451f9e529f7b2a5f3094

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev

2008-10-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9134 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dev


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig   |9 +
 linux/drivers/media/video/cx18/cx18-driver.c|4 
 linux/drivers/media/video/cx18/cx18-streams.c   |   41 +++---
 linux/drivers/media/video/em28xx/em28xx-video.c |8 -
 linux/drivers/media/video/ivtv/ivtv-driver.c|6 
 linux/drivers/media/video/ivtv/ivtv-streams.c   |   40 +++---
 linux/drivers/media/video/v4l2-dev.c|  100 ++--
 linux/include/media/v4l2-dev.h  |   12 -
 v4l/scripts/make_kconfig.pl |1 
 9 files changed, 131 insertions(+), 90 deletions(-)

diff -r b064509ec4af -r 9abfea2b7f56 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Sat Oct 04 18:09:41 2008 -0400
+++ b/linux/drivers/media/video/Kconfig Sat Oct 11 12:31:04 2008 -0300
@@ -71,6 +71,15 @@ config VIDEO_ADV_DEBUG
  Say Y here to enable advanced debugging functionality on some
  V4L devices.
  In doubt, say N.
+
+config VIDEO_FIXED_MINOR_RANGES
+   bool Enable old-style fixed minor ranges for video devices
+   default n
+   ---help---
+ Say Y here to enable the old-style fixed-range minor assignments.
+ Only useful if you rely on the old behavior and use mknod instead of 
udev.
+
+ When in doubt, say N.
 
 config VIDEO_HELPER_CHIPS_AUTO
bool Autoselect pertinent encoders/decoders and other helper chips
diff -r b064509ec4af -r 9abfea2b7f56 
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c  Sat Oct 04 18:09:41 
2008 -0400
+++ b/linux/drivers/media/video/cx18/cx18-driver.c  Sat Oct 11 12:31:04 
2008 -0300
@@ -175,7 +175,7 @@ MODULE_PARM_DESC(enc_pcm_buffers,
 Encoder PCM buffers (in MB)\n
 \t\t\tDefault:  __stringify(CX18_DEFAULT_ENC_PCM_BUFFERS));
 
-MODULE_PARM_DESC(cx18_first_minor, Set minor assigned to first card);
+MODULE_PARM_DESC(cx18_first_minor, Set kernel number assigned to first card);
 
 MODULE_AUTHOR(Hans Verkuil);
 MODULE_DESCRIPTION(CX23418 driver);
@@ -959,7 +959,7 @@ static int module_start(void)
 
/* Validate parameters */
if (cx18_first_minor  0 || cx18_first_minor = CX18_MAX_CARDS) {
-   printk(KERN_ERR cx18:  Exiting, ivtv_first_minor must be 
between 0 and %d\n,
+   printk(KERN_ERR cx18:  Exiting, cx18_first_minor must be 
between 0 and %d\n,
 CX18_MAX_CARDS - 1);
return -1;
}
diff -r b064509ec4af -r 9abfea2b7f56 
linux/drivers/media/video/cx18/cx18-streams.c
--- a/linux/drivers/media/video/cx18/cx18-streams.c Sat Oct 04 18:09:41 
2008 -0400
+++ b/linux/drivers/media/video/cx18/cx18-streams.c Sat Oct 11 12:31:04 
2008 -0300
@@ -57,7 +57,7 @@ static struct {
 static struct {
const char *name;
int vfl_type;
-   int minor_offset;
+   int num_offset;
int dma;
enum v4l2_buf_type buf_type;
struct file_operations *fops;
@@ -144,8 +144,8 @@ static int cx18_prep_dev(struct cx18 *cx
 {
struct cx18_stream *s = cx-streams[type];
u32 cap = cx-v4l2_cap;
-   int minor_offset = cx18_stream_info[type].minor_offset;
-   int minor;
+   int num_offset = cx18_stream_info[type].num_offset;
+   int num = cx-num + cx18_first_minor + num_offset;
 
/* These four fields are always initialized. If v4l2dev == NULL, then
   this stream is not in use. In that case no other fields but these
@@ -164,9 +164,6 @@ static int cx18_prep_dev(struct cx18 *cx
!(cap  (V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE)))
return 0;
 
-   /* card number + user defined offset + device offset */
-   minor = cx-num + cx18_first_minor + minor_offset;
-
/* User explicitly selected 0 buffers for these streams, so don't
   create them. */
if (cx18_stream_info[type].dma != PCI_DMA_NONE 
@@ -177,7 +174,7 @@ static int cx18_prep_dev(struct cx18 *cx
 
cx18_stream_init(cx, type);
 
-   if (minor_offset == -1)
+   if (num_offset == -1)
return 0;
 
/* allocate and initialize the v4l2 video device structure */
@@ -191,7 +188,7 @@ static int cx18_prep_dev(struct cx18 *cx
snprintf(s-v4l2dev-name, sizeof(s-v4l2dev-name), cx18-%d,
cx-num);
 
-  

[linuxtv-commits] [hg:v4l-dvb] backport commit 5e246b850df563224be26f1d409cf66fd6c968df

2008-10-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9138 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit 5e246b850df563224be26f1d409cf66fd6c968df


Author: Takashi Iwai [EMAIL PROTECTED]

ALSA: Kill snd_assert() in other places

Kill snd_assert() in other places, either removed or replaced with
if () with snd_BUG_ON().

kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-alsa.c |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff -r 746a3bee396e -r b4d664a2592a 
linux/drivers/media/video/saa7134/saa7134-alsa.c
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c  Mon Sep 08 15:26:43 
2008 +0800
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c  Fri Aug 08 17:12:47 
2008 +0200
@@ -493,10 +493,12 @@ static int snd_card_saa7134_hw_params(st
period_size = params_period_bytes(hw_params);
periods = params_periods(hw_params);
 
-   snd_assert(period_size = 0x100  period_size = 0x1,
-  return -EINVAL);
-   snd_assert(periods = 4, return -EINVAL);
-   snd_assert(period_size * periods = 1024 * 1024, return -EINVAL);
+   if (period_size  0x100 || period_size  0x1)
+   return -EINVAL;
+   if (periods  4)
+   return -EINVAL;
+   if (period_size * periods  1024 * 1024)
+   return -EINVAL;
 
dev = saa7134-dev;
 
@@ -947,7 +949,8 @@ static int snd_card_saa7134_new_mixer(sn
unsigned int idx;
int err;
 
-   snd_assert(chip != NULL, return -EINVAL);
+   if (snd_BUG_ON(!chip))
+   return -EINVAL;
strcpy(card-mixername, SAA7134 Mixer);
 
for (idx = 0; idx  ARRAY_SIZE(snd_saa7134_controls); idx++) {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/b4d664a2592ab2d47d504997b575fc75ec514278

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Fix build breakage with kernels lower than 2.6.28

2008-10-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9139 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix build breakage with kernels lower than 2.6.28


This patch fixes compilation for older kernels. However, due to -alsa
changes on saa7134-alsa and snd-bt878, I'm not sure if this is enough
for it to really work.

I suspect that something else may be needed for they to work with
earlier versions.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/compat.h |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff -r b4d664a2592a -r 8696f703545b v4l/compat.h
--- a/v4l/compat.h  Fri Aug 08 17:12:47 2008 +0200
+++ b/v4l/compat.h  Sun Oct 12 10:53:33 2008 -0200
@@ -237,4 +237,17 @@ static inline int list_is_singular(const
 #define current_uid() (current-uid)
 #endif
 
-#endif
+#ifndef WARN
+#define WARN(condition, format...) ({  \
+   int __ret_warn_on = !!(condition);  \
+   if (unlikely(__ret_warn_on))\
+   printk(KERN_WARNING format);\
+   unlikely(__ret_warn_on);\
+})
+#endif
+
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 28)
+#define snd_BUG_ON(cond)   WARN((cond), BUG? (%s)\n, __stringify(cond))
+#endif
+
+#endif


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8696f703545b5a4faabf4a6db08f14345a8de987

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit 87f3dd77974cba1ba0798abd741ede50f56b3eb3

2008-10-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9137 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit 87f3dd77974cba1ba0798abd741ede50f56b3eb3


Author: Eric Miao [EMAIL PROTECTED]

[ARM] pxa: simplify DMA register definitions

1. DRCMRxx is no longer recommended, use DRCMR(xx) instead, and
   pass DRCMR index by struct resource if possible

2. DCSRxx, DDADRxx, DSADRxx, DTADRxx, DCMDxx is never used, use
   DCSR(), DDADR(), DSADR(), DTADR(), DCMD() instead

kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/pxa_camera.c |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -r f2631c7c2098 -r 746a3bee396e linux/drivers/media/video/pxa_camera.c
--- a/linux/drivers/media/video/pxa_camera.cSun Oct 12 09:46:02 2008 -0200
+++ b/linux/drivers/media/video/pxa_camera.cMon Sep 08 15:26:43 2008 +0800
@@ -1006,9 +1006,9 @@ static int pxa_camera_resume(struct soc_
struct pxa_camera_dev *pcdev = ici-priv;
int i = 0, ret = 0;
 
-   DRCMR68 = pcdev-dma_chans[0] | DRCMR_MAPVLD;
-   DRCMR69 = pcdev-dma_chans[1] | DRCMR_MAPVLD;
-   DRCMR70 = pcdev-dma_chans[2] | DRCMR_MAPVLD;
+   DRCMR(68) = pcdev-dma_chans[0] | DRCMR_MAPVLD;
+   DRCMR(69) = pcdev-dma_chans[1] | DRCMR_MAPVLD;
+   DRCMR(70) = pcdev-dma_chans[2] | DRCMR_MAPVLD;
 
CICR0 = pcdev-save_cicr[i++]  ~CICR0_ENB;
CICR1 = pcdev-save_cicr[i++];
@@ -1152,9 +1152,9 @@ static int pxa_camera_probe(struct platf
pcdev-dma_chans[2] = err;
dev_dbg(pcdev-dev, got DMA channel (V) %d\n, pcdev-dma_chans[2]);
 
-   DRCMR68 = pcdev-dma_chans[0] | DRCMR_MAPVLD;
-   DRCMR69 = pcdev-dma_chans[1] | DRCMR_MAPVLD;
-   DRCMR70 = pcdev-dma_chans[2] | DRCMR_MAPVLD;
+   DRCMR(68) = pcdev-dma_chans[0] | DRCMR_MAPVLD;
+   DRCMR(69) = pcdev-dma_chans[1] | DRCMR_MAPVLD;
+   DRCMR(70) = pcdev-dma_chans[2] | DRCMR_MAPVLD;
 
/* request irq */
err = request_irq(pcdev-irq, pxa_camera_irq, 0, PXA_CAM_DRV_NAME,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/746a3bee396e999d1a1c5ffe944594ffddb2b6f1

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~mkrufky/hvr950q

2008-10-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9150 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~mkrufky/hvr950q


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/au8522.c|  133 ++
 linux/drivers/media/dvb/frontends/au8522.h|   17 ++
 linux/drivers/media/video/au0828/au0828-dvb.c |   39 +
 3 files changed, 188 insertions(+), 1 deletion(-)

diff -r 51844f20be4e -r 91879edd91f1 linux/drivers/media/dvb/frontends/au8522.c
--- a/linux/drivers/media/dvb/frontends/au8522.cSun Oct 12 23:49:57 
2008 -0200
+++ b/linux/drivers/media/dvb/frontends/au8522.cSun Oct 12 23:51:55 
2008 -0200
@@ -40,6 +40,8 @@ struct au8522_state {
u32 current_frequency;
fe_modulation_t current_modulation;
 
+   u32 fe_status;
+   unsigned int led_state;
 };
 
 static int debug;
@@ -538,10 +540,97 @@ static int au8522_init(struct dvb_fronte
return 0;
 }
 
+static int au8522_led_gpio_enable(struct au8522_state *state, int onoff)
+{
+   struct au8522_led_config *led_config = state-config-led_cfg;
+   u8 val;
+
+   /* bail out if we cant control an LED */
+   if (!led_config || !led_config-gpio_output ||
+   !led_config-gpio_output_enable || !led_config-gpio_output_disable)
+   return 0;
+
+   val = au8522_readreg(state, 0x4000 |
+(led_config-gpio_output  ~0xc000));
+   if (onoff) {
+   /* enable GPIO output */
+   val = ~((led_config-gpio_output_enable  8)  0xff);
+   val |=  (led_config-gpio_output_enable  0xff);
+   } else {
+   /* disable GPIO output */
+   val = ~((led_config-gpio_output_disable  8)  0xff);
+   val |=  (led_config-gpio_output_disable  0xff);
+   }
+   return au8522_writereg(state, 0x8000 |
+  (led_config-gpio_output  ~0xc000), val);
+}
+
+/* led = 0 | off
+ * led = 1 | signal ok
+ * led = 2 | signal strong
+ * led  0 | only light led if leds are currently off
+ */
+static int au8522_led_ctrl(struct au8522_state *state, int led)
+{
+   struct au8522_led_config *led_config = state-config-led_cfg;
+   int i, ret = 0;
+
+   /* bail out if we cant control an LED */
+   if (!led_config || !led_config-gpio_leds ||
+   !led_config-num_led_states || !led_config-led_states)
+   return 0;
+
+   if (led  0) {
+   /* if LED is already lit, then leave it as-is */
+   if (state-led_state)
+   return 0;
+   else
+   led *= -1;
+   }
+
+   /* toggle LED if changing state */
+   if (state-led_state != led) {
+   u8 val;
+
+   dprintk(%s: %d\n, __func__, led);
+
+   au8522_led_gpio_enable(state, 1);
+
+   val = au8522_readreg(state, 0x4000 |
+(led_config-gpio_leds  ~0xc000));
+
+   /* start with all leds off */
+   for (i = 0; i  led_config-num_led_states; i++)
+   val = ~led_config-led_states[i];
+
+   /* set selected LED state */
+   if (led  led_config-num_led_states)
+   val |= led_config-led_states[led];
+   else if (led_config-num_led_states)
+   val |=
+   led_config-led_states[led_config-num_led_states - 1];
+
+   ret = au8522_writereg(state, 0x8000 |
+ (led_config-gpio_leds  ~0xc000), val);
+   if (ret  0)
+   return ret;
+
+   state-led_state = led;
+
+   if (led == 0)
+   au8522_led_gpio_enable(state, 0);
+   }
+
+   return 0;
+}
+
 static int au8522_sleep(struct dvb_frontend *fe)
 {
struct au8522_state *state = fe-demodulator_priv;
dprintk(%s()\n, __func__);
+
+   /* turn off led */
+   au8522_led_ctrl(state, 0);
 
state-current_frequency = 0;
 
@@ -592,10 +681,51 @@ static int au8522_read_status(struct dvb
*status |= FE_HAS_CARRIER | FE_HAS_SIGNAL;
break;
}
+   state-fe_status = *status;
+
+   if (*status  FE_HAS_LOCK)
+   /* turn on LED, if it isn't on already */
+   au8522_led_ctrl(state, -1);
+   else
+   /* turn off LED */
+   au8522_led_ctrl(state, 0);
 
dprintk(%s() status 

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~tmerle/v4l-dvb

2008-10-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9156 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~tmerle/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-dvb.c |   20 +-
 1 file changed, 2 insertions(+), 18 deletions(-)

diff -r 0c654ad2453a -r 94a0f7fc9ab5 
linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c Sun Oct 12 23:54:44 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c Sun Oct 12 23:56:33 
2008 -0200
@@ -422,6 +422,8 @@ static int dvb_init(struct em28xx *dev)
}
break;
case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
+   case EM2880_BOARD_TERRATEC_HYBRID_XS:
+   case EM2880_BOARD_KWORLD_DVB_310U:
dvb-frontend = dvb_attach(zl10353_attach,
   em28xx_zl10353_with_xc3028,
   dev-i2c_adap);
@@ -443,24 +445,6 @@ static int dvb_init(struct em28xx *dev)
}
break;
 #endif
-   case EM2880_BOARD_TERRATEC_HYBRID_XS:
-   dvb-frontend = dvb_attach(zl10353_attach,
-   em28xx_zl10353_with_xc3028,
-   dev-i2c_adap);
-   if (attach_xc3028(0x61, dev)  0) {
-result = -EINVAL;
-   goto out_free;
-   }
-   break;
-   case EM2880_BOARD_KWORLD_DVB_310U:
-   dvb-frontend = dvb_attach(zl10353_attach,
-   em28xx_zl10353_with_xc3028,
-   dev-i2c_adap);
-   if (attach_xc3028(0x61, dev)  0) {
-   result = -EINVAL;
-   goto out_free;
-   }
-   break;
default:
printk(KERN_ERR %s/2: The frontend of your DVB/ATSC card
 isn't supported yet\n,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/94a0f7fc9ab5920658caef252213ab6ce12ae453

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~stoth/s2

2008-10-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9188 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~stoth/s2


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/CARDLIST.cx88   |1 
 linux/drivers/media/dvb/dvb-core/dvb_frontend.c |   98 
 linux/drivers/media/dvb/dvb-usb/Kconfig |2 
 linux/drivers/media/dvb/dvb-usb/dw2102.c|  123 ++-
 linux/drivers/media/dvb/frontends/cx24116.c |  177 +++-
 linux/drivers/media/dvb/frontends/eds1547.h |  133 
 linux/drivers/media/dvb/frontends/stb6000.c |3 
 linux/drivers/media/dvb/frontends/stv0288.c |   20 +
 linux/drivers/media/dvb/frontends/stv0288.h |2 
 linux/drivers/media/video/cx88/cx88-cards.c |   27 +-
 linux/drivers/media/video/cx88/cx88-dvb.c   |9 
 linux/drivers/media/video/cx88/cx88.h   |1 
 linux/include/linux/dvb/frontend.h  |   21 +
 13 files changed, 530 insertions(+), 87 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e28cd0f55160fd87fba2a708bbc7241661da889c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-zoran

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9210 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-zoran


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/adv7170.c  |  289 ++---
 linux/drivers/media/video/adv7175.c  |  293 ++---
 linux/drivers/media/video/bt819.c|  363 +++-
 linux/drivers/media/video/bt856.c|  264 ++--
 linux/drivers/media/video/bt866.c|  311 +++---
 linux/drivers/media/video/ks0127.c   |  566 ---
 linux/drivers/media/video/saa7110.c  |  272 ++---
 linux/drivers/media/video/saa7111.c  |  262 ++--
 linux/drivers/media/video/saa7114.c  |  394 -
 linux/drivers/media/video/saa7185.c  |  244 ++--
 linux/drivers/media/video/vpx3220.c  |  378 +++-
 linux/drivers/media/video/zoran/zoran_card.c |1 
 linux/include/media/v4l2-i2c-drv-legacy.h|   11 
 linux/include/media/v4l2-i2c-drv.h   |   11 
 14 files changed, 1221 insertions(+), 2438 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/14bf94ec23dece151d15649001146b50b799fda7

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9212 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/versions.txt |4 
 1 file changed, 4 insertions(+)

diff -r 14bf94ec23de -r f8f30dd71191 v4l/versions.txt
--- a/v4l/versions.txt  Wed Oct 15 20:26:21 2008 -0200
+++ b/v4l/versions.txt  Wed Oct 15 20:27:27 2008 -0200
@@ -28,6 +28,8 @@ USB_SI470X
 USB_SI470X
 # use of struct delayed_work
 USB_GSPCA_FINEPIX
+# uses linux/hid.h and struct delayed_work
+USB_SI470X
 
 [2.6.19]
 #This driver were developed at kernel 2.6.19, requiring 
vmalloc_user/remap_vmalloc_range
@@ -41,6 +43,8 @@ USB_STV680
 USB_STV680
 USB_S2255
 VIDEO_USBVISION
+# Uses supports_autosuspend
+USB_MR800
 
 # Uses remap_vmalloc_range()
 [2.6.18]


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f8f30dd71191c0b939ee0b5db122528d810b99da

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~tlorenz/v4l-dvb

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9221 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~tlorenz/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 hgimport |6 
 linux/drivers/media/radio/Kconfig|2 
 linux/drivers/media/radio/radio-si470x.c |  250 +--
 v4l/scripts/hg-pull-req.pl   |6 
 4 files changed, 113 insertions(+), 151 deletions(-)

diff -r f8f30dd71191 -r f96e8d47a8e7 hgimport
--- a/hgimport  Wed Oct 15 20:27:27 2008 -0200
+++ b/hgimport  Wed Oct 15 21:47:05 2008 -0200
@@ -104,6 +104,6 @@ done
 
 
 # To cherry pick all files, you can do something like:
-#for i in $TMP/newpatches/*; do
-#  hg import $i;
-#done
+for i in $TMP/newpatches/*; do
+   hg import $i;
+done
diff -r f8f30dd71191 -r f96e8d47a8e7 linux/drivers/media/radio/Kconfig
--- a/linux/drivers/media/radio/Kconfig Wed Oct 15 20:27:27 2008 -0200
+++ b/linux/drivers/media/radio/Kconfig Wed Oct 15 21:47:05 2008 -0200
@@ -359,7 +359,7 @@ config USB_SI470X
  computer's USB port.
 
  To compile this driver as a module, choose M here: the
- module will be called radio-silabs.
+ module will be called radio-si470x.
 
 config USB_MR800
tristate AverMedia MR 800 USB FM radio support
diff -r f8f30dd71191 -r f96e8d47a8e7 linux/drivers/media/radio/radio-si470x.c
--- a/linux/drivers/media/radio/radio-si470x.c  Wed Oct 15 20:27:27 2008 -0200
+++ b/linux/drivers/media/radio/radio-si470x.c  Wed Oct 15 21:47:05 2008 -0200
@@ -104,6 +104,7 @@
  * - hardware frequency seek support
  * - afc indication
  * - more safety checks, let si470x_get_freq return errno
+ * - vidioc behavior corrected according to v4l2 spec
  *
  * ToDo:
  * - add firmware download/update support
@@ -142,9 +143,9 @@
 /* USB Device ID List */
 static struct usb_device_id si470x_usb_driver_id_table[] = {
/* Silicon Labs USB FM Radio Reference Design */
-   { USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
+   { USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
/* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */
-   { USB_DEVICE_AND_INTERFACE_INFO(0x06e1, 0xa155, USB_CLASS_HID, 0, 0) },
+   { USB_DEVICE_AND_INTERFACE_INFO(0x06e1, 0xa155, USB_CLASS_HID, 0, 0) },
/* Terminating entry */
{ }
 };
@@ -158,7 +159,7 @@ MODULE_DEVICE_TABLE(usb, si470x_usb_driv
 
 /* Radio Nr */
 static int radio_nr = -1;
-module_param(radio_nr, int, 0);
+module_param(radio_nr, int, 0444);
 MODULE_PARM_DESC(radio_nr, Radio Nr);
 
 /* Spacing (kHz) */
@@ -166,42 +167,42 @@ MODULE_PARM_DESC(radio_nr, Radio Nr);
 /* 1: 100 kHz (Europe, Japan) */
 /* 2:  50 kHz */
 static unsigned short space = 2;
-module_param(space, ushort, 0);
-MODULE_PARM_DESC(radio_nr, Spacing: 0=200kHz 1=100kHz *2=50kHz*);
+module_param(space, ushort, 0444);
+MODULE_PARM_DESC(space, Spacing: 0=200kHz 1=100kHz *2=50kHz*);
 
 /* Bottom of Band (MHz) */
 /* 0: 87.5 - 108 MHz (USA, Europe)*/
 /* 1: 76   - 108 MHz (Japan wide band) */
 /* 2: 76   -  90 MHz (Japan) */
 static unsigned short band = 1;
-module_param(band, ushort, 0);
-MODULE_PARM_DESC(radio_nr, Band: 0=87.5..108MHz *1=76..108MHz* 2=76..90MHz);
+module_param(band, ushort, 0444);
+MODULE_PARM_DESC(band, Band: 0=87.5..108MHz *1=76..108MHz* 2=76..90MHz);
 
 /* De-emphasis */
 /* 0: 75 us (USA) */
 /* 1: 50 us (Europe, Australia, Japan) */
 static unsigned short de = 1;
-module_param(de, ushort, 0);
-MODULE_PARM_DESC(radio_nr, De-emphasis: 0=75us *1=50us*);
+module_param(de, ushort, 0444);
+MODULE_PARM_DESC(de, De-emphasis: 0=75us *1=50us*);
 
 /* USB timeout */
 static unsigned int usb_timeout = 500;
-module_param(usb_timeout, uint, 0);
+module_param(usb_timeout, uint, 0644);
 MODULE_PARM_DESC(usb_timeout, USB timeout (ms): *500*);
 
 /* Tune timeout */
 static unsigned int tune_timeout = 3000;
-module_param(tune_timeout, uint, 0);
+module_param(tune_timeout, uint, 0644);
 MODULE_PARM_DESC(tune_timeout, Tune timeout: *3000*);
 
 /* Seek timeout */
 static unsigned int seek_timeout = 5000;
-module_param(seek_timeout, uint, 0);
+module_param(seek_timeout, uint, 0644);
 MODULE_PARM_DESC(seek_timeout, Seek timeout: *5000*);
 
 /* RDS buffer blocks */
 static unsigned int rds_buf = 100;
-module_param(rds_buf, uint, 0);
+module_param(rds_buf, uint, 0444);
 MODULE_PARM_DESC(rds_buf, RDS buffer entries: *100*);
 
 /* RDS maximum block errors */
@@ -210,7 +211,7 @@ static 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/mfe

2008-10-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9233 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/mfe


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-core/dvb_frontend.c  |   67 ++
 linux/drivers/media/dvb/dvb-core/dvb_frontend.h  |1 
 linux/drivers/media/dvb/dvb-core/dvbdev.c|3 
 linux/drivers/media/dvb/dvb-core/dvbdev.h|4 
 linux/drivers/media/video/cx23885/cx23885-core.c |   11 
 linux/drivers/media/video/cx23885/cx23885-dvb.c  |  170 +++---
 linux/drivers/media/video/cx23885/cx23885.h  |5 
 linux/drivers/media/video/cx88/cx88-cards.c  |   43 +
 linux/drivers/media/video/cx88/cx88-dvb.c|  407 ++-
 linux/drivers/media/video/cx88/cx88-i2c.c|   17 
 linux/drivers/media/video/cx88/cx88-mpeg.c   |   22 
 linux/drivers/media/video/cx88/cx88.h|6 
 linux/drivers/media/video/saa7134/saa7134-dvb.c  |  218 
 linux/drivers/media/video/saa7134/saa7134.h  |2 
 linux/drivers/media/video/videobuf-dvb.c |  185 +-
 linux/include/media/videobuf-dvb.h   |   39 +
 16 files changed, 846 insertions(+), 354 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/96f54ec13e19d1813c1a32d5c85b781014839fac

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-10-17 Thread Patch from Mauro Carvalho Chehab
The patch number 9246 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/sh_mobile_ceu_camera.c |   96 +--
 linux/drivers/media/video/soc_camera_platform.c  |   20 +--
 linux/include/media/soc_camera_platform.h|   11 +
 3 files changed, 83 insertions(+), 44 deletions(-)

diff -r 62801afa4887 -r 55ada4147e73 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Wed Oct 15 17:47:36 
2008 +
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Fri Oct 17 09:24:24 
2008 -0300
@@ -40,39 +40,39 @@
 
 /* register offsets for sh7722 / sh7723 */
 
-#define CAPSR  0x00
-#define CAPCR  0x04
-#define CAMCR  0x08
-#define CMCYR  0x0c
-#define CAMOR  0x10
-#define CAPWR  0x14
-#define CAIFR  0x18
-#define CSTCR  0x20 /* not on sh7723 */
-#define CSECR  0x24 /* not on sh7723 */
-#define CRCNTR 0x28
-#define CRCMPR 0x2c
-#define CFLCR  0x30
-#define CFSZR  0x34
-#define CDWDR  0x38
-#define CDAYR  0x3c
-#define CDACR  0x40
-#define CDBYR  0x44
-#define CDBCR  0x48
-#define CBDSR  0x4c
-#define CFWCR  0x5c
-#define CLFCR  0x60
-#define CDOCR  0x64
-#define CDDCR  0x68
-#define CDDAR  0x6c
-#define CEIER  0x70
-#define CETCR  0x74
-#define CSTSR  0x7c
-#define CSRTR  0x80
-#define CDSSR  0x84
-#define CDAYR2 0x90
-#define CDACR2 0x94
-#define CDBYR2 0x98
-#define CDBCR2 0x9c
+#define CAPSR  0x00 /* Capture start register */
+#define CAPCR  0x04 /* Capture control register */
+#define CAMCR  0x08 /* Capture interface control register */
+#define CMCYR  0x0c /* Capture interface cycle  register */
+#define CAMOR  0x10 /* Capture interface offset register */
+#define CAPWR  0x14 /* Capture interface width register */
+#define CAIFR  0x18 /* Capture interface input format register */
+#define CSTCR  0x20 /* Camera strobe control register (= sh7722) */
+#define CSECR  0x24 /* Camera strobe emission count register (= sh7722) */
+#define CRCNTR 0x28 /* CEU register control register */
+#define CRCMPR 0x2c /* CEU register forcible control register */
+#define CFLCR  0x30 /* Capture filter control register */
+#define CFSZR  0x34 /* Capture filter size clip register */
+#define CDWDR  0x38 /* Capture destination width register */
+#define CDAYR  0x3c /* Capture data address Y register */
+#define CDACR  0x40 /* Capture data address C register */
+#define CDBYR  0x44 /* Capture data bottom-field address Y register */
+#define CDBCR  0x48 /* Capture data bottom-field address C register */
+#define CBDSR  0x4c /* Capture bundle destination size register */
+#define CFWCR  0x5c /* Firewall operation control register */
+#define CLFCR  0x60 /* Capture low-pass filter control register */
+#define CDOCR  0x64 /* Capture data output control register */
+#define CDDCR  0x68 /* Capture data complexity level register */
+#define CDDAR  0x6c /* Capture data complexity level address register */
+#define CEIER  0x70 /* Capture event interrupt enable register */
+#define CETCR  0x74 /* Capture event flag clear register */
+#define CSTSR  0x7c /* Capture status register */
+#define CSRTR  0x80 /* Capture software reset register */
+#define CDSSR  0x84 /* Capture data size register */
+#define CDAYR2 0x90 /* Capture data address Y register 2 */
+#define CDACR2 0x94 /* Capture data address C register 2 */
+#define CDBYR2 0x98 /* Capture data bottom-field address Y register 2 */
+#define CDBCR2 0x9c /* Capture data bottom-field address C register 2 */
 
 static DEFINE_MUTEX(camera_lock);
 
@@ -165,6 +165,7 @@ static void sh_mobile_ceu_capture(struct
ceu_write(pcdev, CETCR, 0x0317f313 ^ 0x10);
 
if (pcdev-active) {
+   pcdev-active-state = VIDEOBUF_ACTIVE;
ceu_write(pcdev, CDAYR, videobuf_to_dma_contig(pcdev-active));
ceu_write(pcdev, CAPSR, 0x1); /* start capture */
}
@@ -236,7 +237,7 @@ static void sh_mobile_ceu_videobuf_queue
dev_dbg(icd-dev, %s (vb=0x%p) 0x%08lx %zd\n, __func__,
vb, vb-baddr, vb-bsize);
 
-   vb-state = VIDEOBUF_ACTIVE;
+   vb-state = VIDEOBUF_QUEUED;
spin_lock_irqsave(pcdev-lock, flags);
list_add_tail(vb-queue, pcdev-capture);
 
@@ -323,12 +324,24 @@ static void sh_mobile_ceu_remove_device(
 {
struct soc_camera_host *ici = to_soc_camera_host(icd-dev.parent);
struct sh_mobile_ceu_dev *pcdev = ici-priv;
+   unsigned long flags;
 
BUG_ON(icd != pcdev-icd);

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb

2008-10-21 Thread Patch from Mauro Carvalho Chehab
The patch number 9317 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~stoth/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/s5h1411.c |   84 +---
 linux/drivers/media/dvb/frontends/s5h1411.h |2 
 2 files changed, 59 insertions(+), 27 deletions(-)

diff -r 2743f06dbe04 -r 5e4276b4d86d linux/drivers/media/dvb/frontends/s5h1411.c
--- a/linux/drivers/media/dvb/frontends/s5h1411.c   Tue Oct 21 10:47:17 
2008 -0200
+++ b/linux/drivers/media/dvb/frontends/s5h1411.c   Tue Oct 21 10:56:57 
2008 -0200
@@ -38,6 +38,7 @@ struct s5h1411_state {
struct dvb_frontend frontend;
 
fe_modulation_t current_modulation;
+   unsigned int first_tune:1;
 
u32 current_frequency;
int if_freq;
@@ -62,7 +63,7 @@ static struct init_tab {
{ S5H1411_I2C_TOP_ADDR, 0x08, 0x0047, },
{ S5H1411_I2C_TOP_ADDR, 0x1c, 0x0400, },
{ S5H1411_I2C_TOP_ADDR, 0x1e, 0x0370, },
-   { S5H1411_I2C_TOP_ADDR, 0x1f, 0x342a, },
+   { S5H1411_I2C_TOP_ADDR, 0x1f, 0x342c, },
{ S5H1411_I2C_TOP_ADDR, 0x24, 0x0231, },
{ S5H1411_I2C_TOP_ADDR, 0x25, 0x1011, },
{ S5H1411_I2C_TOP_ADDR, 0x26, 0x0f07, },
@@ -100,7 +101,6 @@ static struct init_tab {
{ S5H1411_I2C_TOP_ADDR, 0x78, 0x3141, },
{ S5H1411_I2C_TOP_ADDR, 0x7a, 0x3141, },
{ S5H1411_I2C_TOP_ADDR, 0xb3, 0x8003, },
-   { S5H1411_I2C_TOP_ADDR, 0xb5, 0xafbb, },
{ S5H1411_I2C_TOP_ADDR, 0xb5, 0xa6bb, },
{ S5H1411_I2C_TOP_ADDR, 0xb6, 0x0609, },
{ S5H1411_I2C_TOP_ADDR, 0xb7, 0x2f06, },
@@ -393,7 +393,7 @@ static int s5h1411_set_if_freq(struct dv
 
switch (KHz) {
case 3250:
-   s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x38, 0x10d9);
+   s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x38, 0x10d5);
s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x39, 0x5342);
s5h1411_writereg(state, S5H1411_I2C_QAM_ADDR, 0x2c, 0x10d9);
break;
@@ -464,19 +464,37 @@ static int s5h1411_set_spectralinversion
 
if (inversion == 1)
val |= 0x1000; /* Inverted */
-   else
-   val |= 0x;
 
state-inversion = inversion;
return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
 }
 
+static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial)
+{
+   struct s5h1411_state *state = fe-demodulator_priv;
+   u16 val;
+
+   dprintk(%s(%d)\n, __func__, serial);
+   val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0xbd)  ~0x100;
+
+   if (serial == 1)
+   val |= 0x100;
+
+   return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, val);
+}
+
 static int s5h1411_enable_modulation(struct dvb_frontend *fe,
 fe_modulation_t m)
 {
struct s5h1411_state *state = fe-demodulator_priv;
 
dprintk(%s(0x%08x)\n, __func__, m);
+
+   if ((state-first_tune == 0)  (m == state-current_modulation)) {
+   dprintk(%s() Already at desired modulation.  Skipping...\n,
+   __func__);
+   return 0;
+   }
 
switch (m) {
case VSB_8:
@@ -502,6 +520,7 @@ static int s5h1411_enable_modulation(str
}
 
state-current_modulation = m;
+   state-first_tune = 0;
s5h1411_softreset(fe);
 
return 0;
@@ -535,7 +554,7 @@ static int s5h1411_set_gpio(struct dvb_f
return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val);
 }
 
-static int s5h1411_sleep(struct dvb_frontend *fe, int enable)
+static int s5h1411_set_powerstate(struct dvb_frontend *fe, int enable)
 {
struct s5h1411_state *state = fe-demodulator_priv;
 
@@ -551,6 +570,11 @@ static int s5h1411_sleep(struct dvb_fron
return 0;
 }
 
+static int s5h1411_sleep(struct dvb_frontend *fe)
+{
+   return s5h1411_set_powerstate(fe, 1);
+}
+
 static int s5h1411_register_reset(struct dvb_frontend *fe)
 {
struct s5h1411_state *state = fe-demodulator_priv;
@@ -574,9 +598,6 @@ static int s5h1411_set_frontend(struct d
 
s5h1411_enable_modulation(fe, p-u.vsb.modulation);
 
-   /* Allow the demod to settle */
-   msleep(100);
-
if (fe-ops.tuner_ops.set_params) {
if (fe-ops.i2c_gate_ctrl)
fe-ops.i2c_gate_ctrl(fe, 1);
@@ -587,6 +608,10 @@ static int s5h1411_set_frontend(struct d

[linuxtv-commits] [hg:v4l-dvb] Remove unused inode parameter from video_ioctl2

2008-10-21 Thread Patch from Mauro Carvalho Chehab
The patch number 9331 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Remove unused inode parameter from video_ioctl2


inode is never used on video_ioctl2. Remove it and rename the function to
__video_ioctl2. This allows its usage directly as a callback at
fops.unlocked_ioctl.

Since we still need a callback with inode to be used with fops.ioctl,
this patch adds video_ioctl2() that is just a call to __video_ioctl2().

Also, this patch adds some comments about video_ioctl2 and __video_ioctl2
usage at v4l2-ioctl.h.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/ivtv/ivtv-ioctl.c |2 +-
 linux/drivers/media/video/v4l2-ioctl.c  |   20 
 linux/include/media/v4l2-ioctl.h|   20 +++-
 3 files changed, 24 insertions(+), 18 deletions(-)

diff -r 33731b680f25 -r e83513e77f0d linux/drivers/media/video/ivtv/ivtv-ioctl.c
--- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c   Tue Oct 21 12:27:20 
2008 -0200
+++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c   Tue Oct 21 12:58:39 
2008 -0200
@@ -1830,7 +1830,7 @@ static long ivtv_serialized_ioctl(struct
 
if (ivtv_debug  IVTV_DBGFLG_IOCTL)
vfd-debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;
-   ret = video_ioctl2_unlocked(filp, cmd, arg);
+   ret = __video_ioctl2(filp, cmd, arg);
vfd-debug = 0;
return ret;
 }
diff -r 33731b680f25 -r e83513e77f0d linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.cTue Oct 21 12:27:20 2008 -0200
+++ b/linux/drivers/media/video/v4l2-ioctl.cTue Oct 21 12:58:39 2008 -0200
@@ -1769,7 +1769,7 @@ static int __video_do_ioctl(struct file 
return ret;
 }
 
-int video_ioctl2(struct inode *inode, struct file *file,
+int __video_ioctl2(struct file *file,
   unsigned int cmd, unsigned long arg)
 {
charsbuf[128];
@@ -1861,15 +1861,11 @@ out:
kfree(mbuf);
return err;
 }
+EXPORT_SYMBOL(__video_ioctl2);
+
+int video_ioctl2(struct inode *inode, struct file *file,
+  unsigned int cmd, unsigned long arg)
+{
+   return __video_ioctl2(file, cmd, arg);
+}
 EXPORT_SYMBOL(video_ioctl2);
-
-long video_ioctl2_unlocked(struct file *file,
-unsigned int cmd, unsigned long arg)
-{
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 20)
-   return video_ioctl2(file-f_dentry-d_inode, file, cmd, arg);
-#else
-   return video_ioctl2(file-f_path.dentry-d_inode, file, cmd, arg);
-#endif
-}
-EXPORT_SYMBOL(video_ioctl2_unlocked);
diff -r 33731b680f25 -r e83513e77f0d linux/include/media/v4l2-ioctl.h
--- a/linux/include/media/v4l2-ioctl.h  Tue Oct 21 12:27:20 2008 -0200
+++ b/linux/include/media/v4l2-ioctl.h  Tue Oct 21 12:58:39 2008 -0200
@@ -284,15 +284,25 @@ extern long v4l_compat_ioctl32(struct fi
 extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
unsigned long arg);
 
-extern int video_ioctl2(struct inode *inode, struct file *file,
-   unsigned int cmd, unsigned long arg);
-extern long video_ioctl2_unlocked(struct file *file,
-   unsigned int cmd, unsigned long arg);
-
 /* Include support for obsoleted stuff */
 extern int video_usercopy(struct inode *inode, struct file *file,
  unsigned int cmd, unsigned long arg,
  int (*func)(struct inode *inode, struct file *file,
  unsigned int cmd, void *arg));
 
+/* Standard handlers for V4L ioctl's */
+
+/* This prototype is used on fops.unlocked_ioctl */
+extern int __video_ioctl2(struct file *file,
+   unsigned int cmd, unsigned long arg);
+
+/* This prototype is used on fops.ioctl
+ * Since fops.ioctl enables Kernel Big Lock, it is preferred
+ * to use __video_ioctl2 instead.
+ * It should be noticed that there's no lock code inside
+ * video_ioctl2().
+ */
+extern int video_ioctl2(struct inode *inode, struct file *file,
+   unsigned int cmd, unsigned long arg);
+
 #endif /* _V4L2_IOCTL_H */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e83513e77f0dc2f6f03b8c1a72abe5e7fbd7695f

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit a9b12619f7b6f19c871437ec24a088787a04b1de

2008-10-21 Thread Patch from Mauro Carvalho Chehab
The patch number 9338 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit a9b12619f7b6f19c871437ec24a088787a04b1de


Author: Greg Kroah-Hartman [EMAIL PROTECTED]

device create: misc: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-core/dvbdev.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -r ede12f3d06b9 -r 7073d2374c9a linux/drivers/media/dvb/dvb-core/dvbdev.c
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c Tue Oct 21 13:53:24 2008 -0200
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c Mon Jul 21 20:03:34 2008 -0700
@@ -242,7 +242,11 @@ int dvb_register_device(struct dvb_adapt
 
mutex_unlock(dvbdev_register_lock);
 
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 27)
+   clsdev = device_create(dvb_class, adap-device,
+  MKDEV(DVB_MAJOR, nums2minor(adap-num, type, 
id)),
+  NULL, dvb%d.%s%d, adap-num, dnames[type], id);
+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 27)
clsdev = device_create_drvdata(dvb_class, adap-device,
   MKDEV(DVB_MAJOR, nums2minor(adap-num, type, 
id)),
   NULL, dvb%d.%s%d, adap-num, dnames[type], id);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7073d2374c9a592c3c5650864aedb6a52d8ce308

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] backport commit aa82661baf8a48379355ffa8bf162b07cf487600

2008-10-21 Thread Patch from Mauro Carvalho Chehab
The patch number 9340 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
backport commit aa82661baf8a48379355ffa8bf162b07cf487600


Author: Greg Kroah-Hartman [EMAIL PROTECTED]

USB: remove warn() macro from usb media drivers

USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/radio/dsbr100.c |   13 --
 linux/drivers/media/video/dabusb.c  |4 +-
 linux/drivers/media/video/ov511.c   |   19 ++
 linux/drivers/media/video/usbvideo/konicawc.c   |8 ++--
 linux/drivers/media/video/usbvideo/quickcam_messenger.c |   14 ---
 5 files changed, 35 insertions(+), 23 deletions(-)

diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/radio/dsbr100.c
--- a/linux/drivers/media/radio/dsbr100.c   Sat Oct 18 20:28:37 2008 -0700
+++ b/linux/drivers/media/radio/dsbr100.c   Thu Aug 14 09:37:34 2008 -0700
@@ -311,7 +311,7 @@ static int vidioc_s_frequency(struct fil
 
radio-curfreq = f-frequency;
if (dsbr100_setfreq(radio, radio-curfreq) == -1)
-   warn(Set frequency failed);
+   dev_warn(radio-usbdev-dev, Set frequency failed\n);
return 0;
 }
 
@@ -361,12 +361,14 @@ static int vidioc_s_ctrl(struct file *fi
case V4L2_CID_AUDIO_MUTE:
if (ctrl-value) {
if (dsbr100_stop(radio) == -1) {
-   warn(Radio did not respond properly);
+   dev_warn(radio-usbdev-dev,
+Radio did not respond properly\n);
return -EBUSY;
}
} else {
if (dsbr100_start(radio) == -1) {
-   warn(Radio did not respond properly);
+   dev_warn(radio-usbdev-dev,
+Radio did not respond properly\n);
return -EBUSY;
}
}
@@ -417,7 +419,8 @@ static int usb_dsbr100_open(struct inode
radio-muted = 1;
 
if (dsbr100_start(radio)  0) {
-   warn(Radio did not start up properly);
+   dev_warn(radio-usbdev-dev,
+Radio did not start up properly\n);
radio-users = 0;
unlock_kernel();
return -EIO;
@@ -514,7 +517,7 @@ static int usb_dsbr100_probe(struct usb_
radio-curfreq = FREQ_MIN * FREQ_MUL;
video_set_drvdata(radio-videodev, radio);
if (video_register_device(radio-videodev, VFL_TYPE_RADIO, radio_nr)  
0) {
-   warn(Could not register video device);
+   dev_warn(intf-dev, Could not register video device\n);
video_device_release(radio-videodev);
kfree(radio-transfer_buffer);
kfree(radio);
diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/video/dabusb.c
--- a/linux/drivers/media/video/dabusb.cSat Oct 18 20:28:37 2008 -0700
+++ b/linux/drivers/media/video/dabusb.cThu Aug 14 09:37:34 2008 -0700
@@ -202,7 +202,7 @@ static void dabusb_iso_complete (struct 
err(dabusb_iso_complete: invalid len 
%d, len);
}
else
-   warn(dabusb_iso_complete: corrupted packet 
status: %d, purb-iso_frame_desc[i].status);
+   dev_warn(purb-dev-dev, dabusb_iso_complete: 
corrupted packet status: %d\n, purb-iso_frame_desc[i].status);
if (dst != purb-actual_length)
err(dst!=purb-actual_length:%d!=%d, dst, 
purb-actual_length);
}
@@ -299,7 +299,7 @@ static int dabusb_bulk (pdabusb_t s, pbu
}
 
if( ret == -EPIPE ) {
-   warn(CLEAR_FEATURE request to remove STALL condition.);
+   dev_warn(s-usbdev-dev, CLEAR_FEATURE request to remove 
STALL condition.\n);
if(usb_clear_halt(s-usbdev, usb_pipeendpoint(pipe)))
err(request failed);
}
diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/video/ov511.c
--- a/linux/drivers/media/video/ov511.c Sat Oct 18 20:28:37 2008 -0700
+++ 

[linuxtv-commits] [hg:v4l-dvb] ibmcam: Fix a regression caused by a482f327ff56bc3cf53176a7eb736cea47291a1d

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9351 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
ibmcam: Fix a regression caused by a482f327ff56bc3cf53176a7eb736cea47291a1d


As reported by David Ellingsworth:
 I'm not sure if it matters or not, but the ibmcam driver in the
 Mauro's linux-2.6 git tree in the for_linus branch is currently
 broken.

uvd is equal to NULL during most of ibmcam_probe. Due to that, an OOPS
is
generated at dev_info. This patch replaces uvd-dev-dev to dev-dev
inside this routine.

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]
Reviewed-by: David Ellingsworth [EMAIL PROTECTED]


---

 linux/drivers/media/video/usbvideo/ibmcam.c |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -r ef4d93d73df3 -r 5eac9d2ef59b linux/drivers/media/video/usbvideo/ibmcam.c
--- a/linux/drivers/media/video/usbvideo/ibmcam.c   Thu Oct 23 10:20:27 
2008 -0200
+++ b/linux/drivers/media/video/usbvideo/ibmcam.c   Thu Oct 23 10:53:56 
2008 -0200
@@ -3695,7 +3695,7 @@ static int ibmcam_probe(struct usb_inter
unsigned char video_ep = 0;
 
if (debug = 1)
-   dev_info(uvd-dev-dev, ibmcam_probe(%p,%u.)\n, intf, ifnum);
+   dev_info(dev-dev, ibmcam_probe(%p,%u.)\n, intf, ifnum);
 
/* We don't handle multi-config cameras */
if (dev-descriptor.bNumConfigurations != 1)
@@ -3746,7 +3746,7 @@ static int ibmcam_probe(struct usb_inter
brand = IBM PC Camera; /* a.k.a. Xirlink C-It */
break;
}
-   dev_info(uvd-dev-dev,
+   dev_info(dev-dev,
 %s USB camera found (model %d, rev. 0x%04x)\n,
 brand, model, le16_to_cpu(dev-descriptor.bcdDevice));
} while (0);
@@ -3754,7 +3754,7 @@ static int ibmcam_probe(struct usb_inter
/* Validate found interface: must have one ISO endpoint */
nas = intf-num_altsetting;
if (debug  0)
-   dev_info(uvd-dev-dev, Number of alternate settings=%d.\n,
+   dev_info(dev-dev, Number of alternate settings=%d.\n,
 nas);
if (nas  2) {
err(Too few alternate settings for this camera!);
@@ -3799,7 +3799,7 @@ static int ibmcam_probe(struct usb_inter
actInterface = i;
maxPS = le16_to_cpu(endpoint-wMaxPacketSize);
if (debug  0)
-   dev_info(uvd-dev-dev,
+   dev_info(dev-dev,
 Active setting=%d. 
 maxPS=%d.\n, i, maxPS);
} else
@@ -3840,7 +3840,7 @@ static int ibmcam_probe(struct usb_inter
RESTRICT_TO_RANGE(framerate, 0, 5);
break;
default:
-   dev_info(uvd-dev-dev, IBM camera: using 320x240\n);
+   dev_info(dev-dev, IBM camera: using 320x240\n);
size = SIZE_320x240;
/* No break here */
case SIZE_320x240:
@@ -3869,7 +3869,7 @@ static int ibmcam_probe(struct usb_inter
canvasY = 120;
break;
default:
-   dev_info(uvd-dev-dev, IBM NetCamera: using 
176x144\n);
+   dev_info(dev-dev, IBM NetCamera: using 176x144\n);
size = SIZE_176x144;
/* No break here */
case SIZE_176x144:


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/5eac9d2ef59b48a1a828b13a252285c6127b5c4c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~tmerle/v4l-dvb

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9360 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~tmerle/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/Kconfig |2 +-
 v4l/obsolete.txt|3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff -r e414eb18bc7b -r dcb5346c7232 linux/drivers/media/dvb/dvb-usb/Kconfig
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig   Fri Oct 24 13:47:07 2008 +
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig   Fri Oct 24 12:58:43 2008 -0200
@@ -261,7 +261,7 @@ config DVB_USB_DW2102
  Say Y here to support the DvbWorld DVB-S/S2 USB2.0 receivers
  and the TeVii S650.
 
-config DVB_USB_CINERGY_T2
+config DVB_USB_CINERGY_T2
tristate Terratec CinergyT2/qanu USB 2.0 DVB-T receiver
depends on DVB_USB
help
diff -r e414eb18bc7b -r dcb5346c7232 v4l/obsolete.txt
--- a/v4l/obsolete.txt  Fri Oct 24 13:47:07 2008 +
+++ b/v4l/obsolete.txt  Fri Oct 24 12:58:43 2008 -0200
@@ -3,6 +3,9 @@ video/video-buf
 
 # This file were replaced by videobuf-dvb
 video/video-buf-dvb
+
+#This driver has been reworked and moved to dvb-usb
+dvb/cinergyT2/cinergyT2
 
 # Those drivers were moved to common/tuners
 dvb/frontends/mt2060


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/dcb5346c7232780be00db720fada7cd7f79760a1

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Move S921 driver to the proper place and allow it to compile

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9366 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Move S921 driver to the proper place and allow it to compile


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/Kconfig   |   11 
 linux/drivers/media/dvb/frontends/Makefile  |3 
 linux/drivers/media/dvb/frontends/s921_core.c   |  587 
 linux/drivers/media/dvb/frontends/s921_core.h   |  114 ++
 linux/drivers/media/dvb/frontends/s921_module.c |  254 +
 linux/drivers/media/dvb/frontends/s921_module.h |   49 +
 linux/drivers/media/video/empia/sharp/Makefile  |3 
 linux/drivers/media/video/empia/sharp/s921_core.c   |  586 ---
 linux/drivers/media/video/empia/sharp/s921_core.h   |  114 --
 linux/drivers/media/video/empia/sharp/s921_module.c |  254 -
 linux/drivers/media/video/empia/sharp/s921_module.h |   49 -
 11 files changed, 1018 insertions(+), 1006 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d7422af4064d42c491fcb15a4869244951b900cc

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Move lgdt3304 driver to the proper place and allow it to compile

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9367 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Move lgdt3304 driver to the proper place and allow it to compile


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/frontends/Kconfig   |8 
 linux/drivers/media/dvb/frontends/Makefile  |2 
 linux/drivers/media/dvb/frontends/lgdt3304.c|  398 
 linux/drivers/media/dvb/frontends/lgdt3304.h|   45 +
 linux/drivers/media/video/empia/lgdt3304/Makefile   |7 
 linux/drivers/media/video/empia/lgdt3304/lgdt3304.c |  398 
 linux/drivers/media/video/empia/lgdt3304/lgdt3304.h |   45 -
 7 files changed, 453 insertions(+), 450 deletions(-)

diff -r d7422af4064d -r 06df1b240240 linux/drivers/media/dvb/frontends/Kconfig
--- a/linux/drivers/media/dvb/frontends/Kconfig Fri Oct 24 14:44:38 2008 -0200
+++ b/linux/drivers/media/dvb/frontends/Kconfig Fri Oct 24 16:06:17 2008 -0200
@@ -345,6 +345,14 @@ config DVB_LGDT330X
  An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
  to support this frontend.
 
+config DVB_LGDT3304
+   tristate LG Electronics LGDT3304
+   depends on DVB_CORE  I2C
+   default m if DVB_FE_CUSTOMISE
+   help
+ An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
+ to support this frontend.
+
 config DVB_S5H1409
tristate Samsung S5H1409 based
depends on DVB_CORE  I2C
diff -r d7422af4064d -r 06df1b240240 linux/drivers/media/dvb/frontends/Makefile
--- a/linux/drivers/media/dvb/frontends/MakefileFri Oct 24 14:44:38 
2008 -0200
+++ b/linux/drivers/media/dvb/frontends/MakefileFri Oct 24 16:06:17 
2008 -0200
@@ -37,6 +37,7 @@ obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
 obj-$(CONFIG_DVB_BCM3510) += bcm3510.o
 obj-$(CONFIG_DVB_S5H1420) += s5h1420.o
 obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o
+obj-$(CONFIG_DVB_LGDT3304) += lgdt3304.o
 obj-$(CONFIG_DVB_CX24123) += cx24123.o
 obj-$(CONFIG_DVB_LNBP21) += lnbp21.o
 obj-$(CONFIG_DVB_ISL6405) += isl6405.o
@@ -58,3 +59,4 @@ obj-$(CONFIG_DVB_STV0288) += stv0288.o
 obj-$(CONFIG_DVB_STV0288) += stv0288.o
 obj-$(CONFIG_DVB_STB6000) += stb6000.o
 obj-$(CONFIG_DVB_S921) += s921.o
+
diff -r d7422af4064d -r 06df1b240240 
linux/drivers/media/dvb/frontends/lgdt3304.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/dvb/frontends/lgdt3304.c  Fri Oct 24 16:06:17 
2008 -0200
@@ -0,0 +1,398 @@
+/*
+ * Driver for LG ATSC lgdt3304 driver
+ *
+ * Copyright (C) 2008 Markus Rechberger [EMAIL PROTECTED]
+ *
+ */
+
+#include linux/kernel.h
+#include linux/module.h
+#include linux/delay.h
+#include dvb_frontend.h
+#include lgdt3304.h
+
+static  unsigned int debug = 0;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug,lgdt3304 debugging (default off));
+
+#define dprintk(fmt, args...) if (debug) do {\
+   printk(lgdt3304 debug:  fmt, ##args); } while (0)
+
+struct lgdt3304_state
+{
+   struct dvb_frontend frontend;
+   fe_modulation_t current_modulation;
+   __u32 snr;
+   __u32 current_frequency;
+   __u8 addr;
+   struct i2c_adapter *i2c;
+};
+
+static int i2c_write_demod_bytes (struct dvb_frontend *fe, __u8 *buf, int len)
+{
+   struct lgdt3304_state *state = fe-demodulator_priv;
+   struct i2c_msg i2cmsgs = {
+   .addr = state-addr,
+   .flags = 0,
+   .len = 3,
+   .buf = buf
+   };
+   int i;
+   int err;
+
+   for (i=0; ilen-1; i+=3){
+   if((err = i2c_transfer(state-i2c, i2cmsgs, 1))0) {
+   printk(%s i2c_transfer error %d\n, __FUNCTION__, err);
+   if (err  0)
+   return err;
+   else
+   return -EREMOTEIO;
+   }
+   i2cmsgs.buf += 3;
+   }
+   return 0;
+}
+
+static int lgdt3304_i2c_read_reg(struct dvb_frontend *fe, unsigned int reg)
+{
+   struct lgdt3304_state *state = fe-demodulator_priv;
+   struct i2c_msg i2cmsgs[2];
+   int ret;
+   __u8 buf;
+
+   __u8 regbuf[2] = { reg8, reg0xff };
+
+   i2cmsgs[0].addr = state-addr;
+   i2cmsgs[0].flags = 0;
+   i2cmsgs[0].len = 2;
+   i2cmsgs[0].buf = regbuf;
+
+   i2cmsgs[1].addr = state-addr;
+   i2cmsgs[1].flags = I2C_M_RD;
+   i2cmsgs[1].len = 1;
+   i2cmsgs[1].buf = buf;
+
+   if((ret = i2c_transfer(state-i2c, i2cmsgs, 2))0) {
+   printk(%s i2c_transfer error %d\n, __FUNCTION__, 

[linuxtv-commits] [hg:v4l-dvb] Update README.cx88 with the current status

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9370 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Update README.cx88 with the current status


README.cx88 were outdated since a long time. Update it with the current
status.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]
CC: Rafael Diniz [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/README.cx88 |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff -r 0b6901c8bef7 -r b97973d857a0 linux/Documentation/video4linux/README.cx88
--- a/linux/Documentation/video4linux/README.cx88   Wed Oct 22 21:02:09 
2008 +
+++ b/linux/Documentation/video4linux/README.cx88   Sat Oct 25 00:13:57 
2008 -0200
@@ -1,4 +1,3 @@
-
 cx8800 release notes
 
 
@@ -10,21 +9,20 @@ current status
 
 video
- Basically works.
-   - Some minor image quality glitches.
-   - For now only capture, overlay support isn't completed yet.
+   - For now, only capture and read(). Overlay isn't supported.
 
 audio
- The chip specs for the on-chip TV sound decoder are next
  to useless :-/
- Neverless the builtin TV sound decoder starts working now,
- at least for PAL-BG.  Other TV norms need other code ...
+ at least for some standards.
  FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
  USING.
- Most tuner chips do provide mono sound, which may or may not
  be useable depending on the board design.  With the Hauppauge
  cards it works, so there is mono sound available as fallback.
- audio data dma (i.e. recording without loopback cable to the
- sound card) should be possible, but there is no code yet ...
+ sound card) is supported via cx88-alsa.
 
 vbi
- Code present. Works for NTSC closed caption. PAL and other


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/b97973d857a072f3ab6e31886dece23a11cab62c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Improve make install to work properly with a distro that use non-standard dir for V4L/DVB modules

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9373 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Improve make install to work properly with a distro that use non-standard dir 
for V4L/DVB modules


One distro stores kernel/drivers/media files on non-standard dirs.

I can't see any logical rule for, once having the kernel original dir
position, determine were the kernel driver were placed on that distro.

For example, they put xc5000.ko driver inside foo/media/au0828,
while the expected place would be something like
foo/media/common/tuners.

So, this patch do some tricks, when make rminstall or make install
is called:

1) detect if it is such distro;

2) if so, it will run something like:
find foo/media -name module.ko -exec rm '{}' \;
where module.ko is the official V4L/DVB name for the compiled modules,
and foo is the distro non-standard dir.

This should remove the new V4L/DVB .ko modules that are located at the
non-standard dir or inside one of its sub-directories.

NOTICE: If there are other V4L/DVB drivers there that (1) aren't inside
V4L/DVB tree; (2) weren't selected to compile; then those drivers will
likely stop working.

This patch doesn't affect the other distros.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/make_makefile.pl |   32 ++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff -r d948a33de8ed -r 59a4356c78d0 v4l/scripts/make_makefile.pl
--- a/v4l/scripts/make_makefile.pl  Fri Oct 24 18:08:28 2008 +
+++ b/v4l/scripts/make_makefile.pl  Sat Oct 25 01:21:57 2008 -0200
@@ -157,6 +157,33 @@ sub removeobsolete()
}
 }
 
+#
+# Special hack for Ubuntu with their backport mess
+#
+sub removeubuntu()
+{
+   my $dest = /lib/modules/\$(KERNELRELEASE)/ubuntu/media;
+   my $filelist;
+
+   while ( my ($dir, $files) = each(%instdir) ) {
+   $filelist .= join(' ', keys %$files);
+   }
+   while ( my ($dir, $files) = each(%obsolete) ) {
+   $filelist .= join(' ', keys %$files);
+   }
+   $filelist =~ s/\s+$//;
+
+   print OUT [EMAIL PROTECTED] [ -d $dest ]; then ;
+   print OUT printf \\\nHmm... distro kernel with a non-standard place 
for module backports detected.\\n;
+   print OUT Please always prefer to use vanilla upstream kernel with 
V4L/DVB\\n;
+   print OUT I'll try to remove old/obsolete LUM files from $dest:\\n\; 
;
+   print OUT files=', $filelist, '; ;
+
+   print OUT for i in \$\$files;do find \$dest\ \-name \\$\$i\ \-exec 
echo \'{}\' \';\' ;;
+   print OUT  find \$dest\ \-name \\$\$i\ \-exec rm \'{}\' \';\' ;;
+   print OUT  done;;
+   print OUT  fi\n;
+}
 
 getobsolete();
 
@@ -169,6 +196,7 @@ print OUT [EMAIL PROTECTED] --strip-debug \$(in
 print OUT [EMAIL PROTECTED] --strip-debug \$(inst-m)\n\n;
 
 removeobsolete();
+removeubuntu();
 
 print OUT [EMAIL PROTECTED] \Installing kernel modules under 
\$(DESTDIR)\$(KDIR26)/:\\n;
 
@@ -191,8 +219,8 @@ print OUT media-rminstall::\n;
 print OUT media-rminstall::\n;
 
 removeobsolete();
-
-print OUT [EMAIL PROTECTED] -e \\\nRemoving old \$(DEST) files\\n\\n;
+removeubuntu();
+
 while ( my ($dir, $files) = each(%instdir) ) {
print OUT [EMAIL PROTECTED] -e \\\nRemoving old \$(KDIR26)/$dir 
files:\\n;
print OUT [EMAIL PROTECTED]', join(' ', keys %$files), '; ;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/59a4356c78d059444b2015bdba85a3803101edf4

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] A small improvement at a comment added on the latest patch

2008-10-24 Thread Patch from Mauro Carvalho Chehab
The patch number 9374 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
A small improvement at a comment added on the latest patch


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l/scripts/make_makefile.pl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 59a4356c78d0 -r 3fe430c056b5 v4l/scripts/make_makefile.pl
--- a/v4l/scripts/make_makefile.pl  Sat Oct 25 01:21:57 2008 -0200
+++ b/v4l/scripts/make_makefile.pl  Sat Oct 25 01:34:37 2008 -0200
@@ -158,7 +158,7 @@ sub removeobsolete()
 }
 
 #
-# Special hack for Ubuntu with their backport mess
+# Special hack for Ubuntu with their non-standard dir
 #
 sub removeubuntu()
 {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/3fe430c056b553bb8e88fd2dae65ccfffc85f475

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~awalls/cx18-bugfix

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9476 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~awalls/cx18-bugfix


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-driver.c  |2 --
 linux/drivers/media/video/cx18/cx18-io.c  |4 ++--
 linux/drivers/media/video/cx18/cx18-irq.c |6 +++---
 linux/drivers/media/video/cx18/cx18-mailbox.c |4 ++--
 4 files changed, 7 insertions(+), 9 deletions(-)

diff -r 534445ecb653 -r 8d49e3f706ac 
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c  Tue Oct 28 01:27:37 
2008 +
+++ b/linux/drivers/media/video/cx18/cx18-driver.c  Thu Oct 30 05:51:07 
2008 -0200
@@ -732,8 +732,6 @@ static int __devinit cx18_probe(struct p
cx-std = V4L2_STD_NTSC_M;
 
if (cx-options.tuner == -1) {
-   int i;
-
for (i = 0; i  CX18_CARD_MAX_TUNERS; i++) {
if ((cx-std  cx-card-tuners[i].std) == 0)
continue;
diff -r 534445ecb653 -r 8d49e3f706ac linux/drivers/media/video/cx18/cx18-io.c
--- a/linux/drivers/media/video/cx18/cx18-io.c  Tue Oct 28 01:27:37 2008 +
+++ b/linux/drivers/media/video/cx18/cx18-io.c  Thu Oct 30 05:51:07 2008 -0200
@@ -218,7 +218,7 @@ void cx18_sw1_irq_enable(struct cx18 *cx
 void cx18_sw1_irq_enable(struct cx18 *cx, u32 val)
 {
u32 r;
-   cx18_write_reg(cx, val, SW1_INT_STATUS);
+   cx18_write_reg_noretry(cx, val, SW1_INT_STATUS);
r = cx18_read_reg(cx, SW1_INT_ENABLE_PCI);
cx18_write_reg(cx, r | val, SW1_INT_ENABLE_PCI);
 }
@@ -233,7 +233,7 @@ void cx18_sw2_irq_enable(struct cx18 *cx
 void cx18_sw2_irq_enable(struct cx18 *cx, u32 val)
 {
u32 r;
-   cx18_write_reg(cx, val, SW2_INT_STATUS);
+   cx18_write_reg_noretry(cx, val, SW2_INT_STATUS);
r = cx18_read_reg(cx, SW2_INT_ENABLE_PCI);
cx18_write_reg(cx, r | val, SW2_INT_ENABLE_PCI);
 }
diff -r 534445ecb653 -r 8d49e3f706ac linux/drivers/media/video/cx18/cx18-irq.c
--- a/linux/drivers/media/video/cx18/cx18-irq.c Tue Oct 28 01:27:37 2008 +
+++ b/linux/drivers/media/video/cx18/cx18-irq.c Thu Oct 30 05:51:07 2008 -0200
@@ -153,9 +153,9 @@ irqreturn_t cx18_irq_handler(int irq, vo
sw1_mask = cx18_read_reg(cx, SW1_INT_ENABLE_PCI) | IRQ_EPU_TO_HPU;
sw1 = cx18_read_reg(cx, SW1_INT_STATUS)  sw1_mask;
 
-   cx18_write_reg(cx, sw2sw2_mask, SW2_INT_STATUS);
-   cx18_write_reg(cx, sw1sw1_mask, SW1_INT_STATUS);
-   cx18_write_reg(cx, hw2hw2_mask, HW2_INT_CLR_STATUS);
+   cx18_write_reg_noretry(cx, sw2sw2_mask, SW2_INT_STATUS);
+   cx18_write_reg_noretry(cx, sw1sw1_mask, SW1_INT_STATUS);
+   cx18_write_reg_noretry(cx, hw2hw2_mask, HW2_INT_CLR_STATUS);
 
if (sw1 || sw2 || hw2)
CX18_DEBUG_HI_IRQ(SW1: %x  SW2: %x  HW2: %x\n, sw1, sw2, hw2);
diff -r 534445ecb653 -r 8d49e3f706ac 
linux/drivers/media/video/cx18/cx18-mailbox.c
--- a/linux/drivers/media/video/cx18/cx18-mailbox.c Tue Oct 28 01:27:37 
2008 +
+++ b/linux/drivers/media/video/cx18/cx18-mailbox.c Thu Oct 30 05:51:07 
2008 -0200
@@ -176,7 +176,7 @@ long cx18_mb_ack(struct cx18 *cx, const 
 
cx18_setup_page(cx, SCB_OFFSET);
cx18_write_sync(cx, mb-request, ack_mb-ack);
-   cx18_write_reg(cx, ack_irq, SW2_INT_SET);
+   cx18_write_reg_noretry(cx, ack_irq, SW2_INT_SET);
return 0;
 }
 
@@ -225,7 +225,7 @@ static int cx18_api_call(struct cx18 *cx
}
if (info-flags  API_FAST)
timeout /= 2;
-   cx18_write_reg(cx, irq, SW1_INT_SET);
+   cx18_write_reg_noretry(cx, irq, SW1_INT_SET);
 
while (!sig  cx18_readl(cx, mb-ack) != cx18_readl(cx, mb-request)
cnt  660) {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8d49e3f706ac7db321705ccd725dc9c2a337def5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~tlorenz/v4l-dvb

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9483 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~tlorenz/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/si470x.txt |  118 +
 linux/drivers/media/radio/Kconfig  |   14 ++
 linux/drivers/media/radio/radio-si470x.c   |   13 --
 3 files changed, 132 insertions(+), 13 deletions(-)

diff -r 7749e4eabeaa -r 3648ceff5b02 linux/Documentation/video4linux/si470x.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/Documentation/video4linux/si470x.txtThu Oct 30 06:00:39 
2008 -0200
@@ -0,0 +1,118 @@
+Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers
+
+Copyright (c) 2008 Tobias Lorenz [EMAIL PROTECTED]
+
+
+Information from Silicon Labs
+=
+Silicon Laboratories is the manufacturer of the radio ICs, that nowadays are 
the
+most often used radio receivers in cell phones. Usually they are connected with
+I2C. But SiLabs also provides a reference design, which integrates this IC,
+together with a small microcontroller C8051F321, to form a USB radio.
+Part of this reference design is also a radio application in binary and source
+code. The software also contains an automatic firmware upgrade to the most
+current version. Information on these can be downloaded here:
+http://www.silabs.com/usbradio
+
+
+Supported ICs
+=
+The following ICs have a very similar register set, so that they are or will be
+supported somewhen by the driver:
+- Si4700: FM radio receiver
+- Si4701: FM radio receiver, RDS Support
+- Si4702: FM radio receiver
+- Si4703: FM radio receiver, RDS Support
+- Si4704: FM radio receiver, no external antenna required
+- Si4705: FM radio receiver, no external antenna required, RDS support, Dig I/O
+- Si4706: Enhanced FM RDS/TMC radio receiver, no external antenna required, RDS
+ Support
+- Si4707: Dedicated weather band radio receiver with SAME decoder, RDS Support
+- Si4708: Smallest FM receivers
+- Si4709: Smallest FM receivers, RDS Support
+More information on these can be downloaded here:
+http://www.silabs.com/products/mcu/Pages/USBFMRadioRD.aspx
+
+
+Supported USB devices
+=
+Currently the following USB radios (vendor:product) with the Silicon Labs 
si470x
+chips are known to work:
+- 10c4:818a: Silicon Labs USB FM Radio Reference Design
+- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) 
(RDX-155-EF)
+- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
+
+
+Software
+
+Testing is usually done with most application under Debian/testing:
+- fmtools - Utility for managing FM tuner cards
+- gnomeradio - FM-radio tuner for the GNOME desktop
+- gradio - GTK FM radio tuner
+- kradio - Comfortable Radio Application for KDE
+- radio - ncurses-based radio application
+
+There is also a library libv4l, which can be used. It's going to have a 
function
+for frequency seeking, either by using hardware functionality as in 
radio-si470x
+or by implementing a function as we currently have in every of the mentioned
+programs. Somewhen the radio programs should make use of libv4l.
+
+For processing RDS information, there is a project ongoing at:
+http://rdsd.berlios.de/
+
+There is currently no project for making TMC sentences human readable.
+
+
+Audio Listing
+=
+USB Audio is provided by the ALSA snd_usb_audio module. It is recommended to
+also select SND_USB_AUDIO, as this is required to get sound from the radio. For
+listing you have to redirect the sound, for example using one of the following
+commands.
+
+If you just want to test audio (very poor quality):
+cat /dev/dsp1  /dev/dsp
+
+If you use OSS try:
+sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp
+
+If you use arts try:
+arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
+
+
+Module Parameters
+=
+After loading the module, you still have access to some of them in the sysfs
+mount under /sys/module/radio_si470x/parameters. The contents of read-only 
files
+(0444) are not updated, even if space, band and de are changed using private
+video controls. The others are runtime changeable.
+
+
+Errors
+==
+Increase tune_timeout, if you often get -EIO errors.
+
+When timed out or band limit is reached, hw_freq_seek returns -EAGAIN.
+
+If you get any errors from snd_usb_audio, please report them to the ALSA 
people.
+
+
+Open Issues
+===
+V4L minor device allocation and parameter setting is not perfect. A 

[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9487 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Makefile  |2 
 linux/drivers/media/video/compat_ioctl32.c  | 1000 
 linux/drivers/media/video/ivtv/Kconfig  |5 
 linux/drivers/media/video/v4l2-compat-ioctl32.c |  991 +++
 v4l/obsolete.txt|3 
 5 files changed, 997 insertions(+), 1004 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7438352da383c1d62365578e7baec9a1d36cacb7

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9489 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/Kconfig |6 
 linux/drivers/media/video/Makefile|1 
 linux/drivers/media/video/ov772x.c|  966 ++
 linux/include/media/ov772x.h  |   21 
 linux/include/media/v4l2-chip-ident.h |1 
 5 files changed, 995 insertions(+)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/010b54353ab48bfa66d223b2d07d6b17dbcd99b7

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Simplify video standards enumeration

2008-10-30 Thread Patch from Mauro Carvalho Chehab
The patch number 9498 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Simplify video standards enumeration


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx88/cx88.h |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff -r 9b4010593b24 -r 50e4cdc46320 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h Thu Oct 30 07:53:07 2008 +
+++ b/linux/drivers/media/video/cx88/cx88.h Thu Oct 30 15:28:19 2008 -0200
@@ -54,13 +54,11 @@
 /* --- */
 /* defines and enums   */
 
-/* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
-#define CX88_NORMS (\
-   V4L2_STD_NTSC_M|  V4L2_STD_NTSC_M_JP|  V4L2_STD_NTSC_443 | \
-   V4L2_STD_PAL_BG|  V4L2_STD_PAL_DK   |  V4L2_STD_PAL_I| \
-   V4L2_STD_PAL_M |  V4L2_STD_PAL_N|  V4L2_STD_PAL_Nc   | \
-   V4L2_STD_PAL_60|  V4L2_STD_SECAM_L  |  V4L2_STD_SECAM_DK | \
-   V4L2_STD_SECAM_B| V4L2_STD_SECAM_G  |  V4L2_STD_SECAM_H )
+/* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM/LC */
+#define CX88_NORMS (V4L2_STD_ALL   \
+~V4L2_STD_PAL_H   \
+~V4L2_STD_NTSC_M_KR   \
+~V4L2_STD_SECAM_LC)
 
 #define FORMAT_FLAGS_PACKED   0x01
 #define FORMAT_FLAGS_PLANAR   0x02


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/50e4cdc46320e80b2919d9052c3bf42f30950334

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb

2008-11-05 Thread Patch from Mauro Carvalho Chehab
The patch number 9509 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/common/saa7146_fops.c |2 
 linux/drivers/media/common/saa7146_video.c|   10 ---
 linux/drivers/media/dvb/dvb-core/dvbdev.c |2 
 linux/drivers/media/dvb/dvb-usb/cinergyT2.h   |4 +
 linux/drivers/media/video/Kconfig |8 +--
 linux/drivers/media/video/arv.c   |5 -
 linux/drivers/media/video/bw-qcam.c   |5 -
 linux/drivers/media/video/c-qcam.c|9 +--
 linux/drivers/media/video/cpia.c  |   11 +---
 linux/drivers/media/video/cpia2/cpia2_v4l.c   |   15 ++---
 linux/drivers/media/video/cx18/cx18-driver.c  |4 -
 linux/drivers/media/video/cx25840/Kconfig |2 
 linux/drivers/media/video/ivtv/ivtv-cards.c   |   17 --
 linux/drivers/media/video/ivtv/ivtv-driver.c  |   26 +-
 linux/drivers/media/video/ov511.c |5 -
 linux/drivers/media/video/ov772x.c|   14 +++--
 linux/drivers/media/video/pms.c   |5 -
 linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c  |   13 +
 linux/drivers/media/video/pwc/pwc-if.c|2 
 linux/drivers/media/video/pwc/pwc-v4l.c   |3 -
 linux/drivers/media/video/pwc/pwc.h   |3 -
 linux/drivers/media/video/saa5246a.c  |5 -
 linux/drivers/media/video/saa5249.c   |5 -
 linux/drivers/media/video/se401.c |5 -
 linux/drivers/media/video/stv680.c|5 -
 linux/drivers/media/video/usbvideo/usbvideo.c |5 -
 linux/drivers/media/video/usbvision/usbvision-video.c |4 -
 linux/drivers/media/video/uvc/uvc_v4l2.c  |   13 +
 linux/drivers/media/video/v4l2-ioctl.c|8 +--
 linux/drivers/media/video/vino.c  |5 -
 linux/drivers/media/video/w9966.c |5 -
 linux/drivers/media/video/zoran/zoran_driver.c|8 ---
 linux/include/media/saa7146_vv.h  |3 -
 linux/include/media/v4l2-ioctl.h  |6 --
 34 files changed, 97 insertions(+), 145 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/87d381c495bc8d26ffd6738778b217a18e777872

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~awalls/cx18-bugfix

2008-11-05 Thread Patch from Mauro Carvalho Chehab
The patch number 9517 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~awalls/cx18-bugfix


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-av-audio.c|   41 +++--
 linux/drivers/media/video/cx18/cx18-av-core.c |  106 +
 linux/drivers/media/video/cx18/cx18-av-core.h |3 
 linux/drivers/media/video/cx18/cx18-av-firmware.c |   22 +-
 linux/drivers/media/video/cx18/cx18-driver.c  |   17 ++
 linux/drivers/media/video/cx18/cx18-driver.h  |   27 ++-
 linux/drivers/media/video/cx18/cx18-dvb.c |   23 ++
 linux/drivers/media/video/cx18/cx18-dvb.h |1 
 linux/drivers/media/video/cx18/cx18-firmware.c|   62 +--
 linux/drivers/media/video/cx18/cx18-gpio.c|   24 +--
 linux/drivers/media/video/cx18/cx18-i2c.c |   24 ++-
 linux/drivers/media/video/cx18/cx18-io.c  |   39 +++-
 linux/drivers/media/video/cx18/cx18-io.h  |   25 ++-
 linux/drivers/media/video/cx18/cx18-irq.c |  110 --
 linux/drivers/media/video/cx18/cx18-irq.h |8 -
 linux/drivers/media/video/cx18/cx18-mailbox.c |6 
 linux/drivers/media/video/cx18/cx18-queue.c   |   14 -
 linux/drivers/media/video/cx18/cx18-scb.h |   40 ++---
 18 files changed, 397 insertions(+), 195 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/37d8f8fb993a9f52949fb3eb4d3d711993154d50

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~anttip/af9015

2008-11-05 Thread Patch from Mauro Carvalho Chehab
The patch number 9528 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~anttip/af9015


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/af9015.c  |   33 +--
 linux/drivers/media/dvb/dvb-usb/af9015.h  |   77 +-
 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h |1 
 linux/drivers/media/dvb/frontends/af9013.c|6 -
 4 files changed, 105 insertions(+), 12 deletions(-)

diff -r 3f60459e205a -r e82287af6e1d linux/drivers/media/dvb/dvb-usb/af9015.c
--- a/linux/drivers/media/dvb/dvb-usb/af9015.c  Thu Mar 20 01:18:11 2008 +
+++ b/linux/drivers/media/dvb/dvb-usb/af9015.c  Wed Nov 05 20:04:56 2008 -0200
@@ -31,13 +31,13 @@
 #include mc44s80x.h
 #endif
 
-int dvb_usb_af9015_debug;
+static int dvb_usb_af9015_debug;
 module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
 MODULE_PARM_DESC(debug, set debugging level DVB_USB_DEBUG_STATUS);
-int dvb_usb_af9015_remote;
+static int dvb_usb_af9015_remote;
 module_param_named(remote, dvb_usb_af9015_remote, int, 0644);
 MODULE_PARM_DESC(remote, select remote);
-int dvb_usb_af9015_dual_mode;
+static int dvb_usb_af9015_dual_mode;
 module_param_named(dual_mode, dvb_usb_af9015_dual_mode, int, 0644);
 MODULE_PARM_DESC(dual_mode, enable dual mode);
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
@@ -46,7 +46,7 @@ static DEFINE_MUTEX(af9015_usb_mutex);
 
 static struct af9015_config af9015_config;
 static struct dvb_usb_device_properties af9015_properties[2];
-int af9015_properties_count = ARRAY_SIZE(af9015_properties);
+static int af9015_properties_count = ARRAY_SIZE(af9015_properties);
 
 static struct af9013_config af9015_af9013_config[] = {
{
@@ -549,7 +549,7 @@ static int af9015_eeprom_dump(struct dvb
return 0;
 }
 
-int af9015_download_ir_table(struct dvb_usb_device *d)
+static int af9015_download_ir_table(struct dvb_usb_device *d)
 {
int i, packets = 0, ret;
u16 addr = 0x9a56; /* ir-table start address */
@@ -806,6 +806,16 @@ static int af9015_read_config(struct usb
  ARRAY_SIZE(af9015_ir_table_msi);
}
break;
+   case USB_VID_AVERMEDIA:
+   af9015_properties[i].rc_key_map =
+ af9015_rc_keys_avermedia;
+   af9015_properties[i].rc_key_map_size =
+ ARRAY_SIZE(af9015_rc_keys_avermedia);
+   af9015_config.ir_table =
+ af9015_ir_table_avermedia;
+   af9015_config.ir_table_size =
+ ARRAY_SIZE(af9015_ir_table_avermedia);
+   break;
}
}
}
@@ -999,7 +1009,7 @@ static int af9015_rc_query(struct dvb_us
 }
 
 /* init 2nd I2C adapter */
-int af9015_i2c_init(struct dvb_usb_device *d)
+static int af9015_i2c_init(struct dvb_usb_device *d)
 {
int ret;
struct af9015_state *state = d-priv;
@@ -1197,6 +1207,7 @@ static struct usb_device_id af9015_usb_t
{USB_DEVICE(USB_VID_TELESTAR,  USB_PID_TELESTAR_STARSTICK_2)},
{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A309)},
 /* 15 */{USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGI_VOX_MINI_III)},
+   {USB_DEVICE(USB_VID_KWORLD_2,  USB_PID_KWORLD_395U)},
{0},
 };
 MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1347,7 +1358,7 @@ static struct dvb_usb_device_properties 
 
.i2c_algo = af9015_i2c_algo,
 
-   .num_device_descs = 6,
+   .num_device_descs = 7,
.devices = {
{
.name = Xtensions XD-380,
@@ -1377,6 +1388,12 @@ static struct dvb_usb_device_properties 
{
.name = MSI Digi VOX mini III,
.cold_ids = {af9015_usb_table[15], NULL},
+   .warm_ids = {NULL},
+   },
+   {
+   .name = KWorld USB DVB-T TV Stick II  \
+   (VS-DVB-T 395U),
+   .cold_ids = {af9015_usb_table[16], NULL},
.warm_ids = {NULL},
},
}
@@ -1419,7 +1436,7 @@ static int af9015_usb_probe(struct usb_i
return ret;
 }
 

[linuxtv-commits] [hg:v4l-dvb] Properly handle error messages during alsa registering

2008-11-07 Thread Patch from Mauro Carvalho Chehab
The patch number 9532 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Properly handle error messages during alsa registering


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-audio.c |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff -r 0c3caa20d444 -r 46604f47fca1 
linux/drivers/media/video/em28xx/em28xx-audio.c
--- a/linux/drivers/media/video/em28xx/em28xx-audio.c   Thu Nov 06 23:02:07 
2008 +0100
+++ b/linux/drivers/media/video/em28xx/em28xx-audio.c   Fri Nov 07 15:24:18 
2008 -0200
@@ -500,7 +500,7 @@ static int em28xx_audio_init(struct em28
 
if (dev-has_audio_class) {
/* This device does not support the extension (in this case
-  the device is expecting the snd-usb-audio module */
+  the device is expecting the snd-usb-audio module) */
return 0;
}
 
@@ -521,7 +521,12 @@ static int em28xx_audio_init(struct em28
}
 
spin_lock_init(adev-slock);
-   ret = snd_pcm_new(card, Em28xx Audio, 0, 0, 1, pcm);
+   err = snd_pcm_new(card, Em28xx Audio, 0, 0, 1, pcm);
+   if (err  0) {
+   snd_card_free(card);
+   return err;
+   }
+
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_em28xx_pcm_capture);
pcm-info_flags = 0;
pcm-private_data = dev;
@@ -533,7 +538,7 @@ static int em28xx_audio_init(struct em28
err = snd_card_register(card);
if (err  0) {
snd_card_free(card);
-   return -ENOMEM;
+   return err;
}
adev-sndcard = card;
adev-udev = dev-udev;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/46604f47fca16225c854ad69c3d8a335c94d5448

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~jfrancois/gspca/

2008-11-10 Thread Patch from Mauro Carvalho Chehab
The patch number 9566 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~jfrancois/gspca/


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/gspca.txt|1 
 linux/drivers/media/video/gspca/Kconfig  |2 
 linux/drivers/media/video/gspca/finepix.c|3 
 linux/drivers/media/video/gspca/gspca.c  |   16 
 linux/drivers/media/video/gspca/gspca.h  |   11 
 linux/drivers/media/video/gspca/ov519.c  |  159 ++---
 linux/drivers/media/video/gspca/pac207.c |1 
 linux/drivers/media/video/gspca/sonixb.c |   21 
 linux/drivers/media/video/gspca/sonixj.c |   66 ++
 linux/drivers/media/video/gspca/tv8532.c |  142 +
 linux/drivers/media/video/gspca/zc3xx.c  |  296 ++-
 linux/drivers/media/video/sn9c102/sn9c102_devtable.h |4 
 12 files changed, 369 insertions(+), 353 deletions(-)

diff discarded since it is too big

---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7f45620b44316438852309423e7e8b70d5c6414e

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~pinchartl/uvcvideo

2008-11-10 Thread Patch from Mauro Carvalho Chehab
The patch number 9571 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~pinchartl/uvcvideo


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/uvc/uvc_driver.c |  169 -
 linux/drivers/media/video/uvc/uvc_v4l2.c   |4 
 linux/drivers/media/video/uvc/uvc_video.c  |   65 ++--
 linux/drivers/media/video/uvc/uvcvideo.h   |   14 +
 4 files changed, 107 insertions(+), 145 deletions(-)

diff -r 7f45620b4431 -r b51362e40204 linux/drivers/media/video/uvc/uvc_driver.c
--- a/linux/drivers/media/video/uvc/uvc_driver.cMon Nov 10 19:05:58 
2008 -0200
+++ b/linux/drivers/media/video/uvc/uvc_driver.cMon Nov 10 19:26:55 
2008 -0200
@@ -288,8 +288,10 @@ static int uvc_parse_format(struct uvc_d
struct uvc_format_desc *fmtdesc;
struct uvc_frame *frame;
const unsigned char *start = buffer;
+   unsigned char *_buffer;
unsigned int interval;
unsigned int i, n;
+   int _buflen;
__u8 ftype;
 
format-type = buffer[2];
@@ -410,12 +412,20 @@ static int uvc_parse_format(struct uvc_d
buflen -= buffer[0];
buffer += buffer[0];
 
+   /* Count the number of frame descriptors to test the bFrameIndex
+* field when parsing the descriptors. We can't rely on the
+* bNumFrameDescriptors field as some cameras don't initialize it
+* properly.
+*/
+   for (_buflen = buflen, _buffer = buffer;
+_buflen  2  _buffer[2] == ftype;
+_buflen -= _buffer[0], _buffer += _buffer[0])
+   format-nframes++;
+
/* Parse the frame descriptors. Only uncompressed, MJPEG and frame
 * based formats have frame descriptors.
 */
while (buflen  2  buffer[2] == ftype) {
-   frame = format-frame[format-nframes];
-
if (ftype != VS_FRAME_FRAME_BASED)
n = buflen  25 ? buffer[25] : 0;
else
@@ -429,6 +439,16 @@ static int uvc_parse_format(struct uvc_d
   alts-desc.bInterfaceNumber);
return -EINVAL;
}
+
+   if (buffer[3] - 1 = format-nframes) {
+   uvc_trace(UVC_TRACE_DESCR, device %d videostreaming
+  interface %d frame index %u out of range\n,
+  dev-udev-devnum, alts-desc.bInterfaceNumber,
+  buffer[3]);
+   return -EINVAL;
+   }
+
+   frame = format-frame[buffer[3] - 1];
 
frame-bFrameIndex = buffer[3];
frame-bmCapabilities = buffer[4];
@@ -486,7 +506,6 @@ static int uvc_parse_format(struct uvc_d
1000/frame-dwDefaultFrameInterval,
(1/frame-dwDefaultFrameInterval)%10);
 
-   format-nframes++;
buflen -= buffer[0];
buffer += buffer[0];
}
@@ -1709,24 +1728,6 @@ static int uvc_reset_resume(struct usb_i
  * though they are compliant.
  */
 static struct usb_device_id uvc_ids[] = {
-   /* ALi M5606 (Clevo M540SR) */
-   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
-   | USB_DEVICE_ID_MATCH_INT_INFO,
- .idVendor = 0x0402,
- .idProduct= 0x5606,
- .bInterfaceClass  = USB_CLASS_VIDEO,
- .bInterfaceSubClass   = 1,
- .bInterfaceProtocol   = 0,
- .driver_info  = UVC_QUIRK_PROBE_MINMAX },
-   /* Creative Live! Optia */
-   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
-   | USB_DEVICE_ID_MATCH_INT_INFO,
- .idVendor = 0x041e,
- .idProduct= 0x4057,
- .bInterfaceClass  = USB_CLASS_VIDEO,
- .bInterfaceSubClass   = 1,
- .bInterfaceProtocol   = 0,
- .driver_info  = UVC_QUIRK_PROBE_MINMAX },
/* Microsoft Lifecam NX-6000 */
{ .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
@@ -1812,15 +1813,6 @@ static struct usb_device_id uvc_ids[] = 
  .bInterfaceSubClass   = 1,
  .bInterfaceProtocol   = 0,
  .driver_info  = UVC_QUIRK_STREAM_NO_FID },
-   /* Silicon Motion SM371 */
-   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
-   | 

[linuxtv-commits] [hg:v4l-dvb] Backport a few minor changes from upstream

2008-11-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9573 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Backport a few minor changes from upstream


kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/Documentation/video4linux/bttv/CONTRIBUTORS |2 +-
 linux/drivers/media/dvb/frontends/Makefile|1 -
 linux/sound/pci/bt87x.c   |3 +--
 v4l/compat.h  |4 
 4 files changed, 6 insertions(+), 4 deletions(-)

diff -r bb00cb692462 -r 1251a4091b89 
linux/Documentation/video4linux/bttv/CONTRIBUTORS
--- a/linux/Documentation/video4linux/bttv/CONTRIBUTORS Mon Nov 10 19:56:20 
2008 -0200
+++ b/linux/Documentation/video4linux/bttv/CONTRIBUTORS Tue Nov 11 07:39:53 
2008 -0200
@@ -3,7 +3,7 @@ Michael Chu [EMAIL PROTECTED]
 Michael Chu [EMAIL PROTECTED]
   AverMedia fix and more flexible card recognition
 
-Alan Cox [EMAIL PROTECTED]
+Alan Cox [EMAIL PROTECTED]
   Video4Linux interface and 2.1.x kernel adaptation
 
 Chris Kleitsch
diff -r bb00cb692462 -r 1251a4091b89 linux/drivers/media/dvb/frontends/Makefile
--- a/linux/drivers/media/dvb/frontends/MakefileMon Nov 10 19:56:20 
2008 -0200
+++ b/linux/drivers/media/dvb/frontends/MakefileTue Nov 11 07:39:53 
2008 -0200
@@ -6,7 +6,6 @@ EXTRA_CFLAGS += -Idrivers/media/common/t
 EXTRA_CFLAGS += -Idrivers/media/common/tuners/
 
 s921-objs := s921_module.o s921_core.o
-
 stb0899-objs = stb0899_drv.o stb0899_algo.o
 
 obj-$(CONFIG_DVB_PLL) += dvb-pll.o
diff -r bb00cb692462 -r 1251a4091b89 linux/sound/pci/bt87x.c
--- a/linux/sound/pci/bt87x.c   Mon Nov 10 19:56:20 2008 -0200
+++ b/linux/sound/pci/bt87x.c   Tue Nov 11 07:39:53 2008 -0200
@@ -775,8 +775,7 @@ static int __devinit snd_bt87x_create(st
pci_disable_device(pci);
return err;
}
-   chip-mmio = ioremap_nocache(pci_resource_start(pci, 0),
-pci_resource_len(pci, 0));
+   chip-mmio = pci_ioremap_bar(pci, 0);
if (!chip-mmio) {
snd_printk(KERN_ERR cannot remap io memory\n);
err = -ENOMEM;
diff -r bb00cb692462 -r 1251a4091b89 v4l/compat.h
--- a/v4l/compat.h  Mon Nov 10 19:56:20 2008 -0200
+++ b/v4l/compat.h  Tue Nov 11 07:39:53 2008 -0200
@@ -252,6 +252,10 @@ static inline int list_is_singular(const
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 28)
 #define snd_BUG_ON(cond)   WARN((cond), BUG? (%s)\n, __stringify(cond))
+
+#define pci_ioremap_bar(pci, a)\
+ioremap_nocache(pci_resource_start(pci, a),\
+pci_resource_len(pci, a))
 #endif
 
 #ifndef PCI_DEVICE_ID_MARVELL_88ALP01_CCIC


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1251a4091b89b30d0db79994f30af2ef234d1bfb

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] v4l core: add support for enumerating frame sizes and intervals

2008-11-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9578 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l core: add support for enumerating frame sizes and intervals


video_ioctl2 lacks implementation of those two ioctls:
- VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS

Adds implementation for those.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/v4l2-ioctl.c |   67 +
 linux/include/media/v4l2-ioctl.h   |6 ++
 2 files changed, 73 insertions(+)

diff -r 598777dd0e80 -r c604baf93b60 linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.cTue Nov 11 09:50:02 2008 -0200
+++ b/linux/drivers/media/video/v4l2-ioctl.cTue Nov 11 22:13:47 2008 -0200
@@ -1748,6 +1748,73 @@ static int __video_do_ioctl(struct file 
ret = ops-vidioc_s_hw_freq_seek(file, fh, p);
break;
}
+   case VIDIOC_ENUM_FRAMESIZES:
+   {
+   struct v4l2_frmsizeenum *p = arg;
+
+   if (!ops-vidioc_enum_framesizes)
+   break;
+
+   memset(p, 0, sizeof(*p));
+
+   ret = ops-vidioc_enum_framesizes(file, fh, p);
+   dbgarg(cmd,
+   index=%d, pixelformat=%d, type=%d ,
+   p-index, p-pixel_format, p-type);
+   switch (p-type) {
+   case V4L2_FRMSIZE_TYPE_DISCRETE:
+   dbgarg2(width = %d, height=%d\n,
+   p-discrete.width, p-discrete.height);
+   break;
+   case V4L2_FRMSIZE_TYPE_STEPWISE:
+   dbgarg2(min %dx%d, max %dx%d, step %dx%d\n,
+   p-stepwise.min_width,  p-stepwise.min_height,
+   p-stepwise.step_width, p-stepwise.step_height,
+   p-stepwise.max_width,  p-stepwise.max_height);
+   break;
+   case V4L2_FRMSIZE_TYPE_CONTINUOUS:
+   dbgarg2(continuous\n);
+   break;
+   default:
+   dbgarg2(- Unknown type!\n);
+   }
+
+   break;
+   }
+   case VIDIOC_ENUM_FRAMEINTERVALS:
+   {
+   struct v4l2_frmivalenum *p = arg;
+
+   if (!ops-vidioc_enum_frameintervals)
+   break;
+
+   memset(p, 0, sizeof(*p));
+
+   ret = ops-vidioc_enum_frameintervals(file, fh, p);
+   dbgarg(cmd,
+   index=%d, pixelformat=%d, width=%d, height=%d, type=%d 
,
+   p-index, p-pixel_format,
+   p-width, p-height, p-type);
+   switch (p-type) {
+   case V4L2_FRMIVAL_TYPE_DISCRETE:
+   dbgarg2(fps=%d/%d\n,
+   p-discrete.numerator,
+   p-discrete.denominator);
+   break;
+   case V4L2_FRMIVAL_TYPE_STEPWISE:
+   dbgarg2(min=%d, max=%d, step=%d\n,
+   p-stepwise.min, p-stepwise.max,
+   p-stepwise.step);
+   break;
+   case V4L2_FRMIVAL_TYPE_CONTINUOUS:
+   dbgarg2(continuous\n);
+   break;
+   default:
+   dbgarg2(- Unknown type!\n);
+   }
+   break;
+   }
+
default:
{
if (!ops-vidioc_default)
diff -r 598777dd0e80 -r c604baf93b60 linux/include/media/v4l2-ioctl.h
--- a/linux/include/media/v4l2-ioctl.h  Tue Nov 11 09:50:02 2008 -0200
+++ b/linux/include/media/v4l2-ioctl.h  Tue Nov 11 22:13:47 2008 -0200
@@ -232,6 +232,12 @@ struct v4l2_ioctl_ops {
int (*vidioc_g_chip_ident) (struct file *file, void *fh,
struct v4l2_chip_ident *chip);
 
+   int (*vidioc_enum_framesizes)   (struct file *file, void *fh,
+struct v4l2_frmsizeenum *fsize);
+
+   int (*vidioc_enum_frameintervals) (struct file *file, void *fh,
+  struct v4l2_frmivalenum *fival);
+
/* For other private ioctls */
int (*vidioc_default)  (struct file *file, void *fh,
int cmd, void *arg);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c604baf93b60fee00709a7eec494bb1300282268


[linuxtv-commits] [hg:v4l-dvb] v4l core: a few get ioctls were lacking memory clean

2008-11-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9579 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
v4l core: a few get ioctls were lacking memory clean


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/v4l2-ioctl.c |   15 +++
 1 file changed, 15 insertions(+)

diff -r c604baf93b60 -r 59ebb3e10311 linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.cTue Nov 11 22:13:47 2008 -0200
+++ b/linux/drivers/media/video/v4l2-ioctl.cTue Nov 11 22:15:03 2008 -0200
@@ -1480,9 +1480,15 @@ static int __video_do_ioctl(struct file 
case VIDIOC_G_CROP:
{
struct v4l2_crop *p = arg;
+   __u32 type;
 
if (!ops-vidioc_g_crop)
break;
+
+   type = p-type;
+   memset(p, 0, sizeof(*p));
+   p-type = type;
+
dbgarg(cmd, type=%s\n, prt_names(p-type, v4l2_type_names));
ret = ops-vidioc_g_crop(file, fh, p);
if (!ret)
@@ -1503,10 +1509,16 @@ static int __video_do_ioctl(struct file 
case VIDIOC_CROPCAP:
{
struct v4l2_cropcap *p = arg;
+   __u32 type;
 
/*FIXME: Should also show v4l2_fract pixelaspect */
if (!ops-vidioc_cropcap)
break;
+
+   type = p-type;
+   memset(p, 0, sizeof(*p));
+   p-type = type;
+
dbgarg(cmd, type=%s\n, prt_names(p-type, v4l2_type_names));
ret = ops-vidioc_cropcap(file, fh, p);
if (!ret) {
@@ -1521,6 +1533,9 @@ static int __video_do_ioctl(struct file 
 
if (!ops-vidioc_g_jpegcomp)
break;
+
+   memset(p, 0, sizeof(*p));
+
ret = ops-vidioc_g_jpegcomp(file, fh, p);
if (!ret)
dbgarg(cmd, quality=%d, APPn=%d, 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/59ebb3e10311be1cc3ae51911c81638720f1cfd4

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~awalls/cx18-bugfix

2008-11-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9600 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~awalls/cx18-bugfix


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-driver.c   |   16 -
 linux/drivers/media/video/cx18/cx18-driver.h   |   16 -
 linux/drivers/media/video/cx18/cx18-dvb.c  |   37 +-
 linux/drivers/media/video/cx18/cx18-firmware.c |   37 ++
 linux/drivers/media/video/cx18/cx18-io.c   |   11 
 linux/drivers/media/video/cx18/cx18-io.h   |1 
 linux/drivers/media/video/cx18/cx18-irq.c  |   32 --
 linux/drivers/media/video/cx18/cx18-irq.h  |1 
 linux/drivers/media/video/cx18/cx18-mailbox.c  |  219 -
 linux/drivers/media/video/cx18/cx18-mailbox.h  |7 
 linux/drivers/media/video/cx18/cx18-streams.c  |6 
 linux/drivers/media/video/cx18/cx18-version.h  |2 
 12 files changed, 210 insertions(+), 175 deletions(-)

diff -r 54b6121c0641 -r 9c8b5bb067c2 
linux/drivers/media/video/cx18/cx18-driver.c
--- a/linux/drivers/media/video/cx18/cx18-driver.c  Wed Nov 12 02:03:02 
2008 -0200
+++ b/linux/drivers/media/video/cx18/cx18-driver.c  Wed Nov 12 02:10:06 
2008 -0200
@@ -187,7 +187,7 @@ MODULE_VERSION(CX18_VERSION);
 /* Generic utility functions */
 int cx18_msleep_timeout(unsigned int msecs, int intr)
 {
-   int timeout = msecs_to_jiffies(msecs);
+   long int timeout = msecs_to_jiffies(msecs);
int sig;
 
do {
@@ -446,14 +446,10 @@ static int __devinit cx18_init_struct1(s
mutex_init(cx-i2c_bus_lock[0]);
mutex_init(cx-i2c_bus_lock[1]);
mutex_init(cx-gpio_lock);
+   mutex_init(cx-epu2apu_mb_lock);
+   mutex_init(cx-epu2cpu_mb_lock);
 
spin_lock_init(cx-lock);
-
-   cx-work_queue = create_singlethread_workqueue(cx-name);
-   if (cx-work_queue == NULL) {
-   CX18_ERR(Could not create work queue\n);
-   return -1;
-   }
 
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 20)
INIT_WORK(cx-work, cx18_work_handler);
@@ -476,8 +472,6 @@ static int __devinit cx18_init_struct1(s
init_waitqueue_head(cx-cap_w);
init_waitqueue_head(cx-mb_apu_waitq);
init_waitqueue_head(cx-mb_cpu_waitq);
-   init_waitqueue_head(cx-mb_epu_waitq);
-   init_waitqueue_head(cx-mb_hpu_waitq);
init_waitqueue_head(cx-dma_waitq);
 
/* VBI */
@@ -841,7 +835,6 @@ free_mem:
 free_mem:
release_mem_region(cx-base_addr, CX18_MEM_SIZE);
 free_workqueue:
-   destroy_workqueue(cx-work_queue);
 err:
if (retval == 0)
retval = -ENODEV;
@@ -942,8 +935,7 @@ static void cx18_remove(struct pci_dev *
 
cx18_halt_firmware(cx);
 
-   flush_workqueue(cx-work_queue);
-   destroy_workqueue(cx-work_queue);
+   flush_scheduled_work();
 
cx18_streams_cleanup(cx, 1);
 
diff -r 54b6121c0641 -r 9c8b5bb067c2 
linux/drivers/media/video/cx18/cx18-driver.h
--- a/linux/drivers/media/video/cx18/cx18-driver.h  Wed Nov 12 02:03:02 
2008 -0200
+++ b/linux/drivers/media/video/cx18/cx18-driver.h  Wed Nov 12 02:10:06 
2008 -0200
@@ -207,7 +207,6 @@ struct cx18_options {
 #define CX18_F_I_WORK_HANDLER_DVB  18  /* work to be done for DVB */
 #define CX18_F_I_INITED21  /* set after first open 
*/
 #define CX18_F_I_FAILED22  /* set if first open 
failed */
-#define CX18_F_I_WORK_INITED   23  /* worker thread initialized */
 
 /* These are the VBI types as they appear in the embedded VBI private packets. 
*/
 #define CX18_SLICED_TYPE_TELETEXT_B (1)
@@ -361,6 +360,12 @@ struct cx18_mmio_stats {
atomic_t retried_read[CX18_MAX_MMIO_RD_RETRIES+1];
 };
 
+#define CX18_MAX_MB_ACK_DELAY 100
+
+struct cx18_mbox_stats {
+   atomic_t mb_ack_delay[CX18_MAX_MB_ACK_DELAY+1];
+};
+
 /* Struct to hold info about cx18 cards */
 struct cx18 {
int num;/* board number, -1 during init! */
@@ -379,7 +384,10 @@ struct cx18 {
u32 v4l2_cap;   /* V4L2 capabilities of card */
u32 hw_flags;   /* Hardware description of the board */
unsigned mdl_offset;
-   struct cx18_scb __iomem *scb;   /* pointer to SCB */
+   struct cx18_scb __iomem *scb; /* pointer to SCB */
+   struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/
+   struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/
+
 
struct cx18_av_state av_state;
 
@@ -429,13 +437,10 @@ struct cx18 {
 
  

[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~dougsland/dvb-fix

2008-11-11 Thread Patch from Mauro Carvalho Chehab
The patch number 9606 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~dougsland/dvb-fix


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/usb-urb.c   |   23 ++
 linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |   15 ++
 linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c   |7 +++
 3 files changed, 37 insertions(+), 8 deletions(-)

diff -r 9c8b5bb067c2 -r c95684f09ecb linux/drivers/media/dvb/dvb-usb/usb-urb.c
--- a/linux/drivers/media/dvb/dvb-usb/usb-urb.c Wed Nov 12 02:10:06 2008 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/usb-urb.c Wed Nov 12 02:28:57 2008 -0200
@@ -139,7 +139,7 @@ stream-buf_list[stream-buf_num], (long
 
 static int usb_bulk_urb_init(struct usb_data_stream *stream)
 {
-   int i;
+   int i, j;
 
if ((i = usb_allocate_stream_buffers(stream,stream-props.count,
stream-props.u.bulk.buffersize))  0)
@@ -147,9 +147,13 @@ static int usb_bulk_urb_init(struct usb_
 
/* allocate the URBs */
for (i = 0; i  stream-props.count; i++) {
-   if ((stream-urb_list[i] = usb_alloc_urb(0,GFP_ATOMIC)) == NULL)
-   return -ENOMEM;
-
+   stream-urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC);
+   if (!stream-urb_list[i]) {
+   deb_mem(not enough memory for urb_alloc_urb!.\n);
+   for (j = 0; j  i; j++)
+   usb_free_urb(stream-urb_list[i]);
+   return -ENOMEM;
+   }
usb_fill_bulk_urb( stream-urb_list[i], stream-udev,

usb_rcvbulkpipe(stream-udev,stream-props.endpoint),
stream-buf_list[i],
@@ -174,9 +178,14 @@ static int usb_isoc_urb_init(struct usb_
for (i = 0; i  stream-props.count; i++) {
struct urb *urb;
int frame_offset = 0;
-   if ((stream-urb_list[i] =
-   
usb_alloc_urb(stream-props.u.isoc.framesperurb,GFP_ATOMIC)) == NULL)
-   return -ENOMEM;
+
+   stream-urb_list[i] = 
usb_alloc_urb(stream-props.u.isoc.framesperurb, GFP_ATOMIC);
+   if (!stream-urb_list[i]) {
+   deb_mem(not enough memory for urb_alloc_urb!\n);
+   for (j = 0; j  i; j++)
+   usb_free_urb(stream-urb_list[i]);
+   return -ENOMEM;
+   }
 
urb = stream-urb_list[i];
 
diff -r 9c8b5bb067c2 -r c95684f09ecb 
linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c   Wed Nov 12 
02:10:06 2008 -0200
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c   Wed Nov 12 
02:28:57 2008 -0200
@@ -827,6 +827,12 @@ static int ttusb_alloc_iso_urbs(struct t
 FRAMES_PER_ISO_BUF *
 ISO_BUF_COUNT,
 ttusb-iso_dma_handle);
+
+   if (!ttusb-iso_buffer) {
+   dprintk(%s: pci_alloc_consistent - not enough memory\n,
+   __func__);
+   return -ENOMEM;
+   }
 
memset(ttusb-iso_buffer, 0,
   ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);
@@ -1679,7 +1685,14 @@ static int ttusb_probe(struct usb_interf
 
ttusb_setup_interfaces(ttusb);
 
-   ttusb_alloc_iso_urbs(ttusb);
+   result = ttusb_alloc_iso_urbs(ttusb);
+   if (result  0) {
+   dprintk(%s: ttusb_alloc_iso_urbs - failed\n, __func__);
+   mutex_unlock(ttusb-semi2c);
+   kfree(ttusb);
+   return result;
+   }
+
if (ttusb_init_controller(ttusb))
printk(ttusb_init_controller: error\n);
 
diff -r 9c8b5bb067c2 -r c95684f09ecb 
linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c Wed Nov 12 02:10:06 
2008 -0200
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c Wed Nov 12 02:28:57 
2008 -0200
@@ -1166,6 +1166,12 @@ static int ttusb_dec_alloc_iso_urbs(stru
ISO_BUF_COUNT),
   dec-iso_dma_handle);
 
+   if (!dec-iso_buffer) {
+   dprintk(%s: pci_alloc_consistent - not enough memory\n,
+   

[linuxtv-commits] [hg:v4l-dvb] em28xx: experimental support for HVR-950 IR

2008-11-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9611 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: experimental support for HVR-950 IR


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-input.c |   18 +---
 1 file changed, 6 insertions(+), 12 deletions(-)

diff -r f182249d6d97 -r 8782d5c6570c 
linux/drivers/media/video/em28xx/em28xx-input.c
--- a/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 10:42:33 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 15:05:46 
2008 -0200
@@ -288,27 +288,17 @@ int em28xx_ir_init(struct em28xx *dev)
 
/* detect  configure */
switch (dev-model) {
-#if 0
-   /* dummy entry, just as a reference, while we don't add
-  other entries here
-*/
-   case EM2820_BOARD_UNKNOWN:
+   case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
ir_type  = IR_TYPE_OTHER;
-   ir_codes = ir_codes_empty;
+   ir_codes = ir_codes_hauppauge_new;
ir-mask_keycode = 0x007f;
break;
-   }
-#endif
}
 
if (NULL == ir_codes) {
err = -ENODEV;
goto err_out_free;
}
-
-   /* Get the current key status, to avoid adding an
-  unexistent key code */
-   ir-last_gpio= ir-get_key(ir);
 
/* init input device */
snprintf(ir-name, sizeof(ir-name), em28xx IR (%s),
@@ -333,6 +323,10 @@ int em28xx_ir_init(struct em28xx *dev)
/* record handles to ourself */
ir-dev = dev;
dev-ir = ir;
+
+   /* Get the current key status, to avoid adding an
+  unexistent key code */
+   ir-last_gpio= ir-get_key(ir);
 
em28xx_ir_start(ir);
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8782d5c6570c04c846b20463f3589ca124a6de9d

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~pinchartl/uvcvideo

2008-11-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9610 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~pinchartl/uvcvideo


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/uvc/uvc_ctrl.c   |2 
 linux/drivers/media/video/uvc/uvc_driver.c |2 
 linux/drivers/media/video/uvc/uvc_status.c |   12 +++
 linux/drivers/media/video/uvc/uvc_v4l2.c   |6 +
 linux/drivers/media/video/uvc/uvc_video.c  |4 +
 linux/drivers/media/video/uvc/uvcvideo.h   |1 
 v4l/compat.h   |   67 -
 v4l/versions.txt   |2 
 8 files changed, 93 insertions(+), 3 deletions(-)

diff -r c46249bfa925 -r f182249d6d97 linux/drivers/media/video/uvc/uvc_ctrl.c
--- a/linux/drivers/media/video/uvc/uvc_ctrl.c  Tue Nov 11 21:09:28 2008 +
+++ b/linux/drivers/media/video/uvc/uvc_ctrl.c  Wed Nov 12 10:42:33 2008 -0200
@@ -15,7 +15,9 @@
 #include linux/version.h
 #include linux/list.h
 #include linux/module.h
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 17)
 #include linux/uaccess.h
+#endif
 #include linux/usb.h
 #include linux/videodev2.h
 #include linux/vmalloc.h
diff -r c46249bfa925 -r f182249d6d97 linux/drivers/media/video/uvc/uvc_driver.c
--- a/linux/drivers/media/video/uvc/uvc_driver.cTue Nov 11 21:09:28 
2008 +
+++ b/linux/drivers/media/video/uvc/uvc_driver.cWed Nov 12 10:42:33 
2008 -0200
@@ -1915,7 +1915,9 @@ struct uvc_driver uvc_driver = {
.reset_resume   = uvc_reset_resume,
 #endif
.id_table   = uvc_ids,
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 19)
.supports_autosuspend = 1,
+#endif
},
 };
 
diff -r c46249bfa925 -r f182249d6d97 linux/drivers/media/video/uvc/uvc_status.c
--- a/linux/drivers/media/video/uvc/uvc_status.cTue Nov 11 21:09:28 
2008 +
+++ b/linux/drivers/media/video/uvc/uvc_status.cWed Nov 12 10:42:33 
2008 -0200
@@ -15,7 +15,11 @@
 #include linux/version.h
 #include linux/input.h
 #include linux/usb.h
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 18)
+#include linux/usb_input.h
+#else
 #include linux/usb/input.h
+#endif
 
 #include uvcvideo.h
 
@@ -45,7 +49,11 @@ static int uvc_input_init(struct uvc_dev
input-name = dev-name;
input-phys = phys;
usb_to_input_id(udev, input-id);
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 22)
input-dev.parent = dev-intf-dev;
+#else
+   input-cdev.dev = dev-intf-dev;
+#endif
 
set_bit(EV_KEY, input-evbit);
set_bit(BTN_0, input-keybit);
@@ -118,7 +126,11 @@ static void uvc_event_control(struct uvc
data[1], data[3], attrs[data[4]], len);
 }
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
+static void uvc_status_complete(struct urb *urb, struct pt_regs *regs)
+#else
 static void uvc_status_complete(struct urb *urb)
+#endif
 {
struct uvc_device *dev = urb-context;
int len, ret;
diff -r c46249bfa925 -r f182249d6d97 linux/drivers/media/video/uvc/uvc_v4l2.c
--- a/linux/drivers/media/video/uvc/uvc_v4l2.c  Tue Nov 11 21:09:28 2008 +
+++ b/linux/drivers/media/video/uvc/uvc_v4l2.c  Wed Nov 12 10:42:33 2008 -0200
@@ -413,14 +413,18 @@ static int uvc_v4l2_open(struct inode *i
goto done;
}
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 19)
ret = usb_autopm_get_interface(video-dev-intf);
if (ret  0)
goto done;
+#endif
 
/* Create the device handle. */
handle = kzalloc(sizeof *handle, GFP_KERNEL);
if (handle == NULL) {
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 19)
usb_autopm_put_interface(video-dev-intf);
+#endif
ret = -ENOMEM;
goto done;
}
@@ -459,7 +463,9 @@ static int uvc_v4l2_release(struct inode
kfree(handle);
file-private_data = NULL;
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 19)
usb_autopm_put_interface(video-dev-intf);
+#endif
kref_put(video-dev-kref, uvc_delete);
return 0;
 }
diff -r c46249bfa925 -r f182249d6d97 linux/drivers/media/video/uvc/uvc_video.c
--- a/linux/drivers/media/video/uvc/uvc_video.c Tue Nov 11 21:09:28 2008 +
+++ b/linux/drivers/media/video/uvc/uvc_video.c Wed Nov 12 10:42:33 2008 -0200
@@ -566,7 +566,11 @@ static void uvc_video_decode_bulk(struct
}
 }
 
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
+static void uvc_video_complete(struct urb *urb, struct pt_regs *regs)
+#else
 static void uvc_video_complete(struct urb *urb)
+#endif
 {
 

[linuxtv-commits] [hg:v4l-dvb] em28xx: Properly implement poll support for IR's

2008-11-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9607 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: Properly implement poll support for IR's


The first em28xx were based on i2c IR's. However, some newer designs
are coming with a polling-based IR. Those are done by reading a register
set at em28xx.

This patch adds core polling support for those devices. Later patches will
add support for some device-specific IR's.

This patch adds the same basic IR polling code used by bttv, cx88 and saa7134, 
and
shares the common getkey masks defined at ir-common.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |2 
 linux/drivers/media/video/em28xx/em28xx-input.c |  264 +++-
 linux/drivers/media/video/em28xx/em28xx-reg.h   |7 
 linux/drivers/media/video/em28xx/em28xx-video.c |4 
 linux/drivers/media/video/em28xx/em28xx.h   |6 
 5 files changed, 266 insertions(+), 17 deletions(-)

diff -r c95684f09ecb -r f28c3e7bca61 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Nov 12 02:28:57 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Nov 12 09:41:29 
2008 -0200
@@ -1848,4 +1848,6 @@ void em28xx_card_setup(struct em28xx *de
 #endif
 
em28xx_config_tuner(dev);
+
+   em28xx_ir_init(dev);
 }
diff -r c95684f09ecb -r f28c3e7bca61 
linux/drivers/media/video/em28xx/em28xx-input.c
--- a/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 02:28:57 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 09:41:29 
2008 -0200
@@ -39,12 +39,42 @@ module_param(ir_debug, int, 0644);
 module_param(ir_debug, int, 0644);
 MODULE_PARM_DESC(ir_debug, enable debug messages [IR]);
 
+#define i2cdprintk(fmt, arg...) \
+   if (ir_debug) { \
+   printk(KERN_DEBUG %s/ir:  fmt, ir-c.name , ## arg); \
+   }
+
 #define dprintk(fmt, arg...) \
if (ir_debug) { \
-   printk(KERN_DEBUG %s/ir:  fmt, ir-c.name , ## arg); \
-   }
-
-/* --- */
+   printk(KERN_DEBUG %s/ir:  fmt, ir-name , ## arg); \
+   }
+
+/**
+ Polling structure used by em28xx IR's
+ **/
+
+struct em28xx_IR {
+   struct em28xx *dev;
+   struct input_dev *input;
+   struct ir_input_state ir;
+   char name[32];
+   char phys[32];
+
+   /* poll external decoder */
+   int polling;
+   struct work_struct work;
+   struct timer_list timer;
+   u32 last_gpio;
+   u32 mask_keycode;
+   u32 mask_keydown;
+   u32 mask_keyup;
+
+   int  (*get_key)(struct em28xx_IR *);
+};
+
+/**
+ I2C IR based get keycodes - should be used with ir-kbd-i2c
+ **/
 
 int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 {
@@ -52,7 +82,7 @@ int em28xx_get_key_terratec(struct IR_i2
 
/* poll IR chip */
if (1 != i2c_master_recv(ir-c, b, 1)) {
-   dprintk(read error\n);
+   i2cdprintk(read error\n);
return -EIO;
}
 
@@ -60,7 +90,7 @@ int em28xx_get_key_terratec(struct IR_i2
   down, while 0xff indicates that no button is hold
   down. 0xfe sequences are sometimes interrupted by 0xFF */
 
-   dprintk(key %02x\n, b);
+   i2cdprintk(key %02x\n, b);
 
if (b == 0xff)
return 0;
@@ -73,7 +103,6 @@ int em28xx_get_key_terratec(struct IR_i2
*ir_raw = b;
return 1;
 }
-
 
 int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 {
@@ -103,7 +132,7 @@ int em28xx_get_key_em_haup(struct IR_i2c
 ((buf[0]0x10)3) | /*  0010 */
 ((buf[0]0x20)5);  /*  0001 */
 
-   dprintk(ir hauppauge (em2840): code=0x%02x (rcv=0x%02x)\n,
+   i2cdprintk(ir hauppauge (em2840): code=0x%02x (rcv=0x%02x)\n,
code, buf[0]);
 
/* return key */
@@ -120,11 +149,11 @@ int em28xx_get_key_pinnacle_usb_grey(str
/* poll IR chip */
 
if (3 != i2c_master_recv(ir-c, buf, 3)) {
-   dprintk(read error\n);
+   i2cdprintk(read error\n);
return -EIO;
}
 
-   dprintk(key %02x\n, buf[2]0x3f);
+   i2cdprintk(key %02x\n, buf[2]0x3f);
if (buf[0] != 

[linuxtv-commits] [hg:v4l-dvb] Fix key repetition with HVR-950 IR

2008-11-12 Thread Patch from Mauro Carvalho Chehab
The patch number 9612 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix key repetition with HVR-950 IR


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-input.c |   23 
 1 file changed, 18 insertions(+), 5 deletions(-)

diff -r 8782d5c6570c -r c57f10c4ca78 
linux/drivers/media/video/em28xx/em28xx-input.c
--- a/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 15:05:46 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c   Wed Nov 12 19:46:01 
2008 -0200
@@ -68,6 +68,7 @@ struct em28xx_IR {
u32 mask_keycode;
u32 mask_keydown;
u32 mask_keyup;
+   u32 mask_repeat;
 
int  (*get_key)(struct em28xx_IR *);
 };
@@ -171,15 +172,17 @@ static int default_polling_getkey(struct
 {
struct em28xx *dev = ir-dev;
int rc;
-   u32 msg;
-
-   /* Read key toggle, brand, and key code */
+   u8 msg[4] = { 0, 0, 0, 0 };
+
+   /* Read key toggle, brand, and key code
+  on registers 0x45, 0x46 and 0x47
+*/
rc = dev-em28xx_read_reg_req_len(dev, 0, EM28XX_R45_IR,
- (u8 *)msg, sizeof(msg));
+ msg, sizeof(msg));
if (rc  0)
return rc;
 
-   return (int)(msg  0x7fffl);
+   return (int)(le32_to_cpu(*(u32 *)msg));
 }
 
 /**
@@ -198,6 +201,7 @@ static void em28xx_ir_handle_key(struct 
 
if (gpio == ir-last_gpio)
return;
+
ir-last_gpio = gpio;
 
/* extract data */
@@ -220,6 +224,14 @@ static void em28xx_ir_handle_key(struct 
ir_input_keydown(ir-input, ir-ir, data, data);
else
ir_input_nokey(ir-input, ir-ir);
+   } else if (ir-mask_repeat) {
+   int count = ir-mask_repeat  gpio;
+
+   /* Avoid keyboard bouncing */
+   if ((count == 1) || (count = 5)) {
+   ir_input_keydown(ir-input, ir-ir, data, data);
+   ir_input_nokey(ir-input, ir-ir);
+   }
} else {
/* can't distinguish keydown/up :-/ */
ir_input_keydown(ir-input, ir-ir, data, data);
@@ -292,6 +304,7 @@ int em28xx_ir_init(struct em28xx *dev)
ir_type  = IR_TYPE_OTHER;
ir_codes = ir_codes_hauppauge_new;
ir-mask_keycode = 0x007f;
+   ir-mask_repeat  = 0x007f;
break;
}
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c57f10c4ca787a28b8b28a243d547fa78c11588f

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: cleanup - group all callbacks together

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9616 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: cleanup - group all callbacks together


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff -r f686f27e165d -r 362efac2527a linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:10:11 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:14:15 2008 -0200
@@ -1268,6 +1268,7 @@ static struct CHIPDESC chiplist[] = {
.addr_hi= I2C_ADDR_TDA9840  1,
.registers  = 5,
 
+   /* callbacks */
.checkit= tda9840_checkit,
.getmode= tda9840_getmode,
.setmode= tda9840_setmode,
@@ -1278,13 +1279,14 @@ static struct CHIPDESC chiplist[] = {
},
{
.name   = tda9873h,
-   .checkit= tda9873_checkit,
.insmodopt  = tda9873,
.addr_lo= I2C_ADDR_TDA985x_L  1,
.addr_hi= I2C_ADDR_TDA985x_H  1,
.registers  = 3,
.flags  = CHIP_HAS_INPUTSEL,
 
+   /* callbacks */
+   .checkit= tda9873_checkit,
.getmode= tda9873_getmode,
.setmode= tda9873_setmode,
.checkmode  = generic_checkmode,
@@ -1298,12 +1300,13 @@ static struct CHIPDESC chiplist[] = {
},
{
.name   = tda9874h/a,
-   .checkit= tda9874a_checkit,
-   .initialize = tda9874a_initialize,
.insmodopt  = tda9874a,
.addr_lo= I2C_ADDR_TDA9874  1,
.addr_hi= I2C_ADDR_TDA9874  1,
 
+   /* callbacks */
+   .initialize = tda9874a_initialize,
+   .checkit= tda9874a_checkit,
.getmode= tda9874a_getmode,
.setmode= tda9874a_setmode,
.checkmode  = generic_checkmode,
@@ -1332,10 +1335,11 @@ static struct CHIPDESC chiplist[] = {
.rightreg   = TDA9855_VR,
.bassreg= TDA9855_BA,
.treblereg  = TDA9855_TR,
+
+   /* callbacks */
.volfunc= tda9855_volume,
.bassfunc   = tda9855_bass,
.treblefunc = tda9855_treble,
-
.getmode= tda985x_getmode,
.setmode= tda985x_setmode,
 
@@ -1356,6 +1360,8 @@ static struct CHIPDESC chiplist[] = {
.rightreg   = TEA6300_VL,
.bassreg= TEA6300_BA,
.treblereg  = TEA6300_TR,
+
+   /* callbacks */
.volfunc= tea6300_shift10,
.bassfunc   = tea6300_shift12,
.treblefunc = tea6300_shift12,
@@ -1366,7 +1372,6 @@ static struct CHIPDESC chiplist[] = {
},
{
.name   = tea6320,
-   .initialize = tea6320_initialize,
.insmodopt  = tea6320,
.addr_lo= I2C_ADDR_TEA6300  1,
.addr_hi= I2C_ADDR_TEA6300  1,
@@ -1377,6 +1382,9 @@ static struct CHIPDESC chiplist[] = {
.rightreg   = TEA6320_V,
.bassreg= TEA6320_BA,
.treblereg  = TEA6320_TR,
+
+   /* callbacks */
+   .initialize = tea6320_initialize,
.volfunc= tea6320_volume,
.bassfunc   = tea6320_shift11,
.treblefunc = tea6320_shift11,
@@ -1409,16 +1417,18 @@ static struct CHIPDESC chiplist[] = {
.rightreg   = TDA8425_VR,
.bassreg= TDA8425_BA,
.treblereg  = TDA8425_TR,
+
+   /* callbacks */
+   .initialize = tda8425_initialize,
.volfunc= tda8425_shift10,
.bassfunc   = tda8425_shift12,
.treblefunc = tda8425_shift12,
+   .setmode= tda8425_setmode,
 
.inputreg   = TDA8425_S1,
.inputmap   = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 
},
.inputmute  = TDA8425_S1_OFF,
 
-   .setmode= tda8425_setmode,
-   .initialize = tda8425_initialize,
},
{
.name   = pic16c54 (PV951),
@@ -1443,6 +1453,7 @@ static struct CHIPDESC chiplist[] = {
.addr_hi= I2C_ADDR_TDA9840  1,
  

[linuxtv-commits] [hg:v4l-dvb] tvtime: avoid OOPS at generic_checkmode()

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9617 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvtime: avoid OOPS at generic_checkmode()


generic_checkmode() were called, via a callback, for some tvaudio chips.
There's just one callback code used on all those boards. So, it makes no
sense on keeping this as a callback.

Since there were some OOPS reported on tvaudio on kerneloops.org, this
patch removes this callback, adding the code at the only place were it
is called: inside chip_tread. A flag were added to indicate the need for
a kernel thread to set stereo mode on cards that needs it.

Priority: high

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   71 +---
 1 file changed, 35 insertions(+), 36 deletions(-)

diff -r 362efac2527a -r f8a8e0909f40 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:14:15 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:55:39 2008 -0200
@@ -61,7 +61,6 @@ typedef int  (*initialize)(struct CHIPST
 typedef int  (*initialize)(struct CHIPSTATE*);
 typedef int  (*getmode)(struct CHIPSTATE*);
 typedef void (*setmode)(struct CHIPSTATE*, int mode);
-typedef void (*checkmode)(struct CHIPSTATE*);
 
 /* i2c command */
 typedef struct AUDIOCMD {
@@ -82,6 +81,7 @@ struct CHIPDESC {
 #define CHIP_HAS_VOLUME  1
 #define CHIP_HAS_BASSTREBLE  2
 #define CHIP_HAS_INPUTSEL4
+#define CHIP_NEED_CHECKMODE  8
 
/* various i2c command sequences */
audiocmd   init;
@@ -98,9 +98,6 @@ struct CHIPDESC {
/* get/set mode */
getmode  getmode;
setmode  setmode;
-
-   /* check / autoswitch audio after channel switches */
-   checkmode  checkmode;
 
/* input switch register + values for v4l inputs */
int  inputreg;
@@ -267,6 +264,7 @@ static int chip_thread(void *data)
 {
struct CHIPSTATE *chip = data;
struct CHIPDESC  *desc = chiplist + chip-type;
+   int mode;
 
v4l_dbg(1, debug, chip-c, %s: thread started\n, chip-c-name);
set_freezable();
@@ -285,7 +283,26 @@ static int chip_thread(void *data)
continue;
 
/* have a look what's going on */
-   desc-checkmode(chip);
+   mode = desc-getmode(chip);
+   if (mode == chip-prevmode)
+   continue;
+
+   /* chip detected a new audio mode - set it */
+   v4l_dbg(1, debug, chip-c, %s: thread checkmode\n,
+   chip-c-name);
+
+   chip-prevmode = mode;
+
+   if (mode  V4L2_TUNER_MODE_STEREO)
+   desc-setmode(chip, V4L2_TUNER_MODE_STEREO);
+   if (mode  V4L2_TUNER_MODE_LANG1_LANG2)
+   desc-setmode(chip, V4L2_TUNER_MODE_STEREO);
+   else if (mode  V4L2_TUNER_MODE_LANG1)
+   desc-setmode(chip, V4L2_TUNER_MODE_LANG1);
+   else if (mode  V4L2_TUNER_MODE_LANG2)
+   desc-setmode(chip, V4L2_TUNER_MODE_LANG2);
+   else
+   desc-setmode(chip, V4L2_TUNER_MODE_MONO);
 
/* schedule next check */
mod_timer(chip-wt, jiffies+msecs_to_jiffies(2000));
@@ -293,29 +310,6 @@ static int chip_thread(void *data)
 
v4l_dbg(1, debug, chip-c, %s: thread exiting\n, chip-c-name);
return 0;
-}
-
-static void generic_checkmode(struct CHIPSTATE *chip)
-{
-   struct CHIPDESC  *desc = chiplist + chip-type;
-   int mode = desc-getmode(chip);
-
-   if (mode == chip-prevmode)
-   return;
-
-   v4l_dbg(1, debug, chip-c, %s: thread checkmode\n, chip-c-name);
-   chip-prevmode = mode;
-
-   if (mode  V4L2_TUNER_MODE_STEREO)
-   desc-setmode(chip,V4L2_TUNER_MODE_STEREO);
-   if (mode  V4L2_TUNER_MODE_LANG1_LANG2)
-   desc-setmode(chip,V4L2_TUNER_MODE_STEREO);
-   else if (mode  V4L2_TUNER_MODE_LANG1)
-   desc-setmode(chip,V4L2_TUNER_MODE_LANG1);
-   else if (mode  V4L2_TUNER_MODE_LANG2)
-   desc-setmode(chip,V4L2_TUNER_MODE_LANG2);
-   else
-   desc-setmode(chip,V4L2_TUNER_MODE_MONO);
 }
 
 /* -- */
@@ -1267,12 +1261,12 @@ static struct CHIPDESC chiplist[] = {
.addr_lo= I2C_ADDR_TDA9840  1,
.addr_hi= I2C_ADDR_TDA9840  1,
.registers  = 5,
+   .flags  = CHIP_NEED_CHECKMODE,
 
  

[linuxtv-commits] [hg:v4l-dvb] tvaudio: add additional logic to avoid OOPS

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9618 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: add additional logic to avoid OOPS


This patch checks for volume, bass, treble, set mode and get mode
callbacks before actually enabling the code that would use them.

Instead of aborting the driver for load, this patch will allow it to
load with a reduced number of functionatities.

This prevents OOPS if some board entry is missing a needed callback.

Priority: high

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   45 +++-
 1 file changed, 37 insertions(+), 8 deletions(-)

diff -r f8a8e0909f40 -r efeab4355755 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:55:39 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 15:01:15 2008 -0200
@@ -1523,20 +1523,49 @@ static int chip_probe(struct i2c_client 
chip_cmd(chip,init,desc-init);
 
if (desc-flags  CHIP_HAS_VOLUME) {
-   chip-left   = desc-leftinit   ? desc-leftinit   : 65535;
-   chip-right  = desc-rightinit  ? desc-rightinit  : 65535;
-   chip_write(chip,desc-leftreg,desc-volfunc(chip-left));
-   chip_write(chip,desc-rightreg,desc-volfunc(chip-right));
+   if (!desc-volfunc) {
+   /* This shouldn't be happen. Warn user, but keep working
+  without volume controls
+*/
+   v4l_info(chip-c, volume callback undefined!\n);
+   desc-flags = ~CHIP_HAS_VOLUME;
+   } else {
+   chip-left  = desc-leftinit  ? desc-leftinit  : 65535;
+   chip-right = desc-rightinit ? desc-rightinit : 65535;
+   chip_write(chip, desc-leftreg,
+  desc-volfunc(chip-left));
+   chip_write(chip, desc-rightreg,
+  desc-volfunc(chip-right));
+   }
}
if (desc-flags  CHIP_HAS_BASSTREBLE) {
-   chip-treble = desc-trebleinit ? desc-trebleinit : 32768;
-   chip-bass   = desc-bassinit   ? desc-bassinit   : 32768;
-   chip_write(chip,desc-bassreg,desc-bassfunc(chip-bass));
-   chip_write(chip,desc-treblereg,desc-treblefunc(chip-treble));
+   if (!desc-bassfunc || !desc-treblefunc) {
+   /* This shouldn't be happen. Warn user, but keep working
+  without bass/treble controls
+*/
+   v4l_info(chip-c, bass/treble callbacks undefined!\n);
+   desc-flags = ~CHIP_HAS_BASSTREBLE;
+   } else {
+   chip-treble = desc-trebleinit ?
+   desc-trebleinit : 32768;
+   chip-bass   = desc-bassinit   ?
+   desc-bassinit   : 32768;
+   chip_write(chip, desc-bassreg,
+  desc-bassfunc(chip-bass));
+   chip_write(chip, desc-treblereg,
+  desc-treblefunc(chip-treble));
+   }
}
 
chip-thread = NULL;
if (desc-flags  CHIP_NEED_CHECKMODE) {
+   if (!desc-getmode || !desc-setmode) {
+   /* This shouldn't be happen. Warn user, but keep working
+  without kthread
+*/
+   v4l_info(chip-c, set/get mode callbacks 
undefined!\n);
+   return 0;
+   }
/* start async thread */
init_timer(chip-wt);
chip-wt.function = chip_thread_wake;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/efeab43557556d206cb9432c1989b7766deb770e

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: update initial comments

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9619 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: update initial comments


A driver used on several bttv boards since 2000 is not experimental
anymore ;) Remove it from the comments.

While there, update copyrights addind a quick note about the recent
updates since 2005.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -r efeab4355755 -r f33ef5bce695 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 15:01:15 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 15:07:54 2008 -0200
@@ -1,11 +1,15 @@
 /*
- * experimental driver for simple i2c audio chips.
+ * Driver for simple i2c audio chips.
  *
  * Copyright (c) 2000 Gerd Knorr
  * based on code by:
  *   Eric Sandeen ([EMAIL PROTECTED])
  *   Steve VanDeBogart ([EMAIL PROTECTED])
  *   Greg Alexander ([EMAIL PROTECTED])
+ *
+ * Copyright(c) 2005-2008 Mauro Carvalho Chehab
+ * - Some cleanups, code fixes, etc
+ * - Convert it to V4L2 API
  *
  * This code is placed under the terms of the GNU General Public License
  *


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f33ef5bce695ac53bc7d2775abdfe4a0d443d644

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: instead of using a magic number, use ARRAY_SIZE

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9615 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: instead of using a magic number, use ARRAY_SIZE


Also, the default standard is the first one. So, fix the comment at the
array.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -r 5d2c6204a74e -r f686f27e165d linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:07:30 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 14:10:11 2008 -0200
@@ -780,7 +780,7 @@ static struct tda9874a_MODES {
char *name;
audiocmd cmd;
 } tda9874a_modelist[9] = {
-  {A2, B/G,
+  {A2, B/G, /* default */
{ 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x77,0xA0,0x00, 0x00,0x00 }} },
   {A2, M (Korea),
{ 9, { TDA9874A_C1FRA, 0x5D,0xC0,0x00, 0x62,0x6A,0xAA, 0x20,0x22 }} },
@@ -794,7 +794,7 @@ static struct tda9874a_MODES {
{ 9, { TDA9874A_C1FRA, 0x7D,0x00,0x00, 0x88,0x8A,0xAA, 0x08,0x33 }} },
   {NICAM, B/G,
{ 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x79,0xEA,0xAA, 0x08,0x33 }} },
-  {NICAM, D/K, /* default */
+  {NICAM, D/K,
{ 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x08,0x33 }} },
   {NICAM, L,
{ 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x09,0x33 }} }
@@ -989,7 +989,7 @@ static int tda9874a_initialize(struct CH
 {
if (tda9874a_SIF  2)
tda9874a_SIF = 1;
-   if (tda9874a_STD  8)
+   if (tda9874a_STD = ARRAY_SIZE(tda9874a_modelist))
tda9874a_STD = 0;
if(tda9874a_AMSEL  1)
tda9874a_AMSEL = 0;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f686f27e165d5da350ee51df24174f300e487fa1

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Avoid writing outside shadow.bytes[] array

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9621 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Avoid writing outside shadow.bytes[] array


There were no check about the limits of shadow.bytes array. This offers
a risk of writing values outside the limits, overriding other data
areas.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   30 +---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff -r 84dac3f87474 -r 8188509233f4 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 17:22:53 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 18:03:28 2008 -0200
@@ -157,7 +157,7 @@ static int chip_write(struct CHIPSTATE *
 {
unsigned char buffer[2];
 
-   if (-1 == subaddr) {
+   if (subaddr  0) {
v4l_dbg(1, debug, chip-c, %s: chip_write: 0x%x\n,
chip-c-name, val);
chip-shadow.bytes[1] = val;
@@ -168,6 +168,13 @@ static int chip_write(struct CHIPSTATE *
return -1;
}
} else {
+   if (subaddr + 1 = ARRAY_SIZE(chip-shadow.bytes)) {
+   v4l_info(chip-c,
+   Tried to access a non-existent register: %d\n,
+   subaddr);
+   return -EINVAL;
+   }
+
v4l_dbg(1, debug, chip-c, %s: chip_write: reg%d=0x%x\n,
chip-c-name, subaddr, val);
chip-shadow.bytes[subaddr+1] = val;
@@ -182,12 +189,20 @@ static int chip_write(struct CHIPSTATE *
return 0;
 }
 
-static int chip_write_masked(struct CHIPSTATE *chip, int subaddr, int val, int 
mask)
+static int chip_write_masked(struct CHIPSTATE *chip,
+int subaddr, int val, int mask)
 {
if (mask != 0) {
-   if (-1 == subaddr) {
+   if (subaddr  0) {
val = (chip-shadow.bytes[1]  ~mask) | (val  mask);
} else {
+   if (subaddr + 1 = ARRAY_SIZE(chip-shadow.bytes)) {
+   v4l_info(chip-c,
+   Tried to access a non-existent 
register: %d\n,
+   subaddr);
+   return -EINVAL;
+   }
+
val = (chip-shadow.bytes[subaddr+1]  ~mask) | (val  
mask);
}
}
@@ -232,6 +247,15 @@ static int chip_cmd(struct CHIPSTATE *ch
 
if (0 == cmd-count)
return 0;
+
+   if (cmd-count + cmd-bytes[0] - 1 = ARRAY_SIZE(chip-shadow.bytes)) {
+   v4l_info(chip-c,
+Tried to access a non-existent register range: %d to 
%d\n,
+cmd-bytes[0] + 1, cmd-bytes[0] + cmd-count - 1);
+   return -EINVAL;
+   }
+
+   /* FIXME: it seems that the shadow bytes are wrong bellow !*/
 
/* update our shadow register set; print bytes if (debug  0) */
v4l_dbg(1, debug, chip-c, %s: chip_cmd(%s): reg=%d, data:,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8188509233f4ab3b4758389a913c3c01da8c649b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: Improve comments and remove a unneeded prototype

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9622 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: Improve comments and remove a unneeded prototype


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff -r 8188509233f4 -r 6461c6b8cc74 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 18:03:28 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 18:25:04 2008 -0200
@@ -109,7 +109,6 @@ struct CHIPDESC {
int  inputmute;
int  inputmask;
 };
-static struct CHIPDESC chiplist[];
 
 /* current state of the chip */
 struct CHIPSTATE {
@@ -1868,11 +1867,13 @@ static int chip_command(struct i2c_clien
case VIDIOC_S_FREQUENCY:
chip-mode = 0; /* automatic */
 
-   /* For chips that provide getmode, setmode and checkmode,
-  a kthread is created to automatically to set the audio
-  standard. In this case, start with MONO and wait 2 seconds
-  for the decoding to stablize. Then, run kthread to change
-  to stereo, if carrier detected.
+   /* For chips that provide getmode and setmode, and doesn't
+  automatically follows the stereo carrier, a kthread is
+  created to set the audio standard. In this case, when then
+  the video channel is changed, tvaudio starts on MONO mode.
+  After waiting for 2 seconds, the kernel thread is called,
+  to follow whatever audio standard is pointed by the
+  audio carrier.
 */
if (chip-thread) {
desc-setmode(chip,V4L2_TUNER_MODE_MONO);
@@ -1921,9 +1922,3 @@ static struct v4l2_i2c_driver_data v4l2_
.id_table = chip_id,
 #endif
 };
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6461c6b8cc74060316df3213898cfdb2d166e9f8

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: Improve debug msg by printing something more human

2008-11-13 Thread Patch from Mauro Carvalho Chehab
The patch number 9623 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: Improve debug msg by printing something more human


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -r 6461c6b8cc74 -r ccaaa8508b64 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 18:25:04 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Thu Nov 13 19:12:43 2008 -0200
@@ -37,6 +37,7 @@
 
 #include media/tvaudio.h
 #include media/v4l2-common.h
+#include media/v4l2-ioctl.h
 #include media/v4l2-chip-ident.h
 #include media/v4l2-i2c-drv-legacy.h
 
@@ -1744,7 +1745,10 @@ static int chip_command(struct i2c_clien
struct CHIPSTATE *chip = i2c_get_clientdata(client);
struct CHIPDESC  *desc = chip-desc;
 
-   v4l_dbg(1, debug, chip-c, %s: chip_command 0x%x\n, chip-c-name, 
cmd);
+   if (debug  0) {
+   v4l_i2c_print_ioctl(chip-c, cmd);
+   printk(\n);
+   }
 
switch (cmd) {
case AUDC_SET_RADIO:


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ccaaa8508b64bae69b69f6a20dafbde228269b5c

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] tvaudio: fix OOPS when controlling bass/treble

2008-11-14 Thread Patch from Mauro Carvalho Chehab
The patch number 9624 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
tvaudio: fix OOPS when controlling bass/treble


Not all tvaudio chips allow controlling bass/treble. So, the driver
has a table with a flag to indicate if the chip does support it.

Unfortunately, the handling of this logic were broken for a very long
time (probably since the first module version). Due to that, an OOPS
were generated for devices that don't support bass/treble.

This were the resulting OOPS message before the patch, with debug messages
enabled:

tvaudio' 1-005b: VIDIOC_S_CTRL
BUG: unable to handle kernel NULL pointer dereference at 
IP: []
*pde = 22fda067 *pte = 
Oops:  [#1] SMP
Modules linked in: snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event 
snd_seq snd_seq_device
snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_hwdep snd soundcore 
tuner_simple tuner_types tea5767 tuner
tvaudio bttv bridgebnep rfcomm l2cap bluetooth it87 hwmon_vid hwmon fuse sunrpc 
ipt_REJECT
nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT xt_tcpudp 
nf_conntrack_ipv6 xt_state nf_conntrack
ip6table_filter ip6_tables x_tables ipv6 dm_mirrordm_multipath dm_mod configfs 
videodev v4l1_compat
ir_common 8139cp compat_ioctl32 v4l2_common 8139too videobuf_dma_sg 
videobuf_core mii btcx_risc tveeprom
i915 button snd_page_alloc serio_raw drm pcspkr i2c_algo_bit i2c_i801 i2c_core 
iTCO_wdt
iTCO_vendor_support sr_mod cdrom sg ata_generic pata_acpi ata_piix libata 
sd_mod scsi_mod ext3 jbdmbcache
uhci_hcd ohci_hcd ehci_hcd [last unloaded: soundcore]

Pid: 15413, comm: qv4l2 Not tainted (2.6.25.14-108.fc9.i686 #1)
EIP: 0060:[] EFLAGS: 00210246 CPU: 0
EIP is at 0x0
EAX: 8000 EBX: ebd21600 ECX: e2fd9ec4 EDX: 00200046
ESI: f8c0f0c4 EDI: f8c0f0c4 EBP: e2fd9d50 ESP: e2fd9d2c
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process qv4l2 (pid: 15413, ti=e2fd9000 task=ebe44000 task.ti=e2fd9000)
Stack: f8c0c6ae e2ff2a00 0d00 e2fd9ec4 ebc4e000 e2fd9d5c f8c0c448 
   f899c12a e2fd9d5c f899c154 e2fd9d68 e2fd9d80 c0560185 e2fd9d88 f8f3e1d8
   f8f3e1dc ebc4e034 f8f3e18c e2fd9ec4  e2fd9d90 f899c286 c008561c
Call Trace:
 [f8c0c6ae] ? chip_command+0x266/0x4b6 [tvaudio]
 [f8c0c448] ? chip_command+0x0/0x4b6 [tvaudio]
 [f899c12a] ? i2c_cmd+0x0/0x2f [i2c_core]
 [f899c154] ? i2c_cmd+0x2a/0x2f [i2c_core]
 [c0560185] ? device_for_each_child+0x21/0x49
 [f899c286] ? i2c_clients_command+0x1c/0x1e [i2c_core]
 [f8f283d8] ? bttv_call_i2c_clients+0x14/0x16 [bttv]
 [f8f23601] ? bttv_s_ctrl+0x1bc/0x313 [bttv]
 [f8f23445] ? bttv_s_ctrl+0x0/0x313 [bttv]
 [f8b6096d] ? __video_do_ioctl+0x1f84/0x3726 [videodev]
 [c05abb4e] ? sock_aio_write+0x100/0x10d
 [c041b23e] ? kmap_atomic_prot+0x1dd/0x1df
 [c043a0c9] ? enqueue_hrtimer+0xc2/0xcd
 [c04f4fa4] ? copy_from_user+0x39/0x121
 [f8b622b9] ? __video_ioctl2+0x1aa/0x24a [videodev]
 [c04054fd] ? do_notify_resume+0x768/0x795
 [c043c0f7] ? getnstimeofday+0x34/0xd1
 [c0437b77] ? autoremove_wake_function+0x0/0x33
 [f8b62368] ? video_ioctl2+0xf/0x13 [videodev]
 [c048c6f0] ? vfs_ioctl+0x50/0x69
 [c048c942] ? do_vfs_ioctl+0x239/0x24c
 [c048c995] ? sys_ioctl+0x40/0x5b
 [c0405bf2] ? syscall_call+0x7/0xb
 [c062] ? cpuid4_cache_sysfs_exit+0x3d/0x69
 ===
Code:  Bad EIP value.
EIP: [] 0x0 SS:ESP 0068:e2fd9d2c

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |   17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff -r ccaaa8508b64 -r 875b75236ff8 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Thu Nov 13 19:12:43 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Fri Nov 14 11:46:59 2008 -0200
@@ -1651,13 +1651,13 @@ static int tvaudio_get_ctrl(struct CHIPS
return 0;
}
case V4L2_CID_AUDIO_BASS:
-   if (desc-flags  CHIP_HAS_BASSTREBLE)
+   if (!(desc-flags  CHIP_HAS_BASSTREBLE))
break;
ctrl-value = chip-bass;
return 0;
case V4L2_CID_AUDIO_TREBLE:
-   if (desc-flags  CHIP_HAS_BASSTREBLE)
-   return -EINVAL;
+   if (!(desc-flags  CHIP_HAS_BASSTREBLE))
+   break;
ctrl-value = chip-treble;
return 0;
}
@@ -1717,16 +1717,15 @@ static int tvaudio_set_ctrl(struct CHIPS
return 0;
}
case V4L2_CID_AUDIO_BASS:
-   if (desc-flags  CHIP_HAS_BASSTREBLE)
+   if (!(desc-flags  

[linuxtv-commits] [hg:v4l-dvb] Fix a small mistake on the previous patch

2008-11-14 Thread Patch from Mauro Carvalho Chehab
The patch number 9625 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Fix a small mistake on the previous patch


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/tvaudio.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -r 875b75236ff8 -r 312def568276 linux/drivers/media/video/tvaudio.c
--- a/linux/drivers/media/video/tvaudio.c   Fri Nov 14 11:46:59 2008 -0200
+++ b/linux/drivers/media/video/tvaudio.c   Fri Nov 14 14:38:46 2008 -0200
@@ -1767,12 +1767,12 @@ static int chip_command(struct i2c_clien
break;
case V4L2_CID_AUDIO_VOLUME:
case V4L2_CID_AUDIO_BALANCE:
-   if ((desc-flags  CHIP_HAS_VOLUME))
+   if (!(desc-flags  CHIP_HAS_VOLUME))
return -EINVAL;
break;
case V4L2_CID_AUDIO_BASS:
case V4L2_CID_AUDIO_TREBLE:
-   if ((desc-flags  CHIP_HAS_BASSTREBLE))
+   if (!(desc-flags  CHIP_HAS_BASSTREBLE))
return -EINVAL;
break;
default:


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/312def568276fb6aa07ceb34f85716e5ab9925ea

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] select video device via a popup menu

2008-11-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9626 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
select video device via a popup menu


Seeking for a video device at /dev is sometimes hard, since not all
distros create a /dev/v4l dir. Instead of opening a file, be more
user-friendly, by just displaying the valid files.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 v4l2-apps/util/qv4l2/qv4l2.cpp |   60 -
 v4l2-apps/util/qv4l2/qv4l2.h   |3 +
 2 files changed, 54 insertions(+), 9 deletions(-)

diff -r 312def568276 -r 47f1ed46f569 v4l2-apps/util/qv4l2/qv4l2.cpp
--- a/v4l2-apps/util/qv4l2/qv4l2.cppFri Nov 14 14:38:46 2008 -0200
+++ b/v4l2-apps/util/qv4l2/qv4l2.cppSun Nov 16 01:26:13 2008 -0200
@@ -31,6 +31,7 @@
 #include fcntl.h
 #include sys/ioctl.h
 #include errno.h
+#include dirent.h
 
 #include fileopen.xpm
 
@@ -41,6 +42,7 @@ ApplicationWindow::ApplicationWindow()
 
 fd = -1;
 
+videoDevice = NULL;
 sigMapper = NULL;
 QToolBar * fileTools = new QToolBar( this, file operations );
 fileTools-setLabel( File Operations );
@@ -129,17 +131,57 @@ void ApplicationWindow::setDevice(const 
setCentralWidget(tabs);
 }
 
+void ApplicationWindow::selectdev(int index)
+{
+   setDevice(videoDevice-text(index));
+}
+
+void ApplicationWindow::add_dirVideoDevice(char *dirname)
+{
+   DIR *dir;
+   struct dirent   *entry;
+   char*vid = video;
+   char*rad = radio;
+   char*vbi = vbi;
+   charname[512], *p;
+
+   dir = opendir(dirname);
+   if (!dir)
+   return;
+
+   strcpy(name, dirname);
+   strcat(name, /);
+   p = name + strlen(name);
+
+   entry = readdir(dir);
+   while (entry) {
+   if (!strncmp(entry-d_name, vid, strlen(vid)) ||
+   !strncmp(entry-d_name, rad, strlen(rad)) ||
+   !strncmp(entry-d_name, vbi, strlen(vbi))) {
+   strcpy(p, entry-d_name);
+
+   videoDevice-insertItem(name);
+   }
+   entry = readdir(dir);
+   }
+   closedir(dir);
+}
+
 void ApplicationWindow::choose()
 {
-QString fn = QFileDialog::getOpenFileName( /dev/v4l, QString::null,
-  this);
-if ( !fn.isEmpty() ) {
-   setDevice(fn);
-}
-else
-   statusBar()-message( Loading aborted, 2000 );
-}
-
+   if (videoDevice)
+   delete videoDevice;
+
+   videoDevice = new QPopupMenu(this);
+
+   add_dirVideoDevice(/dev);
+   add_dirVideoDevice(/dev/v4l);
+
+   connect(videoDevice, SIGNAL(activated(int)), this, 
SLOT(selectdev(int)));
+
+   videoDevice-show();
+   videoDevice-setFocus();
+}
 
 void ApplicationWindow::closeEvent( QCloseEvent* ce )
 {
diff -r 312def568276 -r 47f1ed46f569 v4l2-apps/util/qv4l2/qv4l2.h
--- a/v4l2-apps/util/qv4l2/qv4l2.h  Fri Nov 14 14:38:46 2008 -0200
+++ b/v4l2-apps/util/qv4l2/qv4l2.h  Sun Nov 16 01:26:13 2008 -0200
@@ -59,12 +59,14 @@ protected:
 void closeEvent( QCloseEvent* );
 
 private slots:
+void selectdev(int);
 void choose();
 void ctrlAction(int);
 
 void about();
 
 private:
+void add_dirVideoDevice(char *dirname);
 void addTabs();
 void finishGrid(QWidget *vbox, QGrid *grid, unsigned ctrl_class, bool odd);
 void addCtrl(QGrid *grid, const struct v4l2_queryctrl qctrl);
@@ -88,6 +90,7 @@ private:
 QString filename;
 QSignalMapper *sigMapper;
 QTabWidget *tabs;
+QPopupMenu *videoDevice;
 int fd;
 CtrlMap ctrlMap;
 WidgetMap widgetMap;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/47f1ed46f5691e287ebe6336ddaeb21bbc224768

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx: Avoid i2c register error for boards without eeprom

2008-11-15 Thread Patch from Mauro Carvalho Chehab
The patch number 9627 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: Avoid i2c register error for boards without eeprom


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-i2c.c |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff -r 47f1ed46f569 -r f3128f8e3475 
linux/drivers/media/video/em28xx/em28xx-i2c.c
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c Sun Nov 16 01:26:13 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c Sun Nov 16 00:44:14 
2008 -0200
@@ -348,9 +348,9 @@ static int em28xx_i2c_eeprom(struct em28
/* Check if board has eeprom */
err = i2c_master_recv(dev-i2c_client, buf, 0);
if (err  0) {
-   em28xx_errdev(%s: i2c_master_recv failed! err [%d]\n,
-   __func__, err);
-   return err;
+   em28xx_errdev(board has no eeprom\n);
+   memset(eedata, 0, len);
+   return -ENODEV;
}
 
buf = 0;
@@ -620,14 +620,16 @@ int em28xx_i2c_register(struct em28xx *d
dev-i2c_client.adapter = dev-i2c_adap;
 
retval = em28xx_i2c_eeprom(dev, dev-eedata, sizeof(dev-eedata));
-   if (retval  0) {
+   if ((retval  0)  (retval != -ENODEV)) {
em28xx_errdev(%s: em28xx_i2_eeprom failed! retval [%d]\n,
__func__, retval);
+
return retval;
}
 
if (i2c_scan)
em28xx_do_i2c_scan(dev);
+
return 0;
 }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f3128f8e347523836f61c874a3356fd0b3436c2f

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Some boards need to specify tuner address

2008-11-16 Thread Patch from Mauro Carvalho Chehab
The patch number 9630 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Some boards need to specify tuner address


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |1 +
 linux/drivers/media/video/em28xx/em28xx.h   |1 +
 2 files changed, 2 insertions(+)

diff -r ed1b7332fd9b -r 0f7686e28ff5 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Sun Nov 16 09:03:53 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Sun Nov 16 09:05:06 
2008 -0200
@@ -1770,6 +1770,7 @@ void em28xx_card_setup(struct em28xx *de
em28xx_set_model(dev);
 
dev-tuner_type = em28xx_boards[dev-model].tuner_type;
+   dev-tuner_addr = em28xx_boards[dev-model].tuner_addr;
 
/* request some modules */
switch (dev-model) {
diff -r ed1b7332fd9b -r 0f7686e28ff5 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h Sun Nov 16 09:03:53 2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h Sun Nov 16 09:05:06 2008 -0200
@@ -286,6 +286,7 @@ struct em28xx_board {
char *name;
int vchannels;
int tuner_type;
+   int tuner_addr;
 
/* i2c flags */
unsigned int tda9887_conf;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0f7686e28ff5cf14e3f2b17a52f902ea2ab63fca

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Add AC97 registers found on em28xx devices

2008-11-17 Thread Patch from Mauro Carvalho Chehab
The patch number 9642 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Add AC97 registers found on em28xx devices


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-reg.h |   52 ++
 1 file changed, 52 insertions(+)

diff -r c5f976cab011 -r f5876b63d047 
linux/drivers/media/video/em28xx/em28xx-reg.h
--- a/linux/drivers/media/video/em28xx/em28xx-reg.h Sun Nov 16 11:40:21 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-reg.h Mon Nov 17 23:30:09 
2008 -0200
@@ -117,3 +117,55 @@ enum em28xx_chip_id {
CHIP_ID_EM2883 = 36,
CHIP_ID_EM2874 = 65,
 };
+
+/*
+ * Registers used by em202 and other AC97 chips
+ */
+
+/* Standard AC97 registers */
+#define AC97_RESET   0x00
+#define AC97_MASTER_VOL  0x02
+#define AC97_LINE_LEVEL_VOL  0x04
+#define AC97_MASTER_MONO_VOL 0x06
+
+#define AC97_PC_BEEP_VOL 0x0a
+#define AC97_PHONE_VOL   0x0c
+#define AC97_MIC_VOL 0x0e
+#define AC97_LINEIN_VOL  0x10
+#define AC97_CD_VOL  0x12
+#define AC97_VIDEO_VOL   0x14
+#define AC97_AUX_VOL 0x16
+#define AC97_PCM_OUT_VOL 0x18
+#define AC97_RECORD_SELECT   0x1a
+#define AC97_RECORD_GAIN 0x1c
+#define AC97_GENERAL_PURPOSE 0x20
+#define AC97_3D_CTRL 0x22
+#define AC97_AUD_INT_AND_PAG 0x24
+#define AC97_POWER_DOWN_CTRL 0x26
+#define AC97_EXT_AUD_ID  0x28
+#define AC97_EXT_AUD_CTRL0x2a
+
+/* Supported rate varies for each AC97 device
+   if write an unsupported value, it will return the closest one
+ */
+#define AC97_PCM_OUT_FRONT_SRATE 0x2c
+#define AC97_PCM_OUT_SURR_SRATE  0x2e
+#define AC97_PCM_OUT_LFE_SRATE   0x30
+#define AC97_PCM_IN_SRATE0x32
+#define AC97_LFE_MASTER_VOL  0x36
+#define AC97_SURR_MASTER_VOL 0x38
+#define AC97_SPDIF_OUT_CTRL  0x3a
+
+#define AC97_VENDOR_ID1  0x7c
+#define AC97_VENDOR_ID2  0x7e
+
+/* EMP202 vendor registers */
+#define EM202_EXT_MODEM_CTRL 0x3e
+#define EM202_GPIO_CONF  0x4c
+#define EM202_GPIO_POLARITY  0x4e
+#define EM202_GPIO_STICKY0x50
+#define EM202_GPIO_MASK  0x52
+#define EM202_GPIO_STATUS0x54
+#define EM202_SPDIF_OUT_SEL  0x6a
+#define EM202_ANTIPOP0x72
+#define EM202_EAPD_GPIO_ACCESS   0x74


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f5876b63d04752d4179d3841d40baa4872775e4e

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Remove the previous register names

2008-11-17 Thread Patch from Mauro Carvalho Chehab
The patch number 9643 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Remove the previous register names


Previously, AC97 registers were named as if they were part of em28xx
device, generating some confusion. Replace such names for a more general
naming convention.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c |8 
 linux/drivers/media/video/em28xx/em28xx-reg.h  |5 -
 2 files changed, 4 insertions(+), 9 deletions(-)

diff -r f5876b63d047 -r c143ba630fb0 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cMon Nov 17 23:30:09 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cMon Nov 17 23:40:36 
2008 -0200
@@ -292,11 +292,11 @@ static int em28xx_set_audio_source(struc
/* Sets AC97 mixer registers
   This is seems to be needed, even for non-ac97 configs
 */
-   ret = em28xx_write_ac97(dev, EM28XX_R14_VIDEO_AC97, video);
+   ret = em28xx_write_ac97(dev, AC97_VIDEO_VOL, video);
if (ret  0)
return ret;
 
-   ret = em28xx_write_ac97(dev, EM28XX_R10_LINE_IN_AC97, line);
+   ret = em28xx_write_ac97(dev, AC97_LINEIN_VOL, line);
 
return ret;
 }
@@ -312,7 +312,7 @@ int em28xx_audio_analog_set(struct em28x
 
/* Mute */
s[1] |= 0x80;
-   ret = em28xx_write_ac97(dev, EM28XX_R02_MASTER_AC97, s);
+   ret = em28xx_write_ac97(dev, AC97_MASTER_VOL, s);
 
if (ret  0)
return ret;
@@ -334,7 +334,7 @@ int em28xx_audio_analog_set(struct em28x
/* Unmute device */
if (!dev-mute)
s[1] = ~0x80;
-   ret = em28xx_write_ac97(dev, EM28XX_R02_MASTER_AC97, s);
+   ret = em28xx_write_ac97(dev, AC97_MASTER_VOL, s);
 
return ret;
 }
diff -r f5876b63d047 -r c143ba630fb0 
linux/drivers/media/video/em28xx/em28xx-reg.h
--- a/linux/drivers/media/video/em28xx/em28xx-reg.h Mon Nov 17 23:30:09 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-reg.h Mon Nov 17 23:40:36 
2008 -0200
@@ -77,11 +77,6 @@
   0x46  IR brand
   0x47  IR data
 */
-
-/* em202 registers */
-#define EM28XX_R02_MASTER_AC97 0x02
-#define EM28XX_R10_LINE_IN_AC970x10
-#define EM28XX_R14_VIDEO_AC97  0x14
 
 /* em2874 registers */
 #define EM2874_R50_IR_CONFIG0x50


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/c143ba630fb08b6569df9eb78b805207fb2200cc

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Avoid having two concurrent control URB's

2008-11-19 Thread Patch from Mauro Carvalho Chehab
The patch number 9647 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Avoid having two concurrent control URB's


Now that we have a polling task for IR, there's a race condition, since
IR can be polling while other operations are being doing. Also, we are
now sharing the same urb_buf for both read and write control urb
operations. So, we need a mutex.

Thanks to Davin Heitmueller [EMAIL PROTECTED] for warning me.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c  |   12 ++--
 linux/drivers/media/video/em28xx/em28xx-video.c |1 +
 linux/drivers/media/video/em28xx/em28xx.h   |1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff -r 1536e16ffdf1 -r 82deaf78e8df 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cTue Nov 18 15:51:08 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cWed Nov 19 07:17:44 
2008 -0200
@@ -76,17 +76,21 @@ int em28xx_read_reg_req_len(struct em28x
 
em28xx_regdbg(req=%02x, reg=%02x , req, reg);
 
+   mutex_lock(dev-ctrl_urb_lock);
ret = usb_control_msg(dev-udev, usb_rcvctrlpipe(dev-udev, 0), req,
  USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  0x, reg, dev-urb_buf, len, HZ);
if (ret  0) {
if (reg_debug)
printk( failed!\n);
+   mutex_unlock(dev-ctrl_urb_lock);
return ret;
}
 
if (len)
memcpy(buf, dev-urb_buf, len);
+
+   mutex_unlock(dev-ctrl_urb_lock);
 
if (reg_debug) {
printk(%02x values: , ret);
@@ -112,15 +116,17 @@ int em28xx_read_reg_req(struct em28xx *d
 
em28xx_regdbg(req=%02x, reg=%02x:, req, reg);
 
+   mutex_lock(dev-ctrl_urb_lock);
ret = usb_control_msg(dev-udev, usb_rcvctrlpipe(dev-udev, 0), req,
  USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  0x, reg, dev-urb_buf, 1, HZ);
+   val = dev-urb_buf[0];
+   mutex_unlock(dev-ctrl_urb_lock);
+
if (ret  0) {
printk( failed!\n);
return ret;
}
-
-   val = dev-urb_buf[0];
 
if (reg_debug)
printk(%02x\n, (unsigned char) val);
@@ -156,10 +162,12 @@ int em28xx_write_regs_req(struct em28xx 
printk(\n);
}
 
+   mutex_lock(dev-ctrl_urb_lock);
memcpy(dev-urb_buf, buf, len);
ret = usb_control_msg(dev-udev, usb_sndctrlpipe(dev-udev, 0), req,
  USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  0x, reg, dev-urb_buf, len, HZ);
+   mutex_unlock(dev-ctrl_urb_lock);
 
if (dev-wait_after_write)
msleep(dev-wait_after_write);
diff -r 1536e16ffdf1 -r 82deaf78e8df 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Tue Nov 18 15:51:08 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Wed Nov 19 07:17:44 
2008 -0200
@@ -2017,6 +2017,7 @@ static int em28xx_init_dev(struct em28xx
 
dev-udev = udev;
mutex_init(dev-lock);
+   mutex_init(dev-ctrl_urb_lock);
spin_lock_init(dev-slock);
init_waitqueue_head(dev-open);
init_waitqueue_head(dev-wait_frame);
diff -r 1536e16ffdf1 -r 82deaf78e8df linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h Tue Nov 18 15:51:08 2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h Wed Nov 19 07:17:44 2008 -0200
@@ -450,6 +450,7 @@ struct em28xx {
 
/* locks */
struct mutex lock;
+   struct mutex ctrl_urb_lock; /* protects urb_buf */
/* spinlock_t queue_lock; */
struct list_head inqueue, outqueue;
wait_queue_head_t open, wait_frame, wait_stream;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/82deaf78e8df046a9ea721d543c376d64601a31b

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx: Improve audio handling

2008-11-19 Thread Patch from Mauro Carvalho Chehab
The patch number 9651 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: Improve audio handling


This patch properly implements audio handling on em28xx. Before this
patch, it was assumed that every device has an Empia 202 audio chip.
However, this is not true.

After this patch, specific AC97 chipset setup and configurations can be
done.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c  |  265 
 linux/drivers/media/video/em28xx/em28xx-video.c |   63 ---
 linux/drivers/media/video/em28xx/em28xx.h   |   27 +
 3 files changed, 232 insertions(+), 123 deletions(-)

diff -r a161c634b879 -r 5dc4a6b381f6 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cWed Nov 19 12:10:50 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cWed Nov 19 13:01:33 
2008 -0200
@@ -224,41 +224,107 @@ static int em28xx_write_reg_bits(struct 
 }
 
 /*
- * em28xx_write_ac97()
- * write a 16 bit value to the specified AC97 address (LSB first!)
- */
-static int em28xx_write_ac97(struct em28xx *dev, u8 reg, u8 *val)
+ * em28xx_is_ac97_ready()
+ * Checks if ac97 is ready
+ */
+static int em28xx_is_ac97_ready(struct em28xx *dev)
 {
int ret, i;
-   u8 addr = reg  0x7f;
-
-   ret = em28xx_write_regs(dev, EM28XX_R40_AC97LSB, val, 2);
-   if (ret  0)
-   return ret;
-
-   ret = em28xx_write_regs(dev, EM28XX_R42_AC97ADDR, addr, 1);
-   if (ret  0)
-   return ret;
 
/* Wait up to 50 ms for AC97 command to complete */
-   for (i = 0; i  10; i++) {
+   for (i = 0; i  10; i++, msleep(5)) {
ret = em28xx_read_reg(dev, EM28XX_R43_AC97BUSY);
if (ret  0)
return ret;
 
if (!(ret  0x01))
return 0;
-   msleep(5);
-   }
+   }
+
em28xx_warn(AC97 command still being executed: not handled 
properly!\n);
+   return -EBUSY;
+}
+
+/*
+ * em28xx_read_ac97()
+ * write a 16 bit value to the specified AC97 address (LSB first!)
+ */
+static int em28xx_read_ac97(struct em28xx *dev, u8 reg)
+{
+   int ret;
+   u8 addr = (reg  0x7f) | 0x80;
+   u16 val;
+
+   ret = em28xx_is_ac97_ready(dev);
+   if (ret  0)
+   return ret;
+
+   ret = em28xx_write_regs(dev, EM28XX_R42_AC97ADDR, addr, 1);
+   if (ret  0)
+   return ret;
+
+   ret = dev-em28xx_read_reg_req_len(dev, 0, EM28XX_R40_AC97LSB,
+  (u8 *)val, sizeof(val));
+
+   if (ret  0)
+   return ret;
+   return le16_to_cpu(val);
+}
+
+/*
+ * em28xx_write_ac97()
+ * write a 16 bit value to the specified AC97 address (LSB first!)
+ */
+static int em28xx_write_ac97(struct em28xx *dev, u8 reg, u16 val)
+{
+   int ret;
+   u8 addr = reg  0x7f;
+   __le16 value;
+
+   value = cpu_to_le16(val);
+
+   ret = em28xx_is_ac97_ready(dev);
+   if (ret  0)
+   return ret;
+
+   ret = em28xx_write_regs(dev, EM28XX_R40_AC97LSB, (u8 *) value, 2);
+   if (ret  0)
+   return ret;
+
+   ret = em28xx_write_regs(dev, EM28XX_R42_AC97ADDR, addr, 1);
+   if (ret  0)
+   return ret;
+
return 0;
 }
 
+static int set_ac97_em202_input(struct em28xx *dev)
+{
+   int ret;
+   u16 enable  = 0x0808;   /* 12 dB attenuation Left/Right */
+   u16 disable = 0x8808;   /* bit 15 - mute volumme */
+   u16 video, line;
+
+   if (dev-ctl_ainput == EM28XX_AMUX_VIDEO) {
+   video = enable;
+   line = disable;
+   } else {
+   video = disable;
+   line  = enable;
+   }
+
+   /* Sets em202 AC97 mixer registers */
+   ret = em28xx_write_ac97(dev, AC97_VIDEO_VOL, video);
+   if (ret  0)
+   return ret;
+
+   ret = em28xx_write_ac97(dev, AC97_LINEIN_VOL, line);
+
+   return ret;
+}
+
 static int em28xx_set_audio_source(struct em28xx *dev)
 {
-   static char *enable  = \x08\x08;
-   static char *disable = \x08\x88;
-   char *video = enable, *line = disable;
int ret;
u8 input;
 
@@ -280,19 +346,9 @@ static int em28xx_set_audio_source(struc
case EM28XX_AMUX_VIDEO:
input = EM28XX_AUDIO_SRC_TUNER;
break;
-   case EM28XX_AMUX_LINE_IN:
-   input = EM28XX_AUDIO_SRC_LINE;
- 

[linuxtv-commits] [hg:v4l-dvb] em28xx: replace magic numbers to something more meaningful

2008-11-19 Thread Patch from Mauro Carvalho Chehab
The patch number 9650 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: replace magic numbers to something more meaningful


audio mux entries were described by 0 and 1 magic numers. Use an enum
alias for each entry type.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |  678 
 1 file changed, 339 insertions(+), 339 deletions(-)

diff -r a7227dc8bc05 -r a161c634b879 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Nov 19 12:08:53 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Wed Nov 19 12:10:50 
2008 -0200
@@ -59,7 +59,7 @@ struct em28xx_board em28xx_boards[] = {
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = 0,
-   .amux = 0,
+   .amux = EM28XX_AMUX_VIDEO,
} },
},
[EM2800_BOARD_UNKNOWN] = {
@@ -71,11 +71,11 @@ struct em28xx_board em28xx_boards[] = {
.input   = { {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = SAA7115_COMPOSITE0,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = SAA7115_SVIDEO3,
-   .amux = 1,
+   .amux = EM28XX_AMUX_LINE_IN,
+   }, {
+   .type = EM28XX_VMUX_SVIDEO,
+   .vmux = SAA7115_SVIDEO3,
+   .amux = EM28XX_AMUX_LINE_IN,
} },
},
[EM2820_BOARD_UNKNOWN] = {
@@ -91,7 +91,7 @@ struct em28xx_board em28xx_boards[] = {
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = 0,
-   .amux = 0,
+   .amux = EM28XX_AMUX_VIDEO,
} },
},
[EM2820_BOARD_KWORLD_PVRTV2800RF] = {
@@ -104,11 +104,11 @@ struct em28xx_board em28xx_boards[] = {
.input   = { {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = SAA7115_COMPOSITE0,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = SAA7115_SVIDEO3,
-   .amux = 1,
+   .amux = EM28XX_AMUX_LINE_IN,
+   }, {
+   .type = EM28XX_VMUX_SVIDEO,
+   .vmux = SAA7115_SVIDEO3,
+   .amux = EM28XX_AMUX_LINE_IN,
} },
},
[EM2820_BOARD_TERRATEC_CINERGY_250] = {
@@ -120,15 +120,15 @@ struct em28xx_board em28xx_boards[] = {
.input  = { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = SAA7115_COMPOSITE2,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_COMPOSITE1,
-   .vmux = SAA7115_COMPOSITE0,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = SAA7115_SVIDEO3,
-   .amux = 1,
+   .amux = EM28XX_AMUX_LINE_IN,
+   }, {
+   .type = EM28XX_VMUX_COMPOSITE1,
+   .vmux = SAA7115_COMPOSITE0,
+   .amux = EM28XX_AMUX_LINE_IN,
+   }, {
+   .type = EM28XX_VMUX_SVIDEO,
+   .vmux = SAA7115_SVIDEO3,
+   .amux = EM28XX_AMUX_LINE_IN,
} },
},
[EM2820_BOARD_PINNACLE_USB_2] = {
@@ -140,15 +140,15 @@ struct em28xx_board em28xx_boards[] = {
.input  = { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = SAA7115_COMPOSITE2,
-   .amux = 0,
-   }, {
-   .type = EM28XX_VMUX_COMPOSITE1,
-   .vmux = SAA7115_COMPOSITE0,
-   .amux = 1,
-   }, {
-   .type = EM28XX_VMUX_SVIDEO,
-   .vmux = SAA7115_SVIDEO3,
-   

[linuxtv-commits] [hg:v4l-dvb] em28xx: improve AC97 handling

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9653 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: improve AC97 handling


AC97 devices provide several input and outputs. However, before this
patch, em28xx device weren't properly allowing the usage of ac97
possible combinations. Also, several input volumes were left untouched,
instead of making sure that the volumes were set on mute state.

This patch improves support for ac97 devices by allowing to use any
inputs, and making sure that unused inputs are set on mute state.

Yet, some work is still needed to select the AC97 output.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c |   85 +
 linux/drivers/media/video/em28xx/em28xx-reg.h  |   14 ++
 linux/drivers/media/video/em28xx/em28xx.h  |   20 +++-
 3 files changed, 80 insertions(+), 39 deletions(-)

diff -r 6b249075540a -r 306bdf8e0e5d 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 09:56:19 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 10:06:09 
2008 -0200
@@ -298,29 +298,44 @@ static int em28xx_write_ac97(struct em28
return 0;
 }
 
-static int set_ac97_em202_input(struct em28xx *dev)
-{
-   int ret;
-   u16 enable  = 0x0808;   /* 12 dB attenuation Left/Right */
-   u16 disable = 0x8808;   /* bit 15 - mute volumme */
-   u16 video, line;
-
-   if (dev-ctl_ainput == EM28XX_AMUX_VIDEO) {
-   video = enable;
-   line = disable;
-   } else {
-   video = disable;
-   line  = enable;
-   }
-
-   /* Sets em202 AC97 mixer registers */
-   ret = em28xx_write_ac97(dev, AC97_VIDEO_VOL, video);
-   if (ret  0)
-   return ret;
-
-   ret = em28xx_write_ac97(dev, AC97_LINEIN_VOL, line);
-
-   return ret;
+struct em28xx_input_table {
+   enum em28xx_amux amux;
+   u8   reg;
+};
+
+static struct em28xx_input_table inputs[] = {
+   { EM28XX_AMUX_VIDEO,AC97_VIDEO_VOL   },
+   { EM28XX_AMUX_LINE_IN,  AC97_LINEIN_VOL  },
+   { EM28XX_AMUX_PHONE,AC97_PHONE_VOL   },
+   { EM28XX_AMUX_MIC,  AC97_MIC_VOL },
+   { EM28XX_AMUX_CD,   AC97_CD_VOL  },
+   { EM28XX_AMUX_AUX,  AC97_AUX_VOL },
+   { EM28XX_AMUX_PCM_OUT,  AC97_PCM_OUT_VOL },
+};
+
+static int set_ac97_input(struct em28xx *dev)
+{
+   int ret, i;
+   enum em28xx_amux amux = dev-ctl_ainput;
+
+   /* EM28XX_AMUX_VIDEO2 is a special case used to indicate that
+  em28xx should point to LINE IN, while AC97 should use VIDEO
+*/
+   if (amux == EM28XX_AMUX_VIDEO2)
+   amux = dev-ctl_ainput;
+
+   /* Mute all entres but the one that were selected */
+   for (i = 0; i  ARRAY_SIZE(inputs); i++) {
+   if (amux == inputs[i].amux)
+   ret = em28xx_write_ac97(dev, inputs[i].reg, 0x0808);
+   else
+   ret = em28xx_write_ac97(dev, inputs[i].reg, 0x8000);
+
+   if (ret  0)
+   em28xx_warn(couldn't setup AC97 register %d\n,
+inputs[i].reg);
+   }
+   return 0;
 }
 
 static int em28xx_set_audio_source(struct em28xx *dev)
@@ -329,10 +344,10 @@ static int em28xx_set_audio_source(struc
u8 input;
 
if (dev-is_em2800) {
-   if (dev-ctl_ainput)
+   if (dev-ctl_ainput == EM28XX_AMUX_VIDEO)
+   input = EM2800_AUDIO_SRC_TUNER;
+   else
input = EM2800_AUDIO_SRC_LINE;
-   else
-   input = EM2800_AUDIO_SRC_TUNER;
 
ret = em28xx_write_regs(dev, EM2800_R08_AUDIOSRC, input, 1);
if (ret  0)
@@ -360,16 +375,11 @@ static int em28xx_set_audio_source(struc
switch (dev-audio_mode.ac97) {
case EM28XX_NO_AC97:
break;
-   case EM28XX_AC97_OTHER:
-   /* We don't know how to handle this chip.
-  Let's hope it is close enough to em202 to work
-*/
-   case EM28XX_AC97_EM202:
-   ret = set_ac97_em202_input(dev);
-   break;
-   }
-
-   return 0;
+   default:
+   ret = set_ac97_input(dev);
+   }
+
+   return ret;
 }
 
 int em28xx_audio_analog_set(struct em28xx *dev)
@@ -380,6 +390,9 @@ int em28xx_audio_analog_set(struct em28x
if 

[linuxtv-commits] [hg:v4l-dvb] em28xx: merge AC97 vendor id's into a single var

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9652 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: merge AC97 vendor id's into a single var


This makes easier to identify vendor ID, since AC97 vendors are
generally identified by 3 bytes. The remaining byte is used by the
vendor to identify its devices.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c |   11 +++
 linux/drivers/media/video/em28xx/em28xx.h  |3 +--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff -r 5dc4a6b381f6 -r 6b249075540a 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cWed Nov 19 13:01:33 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 09:56:19 
2008 -0200
@@ -424,6 +424,7 @@ int em28xx_audio_setup(struct em28xx *de
 int em28xx_audio_setup(struct em28xx *dev)
 {
int vid1, vid2, feat, cfg;
+   u32 vid;
 
if (dev-chip_id == CHIP_ID_EM2874) {
/* Digital only device - don't load any alsa module */
@@ -475,9 +476,10 @@ int em28xx_audio_setup(struct em28xx *de
if (vid2  0)
goto init_audio;
 
-   dev-audio_mode.ac97_vendor_id1 = vid1;
-   dev-audio_mode.ac97_vendor_id2 = vid2;
-   em28xx_warn(AC97 vendor ID = %04x:%04x\n, vid1, vid2);
+   vid = vid1  16 | vid2;
+
+   dev-audio_mode.ac97_vendor_id = vid;
+   em28xx_warn(AC97 vendor ID = 0x%08x\n, vid);
 
feat = em28xx_read_ac97(dev, AC97_RESET);
if (feat  0)
@@ -486,7 +488,8 @@ int em28xx_audio_setup(struct em28xx *de
dev-audio_mode.ac97_feat = feat;
em28xx_warn(AC97 features = 0x%04x\n, feat);
 
-   if ((vid1 == 0x)  (vid2 == 0x)  (feat == 0x6a90))
+   /* Try to identify what audio processor we have */
+   if ((vid == 0x)  (feat == 0x6a90))
dev-audio_mode.ac97 = EM28XX_AC97_EM202;
 
 init_audio:
diff -r 5dc4a6b381f6 -r 6b249075540a linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h Wed Nov 19 13:01:33 2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h Thu Nov 20 09:56:19 2008 -0200
@@ -267,8 +267,7 @@ struct em28xx_audio_mode {
enum em28xx_ac97_mode ac97;
 
u16 ac97_feat;
-   u16 ac97_vendor_id1;
-   u16 ac97_vendor_id2;
+   u32 ac97_vendor_id;
 
unsigned int has_audio:1;
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6b249075540a91a5035f976c0a4a4eac942d6887

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] merge: http://linuxtv.org/hg/~anttip/af9015

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9666 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
merge: http://linuxtv.org/hg/~anttip/af9015


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/dvb/dvb-usb/af9015.c |   18 --
 linux/drivers/media/dvb/dvb-usb/af9015.h |   64 +++
 2 files changed, 76 insertions(+), 6 deletions(-)

diff -r 97a734555057 -r 2642ea0d2c54 linux/drivers/media/dvb/dvb-usb/af9015.c
--- a/linux/drivers/media/dvb/dvb-usb/af9015.c  Thu Nov 20 10:58:02 2008 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/af9015.c  Thu Nov 20 11:00:09 2008 -0200
@@ -680,12 +680,6 @@ static int af9015_download_firmware(stru
err(firmware boot failed:%d, ret);
goto error;
}
-
-   /* firmware is running, reconnect device in the usb bus */
-   req.cmd = RECONNECT_USB;
-   ret = af9015_rw_udev(udev, req);
-   if (ret)
-   err(reconnect failed: %d, ret);
 
 error:
return ret;
@@ -738,6 +732,16 @@ static int af9015_read_config(struct usb
  af9015_ir_table_mygictv;
af9015_config.ir_table_size =
  ARRAY_SIZE(af9015_ir_table_mygictv);
+   break;
+   case AF9015_REMOTE_DIGITTRADE_DVB_T:
+   af9015_properties[i].rc_key_map =
+ af9015_rc_keys_digittrade;
+   af9015_properties[i].rc_key_map_size =
+ ARRAY_SIZE(af9015_rc_keys_digittrade);
+   af9015_config.ir_table =
+ af9015_ir_table_digittrade;
+   af9015_config.ir_table_size =
+ ARRAY_SIZE(af9015_ir_table_digittrade);
break;
}
} else {
@@ -1219,6 +1223,7 @@ static struct dvb_usb_device_properties 
.usb_ctrl = DEVICE_SPECIFIC,
.download_firmware = af9015_download_firmware,
.firmware = dvb-usb-af9015.fw,
+   .no_reconnect = 1,
 
.size_of_priv = sizeof(struct af9015_state), \
 
@@ -1317,6 +1322,7 @@ static struct dvb_usb_device_properties 
.usb_ctrl = DEVICE_SPECIFIC,
.download_firmware = af9015_download_firmware,
.firmware = dvb-usb-af9015.fw,
+   .no_reconnect = 1,
 
.size_of_priv = sizeof(struct af9015_state), \
 
diff -r 97a734555057 -r 2642ea0d2c54 linux/drivers/media/dvb/dvb-usb/af9015.h
--- a/linux/drivers/media/dvb/dvb-usb/af9015.h  Thu Nov 20 10:58:02 2008 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/af9015.h  Thu Nov 20 11:00:09 2008 -0200
@@ -123,6 +123,7 @@ enum af9015_remote {
AF9015_REMOTE_A_LINK_DTU_M,
AF9015_REMOTE_MSI_DIGIVOX_MINI_II_V3,
AF9015_REMOTE_MYGICTV_U718,
+   AF9015_REMOTE_DIGITTRADE_DVB_T,
 };
 
 /* Leadtek WinFast DTV Dongle Gold */
@@ -596,4 +597,67 @@ static u8 af9015_ir_table_avermedia[] = 
0x03, 0xfc, 0x03, 0xfc, 0x0e, 0x05, 0x00,
 };
 
+/* Digittrade DVB-T USB Stick */
+static struct dvb_usb_rc_key af9015_rc_keys_digittrade[] = {
+   { 0x01, 0x0f, KEY_LAST },   /* RETURN */
+   { 0x05, 0x17, KEY_TEXT },   /* TELETEXT */
+   { 0x01, 0x08, KEY_EPG },/* EPG */
+   { 0x05, 0x13, KEY_POWER },  /* POWER */
+   { 0x01, 0x09, KEY_ZOOM },   /* FULLSCREEN */
+   { 0x00, 0x40, KEY_AUDIO },  /* DUAL SOUND */
+   { 0x00, 0x2c, KEY_PRINT },  /* SNAPSHOT */
+   { 0x05, 0x16, KEY_SUBTITLE },   /* SUBTITLE */
+   { 0x00, 0x52, KEY_CHANNELUP },  /* CH Up */
+   { 0x00, 0x51, KEY_CHANNELDOWN },/* Ch Dn */
+   { 0x00, 0x57, KEY_VOLUMEUP },   /* Vol Up */
+   { 0x00, 0x56, KEY_VOLUMEDOWN }, /* Vol Dn */
+   { 0x01, 0x10, KEY_MUTE },   /* MUTE */
+   { 0x00, 0x27, KEY_0 },
+   { 0x00, 0x1e, KEY_1 },
+   { 0x00, 0x1f, KEY_2 },
+   { 0x00, 0x20, KEY_3 },
+   { 0x00, 0x21, KEY_4 },
+   { 0x00, 0x22, KEY_5 },
+   { 0x00, 0x23, KEY_6 },
+   { 0x00, 0x24, KEY_7 },
+   { 0x00, 0x25, KEY_8 },
+   { 0x00, 0x26, KEY_9 },
+   { 0x01, 0x17, KEY_PLAYPAUSE },  /* TIMESHIFT */
+   { 0x01, 0x15, KEY_RECORD }, /* RECORD */
+   { 0x03, 0x13, KEY_PLAY },   /* PLAY */
+   { 0x01, 0x16, KEY_STOP },   /* STOP */
+   { 0x01, 0x13, KEY_PAUSE },  /* PAUSE */
+};
+

[linuxtv-commits] [hg:v4l-dvb] em28xx: fix a race condition with hald

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9668 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: fix a race condition with hald


Newer versions of hald tries to open it to call QUERYCAP.

Due to the lack of a proper locking, it is possible to open the device
before it finishes initialization.

This patch adds a lock to avoid this risk, and to protect the list of
em28xx devices.

While here, remove the uneeded BKL lock.

Priority: high

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-video.c |  129 +---
 1 file changed, 76 insertions(+), 53 deletions(-)

diff -r fa01a2198f7f -r 207c91177b60 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Fri Nov 14 01:03:00 
2008 +
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Nov 20 11:30:26 
2008 -0200
@@ -73,6 +73,7 @@ MODULE_LICENSE(GPL);
 MODULE_LICENSE(GPL);
 
 static LIST_HEAD(em28xx_devlist);
+static DEFINE_MUTEX(em28xx_devlist_mutex);
 
 static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
 static unsigned int video_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
@@ -1562,7 +1563,7 @@ static int em28xx_v4l2_open(struct inode
struct em28xx_fh *fh;
enum v4l2_buf_type fh_type = 0;
 
-   lock_kernel();
+   mutex_lock(em28xx_devlist_mutex);
list_for_each_entry(h, em28xx_devlist, devlist) {
if (h-vdev-minor == minor) {
dev  = h;
@@ -1578,10 +1579,11 @@ static int em28xx_v4l2_open(struct inode
dev   = h;
}
}
-   if (NULL == dev) {
-   unlock_kernel();
+   mutex_unlock(em28xx_devlist_mutex);
+   if (NULL == dev)
return -ENODEV;
-   }
+
+   mutex_lock(dev-lock);
 
em28xx_videodbg(open minor=%d type=%s users=%d\n,
minor, v4l2_type_names[fh_type], dev-users);
@@ -1590,6 +1592,7 @@ static int em28xx_v4l2_open(struct inode
errCode = em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
if (errCode  0) {
em28xx_errdev(Device locked on digital mode. Can't open 
analog\n);
+   mutex_unlock(dev-lock);
return -EBUSY;
}
 #endif
@@ -1597,10 +1600,9 @@ static int em28xx_v4l2_open(struct inode
fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
if (!fh) {
em28xx_errdev(em28xx-video.c: Out of memory?!\n);
-   unlock_kernel();
+   mutex_unlock(dev-lock);
return -ENOMEM;
}
-   mutex_lock(dev-lock);
fh-dev = dev;
fh-radio = radio;
fh-type = fh_type;
@@ -1641,7 +1643,6 @@ static int em28xx_v4l2_open(struct inode
sizeof(struct em28xx_buffer), fh);
 
mutex_unlock(dev-lock);
-   unlock_kernel();
 
return errCode;
 }
@@ -1939,6 +1940,7 @@ int em28xx_register_extension(struct em2
 {
struct em28xx *dev = NULL;
 
+   mutex_lock(em28xx_devlist_mutex);
mutex_lock(em28xx_extension_devlist_lock);
list_add_tail(ops-next, em28xx_extension_devlist);
list_for_each_entry(dev, em28xx_devlist, devlist) {
@@ -1947,6 +1949,7 @@ int em28xx_register_extension(struct em2
}
printk(KERN_INFO Em28xx: Initialized (%s) extension\n, ops-name);
mutex_unlock(em28xx_extension_devlist_lock);
+   mutex_unlock(em28xx_devlist_mutex);
return 0;
 }
 EXPORT_SYMBOL(em28xx_register_extension);
@@ -1955,6 +1958,7 @@ void em28xx_unregister_extension(struct 
 {
struct em28xx *dev = NULL;
 
+   mutex_lock(em28xx_devlist_mutex);
list_for_each_entry(dev, em28xx_devlist, devlist) {
if (dev)
ops-fini(dev);
@@ -1964,6 +1968,7 @@ void em28xx_unregister_extension(struct 
printk(KERN_INFO Em28xx: Removed (%s) extension\n, ops-name);
list_del(ops-next);
mutex_unlock(em28xx_extension_devlist_lock);
+   mutex_unlock(em28xx_devlist_mutex);
 }
 EXPORT_SYMBOL(em28xx_unregister_extension);
 
@@ -1988,6 +1993,60 @@ static struct video_device *em28xx_vdev_
return vfd;
 }
 
+static int register_analog_devices(struct em28xx *dev)
+{
+   int ret;
+
+   /* allocate and fill video video_device struct */
+   dev-vdev = em28xx_vdev_init(dev, em28xx_video_template, video);
+   if (!dev-vdev) {
+   em28xx_errdev(cannot allocate video_device.\n);
+   return -ENODEV;
+   }
+
+   /* register 

[linuxtv-commits] [hg:v4l-dvb] em28xx: allow specifying audio output

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9670 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: allow specifying audio output


Some boards use different AC97 setups for output. This patch adds the
capability of specifying the output to be used. Currently, only one
output is selected, but the better is to allow user to select it via a
mixer, on alsa driver.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c  |   24 +---
 linux/drivers/media/video/em28xx/em28xx-video.c |   48 
 linux/drivers/media/video/em28xx/em28xx.h   |   10 +++
 3 files changed, 63 insertions(+), 19 deletions(-)

diff -r 9f81a34b0cf2 -r 7bcc09596608 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 13:10:44 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 13:40:51 
2008 -0200
@@ -388,9 +388,17 @@ static int em28xx_set_audio_source(struc
return ret;
 }
 
+static int outputs[] = {
+   [EM28XX_AOUT_MASTER] = AC97_MASTER_VOL,
+   [EM28XX_AOUT_LINE]   = AC97_LINE_LEVEL_VOL,
+   [EM28XX_AOUT_MONO]   = AC97_MASTER_MONO_VOL,
+   [EM28XX_AOUT_LFE]= AC97_LFE_MASTER_VOL,
+   [EM28XX_AOUT_SURR]   = AC97_SURR_MASTER_VOL,
+};
+
 int em28xx_audio_analog_set(struct em28xx *dev)
 {
-   int ret;
+   int ret, i;
u8 xclk = 0x07;
 
if (!dev-audio_mode.has_audio)
@@ -400,11 +408,13 @@ int em28xx_audio_analog_set(struct em28x
   It would be possible to use also line output.
 */
if (dev-audio_mode.ac97 != EM28XX_NO_AC97) {
-   /* Mute */
-   ret = em28xx_write_ac97(dev, AC97_MASTER_VOL, 0x8000);
-
-   if (ret  0)
-   return ret;
+   /* Mute all outputs */
+   for (i = 0; i  ARRAY_SIZE(outputs); i++) {
+   ret = em28xx_write_ac97(dev, outputs[i], 0x8000);
+   if (ret  0)
+   em28xx_warn(couldn't setup AC97 register %d\n,
+outputs[i]);
+   }
}
 
if (dev-has_12mhz_i2s)
@@ -433,7 +443,7 @@ int em28xx_audio_analog_set(struct em28x
vol |= 0x8000;
 
/* Sets volume */
-   ret = em28xx_write_ac97(dev, AC97_MASTER_VOL, vol);
+   ret = em28xx_write_ac97(dev, outputs[dev-ctl_aoutput], vol);
}
 
return ret;
diff -r 9f81a34b0cf2 -r 7bcc09596608 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Nov 20 13:10:44 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Nov 20 13:40:51 
2008 -0200
@@ -571,6 +571,7 @@ static void video_mux(struct em28xx *dev
route.output = 0;
dev-ctl_input = index;
dev-ctl_ainput = INPUT(index)-amux;
+   dev-ctl_aoutput = INPUT(index)-aout;
 
em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, route);
 
@@ -933,20 +934,38 @@ static int vidioc_g_audio(struct file *f
 {
struct em28xx_fh   *fh= priv;
struct em28xx  *dev   = fh-dev;
-   unsigned intindex = a-index;
-
-   if (a-index  1)
-   return -EINVAL;
-
-   index = dev-ctl_ainput;
-
-   if (index == 0)
+
+   switch (a-index) {
+   case EM28XX_AMUX_VIDEO:
strcpy(a-name, Television);
-   else
+   break;
+   case EM28XX_AMUX_LINE_IN:
strcpy(a-name, Line In);
-
+   break;
+   case EM28XX_AMUX_VIDEO2:
+   strcpy(a-name, Television alt);
+   break;
+   case EM28XX_AMUX_PHONE:
+   strcpy(a-name, Phone);
+   break;
+   case EM28XX_AMUX_MIC:
+   strcpy(a-name, Mic);
+   break;
+   case EM28XX_AMUX_CD:
+   strcpy(a-name, CD);
+   break;
+   case EM28XX_AMUX_AUX:
+   strcpy(a-name, Aux);
+   break;
+   case EM28XX_AMUX_PCM_OUT:
+   strcpy(a-name, PCM);
+   break;
+   default:
+   return -EINVAL;
+   }
+
+   a-index = dev-ctl_ainput;
a-capability = V4L2_AUDCAP_STEREO;
-   a-index = index;
 
return 0;
 }
@@ -956,9 +975,14 @@ static int vidioc_s_audio(struct file *f
struct em28xx_fh   *fh  = priv;
struct em28xx  *dev = fh-dev;
 
+#if 0
+   /* Doesn't allow manual routing */
if 

[linuxtv-commits] [hg:v4l-dvb] em28xx: Fix a stupid cut-and-paste error

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9669 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: Fix a stupid cut-and-paste error


Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 207c91177b60 -r 9f81a34b0cf2 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 11:30:26 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 13:10:44 
2008 -0200
@@ -328,7 +328,7 @@ static int set_ac97_input(struct em28xx 
   em28xx should point to LINE IN, while AC97 should use VIDEO
 */
if (amux == EM28XX_AMUX_VIDEO2)
-   amux = dev-ctl_ainput;
+   amux = EM28XX_AMUX_VIDEO;
 
/* Mute all entres but the one that were selected */
for (i = 0; i  ARRAY_SIZE(inputs); i++) {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/9f81a34b0cf21da3472220dddf41686260fee7f9

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Allow opening more than one output at the same time

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9672 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Allow opening more than one output at the same time


Some devices use more than one AC97 outputs. This patch allows such
devices to properly work.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-core.c  |   33 +---
 linux/drivers/media/video/em28xx/em28xx-video.c |6 ++
 linux/drivers/media/video/em28xx/em28xx.h   |   10 ++--
 3 files changed, 31 insertions(+), 18 deletions(-)

diff -r d3ce443c1932 -r 846cc64b1f59 
linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 13:49:33 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.cThu Nov 20 14:39:39 
2008 -0200
@@ -304,12 +304,12 @@ static int em28xx_write_ac97(struct em28
return 0;
 }
 
-struct em28xx_input_table {
-   enum em28xx_amux amux;
+struct em28xx_vol_table {
+   enum em28xx_amux mux;
u8   reg;
 };
 
-static struct em28xx_input_table inputs[] = {
+static struct em28xx_vol_table inputs[] = {
{ EM28XX_AMUX_VIDEO,AC97_VIDEO_VOL   },
{ EM28XX_AMUX_LINE_IN,  AC97_LINEIN_VOL  },
{ EM28XX_AMUX_PHONE,AC97_PHONE_VOL   },
@@ -332,7 +332,7 @@ static int set_ac97_input(struct em28xx 
 
/* Mute all entres but the one that were selected */
for (i = 0; i  ARRAY_SIZE(inputs); i++) {
-   if (amux == inputs[i].amux)
+   if (amux == inputs[i].mux)
ret = em28xx_write_ac97(dev, inputs[i].reg, 0x0808);
else
ret = em28xx_write_ac97(dev, inputs[i].reg, 0x8000);
@@ -388,12 +388,12 @@ static int em28xx_set_audio_source(struc
return ret;
 }
 
-static int outputs[] = {
-   [EM28XX_AOUT_MASTER] = AC97_MASTER_VOL,
-   [EM28XX_AOUT_LINE]   = AC97_LINE_LEVEL_VOL,
-   [EM28XX_AOUT_MONO]   = AC97_MASTER_MONO_VOL,
-   [EM28XX_AOUT_LFE]= AC97_LFE_MASTER_VOL,
-   [EM28XX_AOUT_SURR]   = AC97_SURR_MASTER_VOL,
+struct em28xx_vol_table outputs[] = {
+   { EM28XX_AOUT_MASTER, AC97_MASTER_VOL  },
+   { EM28XX_AOUT_LINE,   AC97_LINE_LEVEL_VOL  },
+   { EM28XX_AOUT_MONO,   AC97_MASTER_MONO_VOL },
+   { EM28XX_AOUT_LFE,AC97_LFE_MASTER_VOL  },
+   { EM28XX_AOUT_SURR,   AC97_SURR_MASTER_VOL },
 };
 
 int em28xx_audio_analog_set(struct em28xx *dev)
@@ -410,10 +410,10 @@ int em28xx_audio_analog_set(struct em28x
if (dev-audio_mode.ac97 != EM28XX_NO_AC97) {
/* Mute all outputs */
for (i = 0; i  ARRAY_SIZE(outputs); i++) {
-   ret = em28xx_write_ac97(dev, outputs[i], 0x8000);
+   ret = em28xx_write_ac97(dev, outputs[i].reg, 0x8000);
if (ret  0)
em28xx_warn(couldn't setup AC97 register %d\n,
-outputs[i]);
+outputs[i].reg);
}
}
 
@@ -443,7 +443,14 @@ int em28xx_audio_analog_set(struct em28x
vol |= 0x8000;
 
/* Sets volume */
-   ret = em28xx_write_ac97(dev, outputs[dev-ctl_aoutput], vol);
+   for (i = 0; i  ARRAY_SIZE(outputs); i++) {
+   if (dev-ctl_aoutput  outputs[i].mux)
+   ret = em28xx_write_ac97(dev, outputs[i].reg,
+   vol);
+   if (ret  0)
+   em28xx_warn(couldn't setup AC97 register %d\n,
+outputs[i].reg);
+   }
}
 
return ret;
diff -r d3ce443c1932 -r 846cc64b1f59 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Nov 20 13:49:33 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Thu Nov 20 14:39:39 
2008 -0200
@@ -572,6 +572,9 @@ static void video_mux(struct em28xx *dev
dev-ctl_input = index;
dev-ctl_ainput = INPUT(index)-amux;
dev-ctl_aoutput = INPUT(index)-aout;
+
+   if (!dev-ctl_aoutput)
+   dev-ctl_aoutput = EM28XX_AOUT_MASTER;
 
em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, route);
 
@@ -982,6 +985,9 @@ static int vidioc_s_audio(struct file *f
 #else
dev-ctl_ainput = INPUT(a-index)-amux;
dev-ctl_aoutput = INPUT(a-index)-aout;
+
+   if (!dev-ctl_aoutput)
+   

[linuxtv-commits] [hg:v4l-dvb] em28xx: fix Pixelview PlayTV board entry

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9673 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: fix Pixelview PlayTV board entry


Pixelview uses a Sigmatel stac codec. It has an external line out pin,
connected to AC97_MASTER_VOL. It also provides I2S output, but using a

---

 linux/drivers/media/video/em28xx/em28xx-cards.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

different volume for this (AC97_MONO_VOL).

Now that AC97 setup is finally fixed, such boards will work better.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]

diff -r 846cc64b1f59 -r d36abc5f03e5 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 14:39:39 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 14:43:05 
2008 -0200
@@ -848,7 +848,9 @@ struct em28xx_board em28xx_boards[] = {
.input  = { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = SAA7115_COMPOSITE2,
-   .amux = EM28XX_AMUX_LINE_IN,
+   .amux = EM28XX_AMUX_VIDEO,
+   .aout = EM28XX_AOUT_MONO |  /* I2S */
+   EM28XX_AOUT_MASTER, /* Line out pin */
}, {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = SAA7115_COMPOSITE0,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/d36abc5f03e543728870f57c1583eda000f21caf

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx: fix a regression caused by changeset 9630

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9676 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: fix a regression caused by changeset 9630


If removing and reiserting the driver on some devices, tuner type will
be unset at the second time. This patch fixes this issue.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -r 5589df6f7483 -r 602d3ac1f476 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 19:38:29 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 19:47:37 
2008 -0200
@@ -1806,7 +1806,8 @@ void em28xx_card_setup(struct em28xx *de
em28xx_set_model(dev);
 
dev-tuner_type = em28xx_boards[dev-model].tuner_type;
-   dev-tuner_addr = em28xx_boards[dev-model].tuner_addr;
+   if (em28xx_boards[dev-model].tuner_addr)
+   dev-tuner_addr = em28xx_boards[dev-model].tuner_addr;
 
/* request some modules */
switch (dev-model) {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/602d3ac1f4764384e1b03a9ff8630955445136d5

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx: devices with xc2028/3028 don't have tda9887

2008-11-20 Thread Patch from Mauro Carvalho Chehab
The patch number 9675 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: devices with xc2028/3028 don't have tda9887


This patch cleans up the entries of xc2028/3028, since those devices
don't need or use a tda9887.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-cards.c |5 -
 1 file changed, 5 deletions(-)

diff -r 9470671cf3d8 -r 5589df6f7483 
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 14:53:42 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c   Thu Nov 20 19:38:29 
2008 -0200
@@ -588,7 +588,6 @@ struct em28xx_board em28xx_boards[] = {
[EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
.name   = Hauppauge WinTV HVR 950,
.vchannels  = 3,
-   .tda9887_conf   = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
.mts_firmware   = 1,
.has_12mhz_i2s  = 1,
@@ -612,7 +611,6 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
.name   = Pinnacle PCTV HD Pro Stick,
.vchannels  = 3,
-   .tda9887_conf   = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
.mts_firmware   = 1,
.has_12mhz_i2s  = 1,
@@ -636,7 +634,6 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
.name   = AMD ATI TV Wonder HD 600,
.vchannels  = 3,
-   .tda9887_conf   = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
.mts_firmware   = 1,
.has_12mhz_i2s  = 1,
@@ -660,7 +657,6 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_TERRATEC_HYBRID_XS] = {
.name = Terratec Hybrid XS,
.vchannels= 3,
-   .tda9887_conf = TDA9887_PRESENT,
.tuner_type   = TUNER_XC2028,
.decoder  = EM28XX_TVP5150,
.has_dvb= 1,
@@ -684,7 +680,6 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
.name = Terratec Prodigy XS,
.vchannels= 3,
-   .tda9887_conf = TDA9887_PRESENT,
.tuner_type   = TUNER_XC2028,
.decoder  = EM28XX_TVP5150,
.input  = { {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/5589df6f7483030571172486bf5f4c6ee265e1e0

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] em28xx: improve message probing logs

2008-11-22 Thread Patch from Mauro Carvalho Chehab
The patch number 9717 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
em28xx: improve message probing logs


On some em28xx devices, there's an unused interface. This is printed on
the logs as an error. We can just ignore that interface.

Priority: normal

Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/em28xx/em28xx-video.c |   40 ++--
 1 file changed, 26 insertions(+), 14 deletions(-)

diff -r 90deb49c4730 -r 1f8fb668c54b 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Sat Nov 22 11:39:10 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Sat Nov 22 11:50:38 
2008 -0200
@@ -2280,12 +2280,6 @@ static int em28xx_usb_probe(struct usb_i
return -ENODEV;
}
 
-   em28xx_err(DRIVER_NAME  new video device (%04x:%04x): interface %i, 
class %i\n,
-   udev-descriptor.idVendor,
-   udev-descriptor.idProduct,
-   ifnum,
-   interface-altsetting[0].desc.bInterfaceClass);
-
endpoint = interface-cur_altsetting-endpoint[0].desc;
 
/* check if the device has the iso in endpoint at the correct place */
@@ -2296,20 +2290,38 @@ static int em28xx_usb_probe(struct usb_i
/* It's a newer em2874/em2875 device */
isoc_pipe = 0;
} else {
+   int check_interface = 1;
isoc_pipe = 1;
endpoint = interface-cur_altsetting-endpoint[1].desc;
if ((endpoint-bmAttributes  USB_ENDPOINT_XFERTYPE_MASK) !=
-   USB_ENDPOINT_XFER_ISOC) {
-   em28xx_err(DRIVER_NAME  probing error: endpoint is 
non-ISO endpoint!\n);
+   USB_ENDPOINT_XFER_ISOC)
+   check_interface = 0;
+
+   if ((endpoint-bEndpointAddress  USB_ENDPOINT_DIR_MASK) == 
USB_DIR_OUT)
+   check_interface = 0;
+
+   if (!check_interface) {
+   em28xx_err(DRIVER_NAME  video device (%04x:%04x): 
+   interface %i, class %i found.\n,
+   udev-descriptor.idVendor,
+   udev-descriptor.idProduct,
+   ifnum,
+   interface-altsetting[0].desc.bInterfaceClass);
+
+   em28xx_err(DRIVER_NAME  This is an anciliary 
+   interface not used by the driver\n);
+
em28xx_devused = ~(1nr);
return -ENODEV;
}
-   if ((endpoint-bEndpointAddress  USB_ENDPOINT_DIR_MASK) == 
USB_DIR_OUT) {
-   em28xx_err(DRIVER_NAME  probing error: endpoint is ISO 
OUT endpoint!\n);
-   em28xx_devused = ~(1nr);
-   return -ENODEV;
-   }
-   }
+
+   }
+
+   em28xx_err(DRIVER_NAME  new video device (%04x:%04x): interface %i, 
class %i\n,
+   udev-descriptor.idVendor,
+   udev-descriptor.idProduct,
+   ifnum,
+   interface-altsetting[0].desc.bInterfaceClass);
 
if (nr = EM28XX_MAXBOARDS) {
printk(DRIVER_NAME : Supports only %i em28xx boards.\n,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1f8fb668c54b952f9ead9d93a4278b3ef76e8353

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


<    1   2   3   4   5   6   7   8   9   10   >