Skip to contentSkip to conversation

Adds support for TEA5767 chipset on V4L

PATCH In review Mauro Carvalho Chehab 3 participants 4 messages Jun 12, 2005 – Jun 14, 2005 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Adds support for TEA5767 chipset on V4L

This patch adds support for TEA5767 FM radio tuner.

PS.: This patch completes first series of synchronizing patches between V4L CVS and 2.6.12-rc6-mm1.

PS 2: I'm resubmitting this patch. Please don't consider old patch.

PS 3: There were some I2C changes that affected V4L on 2.6.12-rc6-mm1. Now, it is necessary to use probe option in tuner to have its I2C addresses recognized by V4L. New patches will come to correct this behavior.

drivers/media/video/Kconfig +3 -2
diff -urN linux-2.6.12-rc6-mm1-v4l_patch/drivers/media/video/Kconfig linux-2.6.12-rc6-mm1/drivers/media/video/Kconfig
@@ -7,7 +7,7 @@
 
 comment "Video Adapters"
 
-config CONFIG_TUNER_MULTI_I2C
+config TUNER_MULTI_I2C
 	bool "Enable support for multiple I2C devices on Video Adapters (EXPERIMENTAL)"
 	depends on VIDEO_DEV && EXPERIMENTAL
 	---help---
@@ -16,7 +16,8 @@
 	  for some cards to allow tunning  both video and radio.
 	  It also improves I2C autodetection for these cards.
 
-	  Only few tuners currently is supporting this. More to come.
+	  Only few tuners currently is supporting this like those with 
+	  TEA5767 FM tuner. More to come.
 
 	  It is safe to say 'Y' here even if your card has only one I2C tuner.
 
drivers/media/video/Makefile +1 -1
diff -urN linux-2.6.12-rc6-mm1-v4l_patch/drivers/media/video/Makefile linux-2.6.12-rc6-mm1/drivers/media/video/Makefile
@@ -7,7 +7,7 @@
 zoran-objs      :=	zr36120.o zr36120_i2c.o zr36120_mem.o
 zr36067-objs	:=	zoran_procfs.o zoran_device.o \
 			zoran_driver.o zoran_card.o
-tuner-objs	:=	tuner-core.o tuner-simple.o mt20xx.o tda8290.o
+tuner-objs	:=	tuner-core.o tuner-simple.o mt20xx.o tda8290.o tea5767.o
 
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o
 
drivers/media/video/tea5767.c +282 -0

282 lines not on this page · raw message

drivers/media/video/tuner-core.c +0 -1
diff -urN linux-2.6.12-rc6-mm1-v4l_patch/drivers/media/video/tuner-core.c linux-2.6.12-rc6-mm1/drivers/media/video/tuner-core.c
@@ -26,7 +26,6 @@
 /*
  * comment line bellow to return to old behavor, where only one I2C device is supported
  */
-#define CONFIG_TUNER_MULTI_I2C /**/
 
 #define UNSET (-1U)
 
#1 lore raw

Hi Mauro,

Quoted 4 lines

PS 3: There were some I2C changes that affected V4L on 2.6.12-rc6-mm1. Now, it is necessary to use probe option in tuner to have its I2C addresses recognized by V4L. New patches will come to correct this behavior.

Which i2c patch please? The changes I made should not cause any trouble to V4L drivers. If they do this is a bug, please report it as such.

Also, a comment on your patch (which I didn't actually review, as I do not feel qualified to do so):

drivers/media/video/tea5767.c line 29

Quoted 6 lines
drivers/media/video/tea5767.c +6 -0
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#include "tuner.h"
+#include "i2c-compat.h"
+#else
+#include <media/tuner.h>
+#endif

No such test please, it is useless. This is Linux 2.6.x, no need to check this.

Signature · 1 line
Jean Delvare
#2 lore raw

Hi, Jean,

Quoted 11 lines · Jean Delvare

Hi Mauro,

Quoted 6 lines

PS 3: There were some I2C changes that affected V4L on 2.6.12-rc6-mm1. Now, it is necessary to use probe option in tuner to have its I2C addresses recognized by V4L. New patches will come to correct this behavior.

Quoted 4 lines

Which i2c patch please? The changes I made should not cause any trouble to V4L drivers. If they do this is a bug, please report it as such.

It is not a bug. The I2C patch has changed some V4L, but it was not
commited to V4L CVS. After making the diff files from CVS to -mm, we noticed that. Patch07 reaplyed part of the patch. Some other V4L CVS code had already changed to new behavior.

Quoted 5 lines

Also, a comment on your patch (which I didn't actually review, as I do not feel qualified to do so):

Quoted 13 lines

drivers/media/video/tea5767.c line 29

Quoted 8 lines
drivers/media/video/tea5767.c +6 -0
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#include "tuner.h"
+#include "i2c-compat.h"
+#else
+#include <media/tuner.h>
+#endif

No such test please, it is useless. This is Linux 2.6.x, no need to check this.

There's a script to eliminate this before submiting the patch... For
some reason, as you pointed, it had failed for this code... I'll review it next time.
This first sync patch had required so many effort, since there were
changes on both sides. I hope next time having less trouble :-)

#3 lore raw
Quoted 10 lines · Mauro Carvalho Chehab
Quoted 9 lines

drivers/media/video/tea5767.c line 29

Quoted 6 lines
drivers/media/video/tea5767.c +6 -0
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#include "tuner.h"
+#include "i2c-compat.h"
+#else
+#include <media/tuner.h>
+#endif

No such test please, it is useless. This is Linux 2.6.x, no need to check this.

Quoted 3 lines

There's a script to eliminate this before submiting the patch... For
some reason, as you pointed, it had failed for this code... I'll review it next time.

btw: is anyone testing the v4l cvs on 2.4 kernels? I stopped doing that quite a while ago, alot of stuff (dvb support) doesn't build on 2.4 kernels anyway, so its probably reasonable to cleanup the code in cvs as well and simply drop the 2.4 code ...

Gerd

Signature · 2 lines
-mm seems unusually stable at present.
	-- akpm about 2.6.12-rc3-mm3