aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dibx000_common.h
diff options
context:
space:
mode:
authorPatrick Boettcher <pboettcher@dibcom.fr>2006-10-17 17:28:14 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 05:51:00 -0500
commit69ea31e7debdefcf1412e8d590ae9bd90cf9253f (patch)
tree7c50602aed2953c92ce8b636d0e8141febb52ef5 /drivers/media/dvb/frontends/dibx000_common.h
parent3cc2e4c3a137075ee66e2d4ce95a95ba153bd7b9 (diff)
V4L/DVB (4766): Add working dib7000m-module
First working version of the dib7000m-driver. This commit also makes the Hauppauge NOVA-T Stick working. Signed-off-by: Francois Kanounnikoff <fkanounnikoff@dibcom.fr> Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/dibx000_common.h')
-rw-r--r--drivers/media/dvb/frontends/dibx000_common.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/dibx000_common.h b/drivers/media/dvb/frontends/dibx000_common.h
index bb0c65f8aee8..a1df604366c3 100644
--- a/drivers/media/dvb/frontends/dibx000_common.h
+++ b/drivers/media/dvb/frontends/dibx000_common.h
@@ -32,6 +32,13 @@ extern void dibx000_exit_i2c_master(struct dibx000_i2c_master *mst);
32#define BAND_LBAND 0x01 32#define BAND_LBAND 0x01
33#define BAND_UHF 0x02 33#define BAND_UHF 0x02
34#define BAND_VHF 0x04 34#define BAND_VHF 0x04
35#define BAND_SBAND 0x08
36#define BAND_FM 0x10
37
38#define BAND_OF_FREQUENCY(freq_kHz) ( (freq_kHz) <= 115000 ? BAND_FM : \
39 (freq_kHz) <= 250000 ? BAND_VHF : \
40 (freq_kHz) <= 863000 ? BAND_UHF : \
41 (freq_kHz) <= 2000000 ? BAND_LBAND : BAND_SBAND )
35 42
36struct dibx000_agc_config { 43struct dibx000_agc_config {
37 /* defines the capabilities of this AGC-setting - using the BAND_-defines*/ 44 /* defines the capabilities of this AGC-setting - using the BAND_-defines*/
@@ -129,6 +136,7 @@ enum dibx000_adc_states {
129 136
130/* I hope I can get rid of the following kludge in the near future */ 137/* I hope I can get rid of the following kludge in the near future */
131struct dibx000_ofdm_channel { 138struct dibx000_ofdm_channel {
139 u32 RF_kHz;
132 u8 Bw; 140 u8 Bw;
133 s16 nfft; 141 s16 nfft;
134 s16 guard; 142 s16 guard;
@@ -138,9 +146,11 @@ struct dibx000_ofdm_channel {
138 s16 vit_alpha; 146 s16 vit_alpha;
139 s16 vit_code_rate_hp; 147 s16 vit_code_rate_hp;
140 s16 vit_code_rate_lp; 148 s16 vit_code_rate_lp;
149 u8 intlv_native;
141}; 150};
142 151
143#define FEP2DIB(fep,ch) \ 152#define FEP2DIB(fep,ch) \
153 (ch)->RF_kHz = (fep)->frequency / 1000; \
144 (ch)->Bw = (fep)->u.ofdm.bandwidth; \ 154 (ch)->Bw = (fep)->u.ofdm.bandwidth; \
145 (ch)->nfft = (fep)->u.ofdm.transmission_mode == TRANSMISSION_MODE_AUTO ? -1 : (fep)->u.ofdm.transmission_mode; \ 155 (ch)->nfft = (fep)->u.ofdm.transmission_mode == TRANSMISSION_MODE_AUTO ? -1 : (fep)->u.ofdm.transmission_mode; \
146 (ch)->guard = (fep)->u.ofdm.guard_interval == GUARD_INTERVAL_AUTO ? -1 : (fep)->u.ofdm.guard_interval; \ 156 (ch)->guard = (fep)->u.ofdm.guard_interval == GUARD_INTERVAL_AUTO ? -1 : (fep)->u.ofdm.guard_interval; \
@@ -149,7 +159,8 @@ struct dibx000_ofdm_channel {
149 (ch)->vit_select_hp = 1; \ 159 (ch)->vit_select_hp = 1; \
150 (ch)->vit_alpha = 1; \ 160 (ch)->vit_alpha = 1; \
151 (ch)->vit_code_rate_hp = (fep)->u.ofdm.code_rate_HP == FEC_AUTO ? -1 : (fep)->u.ofdm.code_rate_HP; \ 161 (ch)->vit_code_rate_hp = (fep)->u.ofdm.code_rate_HP == FEC_AUTO ? -1 : (fep)->u.ofdm.code_rate_HP; \
152 (ch)->vit_code_rate_lp = (fep)->u.ofdm.code_rate_LP == FEC_AUTO ? -1 : (fep)->u.ofdm.code_rate_LP; 162 (ch)->vit_code_rate_lp = (fep)->u.ofdm.code_rate_LP == FEC_AUTO ? -1 : (fep)->u.ofdm.code_rate_LP; \
163 (ch)->intlv_native = 1;
153 164
154#define INIT_OFDM_CHANNEL(ch) do {\ 165#define INIT_OFDM_CHANNEL(ch) do {\
155 (ch)->Bw = 0; \ 166 (ch)->Bw = 0; \