From: Johannes Stezenbach <js@linuxtv.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org,
Hartmut Hackmann <hartmut.hackmann@t-online.de>
Subject: [DVB patch 11/51] frontend: tda1004x: support tda827x tuners
Date: Mon, 27 Jun 2005 14:06:11 +0200 [thread overview]
Message-ID: <20050627121411.722717000@abc> (raw)
In-Reply-To: 20050627120600.739151000@abc
[-- Attachment #1: dvb-frontend-tda1004x-fixes.patch --]
[-- Type: text/plain, Size: 5534 bytes --]
From: Hartmut Hackmann <hartmut.hackmann@t-online.de>
o added preliminary support for tda827x tuners
o set parameters for drift compensation to 0
makes no sense for DVB-T but can prevent lock
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
drivers/media/dvb/frontends/tda1004x.c | 44 ++++++++++++++++++++++++++++++---
drivers/media/dvb/frontends/tda1004x.h | 4 +++
2 files changed, 44 insertions(+), 4 deletions(-)
Index: linux-2.6.12-git8/drivers/media/dvb/frontends/tda1004x.c
===================================================================
--- linux-2.6.12-git8.orig/drivers/media/dvb/frontends/tda1004x.c 2005-06-27 13:23:04.000000000 +0200
+++ linux-2.6.12-git8/drivers/media/dvb/frontends/tda1004x.c 2005-06-27 13:23:05.000000000 +0200
@@ -120,6 +120,8 @@ static int debug;
#define TDA10046H_GPIO_OUT_SEL 0x41
#define TDA10046H_GPIO_SELECT 0x42
#define TDA10046H_AGC_CONF 0x43
+#define TDA10046H_AGC_THR 0x44
+#define TDA10046H_AGC_RENORM 0x45
#define TDA10046H_AGC_GAINS 0x46
#define TDA10046H_AGC_TUN_MIN 0x47
#define TDA10046H_AGC_TUN_MAX 0x48
@@ -272,14 +274,26 @@ static int tda10046h_set_bandwidth(struc
switch (bandwidth) {
case BANDWIDTH_6_MHZ:
tda1004x_write_buf(state, TDA10046H_TIME_WREF1, bandwidth_6mhz, sizeof(bandwidth_6mhz));
+ if (state->config->if_freq == TDA10046_FREQ_045) {
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0x09);
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x4f);
+ }
break;
case BANDWIDTH_7_MHZ:
tda1004x_write_buf(state, TDA10046H_TIME_WREF1, bandwidth_7mhz, sizeof(bandwidth_7mhz));
+ if (state->config->if_freq == TDA10046_FREQ_045) {
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0x0a);
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x79);
+ }
break;
case BANDWIDTH_8_MHZ:
tda1004x_write_buf(state, TDA10046H_TIME_WREF1, bandwidth_8mhz, sizeof(bandwidth_8mhz));
+ if (state->config->if_freq == TDA10046_FREQ_045) {
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0x0b);
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0xa3);
+ }
break;
default:
@@ -420,6 +434,14 @@ static void tda10046_init_plls(struct dv
tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0xd4);
tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x13);
break;
+ case TDA10046_FREQ_045:
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0x0b);
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0xa3);
+ break;
+ case TDA10046_FREQ_052:
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_MSB, 0x0c);
+ tda1004x_write_byteI(state, TDA10046H_FREQ_PHY2_LSB, 0x06);
+ break;
}
tda10046h_set_bandwidth(state, BANDWIDTH_8_MHZ); // default bandwidth 8 MHz
}
@@ -590,6 +612,16 @@ static int tda10046_init(struct dvb_fron
tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x0a); // AGC setup
tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x60); // set AGC polarities
break;
+ case TDA10046_AGC_IFO_AUTO_POS:
+ tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x0a); // AGC setup
+ tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x00); // set AGC polarities
+ break;
+ case TDA10046_AGC_TDA827X:
+ tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x02); // AGC setup
+ tda1004x_write_byteI(state, TDA10046H_AGC_THR, 0x70); // AGC Threshold
+ tda1004x_write_byteI(state, TDA10046H_AGC_RENORM, 0x0E); // Gain Renormalize
+ tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x60); // set AGC polarities
+ break;
}
tda1004x_write_byteI(state, TDA10046H_CONF_TRISTATE1, 0x61); // Turn both AGC outputs on
tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MIN, 0); // }
@@ -1091,9 +1123,12 @@ static int tda1004x_sleep(struct dvb_fro
break;
case TDA1004X_DEMOD_TDA10046:
- tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1);
- if (state->config->pll_sleep != NULL)
+ if (state->config->pll_sleep != NULL) {
+ tda1004x_enable_tuner_i2c(state);
state->config->pll_sleep(fe);
+ tda1004x_disable_tuner_i2c(state);
+ }
+ tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1);
break;
}
state->initialised = 0;
@@ -1104,8 +1139,9 @@ static int tda1004x_sleep(struct dvb_fro
static int tda1004x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
{
fesettings->min_delay_ms = 800;
- fesettings->step_size = 166667;
- fesettings->max_drift = 166667*2;
+ /* Drift compensation makes no sense for DVB-T */
+ fesettings->step_size = 0;
+ fesettings->max_drift = 0;
return 0;
}
Index: linux-2.6.12-git8/drivers/media/dvb/frontends/tda1004x.h
===================================================================
--- linux-2.6.12-git8.orig/drivers/media/dvb/frontends/tda1004x.h 2005-06-27 13:23:02.000000000 +0200
+++ linux-2.6.12-git8/drivers/media/dvb/frontends/tda1004x.h 2005-06-27 13:23:05.000000000 +0200
@@ -34,11 +34,15 @@ enum tda10046_xtal {
enum tda10046_agc {
TDA10046_AGC_DEFAULT, /* original configuration */
TDA10046_AGC_IFO_AUTO_NEG, /* IF AGC only, automatic, negtive */
+ TDA10046_AGC_IFO_AUTO_POS, /* IF AGC only, automatic, positive */
+ TDA10046_AGC_TDA827X, /* IF AGC only, special setup for tda827x */
};
enum tda10046_if {
TDA10046_FREQ_3617, /* original config, 36,166 MHZ */
TDA10046_FREQ_3613, /* 36,13 MHZ */
+ TDA10046_FREQ_045, /* low IF, 4.0, 4.5, or 5.0 MHZ */
+ TDA10046_FREQ_052, /* low IF, 5.1667 MHZ for tda9889 */
};
struct tda1004x_config
--
next prev parent reply other threads:[~2005-06-27 14:02 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-27 12:06 [DVB patch 00/51] DVB update Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 01/51] cinergyT2: endianness fix for raw remote-control keys Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 02/51] remove obsolete skystar2 driver Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 03/51] core: fix race condition in FE_READ_STATUS ioctl Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 04/51] core: add workaround for tuning problem Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 05/51] core: demux error handling fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 06/51] core: dmxdev cleanups Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 07/51] frontend: remove unused I2C ids Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 08/51] frontend: tda1004x update Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 09/51] frontend: bcm3510: fix firmware version check Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 10/51] add missing release_firmware() calls Johannes Stezenbach
2005-06-27 12:06 ` Johannes Stezenbach [this message]
2005-06-27 12:06 ` [DVB patch 12/51] frontend: cx22702: support for cxusb Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 13/51] frontend: l64781: improve tuning Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 14/51] DVB update Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 15/51] add Pluto2 driver Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 16/51] saa7146: kj pci_module_init cleanup Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 17/51] flexcop: add big endian register definitions Johannes Stezenbach
2005-06-27 22:50 ` Andrew Morton
2005-06-27 23:14 ` Johannes Stezenbach
2005-06-28 8:51 ` Patrick Boettcher
2005-06-27 12:06 ` [DVB patch 18/51] flexcop: woraround irq stop problem Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 19/51] Twinhan DST: frontend fixes Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 20/51] Twinhan DST: frontend polarization fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 21/51] ttusb-dec: kfree cleanup Johannes Stezenbach
2005-06-27 22:54 ` Andrew Morton
2005-06-27 23:20 ` Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 22/51] ttpci: add support for Technotrend/Hauppauge DVB-S SE Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 23/51] ttpci: support for new TT DVB-T-CI Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 24/51] ttpci: fix error handling for firmware communication Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 25/51] ttpci: fix bug in timeout handling Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 26/51] ttpci: fix AUDUIO_CONTINUE ioctl Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 27/51] ttpci: budget-av / tu1216 fix for QAM128 Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 28/51] ttpci: more error handling for firmware communication Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 29/51] ttpci: error handling fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 30/51] ttpci: cleanup indentation + whitespace Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 31/51] ttpci: make av7110_fe_lock_fix() retryable Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 32/51] ttpci: kj printk fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 33/51] ttpci: add support for Hauppauge/TT DVB-C budget Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 34/51] dvb-usb: support Artect T1 with broken USB ids Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 35/51] usb: fix ADSTech Instant TV DVB-T USB2.0 support Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 36/51] usb: add isochronous streaming method Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 37/51] frontend: add FMD1216ME PLL Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 38/51] usb: support Medion hybrid USB2.0 DVB-T/analogue box Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 39/51] usb: add module parm to disable remote control polling Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 40/51] frontend: add ALPS TDED4 PLL Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 41/51] usb: digitv-usb fixes Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 42/51] usb: dvb_usb_properties init fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 43/51] usb: cxusb DVB-T fixes Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 44/51] usb: add VideoWalker DVB-T USB ids Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 45/51] usb: digitv memcpy fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 46/51] usb doc update Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 47/51] usb Kconfig help text update Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 48/51] usb: add vp7045 IR keymap Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 49/51] usb: fix WideView USB ids Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 50/51] usb: vp7045 IR map fix Johannes Stezenbach
2005-06-27 12:06 ` [DVB patch 51/51] usb: IR input fixes Johannes Stezenbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050627121411.722717000@abc \
--to=js@linuxtv.org \
--cc=akpm@osdl.org \
--cc=hartmut.hackmann@t-online.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.