[PATCH] v4l: common part Updates and tuner additions

- Remove $Id CVS logs for V4L files
- Included newer cards.
- Added a new NEC protocol for ir based on pulse distance.
- Enable ATSC support for DViCO FusionHDTV5 Gold.
- Added tuner LG NTSC (TALN mini series).
- Fixed tea5767 autodetection.
- Resolve more tuner types.
- Commented debug function removed from mainstream.
- Remove comments from mainstream. Still on development tree.
- linux/version dependencies removed.
- BTSC Lang1 now is set to auto_stereo mode.
- New tuner standby API.
- i2c-core.c uses hexadecimal for the i2c address, so it should stay consistent.

Signed-off-by: Uli Luckas <luckas@musoft.de>
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Hermann Pitton <hermann.pitton@onlinehome.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index d60fc56..79e0bd1 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -49,7 +49,7 @@
 struct tda9887 {
 	struct i2c_client  client;
 	v4l2_std_id        std;
-	unsigned int       radio;
+	enum tuner_mode    mode;
 	unsigned int       config;
 	unsigned int       pinnacle_id;
 	unsigned int       using_v4l2;
@@ -196,7 +196,7 @@
 		.b     = ( cNegativeFmTV  |
 			   cQSS           ),
 		.c     = ( cDeemphasisON  |
-			   cDeemphasis50  ),
+			   cDeemphasis75  ),
 		.e     = ( cGating_36     |
 			   cAudioIF_4_5   |
 			   cVideoIF_45_75 ),
@@ -364,7 +364,7 @@
 	struct tvnorm *norm = NULL;
 	int i;
 
-	if (t->radio) {
+	if (t->mode == T_RADIO) {
 		if (t->radio_mode == V4L2_TUNER_MODE_MONO)
 			norm = &radio_mono;
 		else
@@ -378,7 +378,7 @@
 		}
 	}
 	if (NULL == norm) {
-		dprintk(PREFIX "Oops: no tvnorm entry found\n");
+		dprintk(PREFIX "Unsupported tvnorm entry - audio muted\n");
 		return -1;
 	}
 
@@ -569,6 +569,10 @@
 	tda9887_set_config(t,buf);
 	tda9887_set_insmod(t,buf);
 
+	if (t->mode == T_STANDBY) {
+		buf[1] |= cForcedMuteAudioON;
+	}
+
 
 	dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n",
 		buf[1],buf[2],buf[3]);
@@ -653,10 +657,17 @@
 
 	/* --- configuration --- */
 	case AUDC_SET_RADIO:
-		t->radio = 1;
+	{
+		t->mode = T_RADIO;
 		tda9887_configure(t);
 		break;
-
+	}
+	case TUNER_SET_STANDBY:
+	{
+		t->mode = T_STANDBY;
+		tda9887_configure(t);
+		break;
+	}
 	case AUDC_CONFIG_PINNACLE:
 	{
 		int *i = arg;
@@ -689,7 +700,7 @@
 		struct video_channel *vc = arg;
 
 		CHECK_V4L2;
-		t->radio = 0;
+		t->mode = T_ANALOG_TV;
 		if (vc->norm < ARRAY_SIZE(map))
 			t->std = map[vc->norm];
 		tda9887_fixup_std(t);
@@ -701,7 +712,7 @@
 		v4l2_std_id *id = arg;
 
 		SWITCH_V4L2;
-		t->radio = 0;
+		t->mode = T_ANALOG_TV;
 		t->std   = *id;
 		tda9887_fixup_std(t);
 		tda9887_configure(t);
@@ -713,14 +724,14 @@
 
 		SWITCH_V4L2;
 		if (V4L2_TUNER_ANALOG_TV == f->type) {
-			if (t->radio == 0)
+			if (t->mode == T_ANALOG_TV)
 				return 0;
-			t->radio = 0;
+			t->mode = T_ANALOG_TV;
 		}
 		if (V4L2_TUNER_RADIO == f->type) {
-			if (t->radio == 1)
+			if (t->mode == T_RADIO)
 				return 0;
-			t->radio = 1;
+			t->mode = T_RADIO;
 		}
 		tda9887_configure(t);
 		break;
@@ -735,7 +746,7 @@
 		};
 		struct v4l2_tuner* tuner = arg;
 
-		if (t->radio) {
+		if (t->mode == T_RADIO) {
 			__u8 reg = 0;
 			tuner->afc=0;
 			if (1 == i2c_master_recv(&t->client,&reg,1))
@@ -747,7 +758,7 @@
 	{
 		struct v4l2_tuner* tuner = arg;
 
-		if (t->radio) {
+		if (t->mode == T_RADIO) {
 			t->radio_mode = tuner->audmode;
 			tda9887_configure (t);
 		}