dect
/
linux-2.6
Archived
13
0
Fork 0

V4L/DVB (11682): STV0900/STV0903: Add support for Silicon cut >= 3

1. Support Silicon Cut >= 3.0
2. Remove support for obsolete cuts: 1.0. 1.1. 1.2
3. Try to catch more error cases

Driver doesn't now attach to obsolete silcon cuts, It just simply quits.
Results in code simplification, with removal of the obsolete cuts.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Manu Abraham 2009-05-02 18:26:58 -03:00 committed by Mauro Carvalho Chehab
parent b5b2b7ed56
commit 27d4032143
3 changed files with 770 additions and 512 deletions

File diff suppressed because it is too large Load Diff

View File

@ -77,7 +77,18 @@
#define MAKEWORD16(__a, __b) (((__a) << 8) | (__b))
#define STV090x_SEARCH_AGC2_TH 700
#define MSB(__x) ((__x >> 8) & 0xff)
#define LSB(__x) (__x & 0xff)
#define STV090x_IQPOWER_THRESHOLD 30
#define STV090x_SEARCH_AGC2_TH_CUT20 700
#define STV090x_SEARCH_AGC2_TH_CUT30 1200
#define STV090x_SEARCH_AGC2_TH(__ver) \
((__ver <= 0x20) ? \
STV090x_SEARCH_AGC2_TH_CUT20 : \
STV090x_SEARCH_AGC2_TH_CUT30)
enum stv090x_signal_state {
STV090x_NOCARRIER,
@ -201,24 +212,8 @@ struct stv090x_long_frame_crloop {
struct stv090x_short_frame_crloop {
enum stv090x_modulation modulation;
u8 crl_cut12_2; /* Cut 1.2, SR <= 3M */
u8 crl_cut20_2; /* Cut 2.0, SR < 3M */
u8 crl_cut12_5; /* Cut 1.2, 3 < SR <= 7M */
u8 crl_cut20_5; /* Cut 2.0, 3 < SR <= 7M */
u8 crl_cut12_10; /* Cut 1.2, 7 < SR <= 15M */
u8 crl_cut20_10; /* Cut 2.0, 7 < SR <= 15M */
u8 crl_cut12_20; /* Cut 1.2, 10 < SR <= 25M */
u8 crl_cut20_20; /* Cut 2.0, 10 < SR <= 25M */
u8 crl_cut12_30; /* Cut 1.2, 25 < SR <= 45M */
u8 crl_cut20_30; /* Cut 2.0, 10 < SR <= 45M */
};
struct stv090x_short_frame_vsmod_crloop {
enum stv090x_modulation modulation;
u8 crl_2; /* < 3M */
u8 crl_5; /* 3 < SR <= 7M */
u8 crl_2; /* SR < 3M */
u8 crl_5; /* 3 < SR <= 7M */
u8 crl_10; /* 7 < SR <= 15M */
u8 crl_20; /* 10 < SR <= 25M */
u8 crl_30; /* 10 < SR <= 45M */

View File

@ -793,10 +793,16 @@
#define STV090x_Px_DEMOD(__x) (0xF410 - (__x - 1) * 0x200)
#define STV090x_P1_DEMOD STV090x_Px_DEMOD(1)
#define STV090x_P2_DEMOD STV090x_Px_DEMOD(2)
#define STV090x_OFFST_Px_MANUAL_S2ROLLOFF_FIELD 7
#define STV090x_WIDTH_Px_MANUAL_S2ROLLOFF_FIELD 1
#define STV090x_OFFST_Px_DEMOD_STOP_FIELD 6
#define STV090x_WIDTH_Px_DEMOD_STOP_FIELD 1
#define STV090x_OFFST_Px_SPECINV_CONTROL_FIELD 4
#define STV090x_WIDTH_Px_SPECINV_CONTROL_FIELD 2
#define STV090x_OFFST_Px_MANUAL_ROLLOFF_FIELD 2
#define STV090x_WIDTH_Px_MANUAL_ROLLOFF_FIELD 1
#define STV090x_OFFST_Px_FORCE_ENASAMP_FIELD 3
#define STV090x_WIDTH_Px_FORCE_ENASAMP_FIELD 1
#define STV090x_OFFST_Px_MANUAL_SXROLLOFF_FIELD 2
#define STV090x_WIDTH_Px_MANUAL_SXROLLOFF_FIELD 1
#define STV090x_OFFST_Px_ROLLOFF_CONTROL_FIELD 0
#define STV090x_WIDTH_Px_ROLLOFF_CONTROL_FIELD 2
@ -1566,6 +1572,42 @@
#define STV090x_OFFST_Px_DIS_QP_1_4_FIELD 4
#define STV090x_WIDTH_Px_DIS_QP_1_4_FIELD 4
#define STV090x_Px_GAUSSR0(__x) (0xf4c0 - (__x - 1) * 0x200)
#define STV090x_P1_GAUSSR0 STV090x_Px_GAUSSR0(1)
#define STV090x_P2_GAUSSR0 STV090x_Px_GAUSSR0(2)
#define STV090x_OFFST_Px_EN_CCIMODE_FIELD 7
#define STV090x_WIDTH_Px_EN_CCIMODE_FIELD 1
#define STV090x_OFFST_Px_R0_GAUSSIEN_FIELD 0
#define STV090x_WIDTH_Px_R0_GAUSSIEN_FIELD 7
#define STV090x_Px_CCIR0(__x) (0xf4c1 - (__x - 1) * 0x200)
#define STV090x_P1_CCIR0 STV090x_Px_CCIR0(1)
#define STV090x_P2_CCIR0 STV090x_Px_CCIR0(2)
#define STV090x_OFFST_Px_CCIDETECT_PLH_FIELD 7
#define STV090x_WIDTH_Px_CCIDETECT_PLH_FIELD 1
#define STV090x_OFFST_Px_R0_CCI_FIELD 0
#define STV090x_WIDTH_Px_R0_CCI_FIELD 7
#define STV090x_Px_CCIQUANT(__x) (0xf4c2 - (__x - 1) * 0x200)
#define STV090x_P1_CCIQUANT STV090x_Px_CCIQUANT(1)
#define STV090x_P2_CCIQUANT STV090x_Px_CCIQUANT(2)
#define STV090x_OFFST_Px_CCI_BETA_FIELD 5
#define STV090x_WIDTH_Px_CCI_BETA_FIELD 3
#define STV090x_OFFST_Px_CCI_QUANT_FIELD 0
#define STV090x_WIDTH_Px_CCI_QUANT_FIELD 5
#define STV090x_Px_CCITHRESH(__x) (0xf4c3 - (__x - 1) * 0x200)
#define STV090x_P1_CCITHRESH STV090x_Px_CCITHRESH(1)
#define STV090x_P2_CCITHRESH STV090x_Px_CCITHRESH(2)
#define STV090x_OFFST_Px_CCI_THRESHOLD_FIELD 0
#define STV090x_WIDTH_Px_CCI_THRESHOLD_FIELD 8
#define STV090x_Px_CCIACC(__x) (0xf4c4 - (__x - 1) * 0x200)
#define STV090x_P1_CCIACC STV090x_Px_CCIACC(1)
#define STV090x_P2_CCIACC STV090x_Px_CCIACC(1)
#define STV090x_OFFST_Px_CCI_VALUE_FIELD 0
#define STV090x_WIDTH_Px_CCI_VALUE_FIELD 8
#define STV090x_Px_DMDRESCFG(__x) (0xF4C6 - (__x - 1) * 0x200)
#define STV090x_P1_DMDRESCFG STV090x_Px_DMDRESCFG(1)
#define STV090x_P2_DMDRESCFG STV090x_Px_DMDRESCFG(2)
@ -1847,16 +1889,28 @@
#define STV090x_Px_PDELCTRL2(__x) (0xf551 - (__x - 1) * 0x200)
#define STV090x_P1_PDELCTRL2 STV090x_Px_PDELCTRL2(1)
#define STV090x_P2_PDELCTRL2 STV090x_Px_PDELCTRL2(2)
#define STV090x_OFFST_Px_FORCE_CONTINUOUS 7
#define STV090x_WIDTH_Px_FORCE_CONTINUOUS 1
#define STV090x_OFFST_Px_RESET_UPKO_COUNT 6
#define STV090x_WIDTH_Px_RESET_UPKO_COUNT 1
#define STV090x_OFFST_Px_USER_PKTDELIN_NB 5
#define STV090x_WIDTH_Px_USER_PKTDELIN_NB 1
#define STV090x_OFFST_Px_FORCE_LOCKED 4
#define STV090x_WIDTH_Px_FORCE_LOCKED 1
#define STV090x_OFFST_Px_DATA_UNBBSCRAM 3
#define STV090x_WIDTH_Px_DATA_UNBBSCRAM 1
#define STV090x_OFFST_Px_FORCE_LONGPACKET 2
#define STV090x_WIDTH_Px_FORCE_LONGPACKET 1
#define STV090x_OFFST_Px_FRAME_MODE_FIELD 1
#define STV090x_WIDTH_Px_FRAME_MODE_FIELD 1
#define STV090x_Px_HYSTTHRESH(__x) (0xf554 - (__x - 1) * 0x200)
#define STV090x_P1_HYSTTHRESH STV090x_Px_HYSTTHRESH(1)
#define STV090x_P2_HYSTTHRESH STV090x_Px_HYSTTHRESH(2)
#define STV090x_OFFST_Px_UNLCK_THRESH_FIELD 4
#define STV090x_WIDTH_Px_UNLCK_THRESH_FIELD 4
#define STV090x_OFFST_Px_DELIN_LCK_THRESH_FIELD 0
#define STV090x_WIDTH_Px_DELIN_LCK_THRESH_FIELD 4
#define STV090x_Px_HYSTTHRESH(__x) (0xf554 - (__x - 1) * 0x200)
#define STV090x_P1_HYSTTHRESH STV090x_Px_HYSTTHRESH(1)
#define STV090x_P2_HYSTTHRESH STV090x_Px_HYSTTHRESH(2)
#define STV090x_OFFST_Px_UNLCK_THRESH_FIELD 4
#define STV090x_WIDTH_Px_UNLCK_THRESH_FIELD 4
#define STV090x_OFFST_Px_DELIN_LCK_THRESH_FIELD 0
#define STV090x_WIDTH_Px_DELIN_LCK_THRESH_FIELD 4
#define STV090x_Px_ISIENTRY(__x) (0xf55e - (__x - 1) * 0x200)
#define STV090x_P1_ISIENTRY STV090x_Px_ISIENTRY(1)