diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst_ca.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_hw.h | 3 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 42 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 8 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 8 | ||||
-rw-r--r-- | drivers/media/video/saa7127.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/Kconfig | 26 | ||||
-rw-r--r-- | drivers/media/video/saa7134/Makefile | 7 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 18 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 18 | ||||
-rw-r--r-- | drivers/media/video/tveeprom.c | 2 |
14 files changed, 102 insertions, 49 deletions
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c index e6541af..2239651 100644 --- a/drivers/media/dvb/bt8xx/dst_ca.c +++ b/drivers/media/dvb/bt8xx/dst_ca.c @@ -406,7 +406,7 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, } dprintk(verbose, DST_CA_DEBUG, 1, " "); - if (copy_from_user(p_ca_message, (void *)arg, sizeof (struct ca_msg))) { + if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) { result = -EFAULT; goto free_mem_and_exit; } @@ -579,7 +579,7 @@ static int dst_ca_release(struct inode *inode, struct file *file) return 0; } -static int dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) +static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) { int bytes_read = 0; @@ -588,7 +588,7 @@ static int dst_ca_read(struct file *file, char __user *buffer, size_t length, lo return bytes_read; } -static int dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) +static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) { dprintk(verbose, DST_CA_DEBUG, 1, " Device write."); diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 992be0b..7dae91e 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -176,6 +176,9 @@ static void init_av7110_av(struct av7110 *av7110) } } + if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) + av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on + ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); if (ret < 0) printk("dvb-ttpci:cannot set volume :%d\n",ret); diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h index fedd20f..2a5e87b 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.h +++ b/drivers/media/dvb/ttpci/av7110_hw.h @@ -143,7 +143,8 @@ enum av7110_audio_command { MainSwitch, ADSwitch, SendDiSEqC, - SetRegister + SetRegister, + SpdifSwitch }; enum av7110_request_command { diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index aea3f03..5b93723 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -333,24 +333,30 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) { - u8 fmt; - - switch (std) { - /* zero is autodetect */ - case 0: fmt = 0x0; break; - /* default ntsc to ntsc-m */ - case V4L2_STD_NTSC: - case V4L2_STD_NTSC_M: fmt = 0x1; break; - case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; - case V4L2_STD_NTSC_443: fmt = 0x3; break; - case V4L2_STD_PAL: fmt = 0x4; break; - case V4L2_STD_PAL_M: fmt = 0x5; break; - case V4L2_STD_PAL_N: fmt = 0x6; break; - case V4L2_STD_PAL_Nc: fmt = 0x7; break; - case V4L2_STD_PAL_60: fmt = 0x8; break; - case V4L2_STD_SECAM: fmt = 0xc; break; - default: - return -ERANGE; + u8 fmt=0; /* zero is autodetect */ + + /* First tests should be against specific std */ + if (std & V4L2_STD_NTSC_M_JP) { + fmt=0x2; + } else if (std & V4L2_STD_NTSC_443) { + fmt=0x3; + } else if (std & V4L2_STD_PAL_M) { + fmt=0x5; + } else if (std & V4L2_STD_PAL_N) { + fmt=0x6; + } else if (std & V4L2_STD_PAL_Nc) { + fmt=0x7; + } else if (std & V4L2_STD_PAL_60) { + fmt=0x8; + } else { + /* Then, test against generic ones */ + if (std & V4L2_STD_NTSC) { + fmt=0x1; + } else if (std & V4L2_STD_PAL) { + fmt=0x4; + } else if (std & V4L2_STD_SECAM) { + fmt=0xc; + } } cx25840_and_or(client, 0x400, ~0xf, fmt); diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index e8a1c22..0cfe754 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); #define em28xx_coredbg(fmt, arg...) do {\ if (core_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static unsigned int reg_debug; module_param(reg_debug,int,0644); @@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); #define em28xx_regdbg(fmt, arg...) do {\ if (reg_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static unsigned int isoc_debug; module_param(isoc_debug,int,0644); @@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); #define em28xx_isocdbg(fmt, arg...) do {\ if (isoc_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static int alt = EM28XX_PINOUT; module_param(alt, int, 0644); @@ -126,7 +126,7 @@ u32 em28xx_request_buffers(struct em28xx *dev, u32 count) const size_t imagesize = PAGE_ALIGN(dev->frame_size); /*needs to be page aligned cause the buffers can be mapped individually! */ void *buff = NULL; u32 i; - em28xx_coredbg("requested %i buffers with size %i", count, imagesize); + em28xx_coredbg("requested %i buffers with size %zd", count, imagesize); if (count > EM28XX_NUM_FRAMES) count = EM28XX_NUM_FRAMES; diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 29e21ad..7f56030 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); printk(fmt, ##args); } while (0) #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ printk(KERN_DEBUG "%s at %s: " fmt, \ - dev->name, __FUNCTION__, ##args); } while (0) + dev->name, __FUNCTION__ , ##args); } while (0) /* * em2800_i2c_send_max4() diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 8ecaa08..06d7687 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -45,7 +45,7 @@ #define em28xx_videodbg(fmt, arg...) do {\ if (video_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 1e2ee43..5c7a41c 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h @@ -392,18 +392,18 @@ extern const unsigned int em28xx_bcount; /* printk macros */ #define em28xx_err(fmt, arg...) do {\ - printk(KERN_ERR fmt, ##arg); } while (0) + printk(KERN_ERR fmt , ##arg); } while (0) #define em28xx_errdev(fmt, arg...) do {\ printk(KERN_ERR "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) #define em28xx_info(fmt, arg...) do {\ printk(KERN_INFO "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) #define em28xx_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) inline static int em28xx_audio_source(struct em28xx *dev, int input) { diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 3428e1e..c36f014 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c @@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) { struct saa7127_state *state = i2c_get_clientdata(client); - u16 cc = data->data[0] << 8 | data->data[1]; + u16 cc = data->data[1] << 8 | data->data[0]; int enable = (data->line != 0); if (enable && (data->field != 0 || data->line != 21)) @@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data if (state->cc_enable != enable) { saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (enable << 6) | 0x11); + (state->xds_enable << 7) | (enable << 6) | 0x11); state->cc_enable = enable; } if (!enable) @@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat if (state->xds_enable != enable) { saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (enable << 7) | 0x11); + (enable << 7) | (state->cc_enable << 6) | 0x11); state->xds_enable = enable; } if (!enable) diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c512c44..8a5c3e7 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -1,11 +1,10 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C && SOUND && SND + depends on VIDEO_DEV && PCI && I2C select VIDEO_BUF select VIDEO_IR select VIDEO_TUNER select CRC32 - select SND_PCM_OSS ---help--- This is a video4linux driver for Philips SAA713x based TV cards. @@ -13,6 +12,29 @@ config VIDEO_SAA7134 To compile this driver as a module, choose M here: the module will be called saa7134. +config VIDEO_SAA7134_ALSA + tristate "Philips SAA7134 DMA audio support" + depends on VIDEO_SAA7134 && SND + select SND_PCM_OSS + ---help--- + This is a video4linux driver for direct (DMA) audio in + Philips SAA713x based TV cards using ALSA + + To compile this driver as a module, choose M here: the + module will be called saa7134-alsa. + +config VIDEO_SAA7134_OSS + tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" + depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA + ---help--- + This is a video4linux driver for direct (DMA) audio in + Philips SAA713x based TV cards using OSS + + This is deprecated in favor of the ALSA module + + To compile this driver as a module, choose M here: the + module will be called saa7134-oss. + config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" depends on VIDEO_SAA7134 && DVB_CORE diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile index 134f83a..1ba9984 100644 --- a/drivers/media/video/saa7134/Makefile +++ b/drivers/media/video/saa7134/Makefile @@ -4,8 +4,11 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ saa7134-video.o saa7134-input.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ - saa6752hs.o saa7134-alsa.o \ - saa7134-oss.o + saa6752hs.o + +obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o +obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o + obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o EXTRA_CFLAGS += -I$(src)/.. diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index b24a26b..ade05f7 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -60,7 +60,7 @@ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); #define dprintk(fmt, arg...) if (debug) \ - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) @@ -989,6 +989,14 @@ static int saa7134_alsa_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = alsa_device_init; + dmasound_exit = alsa_device_exit; + } else { + printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); + return -EBUSY; + } + printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); list_for_each(list,&saa7134_devlist) { @@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void) } } - dmasound_init = alsa_device_init; - dmasound_exit = alsa_device_exit; - if (dev == NULL) printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); @@ -1023,12 +1028,15 @@ static void saa7134_alsa_exit(void) snd_card_free(snd_saa7134_cards[idx]); } + dmasound_init = NULL; + dmasound_exit = NULL; printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); return; } -module_init(saa7134_alsa_init); +/* We initialize this late, to make sure the sound system is up and running */ +late_initcall(saa7134_alsa_init); module_exit(saa7134_alsa_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ricardo Cerqueira"); diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699..8badd2a 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c @@ -959,8 +959,17 @@ static int saa7134_oss_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = oss_device_init; + dmasound_exit = oss_device_exit; + } else { + printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); + return -EBUSY; + } + printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); + list_for_each(list,&saa7134_devlist) { dev = list_entry(list, struct saa7134_dev, devlist); if (dev->dmasound.priv_data == NULL) { @@ -974,9 +983,6 @@ static int saa7134_oss_init(void) if (dev == NULL) printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); - dmasound_init = oss_device_init; - dmasound_exit = oss_device_exit; - return 0; } @@ -997,12 +1003,16 @@ static void saa7134_oss_exit(void) } + dmasound_init = NULL; + dmasound_exit = NULL; + printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); return; } -module_init(saa7134_oss_init); +/* We initialize this late, to make sure the sound system is up and running */ +late_initcall(saa7134_oss_init); module_exit(saa7134_oss_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index cd7cf1b..5ac2353 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c @@ -206,7 +206,7 @@ hauppauge_tuner[] = { TUNER_ABSENT, "TCL 2002MI_3H"}, { TUNER_TCL_2002N, "TCL 2002N 5H"}, /* 100-109 */ - { TUNER_ABSENT, "Philips FMD1216ME"}, + { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, { TUNER_ABSENT, "Panasonic ENV57H12D5"}, { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |