[linuxtv-commits] [hg:v4l-dvb] saa7134: remove explicit GPIO initialization

2008-05-12 Thread Patch from Hartmut Hackmann
The patch number 7880 was added via Hartmut Hackmann [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: Hartmut Hackmann  [EMAIL PROTECTED]
saa7134: remove explicit GPIO initialization


This causes a problem with the audio mute on some cards and is done
implictly in the audio initialization code.

Signed-off-by: Hartmut Hackmann [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-core.c |5 -
 1 file changed, 5 deletions(-)

diff -r d8763840 -r 779169257208 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Thu May 01 03:23:23 
2008 -0400
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Fri May 09 00:57:20 
2008 +0200
@@ -1161,11 +1161,6 @@ static int __devinit saa7134_initdev(str
if (TUNER_ABSENT != dev-tuner_type)
saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
 
-   if (card(dev).gpiomask != 0) {
-   mask = card(dev).gpiomask;
-   saa_andorl(SAA7134_GPIO_GPMODE0  2,   mask, mask);
-   saa_andorl(SAA7134_GPIO_GPSTATUS0  2, mask, 0);
-   }
return 0;
 
  fail4:


---

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

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


[linuxtv-commits] [hg:v4l-dvb] saa7134: fixed a compile warning in saa7134-core.c

2008-05-12 Thread Patch from Hartmut Hackmann
The patch number 7881 was added via Hartmut Hackmann [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: Hartmut Hackmann  [EMAIL PROTECTED]
saa7134: fixed a compile warning in saa7134-core.c


patch 779169257208 made the variable mask unnecessary.
This patch just removes the declaration.

Signed-off-by: Hartmut Hackmann [EMAIL PROTECTED]


---

 linux/drivers/media/video/saa7134/saa7134-core.c |1 -
 1 file changed, 1 deletion(-)

diff -r 779169257208 -r f607168a7196 
linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c  Fri May 09 00:57:20 
2008 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c  Mon May 12 22:34:02 
2008 +0200
@@ -960,7 +960,6 @@ static int __devinit saa7134_initdev(str
struct saa7134_dev *dev;
struct saa7134_mpeg_ops *mops;
int err;
-   int mask;
 
if (saa7134_devcount == SAA7134_MAXBOARDS)
return -ENOMEM;


---

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

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


[linuxtv-commits] [hg:v4l-dvb] cx18: fix Compro H900 analog support.

2008-05-12 Thread Patch from Hans Verkuil
The patch number 7887 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
cx18: fix Compro H900 analog support.


Tuner, S-Video and Composite are all working for the Compro H900.

Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-cards.c |   12 ++--
 linux/drivers/media/video/cx18/cx18-cards.h |5 +
 linux/drivers/media/video/cx18/cx18-gpio.c  |   53 
 3 files changed, 42 insertions(+), 28 deletions(-)

diff -r 97257fd1cc7c -r 5d78d128 linux/drivers/media/video/cx18/cx18-cards.c
--- a/linux/drivers/media/video/cx18/cx18-cards.c   Mon May 12 13:53:10 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-cards.c   Mon May 12 15:57:18 
2008 +0200
@@ -135,14 +135,15 @@ static const struct cx18_card cx18_card_
 static const struct cx18_card cx18_card_h900 = {
.type = CX18_CARD_COMPRO_H900,
.name = Compro VideoMate H900,
-   .comment = Not yet supported!\n,
-   .v4l2_capabilities = 0,
+   .comment = DVB  VBI are not yet supported\n,
+   .v4l2_capabilities = CX18_CAP_ENCODER,
.hw_audio_ctrl = CX18_HW_CX23418,
.hw_all = CX18_HW_TUNER,
.video_inputs = {
-   { CX18_CARD_INPUT_VID_TUNER,  0, CX23418_COMPOSITE7 },
-   { CX18_CARD_INPUT_SVIDEO1,1, CX23418_SVIDEO1},
-   { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 },
+   { CX18_CARD_INPUT_VID_TUNER,  0, CX23418_COMPOSITE2 },
+   { CX18_CARD_INPUT_SVIDEO1,1,
+   CX23418_SVIDEO_LUMA3 | CX23418_SVIDEO_CHROMA4 },
+   { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE1 },
},
.audio_inputs = {
{ CX18_CARD_INPUT_AUD_TUNER,
@@ -164,6 +165,7 @@ static const struct cx18_card cx18_card_
.tune_lane = 0,
.initial_emrs = 0,
},
+   .xceive_pin = 15,
.pci_list = cx18_pci_h900,
.i2c = cx18_i2c_std,
 };
diff -r 97257fd1cc7c -r 5d78d128 linux/drivers/media/video/cx18/cx18-cards.h
--- a/linux/drivers/media/video/cx18/cx18-cards.h   Mon May 12 13:53:10 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-cards.h   Mon May 12 15:57:18 
2008 +0200
@@ -114,8 +114,8 @@ struct cx18_card_pci_info {
 /* The mask is the set of bits used by the operation */
 
 struct cx18_gpio_init { /* set initial GPIO DIR and OUT values */
-   u16 direction;  /* DIR setting. Leave to 0 if no init is needed */
-   u16 initial_value;
+   u32 direction;  /* DIR setting. Leave to 0 if no init is needed */
+   u32 initial_value;
 };
 
 struct cx18_card_tuner {
@@ -153,6 +153,7 @@ struct cx18_card {
struct cx18_card_audio_input radio_input;
 
/* GPIO card-specific settings */
+   u8 xceive_pin;  /* XCeive tuner GPIO reset pin */
struct cx18_gpio_init   gpio_init;
 
struct cx18_card_tuner tuners[CX18_CARD_MAX_TUNERS];
diff -r 97257fd1cc7c -r 5d78d128 linux/drivers/media/video/cx18/cx18-gpio.c
--- a/linux/drivers/media/video/cx18/cx18-gpio.cMon May 12 13:53:10 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-gpio.cMon May 12 15:57:18 
2008 +0200
@@ -35,6 +35,9 @@
 #define CX18_REG_GPIO_OUT2   0xc78104
 #define CX18_REG_GPIO_DIR2   0xc7810c
 
+static u32 gpio_dir;
+static u32 gpio_val;
+
 /*
  * HVR-1600 GPIO pins, courtesy of Hauppauge:
  *
@@ -44,45 +47,53 @@
  * gpio13: cs5345 reset pin
 */
 
+static void gpio_write(struct cx18 *cx)
+{
+   write_reg((gpio_dir  0x)  16, CX18_REG_GPIO_DIR1);
+   write_reg(((gpio_dir  0x)  16) | (gpio_val  0x),
+   CX18_REG_GPIO_OUT1);
+   write_reg(gpio_dir  0x, CX18_REG_GPIO_DIR2);
+   write_reg((gpio_dir  0x) | ((gpio_val  0x)  16),
+   CX18_REG_GPIO_OUT2);
+}
+
 void cx18_gpio_init(struct cx18 *cx)
 {
-   if (cx-card-gpio_init.direction == 0)
+   gpio_dir = cx-card-gpio_init.direction;
+   gpio_val = cx-card-gpio_init.initial_value;
+
+   if (gpio_dir == 0)
return;
 
-   CX18_DEBUG_INFO(GPIO initial dir: %08x out: %08x\n,
-  read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_OUT1));
+   gpio_dir |= 1  cx-card-xceive_pin;
+   gpio_val |= 1  cx-card-xceive_pin;
 
-   /* init output data then direction */
-   write_reg(cx-card-gpio_init.direction  16, CX18_REG_GPIO_DIR1);
-   write_reg(0, CX18_REG_GPIO_DIR2);
-   write_reg((cx-card-gpio_init.direction  16) |
-   

[linuxtv-commits] [hg:v4l-dvb] cx18: minor card definition updates.

2008-05-12 Thread Patch from Hans Verkuil
The patch number 7888 was added via Hans Verkuil [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: Hans Verkuil  [EMAIL PROTECTED]
cx18: minor card definition updates.




Signed-off-by: Hans Verkuil [EMAIL PROTECTED]


---

 linux/drivers/media/video/cx18/cx18-cards.c |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff -r 5d78d128 -r 65d1012e149b linux/drivers/media/video/cx18/cx18-cards.c
--- a/linux/drivers/media/video/cx18/cx18-cards.c   Mon May 12 15:57:18 
2008 +0200
+++ b/linux/drivers/media/video/cx18/cx18-cards.c   Mon May 12 16:00:33 
2008 +0200
@@ -47,12 +47,12 @@ static const struct cx18_card cx18_card_
 static const struct cx18_card cx18_card_hvr1600_esmt = {
.type = CX18_CARD_HVR_1600_ESMT,
.name = Hauppauge HVR-1600,
-   .comment = DVB  VBI are not yet supported\n,
+   .comment = VBI is not yet supported\n,
.v4l2_capabilities = CX18_CAP_ENCODER,
.hw_audio_ctrl = CX18_HW_CX23418,
.hw_muxer = CX18_HW_CS5345,
-   .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | CX18_HW_CS5345
-   | CX18_HW_DVB,
+   .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER |
+ CX18_HW_CS5345 | CX18_HW_DVB,
.video_inputs = {
{ CX18_CARD_INPUT_VID_TUNER,  0, CX23418_COMPOSITE7 },
{ CX18_CARD_INPUT_SVIDEO1,1, CX23418_SVIDEO1},
@@ -203,8 +203,6 @@ static const struct cx18_card cx18_card_
/* XC3028 tuner */
{ .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
},
-   /* tuner reset */
-   .gpio_init = { .direction = 0x1000, .initial_value = 0x1000 },
.ddr = {
/* Probably Samsung K4D263238G-VC33 memory */
.chip_config = 0x003,
@@ -214,6 +212,7 @@ static const struct cx18_card cx18_card_
.tune_lane = 0,
.initial_emrs = 2,
},
+   .xceive_pin = 15,
.pci_list = cx18_pci_mpc718,
.i2c = cx18_i2c_std,
 };


---

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

___
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/xc5000

2008-05-12 Thread Patch from Mauro Carvalho Chehab
The patch number 7894 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/xc5000




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


---

 linux/drivers/media/common/tuners/xc5000.c  |9 +++---
 linux/drivers/media/common/tuners/xc5000.h  |   22 
 linux/drivers/media/common/tuners/xc5000_priv.h |2 +
 linux/drivers/media/video/au0828/au0828-dvb.c   |6 +---
 linux/drivers/media/video/cx23885/cx23885-dvb.c |6 +---
 linux/drivers/media/video/cx88/cx88-dvb.c   |   10 ++-
 linux/drivers/media/video/tuner-core.c  |4 +-
 7 files changed, 29 insertions(+), 30 deletions(-)

diff -r 1ef54d1daa8e -r 52dee89a50e3 linux/drivers/media/common/tuners/xc5000.c
--- a/linux/drivers/media/common/tuners/xc5000.cTue May 13 00:01:54 
2008 -0300
+++ b/linux/drivers/media/common/tuners/xc5000.cTue May 13 00:05:47 
2008 -0300
@@ -212,7 +212,7 @@ static void xc5000_TunerReset(struct dvb
dprintk(1, %s()\n, __func__);
 
if (priv-cfg-tuner_callback) {
-   ret = priv-cfg-tuner_callback(priv-cfg-priv,
+   ret = priv-cfg-tuner_callback(priv-devptr,
XC5000_TUNER_RESET, 0);
if (ret)
printk(KERN_ERR xc5000: reset failed\n);
@@ -919,9 +919,9 @@ static const struct dvb_tuner_ops xc5000
.get_status= xc5000_get_status
 };
 
-struct dvb_frontend * xc5000_attach(struct dvb_frontend *fe,
-   struct i2c_adapter *i2c,
-   struct xc5000_config *cfg)
+struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
+  struct i2c_adapter *i2c,
+  struct xc5000_config *cfg, void *devptr)
 {
struct xc5000_priv *priv = NULL;
u16 id = 0;
@@ -935,6 +935,7 @@ struct dvb_frontend * xc5000_attach(stru
priv-cfg = cfg;
priv-bandwidth = BANDWIDTH_6_MHZ;
priv-i2c = i2c;
+   priv-devptr = devptr;
 
/* Check if firmware has been loaded. It is possible that another
   instance of the driver has loaded the firmware.
diff -r 1ef54d1daa8e -r 52dee89a50e3 linux/drivers/media/common/tuners/xc5000.h
--- a/linux/drivers/media/common/tuners/xc5000.hTue May 13 00:01:54 
2008 -0300
+++ b/linux/drivers/media/common/tuners/xc5000.hTue May 13 00:05:47 
2008 -0300
@@ -31,29 +31,31 @@ struct xc5000_config {
u8   i2c_address;
u32  if_khz;
 
-   /* For each bridge framework, when it attaches either analog or digital,
-* it has to store a reference back to its _core equivalent structure,
-* so that it can service the hardware by steering gpio's etc.
-* Each bridge implementation is different so cast priv accordingly.
-* The xc5000 driver cares not for this value, other than ensuring
-* it's passed back to a bridge during tuner_callback().
-*/
-   void *priv;
int  (*tuner_callback) (void *priv, int command, int arg);
 };
 
 /* xc5000 callback command */
 #define XC5000_TUNER_RESET 0
 
+/* For each bridge framework, when it attaches either analog or digital,
+ * it has to store a reference back to its _core equivalent structure,
+ * so that it can service the hardware by steering gpio's etc.
+ * Each bridge implementation is different so cast devptr accordingly.
+ * The xc5000 driver cares not for this value, other than ensuring
+ * it's passed back to a bridge during tuner_callback().
+ */
+
 #if defined(CONFIG_MEDIA_TUNER_XC5000) || \
 (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE)  defined(MODULE))
 extern struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
  struct i2c_adapter *i2c,
- struct xc5000_config *cfg);
+ struct xc5000_config *cfg,
+ void *devptr);
 #else
 static inline struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe,
 struct i2c_adapter *i2c,
-struct xc5000_config *cfg)
+struct xc5000_config *cfg,
+void *devptr)
 {
printk(KERN_WARNING %s: driver disabled by Kconfig\n, __func__);
return NULL;
diff -r 1ef54d1daa8e -r 52dee89a50e3 
linux/drivers/media/common/tuners/xc5000_priv.h
---