From 436eddd035c0ff807f4c64551a5a6edc7fb299d0 Mon Sep 17 00:00:00 2001 From: Tyler Trafford Date: Fri, 13 Jan 2006 14:38:18 -0200 Subject: [PATCH 1/8] V4L/DVB (3365): i2c ids for upd64031a saa717x upd64083 wm8739 - Add i2c ids for drivers: upd64031a saa717x upd64083 wm8739 Signed-off-by: Tyler Trafford Signed-off-by: Mauro Carvalho Chehab --- include/linux/i2c-id.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 6ff2d365895f..474c8f4f5d4f 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -104,6 +104,10 @@ #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ #define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ +#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */ +#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ +#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ +#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ #define I2C_DRIVERID_I2CDEV 900 #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ From 0f79c3637a871c6ebcf8b8c1762725152d5a18d7 Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Sat, 14 Jan 2006 21:26:44 -0200 Subject: [PATCH 2/8] V4L/DVB (3371): Turn frame locked sound on, basic support for FM radio with TDA8275(a) - Enabled audio PLL. This is mandatory for NICAM sound - modify FM IF frequency to 5.5MHz for SAA7133/35 if tuner is tda8290 Signed-off-by: Hartmut Hackmann Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7134/saa7134-cards.c | 6 ++++++ drivers/media/video/saa7134/saa7134-tvaudio.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 275d06af69d2..c64718aec9cb 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c @@ -2515,6 +2515,7 @@ struct saa7134_board saa7134_boards[] = { .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, .mpeg = SAA7134_MPEG_DVB, + .gpiomask = 1 << 21, .inputs = {{ .name = name_tv, .vmux = 1, @@ -2529,6 +2530,11 @@ struct saa7134_board saa7134_boards[] = { .vmux = 8, .amux = LINE1, }}, + .radio = { + .name = name_radio, + .amux = TV, + .gpio = 0x0200000, + }, }, [SAA7134_BOARD_MSI_TVATANYWHERE_PLUS] = { .name = "MSI TV@Anywhere plus", diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 93268427750d..afa4dcb3f96d 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -180,8 +180,8 @@ static void tvaudio_init(struct saa7134_dev *dev) saa_writeb(SAA7134_AUDIO_CLOCK0, clock & 0xff); saa_writeb(SAA7134_AUDIO_CLOCK1, (clock >> 8) & 0xff); saa_writeb(SAA7134_AUDIO_CLOCK2, (clock >> 16) & 0xff); - // frame locked audio was reported not to be reliable - saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x02); + /* frame locked audio is mandatory for NICAM */ + saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x01); saa_writeb(SAA7134_NICAM_ERROR_LOW, 0x14); saa_writeb(SAA7134_NICAM_ERROR_HIGH, 0x50); @@ -809,7 +809,12 @@ static int tvaudio_thread_ddep(void *data) dprintk("ddep override: %s\n",stdres[audio_ddep]); } else if (&card(dev).radio == dev->input) { dprintk("FM Radio\n"); - norms = (0x0f << 2) | 0x01; + if (dev->tuner_type == TUNER_PHILIPS_TDA8290) { + norms = (0x11 << 2) | 0x01; + saa_dsp_writel(dev, 0x42c >> 2, 0x729555); + } else { + norms = (0x0f << 2) | 0x01; + } } else { /* (let chip) scan for sound carrier */ norms = 0; From 15192b1d53506f739b36d37543c42619ac290ebc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 15 Jan 2006 06:50:01 -0200 Subject: [PATCH 3/8] V4L/DVB (3376): cx88 Kconfig fixes for cx88-alsa - Cx88 alsa is experimental. - Removed need of PCM OSS for an ALSA module. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 76fcb4e995c9..53308911ae6e 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -31,8 +31,7 @@ config VIDEO_CX88_DVB config VIDEO_CX88_ALSA tristate "ALSA DMA audio support" - depends on VIDEO_CX88 && SND - select SND_PCM_OSS + depends on VIDEO_CX88 && SND && EXPERIMENTAL ---help--- This is a video4linux driver for direct (DMA) audio on Conexant 2388x based TV cards. From a9cff90ed9a23e9f73963fe73b71ef7e5de3e822 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 15 Jan 2006 06:56:15 -0200 Subject: [PATCH 4/8] V4L/DVB (3377): make some code static - This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840-core.c | 2 +- drivers/media/video/tvp5150.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 0da744c1d23e..c66c2c1f4809 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -43,7 +43,7 @@ MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; -int cx25840_debug; +static int cx25840_debug; module_param_named(debug,cx25840_debug, int, 0644); diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index e86b522938fd..8713c4d0dcca 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -634,7 +634,7 @@ struct i2c_vbi_ram_value { unsigned char values[26]; }; -struct i2c_vbi_ram_value vbi_ram_default[] = +static struct i2c_vbi_ram_value vbi_ram_default[] = { {0x010, /* WST SECAM 6 */ { 0xaa, 0xaa, 0xff, 0xff , 0xe7, 0x2e, 0x20, 0x26, 0xe6, 0xb4, 0x0e, 0x0, 0x0, 0x0, 0x10, 0x0 } From 7d83e8431ae531e907f09c277ab4ab4620092518 Mon Sep 17 00:00:00 2001 From: Panagiotis Christeas Date: Sun, 15 Jan 2006 07:01:54 -0200 Subject: [PATCH 5/8] V4L/DVB (3378): Fix for lack of analog output on some cx88 boards - Workaround to fix a known regression at cx88-tvaudio.c - provide a module parameter workaround to always enable analog output. Signed-off-by: Panagiotis Christeas Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/cx88-tvaudio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index 24118e43e73a..da8d97ce0c4b 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c @@ -60,6 +60,11 @@ static unsigned int audio_debug = 0; module_param(audio_debug, int, 0644); MODULE_PARM_DESC(audio_debug, "enable debug messages [audio]"); +static unsigned int always_analog = 0; +module_param(always_analog,int,0644); +MODULE_PARM_DESC(always_analog,"force analog audio out"); + + #define dprintk(fmt, arg...) if (audio_debug) \ printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg) @@ -155,7 +160,8 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl) cx_write(AUD_I2SOUTPUTCNTL, 1); cx_write(AUD_I2SCNTL, 0); /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */ - } else { + } + if ((always_analog) || (!cx88_boards[core->board].blackbird)) { ctl |= EN_DAC_ENABLE; cx_write(AUD_CTL, ctl); } From 1e4baed379a2bff3c728ea34602d3432fb047af8 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sun, 15 Jan 2006 07:52:23 -0200 Subject: [PATCH 6/8] V4L/DVB (3380): Semaphore to mutex conversion on drivers/media - Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-core/dvbdev.c | 22 +++++++++---------- drivers/media/video/cx88/cx88-core.c | 15 +++++++------ drivers/media/video/em28xx/em28xx-video.c | 7 +++--- drivers/media/video/saa7134/saa7134-core.c | 19 ++++++++-------- drivers/media/video/videodev.c | 25 +++++++++++----------- 5 files changed, 45 insertions(+), 43 deletions(-) diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 06b696e9acbd..54f8b95717b0 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c @@ -33,7 +33,7 @@ #include #include #include - +#include #include "dvbdev.h" static int dvbdev_debug; @@ -44,7 +44,7 @@ MODULE_PARM_DESC(dvbdev_debug, "Turn on/off device debugging (default:off)."); #define dprintk if (dvbdev_debug) printk static LIST_HEAD(dvb_adapter_list); -static DECLARE_MUTEX(dvbdev_register_lock); +static DEFINE_MUTEX(dvbdev_register_lock); static const char * const dnames[] = { "video", "audio", "sec", "frontend", "demux", "dvr", "ca", @@ -202,11 +202,11 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, struct dvb_device *dvbdev; int id; - if (down_interruptible (&dvbdev_register_lock)) + if (mutex_lock_interruptible(&dvbdev_register_lock)) return -ERESTARTSYS; if ((id = dvbdev_get_free_id (adap, type)) < 0) { - up (&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); *pdvbdev = NULL; printk ("%s: could get find free device id...\n", __FUNCTION__); return -ENFILE; @@ -215,11 +215,11 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, *pdvbdev = dvbdev = kmalloc(sizeof(struct dvb_device), GFP_KERNEL); if (!dvbdev) { - up(&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); return -ENOMEM; } - up (&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); memcpy(dvbdev, template, sizeof(struct dvb_device)); dvbdev->type = type; @@ -289,11 +289,11 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct modu { int num; - if (down_interruptible (&dvbdev_register_lock)) + if (mutex_lock_interruptible(&dvbdev_register_lock)) return -ERESTARTSYS; if ((num = dvbdev_get_free_adapter_num ()) < 0) { - up (&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); return -ENFILE; } @@ -309,7 +309,7 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct modu list_add_tail (&adap->list_head, &dvb_adapter_list); - up (&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); return num; } @@ -320,10 +320,10 @@ int dvb_unregister_adapter(struct dvb_adapter *adap) { devfs_remove("dvb/adapter%d", adap->num); - if (down_interruptible (&dvbdev_register_lock)) + if (mutex_lock_interruptible(&dvbdev_register_lock)) return -ERESTARTSYS; list_del (&adap->list_head); - up (&dvbdev_register_lock); + mutex_unlock(&dvbdev_register_lock); return 0; } EXPORT_SYMBOL(dvb_unregister_adapter); diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 194446f28c55..8d6d6a6cf785 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "cx88.h" #include @@ -75,7 +76,7 @@ MODULE_PARM_DESC(nocomb,"disable comb filter"); static unsigned int cx88_devcount; static LIST_HEAD(cx88_devlist); -static DECLARE_MUTEX(devlist); +static DEFINE_MUTEX(devlist); #define NO_SYNC_LINE (-1U) @@ -1036,7 +1037,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) struct list_head *item; int i; - down(&devlist); + mutex_lock(&devlist); list_for_each(item,&cx88_devlist) { core = list_entry(item, struct cx88_core, devlist); if (pci->bus->number != core->pci_bus) @@ -1047,7 +1048,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) if (0 != get_ressources(core,pci)) goto fail_unlock; atomic_inc(&core->refcount); - up(&devlist); + mutex_unlock(&devlist); return core; } core = kzalloc(sizeof(*core),GFP_KERNEL); @@ -1122,13 +1123,13 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) cx88_card_setup(core); cx88_ir_init(core,pci); - up(&devlist); + mutex_unlock(&devlist); return core; fail_free: kfree(core); fail_unlock: - up(&devlist); + mutex_unlock(&devlist); return NULL; } @@ -1140,14 +1141,14 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci) if (!atomic_dec_and_test(&core->refcount)) return; - down(&devlist); + mutex_lock(&devlist); cx88_ir_fini(core); if (0 == core->i2c_rc) i2c_bit_del_bus(&core->i2c_adap); list_del(&core->devlist); iounmap(core->lmmio); cx88_devcount--; - up(&devlist); + mutex_unlock(&devlist); kfree(core); } diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 3323dffe26a4..eea304f75176 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "em28xx.h" #include @@ -191,7 +192,7 @@ static struct v4l2_queryctrl saa711x_qctrl[] = { static struct usb_driver em28xx_usb_driver; -static DECLARE_MUTEX(em28xx_sysfs_lock); +static DEFINE_MUTEX(em28xx_sysfs_lock); static DECLARE_RWSEM(em28xx_disconnect); /********************* v4l2 interface ******************************************/ @@ -394,7 +395,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) */ static void em28xx_release_resources(struct em28xx *dev) { - down(&em28xx_sysfs_lock); + mutex_lock(&em28xx_sysfs_lock); em28xx_info("V4L2 device /dev/video%d deregistered\n", dev->vdev->minor); @@ -403,7 +404,7 @@ static void em28xx_release_resources(struct em28xx *dev) /* video_unregister_device(dev->vbi_dev); */ em28xx_i2c_unregister(dev); usb_put_dev(dev->udev); - up(&em28xx_sysfs_lock); + mutex_unlock(&em28xx_sysfs_lock); } /* diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 3dd42efe3699..028904bd94a2 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "saa7134-reg.h" #include "saa7134.h" @@ -84,7 +85,7 @@ MODULE_PARM_DESC(radio_nr, "radio device number"); MODULE_PARM_DESC(tuner, "tuner type"); MODULE_PARM_DESC(card, "card type"); -static DECLARE_MUTEX(devlist_lock); +static DEFINE_MUTEX(devlist_lock); LIST_HEAD(saa7134_devlist); static LIST_HEAD(mops_list); static unsigned int saa7134_devcount; @@ -969,13 +970,13 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, pci_set_drvdata(pci_dev,dev); saa7134_devcount++; - down(&devlist_lock); + mutex_lock(&devlist_lock); list_for_each(item,&mops_list) { mops = list_entry(item, struct saa7134_mpeg_ops, next); mpeg_ops_attach(mops, dev); } list_add_tail(&dev->devlist,&saa7134_devlist); - up(&devlist_lock); + mutex_unlock(&devlist_lock); /* check for signal */ saa7134_irq_video_intl(dev); @@ -1031,13 +1032,13 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev) saa7134_hwfini(dev); /* unregister */ - down(&devlist_lock); + mutex_lock(&devlist_lock); list_del(&dev->devlist); list_for_each(item,&mops_list) { mops = list_entry(item, struct saa7134_mpeg_ops, next); mpeg_ops_detach(mops, dev); } - up(&devlist_lock); + mutex_unlock(&devlist_lock); saa7134_devcount--; saa7134_i2c_unregister(dev); @@ -1071,13 +1072,13 @@ int saa7134_ts_register(struct saa7134_mpeg_ops *ops) struct list_head *item; struct saa7134_dev *dev; - down(&devlist_lock); + mutex_lock(&devlist_lock); list_for_each(item,&saa7134_devlist) { dev = list_entry(item, struct saa7134_dev, devlist); mpeg_ops_attach(ops, dev); } list_add_tail(&ops->next,&mops_list); - up(&devlist_lock); + mutex_unlock(&devlist_lock); return 0; } @@ -1086,13 +1087,13 @@ void saa7134_ts_unregister(struct saa7134_mpeg_ops *ops) struct list_head *item; struct saa7134_dev *dev; - down(&devlist_lock); + mutex_lock(&devlist_lock); list_del(&ops->next); list_for_each(item,&saa7134_devlist) { dev = list_entry(item, struct saa7134_dev, devlist); mpeg_ops_detach(ops, dev); } - up(&devlist_lock); + mutex_unlock(&devlist_lock); } EXPORT_SYMBOL(saa7134_ts_register); diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index d5be25987142..078880e4c8c0 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c @@ -29,7 +29,6 @@ #include #include #include -#include #include @@ -83,7 +82,7 @@ static struct class video_class = { */ static struct video_device *video_device[VIDEO_NUM_DEVICES]; -static DECLARE_MUTEX(videodev_lock); +static DEFINE_MUTEX(videodev_lock); struct video_device* video_devdata(struct file *file) { @@ -102,15 +101,15 @@ static int video_open(struct inode *inode, struct file *file) if(minor>=VIDEO_NUM_DEVICES) return -ENODEV; - down(&videodev_lock); + mutex_lock(&videodev_lock); vfl=video_device[minor]; if(vfl==NULL) { - up(&videodev_lock); + mutex_unlock(&videodev_lock); request_module("char-major-%d-%d", VIDEO_MAJOR, minor); - down(&videodev_lock); + mutex_lock(&videodev_lock); vfl=video_device[minor]; if (vfl==NULL) { - up(&videodev_lock); + mutex_unlock(&videodev_lock); return -ENODEV; } } @@ -123,7 +122,7 @@ static int video_open(struct inode *inode, struct file *file) file->f_op = fops_get(old_fops); } fops_put(old_fops); - up(&videodev_lock); + mutex_unlock(&videodev_lock); return err; } @@ -304,12 +303,12 @@ int video_register_device(struct video_device *vfd, int type, int nr) } /* pick a minor number */ - down(&videodev_lock); + mutex_lock(&videodev_lock); if (nr >= 0 && nr < end-base) { /* use the one the driver asked for */ i = base+nr; if (NULL != video_device[i]) { - up(&videodev_lock); + mutex_unlock(&videodev_lock); return -ENFILE; } } else { @@ -318,13 +317,13 @@ int video_register_device(struct video_device *vfd, int type, int nr) if (NULL == video_device[i]) break; if (i == end) { - up(&videodev_lock); + mutex_unlock(&videodev_lock); return -ENFILE; } } video_device[i]=vfd; vfd->minor=i; - up(&videodev_lock); + mutex_unlock(&videodev_lock); sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor), @@ -362,14 +361,14 @@ int video_register_device(struct video_device *vfd, int type, int nr) void video_unregister_device(struct video_device *vfd) { - down(&videodev_lock); + mutex_lock(&videodev_lock); if(video_device[vfd->minor]!=vfd) panic("videodev: bad unregister"); devfs_remove(vfd->devfs_name); video_device[vfd->minor]=NULL; class_device_unregister(&vfd->class_dev); - up(&videodev_lock); + mutex_unlock(&videodev_lock); } From fabd23862ba34f217f154c225c59eb5267c4a5d1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 15 Jan 2006 08:12:14 -0200 Subject: [PATCH 7/8] V4L/DVB (3381): Fix compilation with Alpha - BOOT_SIZE name is also used at alpha and were breaking compiling with allyesconfig. - All BOOT_* renamed to AV7110_BOOT* to fix and keep names with the same style. Thanks to Andrew Morton for pointing this. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110_hw.c | 40 ++++++++++++++--------------- drivers/media/dvb/ttpci/av7110_hw.h | 12 ++++----- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c index cb377452b57d..b2e63e9fc053 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.c +++ b/drivers/media/dvb/ttpci/av7110_hw.c @@ -146,52 +146,52 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len) { int i; int blocks, rest; - u32 base, bootblock = BOOT_BLOCK; + u32 base, bootblock = AV7110_BOOT_BLOCK; dprintk(4, "%p\n", av7110); - blocks = len / BOOT_MAX_SIZE; - rest = len % BOOT_MAX_SIZE; + blocks = len / AV7110_BOOT_MAX_SIZE; + rest = len % AV7110_BOOT_MAX_SIZE; base = DRAM_START_CODE; for (i = 0; i < blocks; i++) { - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at block %d\n", i); return -ETIMEDOUT; } dprintk(4, "writing DRAM block %d\n", i); mwdebi(av7110, DEBISWAB, bootblock, - ((char*)data) + i * BOOT_MAX_SIZE, BOOT_MAX_SIZE); + ((char*)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE); bootblock ^= 0x1400; - iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4); - iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, BOOT_MAX_SIZE, 2); - iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); - base += BOOT_MAX_SIZE; + iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); + base += AV7110_BOOT_MAX_SIZE; } if (rest > 0) { - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at last block\n"); return -ETIMEDOUT; } if (rest > 4) mwdebi(av7110, DEBISWAB, bootblock, - ((char*)data) + i * BOOT_MAX_SIZE, rest); + ((char*)data) + i * AV7110_BOOT_MAX_SIZE, rest); else mwdebi(av7110, DEBISWAB, bootblock, - ((char*)data) + i * BOOT_MAX_SIZE - 4, rest + 4); + ((char*)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4); - iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4); - iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, rest, 2); - iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); + iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); } - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { printk(KERN_ERR "dvb-ttpci: load_dram(): timeout after last block\n"); return -ETIMEDOUT; } - iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, 0, 2); - iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BOOT_COMPLETE) < 0) { + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, 0, 2); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); + if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_AV7110_BOOT_COMPLETE) < 0) { printk(KERN_ERR "dvb-ttpci: load_dram(): final handshake timeout\n"); return -ETIMEDOUT; } @@ -262,7 +262,7 @@ int av7110_bootarm(struct av7110 *av7110) //saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT); mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode)); - iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); + iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); if (saa7146_wait_for_debi_done(av7110->dev, 1)) { printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): " diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h index 84b83299b8be..4e173c67fbb2 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.h +++ b/drivers/media/dvb/ttpci/av7110_hw.h @@ -18,7 +18,7 @@ enum av7110_bootstate { BOOTSTATE_BUFFER_EMPTY = 0, BOOTSTATE_BUFFER_FULL = 1, - BOOTSTATE_BOOT_COMPLETE = 2 + BOOTSTATE_AV7110_BOOT_COMPLETE = 2 }; enum av7110_type_rec_play_format @@ -295,11 +295,11 @@ enum av7110_command_type { #define DPRAM_BASE 0x4000 /* boot protocol area */ -#define BOOT_STATE (DPRAM_BASE + 0x3F8) -#define BOOT_SIZE (DPRAM_BASE + 0x3FA) -#define BOOT_BASE (DPRAM_BASE + 0x3FC) -#define BOOT_BLOCK (DPRAM_BASE + 0x400) -#define BOOT_MAX_SIZE 0xc00 +#define AV7110_BOOT_STATE (DPRAM_BASE + 0x3F8) +#define AV7110_BOOT_SIZE (DPRAM_BASE + 0x3FA) +#define AV7110_BOOT_BASE (DPRAM_BASE + 0x3FC) +#define AV7110_BOOT_BLOCK (DPRAM_BASE + 0x400) +#define AV7110_BOOT_MAX_SIZE 0xc00 /* firmware command protocol area */ #define IRQ_STATE (DPRAM_BASE + 0x0F4) From e0ad8486266c3415ab9c17f5c03c47edc7b93d7b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 15 Jan 2006 06:45:20 -0200 Subject: [PATCH 8/8] V4L/DVB (3375): git dvb callbacks fix - Not sure what went wrong here, but SND_PCI_PM_CALLBACKS got deleted. Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/cx88-alsa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index fd8bc718f0e3..e649f678d47a 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -805,7 +805,6 @@ static struct pci_driver cx88_audio_pci_driver = { .id_table = cx88_audio_pci_tbl, .probe = cx88_audio_initdev, .remove = cx88_audio_finidev, - SND_PCI_PM_CALLBACKS }; /****************************************************************************