summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-07-07 06:42:28 +0000
committerGerd Knorr <devnull@localhost>2004-07-07 06:42:28 +0000
commitb51f6e936a61b0ac199a778d45f67f9db48313f9 (patch)
treeac522e1723e9baabe707d3cdcfb7295d582f3e21 /linux/drivers
parenta3f6ab922affe971512b83a9029f4c4061e0b60b (diff)
downloadmediapointer-dvb-s2-b51f6e936a61b0ac199a778d45f67f9db48313f9.tar.gz
mediapointer-dvb-s2-b51f6e936a61b0ac199a778d45f67f9db48313f9.tar.bz2
- saa7134: add automute option.
- tda9887: add config i2c command.
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c13
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c7
-rw-r--r--linux/drivers/media/video/cx88/cx88.h3
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c51
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c5
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c3
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c34
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h5
-rw-r--r--linux/drivers/media/video/tda9887.c42
11 files changed, 137 insertions, 30 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index c568c73df..aa8d87898 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -115,7 +115,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_WINFAST2000XP] = {
.name = "Leadtek Winfast 2000XP Expert",
.tuner_type = 44,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
@@ -159,7 +159,7 @@ struct cx88_board cx88_boards[] = {
// values for PAL from DScaler
.name = "MSI TV-@nywhere Master",
.tuner_type = 33,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
@@ -189,7 +189,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_WINFAST_DV2000] = {
.name = "Leadtek Winfast DV2000",
.tuner_type = 38,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
@@ -218,7 +218,6 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_IODATA_GVVCP3PCI] = {
.name = "IODATA GV-VCP3/PCI",
.tuner_type = TUNER_ABSENT,
- .needs_tda9887 = 0,
.input = {{
.type = CX88_VMUX_COMPOSITE1,
.vmux = 0,
@@ -233,7 +232,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_PROLINK_PLAYTVPVR] = {
.name = "Prolink PlayTV PVR",
.tuner_type = 43,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
@@ -255,7 +254,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_ASUS_PVR_416] = {
.name = "ASUS PVR-416",
.tuner_type = 43,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
@@ -282,7 +281,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_MSI_TVANYWHERE] = {
.name = "MSI TV-@nywhere",
.tuner_type = 33,
- .needs_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index 1ced37b77..fcf8b1abd 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -93,6 +93,8 @@ static int attach_inform(struct i2c_client *client)
if (dev->tuner_type != UNSET)
cx8800_call_i2c_clients(dev,TUNER_SET_TYPE,&dev->tuner_type);
+ if (dev->tda9887_conf)
+ cx8800_call_i2c_clients(dev,TDA9887_SET_CONFIG,&dev->tda9887_conf);
if (1 /* fixme: debug */)
printk("%s: i2c attach [client=%s]\n",
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index deaa2017a..6b0584f0f 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -2398,6 +2398,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
dev->tuner_type = tuner[cx8800_devcount];
if (UNSET == dev->tuner_type)
dev->tuner_type = cx88_boards[dev->board].tuner_type;
+ dev->tda9887_conf = cx88_boards[dev->board].tda9887_conf;
/* get mmio */
if (!request_mem_region(pci_resource_start(pci_dev,0),
@@ -2454,11 +2455,13 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
/* load and configure helper modules */
if (TUNER_ABSENT != dev->tuner_type)
request_module("tuner");
- if (cx88_boards[dev->board].needs_tda9887)
+ if (dev->tda9887_conf)
request_module("tda9887");
if (dev->tuner_type != UNSET)
cx8800_call_i2c_clients(dev,TUNER_SET_TYPE,&dev->tuner_type);
-
+ if (dev->tda9887_conf)
+ cx8800_call_i2c_clients(dev,TDA9887_SET_CONFIG,&dev->tda9887_conf);
+
/* register v4l devices */
dev->video_dev = vdev_init(dev,&cx8800_video_template,"video");
err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER,
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index 1b59c808b..9d4cd4037 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -168,7 +168,7 @@ struct cx88_input {
struct cx88_board {
char *name;
unsigned int tuner_type;
- int needs_tda9887:1;
+ int tda9887_conf;
struct cx88_input input[8];
struct cx88_input radio;
};
@@ -261,6 +261,7 @@ struct cx8800_dev {
/* config info */
unsigned int board;
unsigned int tuner_type;
+ unsigned int tda9887_conf;
unsigned int has_radio;
/* i2c i/o */
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index 9ae587744..0ff596b09 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -154,6 +154,26 @@ struct saa7134_board saa7134_boards[] = {
.gpio = 0x8000,
},
},
+ [SAA7135_BOARD_FLYTVPLATINUM] = {
+ /* "Arnaud Quette" <aquette@free.fr> */
+ .name = "LifeView FlyTV Platinum",
+ .audio_clock = 0x00200000,
+ .tuner_type = TUNER_PHILIPS_SECAM,
+ .inputs = {{
+ .name = name_tv,
+ .vmux = 1,
+ .amux = LINE2,
+ .tv = 1,
+ },{
+ .name = name_comp1,
+ .vmux = 0,
+ .amux = LINE2,
+ },{
+ .name = name_svideo,
+ .vmux = 8,
+ .amux = LINE2,
+ }},
+ },
[SAA7134_BOARD_EMPRESS] = {
/* "Gert Vervoort" <gert.vervoort@philips.com> */
.name = "EMPRESS",
@@ -243,7 +263,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "KNC One TV-Station RDS / Typhoon TV Tuner RDS",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -278,7 +298,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "KNC One TV-Station DVR",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.gpiomask = 0x820000,
.inputs = {{
.name = name_tv,
@@ -333,7 +353,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "Medion 5044",
.audio_clock = 0x00187de7, // was: 0x00200000,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -414,7 +434,7 @@ struct saa7134_board saa7134_boards[] = {
//.audio_clock = 0x00200000,
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -440,7 +460,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "Typhoon TV+Radio 90031",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -503,7 +523,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "ASUS TV-FM 7134",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -666,7 +686,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "AverMedia M156 / Medion 2819",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -719,7 +739,7 @@ struct saa7134_board saa7134_boards[] = {
// probably wrong, the 7133 one is the NTSC version ...
// .tuner_type = TUNER_PHILIPS_FM1236_MK3
.tuner_type = TUNER_LG_NTSC_NEW_TAPC,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -743,7 +763,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "Pinnacle PCTV Stereo (saa7134)",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_MT2032,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 3,
@@ -957,7 +977,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "AverMedia 305",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 1,
@@ -989,7 +1009,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "UPMOST PURPLE TV",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1236_MK3,
- .need_tda9887 = 1,
+ .tda9887_conf = TDA9887_PRESENT,
.inputs = {{
.name = name_tv,
.vmux = 7,
@@ -1104,6 +1124,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.driver_data = SAA7134_BOARD_FLYVIDEO2000,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
+ .device = PCI_DEVICE_ID_PHILIPS_SAA7135,
+ .subvendor = 0x5168,
+ .subdevice = 0x0212,
+ .driver_data = SAA7134_BOARD_FLYTVPLATINUM,
+ },{
+ .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = 0x16be,
.subdevice = 0x0003,
@@ -1343,8 +1369,9 @@ int saa7134_board_init(struct saa7134_dev *dev)
switch (dev->board) {
case SAA7134_BOARD_FLYVIDEO2000:
case SAA7134_BOARD_FLYVIDEO3000:
- board_flyvideo(dev);
dev->has_remote = 1;
+ case SAA7135_BOARD_FLYTVPLATINUM:
+ board_flyvideo(dev);
break;
case SAA7134_BOARD_CINERGY400:
case SAA7134_BOARD_CINERGY600:
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 1567fc067..d031d5dde 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -870,7 +870,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
must_configure_manually();
dev->board = SAA7134_BOARD_UNKNOWN;
}
- dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+ dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+ dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
if (UNSET != tuner[saa7134_devcount])
dev->tuner_type = tuner[saa7134_devcount];
printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
@@ -921,7 +922,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
/* load i2c helpers */
if (TUNER_ABSENT != dev->tuner_type)
request_module("tuner");
- if (saa7134_boards[dev->board].need_tda9887)
+ if (dev->tda9887_conf)
request_module("tda9887");
if (card_has_ts(dev))
request_module("saa6752hs");
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index b039c0385..e35cfd10f 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -327,8 +327,10 @@ static int attach_inform(struct i2c_client *client)
{
struct saa7134_dev *dev = client->adapter->algo_data;
int tuner = dev->tuner_type;
+ int conf = dev->tda9887_conf;
saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&tuner);
+ saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&conf);
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index c5950ba28..7776de191 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -512,7 +512,8 @@ static int tvaudio_thread(void *data)
dprintk("tvaudio thread scan start [%d]\n",dev->thread.scan1);
dev->tvaudio = NULL;
tvaudio_init(dev);
- dev->automute = 1;
+ if (dev->ctl_automute)
+ dev->automute = 1;
mute_input_7134(dev);
/* give the tuner some time */
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 8afa9f441..4e1b864f7 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -272,7 +272,8 @@ static struct saa7134_tvnorm tvnorms[] = {
#define V4L2_CID_PRIVATE_INVERT (V4L2_CID_PRIVATE_BASE + 0)
#define V4L2_CID_PRIVATE_Y_ODD (V4L2_CID_PRIVATE_BASE + 1)
#define V4L2_CID_PRIVATE_Y_EVEN (V4L2_CID_PRIVATE_BASE + 2)
-#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 3)
+#define V4L2_CID_PRIVATE_AUTOMUTE (V4L2_CID_PRIVATE_BASE + 3)
+#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 4)
static const struct v4l2_queryctrl no_ctrl = {
.name = "42",
@@ -356,6 +357,13 @@ static const struct v4l2_queryctrl video_ctrls[] = {
.maximum = 128,
.default_value = 0,
.type = V4L2_CTRL_TYPE_INTEGER,
+ },{
+ .id = V4L2_CID_PRIVATE_AUTOMUTE,
+ .name = "automute",
+ .minimum = 0,
+ .maximum = 1,
+ .default_value = 1,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
}
};
static const unsigned int CTRLS = ARRAY_SIZE(video_ctrls);
@@ -1043,6 +1051,9 @@ static int get_control(struct saa7134_dev *dev, struct v4l2_control *c)
case V4L2_CID_PRIVATE_Y_ODD:
c->value = dev->ctl_y_odd;
break;
+ case V4L2_CID_PRIVATE_AUTOMUTE:
+ c->value = dev->ctl_automute;
+ break;
default:
return -EINVAL;
}
@@ -1118,6 +1129,17 @@ static int set_control(struct saa7134_dev *dev, struct saa7134_fh *fh,
dev->ctl_y_odd = c->value;
restart_overlay = 1;
break;
+ case V4L2_CID_PRIVATE_AUTOMUTE:
+ dev->ctl_automute = c->value;
+ if (dev->tda9887_conf) {
+ if (dev->ctl_automute)
+ dev->tda9887_conf |= TDA9887_AUTOMUTE;
+ else
+ dev->tda9887_conf &= ~TDA9887_AUTOMUTE;
+ saa7134_i2c_call_clients(dev, TDA9887_SET_CONFIG,
+ &dev->tda9887_conf);
+ }
+ break;
default:
return -EINVAL;
}
@@ -2246,9 +2268,12 @@ int saa7134_video_init1(struct saa7134_dev *dev)
dev->ctl_hue = ctrl_by_id(V4L2_CID_HUE)->default_value;
dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;
dev->ctl_volume = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;
+ dev->ctl_mute = ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;
+ dev->ctl_invert = ctrl_by_id(V4L2_CID_PRIVATE_INVERT)->default_value;
+ dev->ctl_automute = ctrl_by_id(V4L2_CID_PRIVATE_AUTOMUTE)->default_value;
- dev->ctl_invert = 0;
- dev->ctl_mute = 1;
+ if (dev->tda9887_conf && dev->ctl_automute)
+ dev->tda9887_conf |= TDA9887_AUTOMUTE;
dev->automute = 0;
INIT_LIST_HEAD(&dev->video_q.queue);
@@ -2304,7 +2329,8 @@ void saa7134_irq_video_intl(struct saa7134_dev *dev)
saa7134_tvaudio_do_scan(dev);
} else {
/* no video signal -> mute audio */
- dev->automute = 1;
+ if (dev->ctl_automute)
+ dev->automute = 1;
saa7134_tvaudio_setmute(dev);
}
}
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index e77ba8805..c6a2c2a8a 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -185,6 +185,7 @@ struct saa7134_format {
#define SAA7133_BOARD_UPMOST_PURPLE_TV 36
#define SAA7134_BOARD_ITEMS_MTV005 37
#define SAA7134_BOARD_CINERGY200 38
+#define SAA7134_BOARD_FLYTVPLATINUM 39
#define SAA7134_INPUT_MAX 8
@@ -213,7 +214,7 @@ struct saa7134_board {
/* i2c chip info */
unsigned int tuner_type;
- unsigned int need_tda9887:1;
+ unsigned int tda9887_conf;
};
#define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name)
@@ -391,6 +392,7 @@ struct saa7134_dev {
/* config info */
unsigned int board;
unsigned int tuner_type;
+ unsigned int tda9887_conf;
unsigned int gpio_value;
/* i2c i/o */
@@ -426,6 +428,7 @@ struct saa7134_dev {
int ctl_mirror;
int ctl_y_odd;
int ctl_y_even;
+ int ctl_automute;
/* crop */
struct v4l2_rect crop_bounds;
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index ee2bdd1a7..9cf8a8b69 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -9,10 +9,12 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "audiochip.h"
+#include "tuner.h"
#include "id.h"
#include "i2c-compat.h"
#else
#include <media/audiochip.h>
+#include <media/tuner.h>
#include <media/id.h>
#endif
@@ -53,6 +55,7 @@ struct tda9887 {
struct i2c_client client;
v4l2_std_id std;
unsigned int radio;
+ unsigned int config;
unsigned int pinnacle_id;
unsigned int using_v4l2;
};
@@ -403,6 +406,36 @@ static int tda9887_set_insmod(struct tda9887 *t, char *buf)
return 0;
}
+static int tda9887_set_config(struct tda9887 *t, char *buf)
+{
+ if (t->config & TDA9887_PORT1)
+ buf[1] |= cOutputPort1Inactive;
+ if (t->config & TDA9887_PORT2)
+ buf[1] |= cOutputPort2Inactive;
+ if (t->config & TDA9887_QSS)
+ buf[1] |= cQSS;
+ if (t->config & TDA9887_INTERCARRIER)
+ buf[1] &= ~cQSS;
+
+ if (t->config & TDA9887_AUTOMUTE)
+ buf[1] |= cAutoMuteFmActive;
+ if (t->config & TDA9887_DEEMPHASIS_MASK) {
+ buf[2] &= ~0x60;
+ switch (t->config & TDA9887_DEEMPHASIS_MASK) {
+ case TDA9887_DEEMPHASIS_NONE:
+ buf[2] |= cDeemphasisOFF;
+ break;
+ case TDA9887_DEEMPHASIS_50:
+ buf[2] |= cDeemphasisON | cDeemphasis50;
+ break;
+ case TDA9887_DEEMPHASIS_75:
+ buf[2] |= cDeemphasisON | cDeemphasis75;
+ break;
+ }
+ }
+ return 0;
+}
+
/* ---------------------------------------------------------------------- */
static int tda9887_set_pinnacle(struct tda9887 *t, char *buf)
@@ -505,6 +538,7 @@ static int tda9887_configure(struct tda9887 *t)
if (UNSET != t->pinnacle_id) {
tda9887_set_pinnacle(t,buf);
}
+ tda9887_set_config(t,buf);
tda9887_set_insmod(t,buf);
dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n",
@@ -611,6 +645,14 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
tda9887_configure(t);
break;
}
+ case TDA9887_SET_CONFIG:
+ {
+ int *i = arg;
+
+ t->config = *i;
+ tda9887_configure(t);
+ break;
+ }
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */