Commit 34218e06 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

Merge branch 'work-fixes'

parents dece6960 67264484
...@@ -381,6 +381,23 @@ bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet * ...@@ -381,6 +381,23 @@ bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *
EXPORT_SYMBOL(bt878_device_control); EXPORT_SYMBOL(bt878_device_control);
struct cards card_list[] __devinitdata = {
{ 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
{ 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
{ 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
{ 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
{ 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
{ 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
{ 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
{ 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
{ 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
{ 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
{ 0, -1, NULL }
};
/***********************/ /***********************/
/* PCI device handling */ /* PCI device handling */
/***********************/ /***********************/
...@@ -388,18 +405,41 @@ EXPORT_SYMBOL(bt878_device_control); ...@@ -388,18 +405,41 @@ EXPORT_SYMBOL(bt878_device_control);
static int __devinit bt878_probe(struct pci_dev *dev, static int __devinit bt878_probe(struct pci_dev *dev,
const struct pci_device_id *pci_id) const struct pci_device_id *pci_id)
{ {
int result; int result = 0, has_dvb = 0, i;
unsigned char lat; unsigned char lat;
struct bt878 *bt; struct bt878 *bt;
#if defined(__powerpc__) #if defined(__powerpc__)
unsigned int cmd; unsigned int cmd;
#endif #endif
unsigned int cardid;
unsigned short id;
struct cards *dvb_cards;
printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n",
bt878_num); bt878_num);
if (pci_enable_device(dev)) if (pci_enable_device(dev))
return -EIO; return -EIO;
pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &id);
cardid = id << 16;
pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &id);
cardid |= id;
for (i = 0, dvb_cards = card_list; i < ARRAY_SIZE(card_list); i++, dvb_cards++) {
if (cardid == dvb_cards->pci_id) {
printk("%s: card id=[0x%x],[ %s ] has DVB functions.\n",
__func__, cardid, dvb_cards->name);
has_dvb = 1;
}
}
if (!has_dvb) {
printk("%s: card id=[0x%x], Unknown card.\nExiting..\n", __func__, cardid);
result = -EINVAL;
goto fail0;
}
bt = &bt878[bt878_num]; bt = &bt878[bt878_num];
bt->dev = dev; bt->dev = dev;
bt->nr = bt878_num; bt->nr = bt878_num;
...@@ -416,6 +456,8 @@ static int __devinit bt878_probe(struct pci_dev *dev, ...@@ -416,6 +456,8 @@ static int __devinit bt878_probe(struct pci_dev *dev,
pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision); pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision);
pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
printk(KERN_INFO "bt878(%d): Bt%x (rev %d) at %02x:%02x.%x, ", printk(KERN_INFO "bt878(%d): Bt%x (rev %d) at %02x:%02x.%x, ",
bt878_num, bt->id, bt->revision, dev->bus->number, bt878_num, bt->id, bt->revision, dev->bus->number,
PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
......
...@@ -88,6 +88,23 @@ ...@@ -88,6 +88,23 @@
#define BT878_RISC_SYNC_MASK (1 << 15) #define BT878_RISC_SYNC_MASK (1 << 15)
#define BTTV_BOARD_UNKNOWN 0x00
#define BTTV_BOARD_PINNACLESAT 0x5e
#define BTTV_BOARD_NEBULA_DIGITV 0x68
#define BTTV_BOARD_PC_HDTV 0x70
#define BTTV_BOARD_TWINHAN_DST 0x71
#define BTTV_BOARD_AVDVBT_771 0x7b
#define BTTV_BOARD_AVDVBT_761 0x7c
#define BTTV_BOARD_DVICO_DVBT_LITE 0x80
#define BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE 0x87
struct cards {
__u32 pci_id;
__u16 card_id;
char *name;
};
extern int bt878_num; extern int bt878_num;
struct bt878 { struct bt878 {
......
...@@ -83,12 +83,18 @@ config DVB_USB_UMT_010 ...@@ -83,12 +83,18 @@ config DVB_USB_UMT_010
Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver. Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver.
config DVB_USB_CXUSB config DVB_USB_CXUSB
tristate "Medion MD95700 hybrid USB2.0 (Conexant) support" tristate "Conexant USB2.0 hybrid reference design support"
depends on DVB_USB depends on DVB_USB
select DVB_CX22702 select DVB_CX22702
select DVB_LGDT330X
select DVB_MT352
help help
Say Y here to support the Medion MD95700 hybrid USB2.0 device. Currently Say Y here to support the Conexant USB2.0 hybrid reference design.
only the DVB-T part is supported. Currently, only DVB and ATSC modes are supported, analog mode
shall be added in the future. Devices that require this module:
Medion MD95700 hybrid USB2.0 device.
DViCO FusionHDTV (Bluebird) USB2.0 devices
config DVB_USB_DIGITV config DVB_USB_DIGITV
tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support" tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support"
......
...@@ -234,7 +234,7 @@ static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { ...@@ -234,7 +234,7 @@ static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
{ {
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x38 }; static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 };
static u8 reset [] = { RESET, 0x80 }; static u8 reset [] = { RESET, 0x80 };
static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
static u8 agc_cfg [] = { AGC_TARGET, 0x28, 0x20 }; static u8 agc_cfg [] = { AGC_TARGET, 0x28, 0x20 };
...@@ -255,7 +255,7 @@ static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) ...@@ -255,7 +255,7 @@ static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
static int cxusb_mt352_demod_init(struct dvb_frontend* fe) static int cxusb_mt352_demod_init(struct dvb_frontend* fe)
{ /* used in both lgz201 and th7579 */ { /* used in both lgz201 and th7579 */
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x29 };
static u8 reset [] = { RESET, 0x80 }; static u8 reset [] = { RESET, 0x80 };
static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 }; static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 };
......
...@@ -175,12 +175,14 @@ static int digitv_probe(struct usb_interface *intf, ...@@ -175,12 +175,14 @@ static int digitv_probe(struct usb_interface *intf,
if ((ret = dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,&d)) == 0) { if ((ret = dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,&d)) == 0) {
u8 b[4] = { 0 }; u8 b[4] = { 0 };
if (d != NULL) { /* do that only when the firmware is loaded */
b[0] = 1; b[0] = 1;
digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0); digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0);
b[0] = 0; b[0] = 0;
digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0); digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0);
} }
}
return ret; return ret;
} }
...@@ -194,7 +196,7 @@ static struct dvb_usb_properties digitv_properties = { ...@@ -194,7 +196,7 @@ static struct dvb_usb_properties digitv_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER, .caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = CYPRESS_FX2, .usb_ctrl = CYPRESS_FX2,
.firmware = "dvb-usb-digitv-01.fw", .firmware = "dvb-usb-digitv-02.fw",
.size_of_priv = 0, .size_of_priv = 0,
...@@ -229,6 +231,7 @@ static struct dvb_usb_properties digitv_properties = { ...@@ -229,6 +231,7 @@ static struct dvb_usb_properties digitv_properties = {
{ &digitv_table[0], NULL }, { &digitv_table[0], NULL },
{ NULL }, { NULL },
}, },
{ NULL },
} }
}; };
......
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
struct vp7045_fe_state { struct vp7045_fe_state {
struct dvb_frontend fe; struct dvb_frontend fe;
struct dvb_frontend_ops ops;
struct dvb_usb_device *d; struct dvb_usb_device *d;
}; };
static int vp7045_fe_read_status(struct dvb_frontend* fe, fe_status_t *status) static int vp7045_fe_read_status(struct dvb_frontend* fe, fe_status_t *status)
{ {
struct vp7045_fe_state *state = fe->demodulator_priv; struct vp7045_fe_state *state = fe->demodulator_priv;
...@@ -150,7 +151,8 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d) ...@@ -150,7 +151,8 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
goto error; goto error;
s->d = d; s->d = d;
s->fe.ops = &vp7045_fe_ops; memcpy(&s->ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops));
s->fe.ops = &s->ops;
s->fe.demodulator_priv = s; s->fe.demodulator_priv = s;
goto success; goto success;
......
...@@ -28,12 +28,6 @@ config DVB_TDA8083 ...@@ -28,12 +28,6 @@ config DVB_TDA8083
help 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_TDA80XX
tristate "Philips TDA8044 or TDA8083 based"
depends on DVB_CORE
help
A DVB-S tuner module. Say Y when you want to support this frontend.
config DVB_MT312 config DVB_MT312
tristate "Zarlink MT312 based" tristate "Zarlink MT312 based"
depends on DVB_CORE depends on DVB_CORE
...@@ -139,12 +133,6 @@ config DVB_DIB3000MC ...@@ -139,12 +133,6 @@ config DVB_DIB3000MC
comment "DVB-C (cable) frontends" comment "DVB-C (cable) frontends"
depends on DVB_CORE depends on DVB_CORE
config DVB_ATMEL_AT76C651
tristate "Atmel AT76C651 based"
depends on DVB_CORE
help
A DVB-C tuner module. Say Y when you want to support this frontend.
config DVB_VES1820 config DVB_VES1820
tristate "VLSI VES1820 based" tristate "VLSI VES1820 based"
depends on DVB_CORE depends on DVB_CORE
......
...@@ -8,7 +8,6 @@ obj-$(CONFIG_DVB_CORE) += dvb-pll.o ...@@ -8,7 +8,6 @@ obj-$(CONFIG_DVB_CORE) += dvb-pll.o
obj-$(CONFIG_DVB_STV0299) += stv0299.o obj-$(CONFIG_DVB_STV0299) += stv0299.o
obj-$(CONFIG_DVB_SP8870) += sp8870.o obj-$(CONFIG_DVB_SP8870) += sp8870.o
obj-$(CONFIG_DVB_CX22700) += cx22700.o obj-$(CONFIG_DVB_CX22700) += cx22700.o
obj-$(CONFIG_DVB_ATMEL_AT76C651) += at76c651.o
obj-$(CONFIG_DVB_CX24110) += cx24110.o obj-$(CONFIG_DVB_CX24110) += cx24110.o
obj-$(CONFIG_DVB_TDA8083) += tda8083.o obj-$(CONFIG_DVB_TDA8083) += tda8083.o
obj-$(CONFIG_DVB_L64781) += l64781.o obj-$(CONFIG_DVB_L64781) += l64781.o
...@@ -22,7 +21,6 @@ obj-$(CONFIG_DVB_SP887X) += sp887x.o ...@@ -22,7 +21,6 @@ obj-$(CONFIG_DVB_SP887X) += sp887x.o
obj-$(CONFIG_DVB_NXT6000) += nxt6000.o obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
obj-$(CONFIG_DVB_MT352) += mt352.o obj-$(CONFIG_DVB_MT352) += mt352.o
obj-$(CONFIG_DVB_CX22702) += cx22702.o obj-$(CONFIG_DVB_CX22702) += cx22702.o
obj-$(CONFIG_DVB_TDA80XX) += tda80xx.o
obj-$(CONFIG_DVB_TDA10021) += tda10021.o obj-$(CONFIG_DVB_TDA10021) += tda10021.o
obj-$(CONFIG_DVB_STV0297) += stv0297.o obj-$(CONFIG_DVB_STV0297) += stv0297.o
obj-$(CONFIG_DVB_NXT200X) += nxt200x.o obj-$(CONFIG_DVB_NXT200X) += nxt200x.o
......
This diff is collapsed.
/*
* at76c651.c
*
* Atmel DVB-C Frontend Driver (at76c651)
*
* Copyright (C) 2001 fnbrd <fnbrd@gmx.de>
* & 2002-2004 Andreas Oberritter <obi@linuxtv.org>
* & 2003 Wolfram Joost <dbox2@frokaschwei.de>
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* AT76C651
* http://www.nalanda.nitc.ac.in/industry/datasheets/atmel/acrobat/doc1293.pdf
* http://www.atmel.com/atmel/acrobat/doc1320.pdf
*/
#ifndef AT76C651_H
#define AT76C651_H
#include <linux/dvb/frontend.h>
struct at76c651_config
{
/* the demodulator's i2c address */
u8 demod_address;
/* PLL maintenance */
int (*pll_init)(struct dvb_frontend* fe);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};
extern struct dvb_frontend* at76c651_attach(const struct at76c651_config* config,
struct i2c_adapter* i2c);
#endif // AT76C651_H
This diff is collapsed.
/*
* tda80xx.c
*
* Philips TDA8044 / TDA8083 QPSK demodulator driver
*
* Copyright (C) 2001 Felix Domke <tmbinc@elitedvb.net>
* Copyright (C) 2002-2004 Andreas Oberritter <obi@linuxtv.org>
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef TDA80XX_H
#define TDA80XX_H
#include <linux/dvb/frontend.h>
struct tda80xx_config
{
/* the demodulator's i2c address */
u8 demod_address;
/* IRQ to use (0=>no IRQ used) */
u32 irq;
/* Register setting to use for 13v */
u8 volt13setting;
/* Register setting to use for 18v */
u8 volt18setting;
/* PLL maintenance */
int (*pll_init)(struct dvb_frontend* fe);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};
extern struct dvb_frontend* tda80xx_attach(const struct tda80xx_config* config,
struct i2c_adapter* i2c);
#endif // TDA80XX_H
...@@ -2329,6 +2329,17 @@ static int frontend_init(struct av7110 *av7110) ...@@ -2329,6 +2329,17 @@ static int frontend_init(struct av7110 *av7110)
av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
break; break;
case 0x0004: // Galaxis DVB-S rev1.3
/* ALPS BSRV2 */
av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
if (av7110->fe) {
av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst;
av7110->fe->ops->set_tone = av7110_set_tone;
av7110->recover = dvb_s_recover;
}
break;
case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */
/* Grundig 29504-451 */ /* Grundig 29504-451 */
av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
...@@ -2930,6 +2941,7 @@ MAKE_AV7110_INFO(tts_1_3se, "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE"); ...@@ -2930,6 +2941,7 @@ MAKE_AV7110_INFO(tts_1_3se, "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE");
MAKE_AV7110_INFO(ttt, "Technotrend/Hauppauge DVB-T"); MAKE_AV7110_INFO(ttt, "Technotrend/Hauppauge DVB-T");
MAKE_AV7110_INFO(fsc, "Fujitsu Siemens DVB-C"); MAKE_AV7110_INFO(fsc, "Fujitsu Siemens DVB-C");
MAKE_AV7110_INFO(fss, "Fujitsu Siemens DVB-S rev1.6"); MAKE_AV7110_INFO(fss, "Fujitsu Siemens DVB-S rev1.6");
MAKE_AV7110_INFO(gxs_1_3, "Galaxis DVB-S rev1.3");
static struct pci_device_id pci_tbl[] = { static struct pci_device_id pci_tbl[] = {
MAKE_EXTENSION_PCI(fsc, 0x110a, 0x0000), MAKE_EXTENSION_PCI(fsc, 0x110a, 0x0000),
...@@ -2937,13 +2949,13 @@ static struct pci_device_id pci_tbl[] = { ...@@ -2937,13 +2949,13 @@ static struct pci_device_id pci_tbl[] = {
MAKE_EXTENSION_PCI(ttt_1_X, 0x13c2, 0x0001), MAKE_EXTENSION_PCI(ttt_1_X, 0x13c2, 0x0001),
MAKE_EXTENSION_PCI(ttc_2_X, 0x13c2, 0x0002), MAKE_EXTENSION_PCI(ttc_2_X, 0x13c2, 0x0002),
MAKE_EXTENSION_PCI(tts_2_X, 0x13c2, 0x0003), MAKE_EXTENSION_PCI(tts_2_X, 0x13c2, 0x0003),
MAKE_EXTENSION_PCI(gxs_1_3, 0x13c2, 0x0004),
MAKE_EXTENSION_PCI(fss, 0x13c2, 0x0006), MAKE_EXTENSION_PCI(fss, 0x13c2, 0x0006),
MAKE_EXTENSION_PCI(ttt, 0x13c2, 0x0008), MAKE_EXTENSION_PCI(ttt, 0x13c2, 0x0008),
MAKE_EXTENSION_PCI(ttc_1_X, 0x13c2, 0x000a), MAKE_EXTENSION_PCI(ttc_1_X, 0x13c2, 0x000a),
MAKE_EXTENSION_PCI(tts_2_3, 0x13c2, 0x000e), MAKE_EXTENSION_PCI(tts_2_3, 0x13c2, 0x000e),
MAKE_EXTENSION_PCI(tts_1_3se, 0x13c2, 0x1002), MAKE_EXTENSION_PCI(tts_1_3se, 0x13c2, 0x1002),
/* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0004), UNDEFINED CARD */ // Galaxis DVB PC-Sat-Carte
/* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1 /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1
/* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0009), UNDEFINED CARD */ // TT/Hauppauge WinTV Nexus-CA v???? /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0009), UNDEFINED CARD */ // TT/Hauppauge WinTV Nexus-CA v????
......
...@@ -214,7 +214,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = { ...@@ -214,7 +214,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = {
we can capture, of the first and second field. */ we can capture, of the first and second field. */
.vbistart = { 7,320 }, .vbistart = { 7,320 },
},{ },{
.v4l2_id = V4L2_STD_NTSC_M, .v4l2_id = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR,
.name = "NTSC", .name = "NTSC",
.Fsc = 28636363, .Fsc = 28636363,
.swidth = 768, .swidth = 768,
......
...@@ -220,33 +220,23 @@ static void input_change(struct i2c_client *client) ...@@ -220,33 +220,23 @@ static void input_change(struct i2c_client *client)
cx25840_write(client, 0x808, 0xff); cx25840_write(client, 0x808, 0xff);
cx25840_write(client, 0x80b, 0x10); cx25840_write(client, 0x80b, 0x10);
} else if (std & V4L2_STD_NTSC) { } else if (std & V4L2_STD_NTSC) {
/* NTSC */
if (state->pvr150_workaround) {
/* Certain Hauppauge PVR150 models have a hardware bug /* Certain Hauppauge PVR150 models have a hardware bug
that causes audio to drop out. For these models the that causes audio to drop out. For these models the
audio standard must be set explicitly. audio standard must be set explicitly.
To be precise: it affects cards with tuner models To be precise: it affects cards with tuner models
85, 99 and 112 (model numbers from tveeprom). */ 85, 99 and 112 (model numbers from tveeprom). */
int hw_fix = state->pvr150_workaround;
if (std == V4L2_STD_NTSC_M_JP) { if (std == V4L2_STD_NTSC_M_JP) {
/* Japan uses EIAJ audio standard */ /* Japan uses EIAJ audio standard */
cx25840_write(client, 0x808, 0x2f); cx25840_write(client, 0x808, hw_fix ? 0x2f : 0xf7);
} else { } else if (std == V4L2_STD_NTSC_M_KR) {
/* Others use the BTSC audio standard */ /* South Korea uses A2 audio standard */
cx25840_write(client, 0x808, 0x1f); cx25840_write(client, 0x808, hw_fix ? 0x3f : 0xf8);
}
/* South Korea uses the A2-M (aka Zweiton M) audio
standard, and should set 0x808 to 0x3f, but I don't
know how to detect this. */
} else if (std == V4L2_STD_NTSC_M_JP) {
/* Japan uses EIAJ audio standard */
cx25840_write(client, 0x808, 0xf7);
} else { } else {
/* Others use the BTSC audio standard */ /* Others use the BTSC audio standard */
cx25840_write(client, 0x808, 0xf6); cx25840_write(client, 0x808, hw_fix ? 0x1f : 0xf6);
} }
/* South Korea uses the A2-M (aka Zweiton M) audio standard,
and should set 0x808 to 0xf8, but I don't know how to
detect this. */
cx25840_write(client, 0x80b, 0x00); cx25840_write(client, 0x80b, 0x00);
} }
...@@ -330,17 +320,17 @@ static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) ...@@ -330,17 +320,17 @@ static int set_v4lstd(struct i2c_client *client, v4l2_std_id std)
u8 fmt=0; /* zero is autodetect */ u8 fmt=0; /* zero is autodetect */
/* First tests should be against specific std */ /* First tests should be against specific std */
if (std & V4L2_STD_NTSC_M_JP) { if (std == V4L2_STD_NTSC_M_JP) {
fmt=0x2; fmt=0x2;
} else if (std & V4L2_STD_NTSC_443) { } else if (std == V4L2_STD_NTSC_443) {
fmt=0x3; fmt=0x3;
} else if (std & V4L2_STD_PAL_M) { } else if (std == V4L2_STD_PAL_M) {
fmt=0x5; fmt=0x5;
} else if (std & V4L2_STD_PAL_N) { } else if (std == V4L2_STD_PAL_N) {
fmt=0x6; fmt=0x6;
} else if (std & V4L2_STD_PAL_Nc) { } else if (std == V4L2_STD_PAL_Nc) {
fmt=0x7; fmt=0x7;
} else if (std & V4L2_STD_PAL_60) { } else if (std == V4L2_STD_PAL_60) {
fmt=0x8; fmt=0x8;
} else { } else {
/* Then, test against generic ones */ /* Then, test against generic ones */
...@@ -369,7 +359,7 @@ v4l2_std_id cx25840_get_v4lstd(struct i2c_client * client) ...@@ -369,7 +359,7 @@ v4l2_std_id cx25840_get_v4lstd(struct i2c_client * client)
} }
switch (fmt) { switch (fmt) {
case 0x1: return V4L2_STD_NTSC_M; case 0x1: return V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR;
case 0x2: return V4L2_STD_NTSC_M_JP; case 0x2: return V4L2_STD_NTSC_M_JP;
case 0x3: return V4L2_STD_NTSC_443; case 0x3: return V4L2_STD_NTSC_443;
case 0x4: return V4L2_STD_PAL; case 0x4: return V4L2_STD_PAL;
......
...@@ -128,7 +128,7 @@ MODULE_PARM_DESC(debug,"enable debug messages"); ...@@ -128,7 +128,7 @@ MODULE_PARM_DESC(debug,"enable debug messages");
* BOARD Specific: Sets audio DMA * BOARD Specific: Sets audio DMA
*/ */
int _cx88_start_audio_dma(snd_cx88_card_t *chip) static int _cx88_start_audio_dma(snd_cx88_card_t *chip)
{ {
struct cx88_buffer *buf = chip->buf; struct cx88_buffer *buf = chip->buf;
struct cx88_core *core=chip->core; struct cx88_core *core=chip->core;
...@@ -173,7 +173,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip) ...@@ -173,7 +173,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip)
/* /*
* BOARD Specific: Resets audio DMA * BOARD Specific: Resets audio DMA
*/ */
int _cx88_stop_audio_dma(snd_cx88_card_t *chip) static int _cx88_stop_audio_dma(snd_cx88_card_t *chip)
{ {
struct cx88_core *core=chip->core; struct cx88_core *core=chip->core;
dprintk(1, "Stopping audio DMA\n"); dprintk(1, "Stopping audio DMA\n");
...@@ -613,7 +613,7 @@ static snd_kcontrol_new_t snd_cx88_capture_volume = { ...@@ -613,7 +613,7 @@ static snd_kcontrol_new_t snd_cx88_capture_volume = {
* Only boards with eeprom and byte 1 at eeprom=1 have it * Only boards with eeprom and byte 1 at eeprom=1 have it
*/ */
struct pci_device_id cx88_audio_pci_tbl[] = { static struct pci_device_id cx88_audio_pci_tbl[] = {
{0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
{0, } {0, }
......
...@@ -787,12 +787,14 @@ static int set_pll(struct cx88_core *core, int prescale, u32 ofreq) ...@@ -787,12 +787,14 @@ static int set_pll(struct cx88_core *core, int prescale, u32 ofreq)
int cx88_start_audio_dma(struct cx88_core *core) int cx88_start_audio_dma(struct cx88_core *core)
{ {
/* constant 128 made buzz in analog Nicam-stereo for bigger fifo_size */
int bpl = cx88_sram_channels[SRAM_CH25].fifo_size/4;
/* setup fifo + format */ /* setup fifo + format */
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0); cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], bpl, 0);
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0); cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], bpl, 0);
cx_write(MO_AUDD_LNGTH, 128); /* fifo bpl size */ cx_write(MO_AUDD_LNGTH, bpl); /* fifo bpl size */
cx_write(MO_AUDR_LNGTH, 128); /* fifo bpl size */ cx_write(MO_AUDR_LNGTH, bpl); /* fifo bpl size */
/* start dma */ /* start dma */
cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */ cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */
......
...@@ -482,6 +482,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ...@@ -482,6 +482,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
switch (core->board) { switch (core->board) {
case CX88_BOARD_DNTV_LIVE_DVB_T: case CX88_BOARD_DNTV_LIVE_DVB_T:
case CX88_BOARD_KWORLD_DVB_T: case CX88_BOARD_KWORLD_DVB_T:
case CX88_BOARD_KWORLD_DVB_T_CX22702:
ir_codes = ir_codes_dntv_live_dvb_t; ir_codes = ir_codes_dntv_live_dvb_t;
ir->gpio_addr = MO_GP1_IO; ir->gpio_addr = MO_GP1_IO;
ir->mask_keycode = 0x1f; ir->mask_keycode = 0x1f;
......
...@@ -139,6 +139,9 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg, ...@@ -139,6 +139,9 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg,
{ {
int ret, byte; int ret, byte;
if (dev->state & DEV_DISCONNECTED)
return(-ENODEV);
em28xx_regdbg("req=%02x, reg=%02x ", req, reg); em28xx_regdbg("req=%02x, reg=%02x ", req, reg);
ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req, ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req,
...@@ -165,6 +168,9 @@ int em28xx_read_reg_req(struct em28xx *dev, u8 req, u16 reg) ...@@ -165,6 +168,9 @@ int em28xx_read_reg_req(struct em28xx *dev, u8 req, u16 reg)
u8 val; u8 val;
int ret; int ret;
if (dev->state & DEV_DISCONNECTED)
return(-ENODEV);
em28xx_regdbg("req=%02x, reg=%02x:", req, reg); em28xx_regdbg("req=%02x, reg=%02x:", req, reg);
ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req, ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req,
...@@ -195,7 +201,12 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, ...@@ -195,7 +201,12 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
int ret; int ret;
/*usb_control_msg seems to expect a kmalloced buffer */ /*usb_control_msg seems to expect a kmalloced buffer */
unsigned char *bufs = kmalloc(len, GFP_KERNEL); unsigned char *bufs;
if (dev->state & DEV_DISCONNECTED)
return(-ENODEV);
bufs = kmalloc(len, GFP_KERNEL);
em28xx_regdbg("req=%02x reg=%02x:", req, reg); em28xx_regdbg("req=%02x reg=%02x:", req, reg);
...@@ -212,7 +223,7 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, ...@@ -212,7 +223,7 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), req, ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), req,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0x0000, reg, bufs, len, HZ); 0x0000, reg, bufs, len, HZ);
mdelay(5); /* FIXME: magic number */ msleep(5); /* FIXME: magic number */
kfree(bufs); kfree(bufs);
return ret; return ret;
} }
......
...@@ -78,7 +78,7 @@ static int em2800_i2c_send_max4(struct em28xx *dev, unsigned char addr, ...@@ -78,7 +78,7 @@ static int em2800_i2c_send_max4(struct em28xx *dev, unsigned char addr,
ret = dev->em28xx_read_reg(dev, 0x05); ret = dev->em28xx_read_reg(dev, 0x05);
if (ret == 0x80 + len - 1) if (ret == 0x80 + len - 1)
return len; return len;
mdelay(5); msleep(5);
} }
em28xx_warn("i2c write timed out\n"); em28xx_warn("i2c write timed out\n");
return -EIO; return -EIO;
...@@ -138,7 +138,7 @@ static int em2800_i2c_check_for_device(struct em28xx *dev, unsigned char addr) ...@@ -138,7 +138,7 @@ static int em2800_i2c_check_for_device(struct em28xx *dev, unsigned char addr)
return -ENODEV; return -ENODEV;
else if (msg == 0x84) else if (msg == 0x84)
return 0; return 0;
mdelay(5); msleep(5);
} }
return -ENODEV; return -ENODEV;
} }
...@@ -278,9 +278,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -278,9 +278,9 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
msgs[i].buf, msgs[i].buf,
msgs[i].len, msgs[i].len,
i == num - 1); i == num - 1);
}
if (rc < 0) if (rc < 0)
goto err; goto err;
}
if (i2c_debug>=2) if (i2c_debug>=2)
printk("\n"); printk("\n");
} }
......
...@@ -231,7 +231,7 @@ static struct tvnorm tvnorms[] = { ...@@ -231,7 +231,7 @@ static struct tvnorm tvnorms[] = {
cAudioIF_6_5 | cAudioIF_6_5 |
cVideoIF_38_90 ), cVideoIF_38_90 ),
},{ },{
.std = V4L2_STD_NTSC_M, .std = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR,
.name = "NTSC-M", .name = "NTSC-M",
.b = ( cNegativeFmTV | .b = ( cNegativeFmTV |
cQSS ), cQSS ),
...@@ -619,6 +619,11 @@ static int tda9887_fixup_std(struct tda9887 *t) ...@@ -619,6 +619,11 @@ static int tda9887_fixup_std(struct tda9887 *t)
tda9887_dbg("insmod fixup: NTSC => NTSC_M_JP\n"); tda9887_dbg("insmod fixup: NTSC => NTSC_M_JP\n");
t->std = V4L2_STD_NTSC_M_JP; t->std = V4L2_STD_NTSC_M_JP;
break; break;
case 'k':
case 'K':
tda9887_dbg("insmod fixup: NTSC => NTSC_M_KR\n");
t->std = V4L2_STD_NTSC_M_KR;
break;
case '-': case '-':
/* default parameter, do nothing */ /* default parameter, do nothing */
break; break;
......
...@@ -366,6 +366,11 @@ static int tuner_fixup_std(struct tuner *t) ...@@ -366,6 +366,11 @@ static int tuner_fixup_std(struct tuner *t)
tuner_dbg("insmod fixup: NTSC => NTSC_M_JP\n"); tuner_dbg("insmod fixup: NTSC => NTSC_M_JP\n");
t->std = V4L2_STD_NTSC_M_JP; t->std = V4L2_STD_NTSC_M_JP;
break; break;
case 'k':
case 'K':
tuner_dbg("insmod fixup: NTSC => NTSC_M_KR\n");
t->std = V4L2_STD_NTSC_M_KR;
break;
case '-': case '-':
/* default parameter, do nothing */ /* default parameter, do nothing */
break; break;
......
...@@ -896,6 +896,17 @@ static int tvp5150_command(struct i2c_client *c, ...@@ -896,6 +896,17 @@ static int tvp5150_command(struct i2c_client *c,
} }
case DECODER_GET_STATUS: case DECODER_GET_STATUS:
{ {
int *iarg = arg;
int status;
int res=0;
status = tvp5150_read(c, 0x88);
if(status&0x08){
res |= DECODER_STATUS_COLOR;
}
if(status&0x04 && status&0x02){
res |= DECODER_STATUS_GOOD;
}
*iarg=res;
break; break;
} }
......
...@@ -629,6 +629,7 @@ typedef __u64 v4l2_std_id; ...@@ -629,6 +629,7 @@ typedef __u64 v4l2_std_id;
#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
...@@ -661,7 +662,8 @@ typedef __u64 v4l2_std_id; ...@@ -661,7 +662,8 @@ typedef __u64 v4l2_std_id;
V4L2_STD_PAL_H |\ V4L2_STD_PAL_H |\
V4L2_STD_PAL_I) V4L2_STD_PAL_I)
#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\
V4L2_STD_NTSC_M_JP) V4L2_STD_NTSC_M_JP |\
V4L2_STD_NTSC_M_KR)
#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\
V4L2_STD_SECAM_K |\ V4L2_STD_SECAM_K |\
V4L2_STD_SECAM_K1) V4L2_STD_SECAM_K1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment