From 214fa1dbeaff3457ef8a7018af320e711cb25a86 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 3 Nov 2007 22:20:59 -0200 Subject: Add a hint for boards without unique USB ID From: Mauro Carvalho Chehab This patch adds a function to allow trying to detect boards that shares the generic IDs. The current detection method is based at eeprom checksum. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/drivers/media/video/em28xx/em28xx.h') diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 8b4c54f9f..13afe0ab9 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -260,6 +260,8 @@ struct em28xx { int interlaced; /* 1=interlace fileds, 0=just top fileds */ int type; + unsigned long hash; /* eeprom hash - for boards with generic ID */ + /* states */ enum em28xx_dev_state state; enum em28xx_stream_state stream; -- cgit v1.2.3 From 3ed99c75c6b16c3365499e240d87a21123f37208 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 3 Nov 2007 22:21:57 -0200 Subject: Add entry for Pixelview Prolink PlayTV USB 2.0 From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/em28xx/em28xx.h') diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 13afe0ab9..4cf310f57 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -49,6 +49,7 @@ #define EM2880_BOARD_TERRATEC_HYBRID_XS 11 #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 #define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 +#define EM2820_BOARD_PROLINK_PLAYTV_USB2 14 #define UNSET -1 -- cgit v1.2.3 From a66f6aab3859293e78effa93f7824c3aa0c75e33 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 3 Nov 2007 22:22:38 -0200 Subject: em28xx: fix locking to allow accesses from 2 different threads at the same time From: Sascha Sommer The attached patch modifies the em28xx driver so that there can be ioctls from multiple different threads. This is necessary for capture apps like MPlayer that use different threads for capturing and channel tuning. Now the locking is only done for the ioctls that change properties of the device or access the i2c bus. It also removes some locks that look unnecessary: In em28xx_init_dev: the videodevice is not registered yet so nothing can access the hardware meanwhile, the device struct is not assigned to the interface yet so no race with disconnect is possible In em28xx_release_resources: it gets only called when dev->lock is already held Signed-off-by: Sascha Sommer Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/em28xx/em28xx.h') diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 4cf310f57..4b4eaa43c 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -269,7 +269,7 @@ struct em28xx { enum em28xx_io_method io; /* locks */ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) - struct mutex lock, fileop_lock; + struct mutex lock; #else struct semaphore lock, fileop_lock; #endif -- cgit v1.2.3 From 62af2ba09181e8b6c7db6fc777770860ae7674b5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 3 Nov 2007 19:05:07 +0100 Subject: em28xx: add support for vgear pockettv From: Sascha Sommer attached patch adds support for the vgear pockettv. It seems to require a write to another register for audio to work. I checked my old cinergydrv and we did the same register write there. I therefore enabled it for all em2800 based devices. Signed-off-by: Sascha Sommer Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linux/drivers/media/video/em28xx/em28xx.h') diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 4b4eaa43c..e23760122 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -50,6 +50,7 @@ #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 #define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 #define EM2820_BOARD_PROLINK_PLAYTV_USB2 14 +#define EM2800_BOARD_VGEAR_POCKETTV 15 #define UNSET -1 @@ -342,6 +343,9 @@ extern struct em28xx_board em28xx_boards[]; extern struct usb_device_id em28xx_id_table[]; extern const unsigned int em28xx_bcount; +/* em2800 registers */ +#define EM2800_AUDIOSRC_REG 0x08 + /* em28xx registers */ #define CHIPID_REG 0x0a #define USBSUSP_REG 0x0c /* */ @@ -397,6 +401,8 @@ extern const unsigned int em28xx_bcount; #define VIDEO_AC97 0x14 /* register settings */ +#define EM2800_AUDIO_SRC_TUNER 0x0d +#define EM2800_AUDIO_SRC_LINE 0x0c #define EM28XX_AUDIO_SRC_TUNER 0xc0 #define EM28XX_AUDIO_SRC_LINE 0x80 @@ -418,6 +424,12 @@ extern const unsigned int em28xx_bcount; inline static int em28xx_audio_source(struct em28xx *dev, int input) { + if(dev->is_em2800){ + u8 tmp = EM2800_AUDIO_SRC_TUNER; + if(input == EM28XX_AUDIO_SRC_LINE) + tmp = EM2800_AUDIO_SRC_LINE; + em28xx_write_regs(dev, EM2800_AUDIOSRC_REG, &tmp, 1); + } return em28xx_write_reg_bits(dev, AUDIOSRC_REG, input, 0xc0); } -- cgit v1.2.3