aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:20:01 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:20:01 -0500
commitd669af9d5afb5bdb629f78d024b35e507465f570 (patch)
tree711ab23d69098fa05973b69efbd0ae61cc7ff927 /drivers/media/video/cx88
parent2ddb55f091a9c74a297d72b50f8310c0c8ed7d1d (diff)
parentf87d09be8c2c270b83c2ad80d06206a7306e2fa9 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/Kconfig3
-rw-r--r--drivers/media/video/cx88/Makefile1
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c9
-rw-r--r--drivers/media/video/cx88/cx88-core.c15
-rw-r--r--drivers/media/video/cx88/cx88-tvaudio.c8
-rw-r--r--drivers/media/video/cx88/cx88-vp3054-i2c.c4
6 files changed, 25 insertions, 15 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
31 31
32config VIDEO_CX88_ALSA 32config VIDEO_CX88_ALSA
33 tristate "ALSA DMA audio support" 33 tristate "ALSA DMA audio support"
34 depends on VIDEO_CX88 && SND 34 depends on VIDEO_CX88 && SND && EXPERIMENTAL
35 select SND_PCM_OSS
36 ---help--- 35 ---help---
37 This is a video4linux driver for direct (DMA) audio on 36 This is a video4linux driver for direct (DMA) audio on
38 Conexant 2388x based TV cards. 37 Conexant 2388x based TV cards.
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
index e4b2134fe567..6e5eaa22619e 100644
--- a/drivers/media/video/cx88/Makefile
+++ b/drivers/media/video/cx88/Makefile
@@ -5,6 +5,7 @@ cx8802-objs := cx88-mpeg.o
5 5
6obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o cx8802.o cx88-blackbird.o 6obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o cx8802.o cx88-blackbird.o
7obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o cx88-vp3054-i2c.o 7obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o cx88-vp3054-i2c.o
8obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o
8 9
9EXTRA_CFLAGS += -I$(src)/.. 10EXTRA_CFLAGS += -I$(src)/..
10EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core 11EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index 7695b521eb35..a2e36a1e5f59 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -116,7 +116,7 @@ MODULE_LICENSE("GPL");
116MODULE_SUPPORTED_DEVICE("{{Conexant,23881}," 116MODULE_SUPPORTED_DEVICE("{{Conexant,23881},"
117 "{{Conexant,23882}," 117 "{{Conexant,23882},"
118 "{{Conexant,23883}"); 118 "{{Conexant,23883}");
119static unsigned int debug = 0; 119static unsigned int debug;
120module_param(debug,int,0644); 120module_param(debug,int,0644);
121MODULE_PARM_DESC(debug,"enable debug messages"); 121MODULE_PARM_DESC(debug,"enable debug messages");
122 122
@@ -333,10 +333,10 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = {
333 .channels_min = 1, 333 .channels_min = 1,
334 .channels_max = 2, 334 .channels_max = 2,
335 .buffer_bytes_max = (2*2048), 335 .buffer_bytes_max = (2*2048),
336 .period_bytes_min = 256, 336 .period_bytes_min = 2048,
337 .period_bytes_max = 2048, 337 .period_bytes_max = 2048,
338 .periods_min = 2, 338 .periods_min = 2,
339 .periods_max = 16, 339 .periods_max = 2,
340}; 340};
341 341
342/* 342/*
@@ -653,7 +653,7 @@ static void snd_cx88_dev_free(snd_card_t * card)
653 * Alsa Constructor - Component probe 653 * Alsa Constructor - Component probe
654 */ 654 */
655 655
656static int devno=0; 656static int devno;
657static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, 657static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
658 snd_cx88_card_t **rchip) 658 snd_cx88_card_t **rchip)
659{ 659{
@@ -805,7 +805,6 @@ static struct pci_driver cx88_audio_pci_driver = {
805 .id_table = cx88_audio_pci_tbl, 805 .id_table = cx88_audio_pci_tbl,
806 .probe = cx88_audio_initdev, 806 .probe = cx88_audio_initdev,
807 .remove = cx88_audio_finidev, 807 .remove = cx88_audio_finidev,
808 SND_PCI_PM_CALLBACKS
809}; 808};
810 809
811/**************************************************************************** 810/****************************************************************************
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 @@
32#include <linux/pci.h> 32#include <linux/pci.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/videodev2.h> 34#include <linux/videodev2.h>
35#include <linux/mutex.h>
35 36
36#include "cx88.h" 37#include "cx88.h"
37#include <media/v4l2-common.h> 38#include <media/v4l2-common.h>
@@ -75,7 +76,7 @@ MODULE_PARM_DESC(nocomb,"disable comb filter");
75 76
76static unsigned int cx88_devcount; 77static unsigned int cx88_devcount;
77static LIST_HEAD(cx88_devlist); 78static LIST_HEAD(cx88_devlist);
78static DECLARE_MUTEX(devlist); 79static DEFINE_MUTEX(devlist);
79 80
80#define NO_SYNC_LINE (-1U) 81#define NO_SYNC_LINE (-1U)
81 82
@@ -1036,7 +1037,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
1036 struct list_head *item; 1037 struct list_head *item;
1037 int i; 1038 int i;
1038 1039
1039 down(&devlist); 1040 mutex_lock(&devlist);
1040 list_for_each(item,&cx88_devlist) { 1041 list_for_each(item,&cx88_devlist) {
1041 core = list_entry(item, struct cx88_core, devlist); 1042 core = list_entry(item, struct cx88_core, devlist);
1042 if (pci->bus->number != core->pci_bus) 1043 if (pci->bus->number != core->pci_bus)
@@ -1047,7 +1048,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
1047 if (0 != get_ressources(core,pci)) 1048 if (0 != get_ressources(core,pci))
1048 goto fail_unlock; 1049 goto fail_unlock;
1049 atomic_inc(&core->refcount); 1050 atomic_inc(&core->refcount);
1050 up(&devlist); 1051 mutex_unlock(&devlist);
1051 return core; 1052 return core;
1052 } 1053 }
1053 core = kzalloc(sizeof(*core),GFP_KERNEL); 1054 core = kzalloc(sizeof(*core),GFP_KERNEL);
@@ -1122,13 +1123,13 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
1122 cx88_card_setup(core); 1123 cx88_card_setup(core);
1123 cx88_ir_init(core,pci); 1124 cx88_ir_init(core,pci);
1124 1125
1125 up(&devlist); 1126 mutex_unlock(&devlist);
1126 return core; 1127 return core;
1127 1128
1128fail_free: 1129fail_free:
1129 kfree(core); 1130 kfree(core);
1130fail_unlock: 1131fail_unlock:
1131 up(&devlist); 1132 mutex_unlock(&devlist);
1132 return NULL; 1133 return NULL;
1133} 1134}
1134 1135
@@ -1140,14 +1141,14 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci)
1140 if (!atomic_dec_and_test(&core->refcount)) 1141 if (!atomic_dec_and_test(&core->refcount))
1141 return; 1142 return;
1142 1143
1143 down(&devlist); 1144 mutex_lock(&devlist);
1144 cx88_ir_fini(core); 1145 cx88_ir_fini(core);
1145 if (0 == core->i2c_rc) 1146 if (0 == core->i2c_rc)
1146 i2c_bit_del_bus(&core->i2c_adap); 1147 i2c_bit_del_bus(&core->i2c_adap);
1147 list_del(&core->devlist); 1148 list_del(&core->devlist);
1148 iounmap(core->lmmio); 1149 iounmap(core->lmmio);
1149 cx88_devcount--; 1150 cx88_devcount--;
1150 up(&devlist); 1151 mutex_unlock(&devlist);
1151 kfree(core); 1152 kfree(core);
1152} 1153}
1153 1154
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;
60module_param(audio_debug, int, 0644); 60module_param(audio_debug, int, 0644);
61MODULE_PARM_DESC(audio_debug, "enable debug messages [audio]"); 61MODULE_PARM_DESC(audio_debug, "enable debug messages [audio]");
62 62
63static unsigned int always_analog = 0;
64module_param(always_analog,int,0644);
65MODULE_PARM_DESC(always_analog,"force analog audio out");
66
67
63#define dprintk(fmt, arg...) if (audio_debug) \ 68#define dprintk(fmt, arg...) if (audio_debug) \
64 printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg) 69 printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
65 70
@@ -155,7 +160,8 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
155 cx_write(AUD_I2SOUTPUTCNTL, 1); 160 cx_write(AUD_I2SOUTPUTCNTL, 1);
156 cx_write(AUD_I2SCNTL, 0); 161 cx_write(AUD_I2SCNTL, 0);
157 /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */ 162 /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */
158 } else { 163 }
164 if ((always_analog) || (!cx88_boards[core->board].blackbird)) {
159 ctl |= EN_DAC_ENABLE; 165 ctl |= EN_DAC_ENABLE;
160 cx_write(AUD_CTL, ctl); 166 cx_write(AUD_CTL, ctl);
161 } 167 }
diff --git a/drivers/media/video/cx88/cx88-vp3054-i2c.c b/drivers/media/video/cx88/cx88-vp3054-i2c.c
index 372cd29cedbd..751a754a45e9 100644
--- a/drivers/media/video/cx88/cx88-vp3054-i2c.c
+++ b/drivers/media/video/cx88/cx88-vp3054-i2c.c
@@ -32,6 +32,10 @@
32#include "cx88-vp3054-i2c.h" 32#include "cx88-vp3054-i2c.h"
33 33
34 34
35MODULE_DESCRIPTION("driver for cx2388x VP3054 design");
36MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
37MODULE_LICENSE("GPL");
38
35/* ----------------------------------------------------------------------- */ 39/* ----------------------------------------------------------------------- */
36 40
37static void vp3054_bit_setscl(void *data, int state) 41static void vp3054_bit_setscl(void *data, int state)