summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Hackmann <devnull@localhost>2005-06-14 22:51:42 +0000
committerHartmut Hackmann <devnull@localhost>2005-06-14 22:51:42 +0000
commit2cecc015fc085847b2c66451f2c9a1eabd6098e1 (patch)
tree5ac3830a76b52c3bbf3700a58e7b76fca3de433a
parentd054649cd53c13ab932b5ce73fee104c6e4cda25 (diff)
downloadmediapointer-dvb-s2-2cecc015fc085847b2c66451f2c9a1eabd6098e1.tar.gz
mediapointer-dvb-s2-2cecc015fc085847b2c66451f2c9a1eabd6098e1.tar.bz2
- special FM stereo configuration for FMD1216 tuner via i2c client call
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
-rw-r--r--linux/drivers/media/video/tda9887.c29
-rw-r--r--linux/include/media/audiochip.h4
2 files changed, 25 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index c944ee24d..b83b8e67d 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -61,6 +61,7 @@ struct tda9887 {
unsigned int radio;
unsigned int config;
unsigned int pinnacle_id;
+ unsigned int philips_fmd_id;
unsigned int using_v4l2;
unsigned int radio_mode;
};
@@ -242,6 +243,13 @@ static struct tvnorm radio_mono = {
cRadioIF_38_90 ),
};
+static struct tvnorm radio_philips_fmd = {
+ .name = "radio",
+ .b = ( cFmRadio | cQSS | cAutoMuteFmActive),
+ .c = ( cAudioGain6 | cDeemphasis50 | cDeemphasisOFF | 0x1f),
+ .e = ( cGating_36 | cTunerGainLow | cRadioIF_38_90 | cAudioIF_5_5 ),
+};
+
/* ---------------------------------------------------------------------- */
static void dump_read_message(unsigned char *buf)
@@ -374,10 +382,12 @@ static int tda9887_set_tvnorm(struct tda9887 *t, char *buf)
int i;
if (t->radio) {
+ if (t-> philips_fmd_id)
+ norm = &radio_philips_fmd;
if (t->radio_mode == V4L2_TUNER_MODE_MONO)
norm = &radio_mono;
else
- norm = &radio_stereo;
+ norm = &radio_stereo;
} else {
for (i = 0; i < ARRAY_SIZE(tvnorms); i++) {
if (tvnorms[i].std & t->std) {
@@ -575,7 +585,10 @@ static int tda9887_configure(struct tda9887 *t)
if (UNSET != t->pinnacle_id) {
tda9887_set_pinnacle(t,buf);
}
-
+ if ((t->radio) && (t->philips_fmd_id)) {
+ buf[1] &= ~cOutputPort1Inactive;
+ buf[1] &= ~cOutputPort2Inactive;
+ }
tda9887_set_config(t,buf);
tda9887_set_insmod(t,buf);
@@ -627,10 +640,11 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr,
t->client = client_template;
t->std = 0;
t->pinnacle_id = UNSET;
+ t->philips_fmd_id = 0;
t->radio_mode = V4L2_TUNER_MODE_STEREO;
- i2c_set_clientdata(&t->client, t);
- i2c_attach_client(&t->client);
+ i2c_set_clientdata(&t->client, t);
+ i2c_attach_client(&t->client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -641,7 +655,7 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr,
static int tda9887_probe(struct i2c_adapter *adap)
{
#ifdef I2C_CLASS_TV_ANALOG
- if (adap->class & I2C_CLASS_TV_ANALOG)
+ if (adap->class & I2C_CLASS_TV_ANALOG)
return i2c_probe(adap, &addr_data, tda9887_attach);
#else
switch (adap->id) {
@@ -684,7 +698,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* --- configuration --- */
case AUDC_SET_RADIO:
t->radio = 1;
- tda9887_configure(t);
+ tda9887_configure(t);
break;
case AUDC_CONFIG_PINNACLE:
@@ -695,6 +709,9 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
tda9887_configure(t);
break;
}
+ case AUDC_CONFIG_PHILIPS_FMD:
+ t->philips_fmd_id = 1;
+ break;
case TDA9887_SET_CONFIG:
{
int *i = arg;
diff --git a/linux/include/media/audiochip.h b/linux/include/media/audiochip.h
index f345a61c3..0ec90d194 100644
--- a/linux/include/media/audiochip.h
+++ b/linux/include/media/audiochip.h
@@ -1,5 +1,5 @@
/*
- * $Id: audiochip.h,v 1.3 2005/06/12 04:19:19 mchehab Exp $
+ * $Id: audiochip.h,v 1.4 2005/06/14 22:51:42 hhackmann Exp $
*/
#ifndef AUDIOCHIP_H
@@ -35,5 +35,5 @@
/* misc stuff to pass around config info to i2c chips */
#define AUDC_CONFIG_PINNACLE _IOW('m',32,int)
-
+#define AUDC_CONFIG_PHILIPS_FMD _IO('m',33)
#endif /* AUDIOCHIP_H */