From 6d4a3b8de8a3c9f1b5d470f8ff6fa30c59382cc6 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Fri, 9 Mar 2007 10:07:07 -0800 Subject: cx88: merge identical boards From: Trent Piepho The attach code for HAUPPAUGE_HVR3000 and HAUPPAUGE_HVR1300 is exactly the same as the code used by HAUPPAUGE_HVR1100, HAUPPAUGE_HVR1100LP, and WINFAST_DTV2000H. So, those first two cards are added to the case block used by the last three. Signed-off-by: Trent Piepho --- linux/drivers/media/video/cx88/cx88-dvb.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 2b24c27a6..2327b32fd 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -476,6 +476,8 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_WINFAST_DTV2000H: case CX88_BOARD_HAUPPAUGE_HVR1100: case CX88_BOARD_HAUPPAUGE_HVR1100LP: + case CX88_BOARD_HAUPPAUGE_HVR1300: + case CX88_BOARD_HAUPPAUGE_HVR3000: dev->dvb.frontend = dvb_attach(cx22702_attach, &hauppauge_hvr_config, &dev->core->i2c_adap); @@ -694,24 +696,6 @@ static int dvb_register(struct cx8802_dev *dev) dev->dvb.frontend->ops.set_voltage = geniatech_dvbs_set_voltage; } break; - case CX88_BOARD_HAUPPAUGE_HVR1300: - dev->dvb.frontend = dvb_attach(cx22702_attach, - &hauppauge_hvr_config, - &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, - &dev->core->i2c_adap, &dvb_pll_fmd1216me); - } - break; - case CX88_BOARD_HAUPPAUGE_HVR3000: - dev->dvb.frontend = dvb_attach(cx22702_attach, - &hauppauge_hvr_config, - &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, - &dev->core->i2c_adap, &dvb_pll_fmd1216me); - } - break; default: printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", dev->core->name); -- cgit v1.2.3 From 15daef71fb04bcd5f34f4576390141982b4907e8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 23 Mar 2007 18:53:18 -0300 Subject: Fix pll input logic for nxt200x/tuv1236d From: Mauro Carvalho Chehab This patch fixes a few troubles on nxt200x implementation: 1) A nxt200x internal input control logic were done on both cx88-dvb and saa7134-dvb; 2) The nx200x_set_pll_input callback were filling buffer, at the 5th position, without even testing if that buffer were filled; 3) a 5 byte buffer were written to the device, even if the buffer were not properly initialized by calc_regs. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-dvb.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 2327b32fd..10e2df75f 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -371,18 +371,9 @@ static int nxt200x_set_ts_param(struct dvb_frontend* fe, int is_punctured) return 0; } -static int nxt200x_set_pll_input(u8* buf, int input) -{ - if (input) - buf[3] |= 0x08; - else - buf[3] &= ~0x08; - return 0; -} - static struct nxt200x_config ati_hdtvwonder = { .demod_address = 0x0a, - .set_pll_input = nxt200x_set_pll_input, + .is_tuv1236d = 1, .set_ts_params = nxt200x_set_ts_param, }; -- cgit v1.2.3 From c72566b0b7d46f2f44806ce248c168c67b7418dd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 25 Mar 2007 12:04:18 -0300 Subject: Reverted changeset 5463 From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-dvb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 10e2df75f..2327b32fd 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -371,9 +371,18 @@ static int nxt200x_set_ts_param(struct dvb_frontend* fe, int is_punctured) return 0; } +static int nxt200x_set_pll_input(u8* buf, int input) +{ + if (input) + buf[3] |= 0x08; + else + buf[3] &= ~0x08; + return 0; +} + static struct nxt200x_config ati_hdtvwonder = { .demod_address = 0x0a, - .is_tuv1236d = 1, + .set_pll_input = nxt200x_set_pll_input, .set_ts_params = nxt200x_set_ts_param, }; -- cgit v1.2.3 From 796a8651acd1759db5223b03bdbfe43f94d7c11e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 28 Mar 2007 22:37:26 -0300 Subject: Use ARRAY_SIZE and a cleaner logic for initializing tuner From: Mauro Carvalho Chehab ATI HDTV Wonder needs to initialize some registers before allowing the tuner to start working. The current logic have lots of magic. This patch makes the code cleaner, using ARRAY_SIZE() for the initialization array and using a bidimensional array, instead of doing some stuff like: &buffer[i+2][0] Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-cards.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 774bcfed9..825334ef3 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1823,7 +1823,7 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core) { 0x03, 0x0C }, }; - for (i = 0; i < 13; i++) { + for (i = 0; i < ARRAY_SIZE(init_bufs); i++) { msg.buf = init_bufs[i]; msg.len = (i != 12 ? 5 : 2); err = i2c_transfer(&core->i2c_adap, &msg, 1); @@ -1950,12 +1950,21 @@ void cx88_card_setup(struct cx88_core *core) if (0 == core->i2c_rc) { /* enable tuner */ int i; - static const u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 }; + static const u8 buffer [][2] = { + {0x10,0x12}, + {0x13,0x04}, + {0x16,0x00}, + {0x14,0x04}, + {0x17,0x00} + }; core->i2c_client.addr = 0x0a; - for (i = 0; i < 5; i++) - if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2)) - printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n", + for (i = 0; i < ARRAY_SIZE(buffer); i++) + if (2 != i2c_master_send(&core->i2c_client, + buffer[i],2)) + printk(KERN_WARNING + "%s: Unable to enable " + "tuner(%i).\n", core->name, i); } break; -- cgit v1.2.3 From 396451756f52f81a20ee9099408b2b71192dae6f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 29 Mar 2007 08:42:30 -0300 Subject: Use ARRAY_SIZE instead of a magic number From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 2f60c957b..30fd0776a 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -1,3 +1,4 @@ + /* cx88-i2c.c -- all the i2c code is here @@ -206,7 +207,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) unsigned char buf; int i,rc; - for (i = 0; i < 128; i++) { + for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { c->addr = i; rc = i2c_master_recv(c,&buf,0); if (rc < 0) -- cgit v1.2.3 From 686ff7fe92d95c0906ed35c145fdc32dd49350c6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 29 Mar 2007 08:47:04 -0300 Subject: Fix cx88_print_irqbits calls to use ARRAY_SIZE From: Mauro Carvalho Chehab cx88_print_irqbits were expecting a string pointer with 32 bytes. Better to pass the string size and use ARRAY_SIZE on its calls. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 3 ++- linux/drivers/media/video/cx88/cx88-core.c | 8 ++++---- linux/drivers/media/video/cx88/cx88-mpeg.c | 3 ++- linux/drivers/media/video/cx88/cx88-video.c | 3 ++- linux/drivers/media/video/cx88/cx88.h | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index bf67ec27d..da5dc6817 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -257,7 +257,8 @@ static void cx8801_aud_irq(snd_cx88_card_t *chip) cx_write(MO_AUD_INTSTAT, status); if (debug > 1 || (status & mask & ~0xff)) cx88_print_irqbits(core->name, "irq aud", - cx88_aud_irqs, status, mask); + cx88_aud_irqs, ARRAY_SIZE(cx88_aud_irqs), + status, mask); /* risc op code error */ if (status & (1 << 16)) { printk(KERN_WARNING "%s/0: audio risc op code error\n",core->name); diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 367dc3c7b..ba132d065 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -524,12 +524,12 @@ static char *cx88_pci_irqs[32] = { }; void cx88_print_irqbits(char *name, char *tag, char **strings, - u32 bits, u32 mask) + int len, u32 bits, u32 mask) { unsigned int i; printk(KERN_DEBUG "%s: %s [0x%x]", name, tag, bits); - for (i = 0; i < 32; i++) { + for (i = 0; i < len; i++) { if (!(bits & (1 << i))) continue; if (strings[i]) @@ -555,8 +555,8 @@ int cx88_core_irq(struct cx88_core *core, u32 status) } if (!handled) cx88_print_irqbits(core->name, "irq pci", - cx88_pci_irqs, status, - core->pci_irqmask); + cx88_pci_irqs, ARRAY_SIZE(cx88_pci_irqs), + status, core->pci_irqmask); return handled; } diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index cb642ca03..ce4ab476b 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -405,7 +405,8 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev) if (debug || (status & mask & ~0xff)) cx88_print_irqbits(core->name, "irq mpeg ", - cx88_mpeg_irqs, status, mask); + cx88_mpeg_irqs, ARRAY_SIZE(cx88_mpeg_irqs), + status, mask); /* risc op code error */ if (status & (1 << 16)) { diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 2e6259ceb..6eb6c370b 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1836,7 +1836,8 @@ static void cx8800_vid_irq(struct cx8800_dev *dev) cx_write(MO_VID_INTSTAT, status); if (irq_debug || (status & mask & ~0xff)) cx88_print_irqbits(core->name, "irq vid", - cx88_vid_irqs, status, mask); + cx88_vid_irqs, ARRAY_SIZE(cx88_vid_irqs), + status, mask); /* risc op code error */ if (status & (1 << 16)) { diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 4719046e1..a35b46cab 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -545,7 +545,7 @@ struct cx8802_dev { /* cx88-core.c */ extern void cx88_print_irqbits(char *name, char *tag, char **strings, - u32 bits, u32 mask); + int len, u32 bits, u32 mask); extern int cx88_core_irq(struct cx88_core *core, u32 status); extern void cx88_wakeup(struct cx88_core *core, -- cgit v1.2.3 From 5e29e28718a80e08f3c6c920d162964c0d377f93 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 30 Mar 2007 10:58:01 -0300 Subject: Replace DMA magic mask for its aliases From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 2 +- linux/drivers/media/video/cx88/cx88-mpeg.c | 2 +- linux/drivers/media/video/cx88/cx88-video.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index da5dc6817..1cc8c372f 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -790,7 +790,7 @@ static int __devinit snd_cx88_create(struct snd_card *card, return err; } - if (!pci_dma_supported(pci,0xffffffff)) { + if (!pci_dma_supported(pci,DMA_32BIT_MASK)) { dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); err = -EIO; cx88_core_put(core,pci); diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index ce4ab476b..60bff8779 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -492,7 +492,7 @@ int cx8802_init_common(struct cx8802_dev *dev) if (pci_enable_device(dev->pci)) return -EIO; pci_set_master(dev->pci); - if (!pci_dma_supported(dev->pci,0xffffffff)) { + if (!pci_dma_supported(dev->pci,DMA_32BIT_MASK)) { printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); return -EIO; } diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 6eb6c370b..76af9fed6 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2068,7 +2068,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); pci_set_master(pci_dev); - if (!pci_dma_supported(pci_dev,0xffffffff)) { + if (!pci_dma_supported(pci_dev,DMA_32BIT_MASK)) { printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); err = -EIO; goto fail_core; -- cgit v1.2.3 From 16c93516480ddb3b9750a8963e2f29880c6d6bdb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 31 Mar 2007 10:34:59 -0300 Subject: Cx88: Support the DTV1000 T analog inputs From: Jean Delvare Add support for the S-Video and CVBS (composite) analog video inputs of the Leadtek WinFast DTV1000 T adapter. Signed-off-by: Jean Delvare Acked-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-cards.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 825334ef3..6be16512a 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -886,6 +886,12 @@ struct cx88_board cx88_boards[] = { .input = {{ .type = CX88_VMUX_DVB, .vmux = 0, + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, }}, .mpeg = CX88_MPEG_DVB, }, @@ -1955,14 +1961,14 @@ void cx88_card_setup(struct cx88_core *core) {0x13,0x04}, {0x16,0x00}, {0x14,0x04}, - {0x17,0x00} + {0x17,0x00} }; core->i2c_client.addr = 0x0a; for (i = 0; i < ARRAY_SIZE(buffer); i++) if (2 != i2c_master_send(&core->i2c_client, buffer[i],2)) - printk(KERN_WARNING + printk(KERN_WARNING "%s: Unable to enable " "tuner(%i).\n", core->name, i); -- cgit v1.2.3 From 0ad1bcbf3bb203b6371244f31044c2e68cabcd01 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 16 Apr 2007 10:34:33 -0300 Subject: Cx88-alsa.c: Use kzalloc From: vignesh.babu@wipro.com Replacing kmalloc/memset combination with kzalloc. Signed-off-by: vignesh babu Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 1cc8c372f..5091913d3 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -468,11 +468,9 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream, dprintk(1,"Setting buffer\n"); - buf = kmalloc(sizeof(*buf),GFP_KERNEL); + buf = kzalloc(sizeof(*buf),GFP_KERNEL); if (NULL == buf) return -ENOMEM; - memset(buf,0,sizeof(*buf)); - buf->vb.memory = V4L2_MEMORY_MMAP; buf->vb.width = chip->period_size; -- cgit v1.2.3 From 4ab7e7e5f0d2d8b0abcd7a23f6427c724a4d46bd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 19 Apr 2007 11:21:50 -0300 Subject: Fix support for Winfast TV2000 XP Global From: C.masoyras Fix GPIO to work with TV and Composite inputs. Signed-off-by: C.masoyras Signed-off-by: Alex Deucher Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-cards.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 6be16512a..7b1fb79b6 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -983,9 +983,17 @@ struct cx88_board cx88_boards[] = { .input = {{ .type = CX88_VMUX_TELEVISION, .vmux = 0, - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, + .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */ + .gpio1 = 0x0000, + .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */ + + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */ + .gpio1 = 0x0000, + .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */ + },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, -- cgit v1.2.3 From adfab19699a13f2ec485a48b1c6dc58c37a3b880 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 19 Apr 2007 17:07:20 -0300 Subject: Reverting changeset 294b550d74f4ad567dfa7079555ab16250cbd602 From: Mauro Carvalho Chehab This patch went applied at the wrong board. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-cards.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 7b1fb79b6..6be16512a 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -983,17 +983,9 @@ struct cx88_board cx88_boards[] = { .input = {{ .type = CX88_VMUX_TELEVISION, .vmux = 0, - .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */ - .gpio1 = 0x0000, - .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */ - - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, - .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */ - .gpio1 = 0x0000, - .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */ - + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, -- cgit v1.2.3 From fd53d3d2c2ad6a619e8c2f7ef884839f87dd4b3f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 1 May 2007 08:32:24 -0300 Subject: cx88: fix compilation on alpha From: Alexey Dobriyan error: 'DMA_32BIT_MASK' undeclared Signed-off-by: Alexey Dobriyan Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 1 + linux/drivers/media/video/cx88/cx88-mpeg.c | 1 + linux/drivers/media/video/cx88/cx88-video.c | 1 + 3 files changed, 3 insertions(+) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 5091913d3..7131e05a3 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 60bff8779..129dbfa3f 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -30,6 +30,7 @@ #include #endif #include +#include #include #include "cx88.h" diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 76af9fed6..9b8edf555 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -39,6 +39,7 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #include #endif +#include #include #include "cx88.h" -- cgit v1.2.3 From 8ea8194c2465db7679f0e0cd2aa9131294eed015 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 1 May 2007 08:35:10 -0300 Subject: Cx88-mpeg.c: make 2 functions static From: Adrian Bunk This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-mpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 129dbfa3f..861ac813e 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -671,7 +671,7 @@ struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board } /* Driver asked for hardware access. */ -int cx8802_request_acquire(struct cx8802_driver *drv) +static int cx8802_request_acquire(struct cx8802_driver *drv) { struct cx88_core *core = drv->core; @@ -691,7 +691,7 @@ int cx8802_request_acquire(struct cx8802_driver *drv) } /* Driver asked to release hardware. */ -int cx8802_request_release(struct cx8802_driver *drv) +static int cx8802_request_release(struct cx8802_driver *drv) { struct cx88_core *core = drv->core; -- cgit v1.2.3 From 9e77d37f02dfdf40e28145025105c9b0d8466a21 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 5 May 2007 11:05:39 -0400 Subject: dvb-pll: pass dvb_frontend_parameters to generic set() function From: Michael Krufky Rename dvb_pll_desc.setbw() to set(), and accept struct dvb_frontend_parameters instead of passing both freq and bandwidth, so that this may be used as a generic function. In order to do this, dvb_pll_configure must also be altered in the same manner, to take struct dvb_frontend_parameters instead of freq and bandwidth. Signed-off-by: Michael Krufky Signed-off-by: Trent Piepho --- linux/drivers/media/video/cx88/cx88-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 2327b32fd..24174f4cb 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -263,9 +263,7 @@ static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe, return err; /* Tune PLL */ - dvb_pll_configure(dev->core->pll_desc, buf, - params->frequency, - params->u.ofdm.bandwidth); + dvb_pll_configure(dev->core->pll_desc, buf, params); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { -- cgit v1.2.3 From a9131e180377070115d9d7d1aa4e76c5906a81fd Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 5 May 2007 11:15:57 -0400 Subject: tuv1236d: move rf input switching code into dvb-pll From: Michael Krufky This patch removes duplicate code from cx88-dvb and saa7134-dvb that handles rf input switching for the TUV1236d tuner. The functionality is added to dvb-pll, where all the other code that handles the TUV1236d is kept. Signed-off-by: Michael Krufky Signed-off-by: Trent Piepho --- linux/drivers/media/video/cx88/cx88-dvb.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 24174f4cb..f21156f07 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -369,18 +369,8 @@ static int nxt200x_set_ts_param(struct dvb_frontend* fe, int is_punctured) return 0; } -static int nxt200x_set_pll_input(u8* buf, int input) -{ - if (input) - buf[3] |= 0x08; - else - buf[3] &= ~0x08; - return 0; -} - static struct nxt200x_config ati_hdtvwonder = { .demod_address = 0x0a, - .set_pll_input = nxt200x_set_pll_input, .set_ts_params = nxt200x_set_ts_param, }; -- cgit v1.2.3 From e08fe9b085ccce13ce192a1351c8192f6a6cb60b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 7 May 2007 10:56:42 -0300 Subject: Cx88: Drop the generic i2c client from cx88-vp3054-i2c From: Jean Delvare Drop the generic client declared in cx88-vp3054-i2c: it's not used anywhere. This shrinks cx88-vp3054-i2c.o by 29% on x86_64. Unless it was there for later use? Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | 7 ------- linux/drivers/media/video/cx88/cx88-vp3054-i2c.h | 1 - 2 files changed, 8 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index 59802d9ee..dc97f4686 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -117,10 +117,6 @@ static struct i2c_adapter vp3054_i2c_adap_template = { .id = I2C_HW_B_CX2388x, }; -static struct i2c_client vp3054_i2c_client_template = { - .name = "VP-3054", -}; - int vp3054_i2c_probe(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; @@ -139,8 +135,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) sizeof(vp3054_i2c->adap)); memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template, sizeof(vp3054_i2c->algo)); - memcpy(&vp3054_i2c->client, &vp3054_i2c_client_template, - sizeof(vp3054_i2c->client)); #ifdef I2C_CLASS_TV_DIGITAL vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL; @@ -154,7 +148,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) vp3054_i2c->algo.data = dev; i2c_set_adapdata(&vp3054_i2c->adap, dev); vp3054_i2c->adap.algo_data = &vp3054_i2c->algo; - vp3054_i2c->client.adapter = &vp3054_i2c->adap; vp3054_bit_setscl(dev,1); vp3054_bit_setsda(dev,1); diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h index b7a0a04d2..637a7d232 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h @@ -26,7 +26,6 @@ struct vp3054_i2c_state { struct i2c_adapter adap; struct i2c_algo_bit_data algo; - struct i2c_client client; u32 state; }; -- cgit v1.2.3 From 363704d53733c9e4b39840dbe7bedb49a24addb0 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 5 May 2007 16:11:32 -0700 Subject: cx88: VP3054 support can't be a module when cx88 is compiled in From: Trent Piepho If cx88 support is compiled into the kernel while vp3054 is left as a module, the kernel will fail to link. Adjust the existing "#if" code in cx88 so that it won't consider vp3054 to be supported in this case. It might make sense to move vp3054 selection into the "customisation" menu instead of a cx88 sub-option (though this is a cx88 feature, there is no extra chip involved). It might also make sense to use dvb_attach() to load vp3054 support. Signed-off-by: Trent Piepho --- linux/drivers/media/video/cx88/cx88-dvb.c | 13 ++++--------- linux/drivers/media/video/cx88/cx88-vp3054-i2c.h | 7 +++++++ 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 2327b32fd..9b4fede71 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -36,9 +36,7 @@ #include "mt352.h" #include "mt352_priv.h" -#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) -# include "cx88-vp3054-i2c.h" -#endif +#include "cx88-vp3054-i2c.h" #include "zl10353.h" #include "cx22702.h" #include "or51132.h" @@ -200,7 +198,7 @@ static struct mt352_config dvico_fusionhdtv_dual = { .demod_init = dvico_dual_demod_init, }; -#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) { static u8 clock_config [] = { 0x89, 0x38, 0x38 }; @@ -545,7 +543,7 @@ static int dvb_register(struct cx8802_dev *dev) } break; case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: -#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) dev->core->pll_addr = 0x61; dev->core->pll_desc = &dvb_pll_fmd1216me; dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config, @@ -782,11 +780,10 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB)) goto fail_core; -#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) + /* If vp3054 isn't enabled, a stub will just return 0 */ err = vp3054_i2c_probe(dev); if (0 != err) goto fail_core; -#endif /* dvb stuff */ printk("%s/2: cx2388x based dvb card\n", core->name); @@ -811,9 +808,7 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv) /* dvb */ videobuf_dvb_unregister(&dev->dvb); -#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) vp3054_i2c_remove(dev); -#endif return 0; } diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h index 637a7d232..be99c931d 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h @@ -30,5 +30,12 @@ struct vp3054_i2c_state { }; /* ----------------------------------------------------------------------- */ +#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) int vp3054_i2c_probe(struct cx8802_dev *dev); void vp3054_i2c_remove(struct cx8802_dev *dev); +#else +static inline int vp3054_i2c_probe(struct cx8802_dev *dev) +{ return 0; } +static inline void vp3054_i2c_remove(struct cx8802_dev *dev) +{ } +#endif -- cgit v1.2.3 From 3518ff7214833cea053fef8e8a76f5ba5269e79f Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Tue, 8 May 2007 14:05:16 -0700 Subject: Integrate all users of the fmd1216 tuner with dvb-pll From: Trent Piepho Enhance the dvb-pll definition of the fmd1216 tuner by adding an init sequence and a sleep sequence. The init sequence sets the AGC control register to 0xa0, selecting the fast time constant and 112 dBuV take-over point. This the recommended value for DVB-T operation. The sleep sequence sets bit P4 (which is believed to turn the analog demodulator on), turns off the tuning voltage, and sets the AGC control register to 0x60 (external AGC voltage, the recommended value for analog operation). The existing dvb-pll users in the cx88 driver, listed below, will gain these init and sleep sequences. CX88_BOARD_HAUPPAUGE_HVR1100 Hauppauge WinTV-HVR1100 DVB-T/Hybrid CX88_BOARD_HAUPPAUGE_HVR1100LP Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profi CX88_BOARD_WINFAST_DTV2000H WinFast DTV2000 H CX88_BOARD_HAUPPAUGE_HVR3000 Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DV CX88_BOARD_HAUPPAUGE_HVR1300 Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encod This non-dvb-pll user in the cx88 driver should only gain the sleep sequence, as it already had an equivalent init sequence. The non-dvb-pll code for this user is removed. X88_BOARD_DNTV_LIVE_DVB_T_PRO digitalnow DNTV Live! DVB-T Pro In these saa7134 driver, these non-dvb-pll users are converted to use dvb-pll: SAA7134_BOARD_MD7134 Medion 7134 SAA7134_BOARD_ASUS_EUROPA2_HYBRID Asus Europa2 OEM The saa7134 functions philips_fmd1216_tuner_init(), philips_fmd1216_tuner_sleep(), and philips_fmd1216_tuner_set_params() are deleted and the dvb-pll versions are used. This should result in equivalent sleep, init, and tuning sequences being sent to the tuner. For the cxusb driver, only one board is effected: USB_PID_MEDION_MD95700 Medion MD95700 This board used dvb_usb_tuner_init_i2c() and dvb_usb_tuner_set_params_i2c() for init and tuning, respectively. These functions are effectively the same as the dvb-pll versions. They call a tuner pass control function defined at the dvb-usb level, but this does not matter, as this card does not have a tuner pass control function (only the dib3000mb does). This board will gain the sleep sequence, while init and tuning should be unchanged. Signed-off-by: Trent Piepho Signed-off-by: Michael Krufky --- linux/drivers/media/video/cx88/cx88-dvb.c | 61 +------------------------------ 1 file changed, 2 insertions(+), 59 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index f21156f07..ea9981403 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -224,62 +224,6 @@ static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) return 0; } -static int philips_fmd1216_pll_init(struct dvb_frontend *fe) -{ - struct cx8802_dev *dev= fe->dvb->priv; - - /* this message is to set up ATC and ALC */ - static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 }; - struct i2c_msg msg = - { .addr = dev->core->pll_addr, .flags = 0, - .buf = fmd1216_init, .len = sizeof(fmd1216_init) }; - int err; - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { - if (err < 0) - return err; - else - return -EREMOTEIO; - } - - return 0; -} - -static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters* params) -{ - struct cx8802_dev *dev= fe->dvb->priv; - u8 buf[4]; - struct i2c_msg msg = - { .addr = dev->core->pll_addr, .flags = 0, - .buf = buf, .len = 4 }; - int err; - - /* Switch PLL to DVB mode */ - err = philips_fmd1216_pll_init(fe); - if (err) - return err; - - /* Tune PLL */ - dvb_pll_configure(dev->core->pll_desc, buf, params); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { - - printk(KERN_WARNING "cx88-dvb: %s error " - "(addr %02x <- %02x, err = %i)\n", - __FUNCTION__, dev->core->pll_addr, buf[0], err); - if (err < 0) - return err; - else - return -EREMOTEIO; - } - - return 0; -} - static struct mt352_config dntv_live_dvbt_pro_config = { .demod_address = 0x0f, .no_tuner = 1, @@ -534,12 +478,11 @@ static int dvb_register(struct cx8802_dev *dev) break; case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: #if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE) - dev->core->pll_addr = 0x61; - dev->core->pll_desc = &dvb_pll_fmd1216me; dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config, &((struct vp3054_i2c_state *)dev->card_priv)->adap); if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; + dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, + &dev->core->i2c_adap, &dvb_pll_fmd1216me); } #else printk("%s: built without vp3054 support\n", dev->core->name); -- cgit v1.2.3 From 02e085b956ce32aa54ff3a2e938a0919ac75c643 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Tue, 8 May 2007 17:23:40 -0400 Subject: cx88: kill core->pll_desc and core->pll_addr From: Michael Krufky Now that dvb-pll is being used properly in all cx88-dvb instances, the cx88 driver no longer needs to store pll_desc nor pll_addr. Signed-off-by: Michael Krufky --- linux/drivers/media/video/cx88/cx88-dvb.c | 4 ---- linux/drivers/media/video/cx88/cx88.h | 2 -- 2 files changed, 6 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index ea9981403..62c599bf3 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -637,10 +637,6 @@ static int dvb_register(struct cx8802_dev *dev) return -1; } - if (dev->core->pll_desc) { - dev->dvb.frontend->ops.info.frequency_min = dev->core->pll_desc->min; - dev->dvb.frontend->ops.info.frequency_max = dev->core->pll_desc->max; - } /* Ensure all frontends negotiate bus access */ dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index a35b46cab..e71441c71 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -322,8 +322,6 @@ struct cx88_core { /* config info -- dvb */ #if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE) - struct dvb_pll_desc *pll_desc; - unsigned int pll_addr; int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage); #endif -- cgit v1.2.3 From df27d2f282dd8872faaba2c14151054802003482 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 13 May 2007 09:05:51 -0300 Subject: Backport kernel changeset e63340ae6b6205fef26b40a75673d1c9c0c8bb90 From: Mauro Carvalho Chehab kernel-sync: The original patch description, from Randy Dunlap : header cleaning: don't include smp_lock.h when not used Remove includes of where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-tvaudio.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index e65cf72af..7c2e9b9e1 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include "compat.h" #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -- cgit v1.2.3 From 0f65d0ff00289bf9ccb53c0b6acb63eb0e6f2984 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 13 May 2007 09:43:11 -0300 Subject: backport mainstream changeset 6473d160b4aba8023bcf38519a5989694dfd51a7 From: Mauro Carvalho Chehab kernel-sync: The original kernel patch is from Jean Delvare PCI: Cleanup the includes of Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-tvaudio.c | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 7c2e9b9e1..f69b4752d 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 2e1679b85048083df6e8456663b76eeb8581b241 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 13 May 2007 11:22:54 -0300 Subject: Backport several cleanups at includes From: Mauro Carvalho Chehab kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-alsa.c | 1 + linux/drivers/media/video/cx88/cx88-mpeg.c | 1 + linux/drivers/media/video/cx88/cx88-video.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 7131e05a3..a2d0abae6 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -28,6 +28,7 @@ #include #include #include + #include #include #include diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 861ac813e..bd5ed6760 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -29,6 +29,7 @@ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include #endif +#include #include #include #include diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 9b8edf555..612c8393f 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1,4 +1,3 @@ - /* * * device driver for Conexant 2388x based TV cards @@ -34,6 +33,7 @@ #include #include #include +#include #include #include "compat.h" #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -- cgit v1.2.3 From 282647fc6ca96307a1e740536bbe09d01185f33c Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 17 May 2007 17:10:17 -0400 Subject: cx88: add support for ADS Tech Instant Video PCI From: Daniel Gimpelevich Signed-off-by: Daniel Gimpelevich Signed-off-by: Michael Krufky --- linux/drivers/media/video/cx88/cx88-cards.c | 24 ++++++++++++++++++++++++ linux/drivers/media/video/cx88/cx88.h | 1 + 2 files changed, 25 insertions(+) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 6be16512a..ebde756b2 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1368,6 +1368,26 @@ struct cx88_board cx88_boards[] = { /* fixme: Add radio support */ .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD, }, + [CX88_BOARD_ADSTECH_PTV_390] = { + .name = "ADS Tech Instant Video PCI", + .tuner_type = TUNER_ABSENT, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .input = {{ + .type = CX88_VMUX_DEBUG, + .vmux = 3, + .gpio0 = 0x04ff, + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + .gpio0 = 0x07fa, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, + .gpio0 = 0x07fa, + }}, + }, }; const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); @@ -1674,6 +1694,10 @@ struct cx88_subid cx88_subids[] = { .subvendor = 0x1421, .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */ .card = CX88_BOARD_KWORLD_DVBS_100, + },{ + .subvendor = 0x1421, + .subdevice = 0x0390, + .card = CX88_BOARD_ADSTECH_PTV_390, }, }; const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index e71441c71..144c40410 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -212,6 +212,7 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_NORWOOD_MICRO 54 #define CX88_BOARD_TE_DTV_250_OEM_SWANN 55 #define CX88_BOARD_HAUPPAUGE_HVR1300 56 +#define CX88_BOARD_ADSTECH_PTV_390 57 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, -- cgit v1.2.3 From 37019a7d11c6cd4a51e9766830f6ed25e3e709d8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 21 May 2007 11:48:11 -0300 Subject: V4L: cx88 - switch to using msecs_to_jiffies() From: Dmitry Torokhov Signed-off-by: Dmitry Torokhov Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-input.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media/video/cx88') diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index 6c712ecdd..a2e34e901 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -157,24 +157,20 @@ static void cx88_ir_work(struct work_struct *work) #else struct cx88_IR *ir = container_of(work, struct cx88_IR, work); #endif - unsigned long timeout; cx88_ir_handle_key(ir); - timeout = jiffies + (ir->polling * HZ / 1000); - mod_timer(&ir->timer, timeout); + mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); } static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) { if (ir->polling) { + setup_timer(&ir->timer, ir_timer, (unsigned long)ir); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&ir->work, cx88_ir_work, ir); #else INIT_WORK(&ir->work, cx88_ir_work); #endif - init_timer(&ir->timer); - ir->timer.function = ir_timer; - ir->timer.data = (unsigned long)ir; schedule_work(&ir->work); } if (ir->sampling) { -- cgit v1.2.3