diff options
author | Patrick Boettcher <pboettcher@kernellabs.com> | 2010-10-09 09:12:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:31:33 -0400 |
commit | 4f7200a8a0253e7a4b74cbf1a0a3868cccdee647 (patch) | |
tree | 5373561002848afe50bf504c6fd516a3ade8f1aa | |
parent | b4797048f70e142a65ee2139085edb44b166d238 (diff) |
[media] stv090x: add tei-field to config-structure
Some backends want to receive the full transport stream including
uncorrected packets. To have that feature this patchs add a field to
the config-structure called TEI (transport stream error indicator).
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Martin Wilks <m.wilks@technisat.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index 63cb4f8fa6c8..dba2c0407fd1 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -4169,6 +4169,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4169 | switch (state->config->ts1_mode) { | 4169 | switch (state->config->ts1_mode) { |
4170 | case STV090x_TSMODE_PARALLEL_PUNCTURED: | 4170 | case STV090x_TSMODE_PARALLEL_PUNCTURED: |
4171 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); | 4171 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); |
4172 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts1_tei); | ||
4172 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); | 4173 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); |
4173 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); | 4174 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); |
4174 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) | 4175 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) |
@@ -4177,6 +4178,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4177 | 4178 | ||
4178 | case STV090x_TSMODE_DVBCI: | 4179 | case STV090x_TSMODE_DVBCI: |
4179 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); | 4180 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); |
4181 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts1_tei); | ||
4180 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); | 4182 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); |
4181 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); | 4183 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); |
4182 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) | 4184 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) |
@@ -4185,6 +4187,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4185 | 4187 | ||
4186 | case STV090x_TSMODE_SERIAL_PUNCTURED: | 4188 | case STV090x_TSMODE_SERIAL_PUNCTURED: |
4187 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); | 4189 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); |
4190 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts1_tei); | ||
4188 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); | 4191 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); |
4189 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); | 4192 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); |
4190 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) | 4193 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) |
@@ -4193,6 +4196,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4193 | 4196 | ||
4194 | case STV090x_TSMODE_SERIAL_CONTINUOUS: | 4197 | case STV090x_TSMODE_SERIAL_CONTINUOUS: |
4195 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); | 4198 | reg = stv090x_read_reg(state, STV090x_P1_TSCFGH); |
4199 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts1_tei); | ||
4196 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); | 4200 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); |
4197 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); | 4201 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); |
4198 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) | 4202 | if (stv090x_write_reg(state, STV090x_P1_TSCFGH, reg) < 0) |
@@ -4206,6 +4210,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4206 | switch (state->config->ts2_mode) { | 4210 | switch (state->config->ts2_mode) { |
4207 | case STV090x_TSMODE_PARALLEL_PUNCTURED: | 4211 | case STV090x_TSMODE_PARALLEL_PUNCTURED: |
4208 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); | 4212 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); |
4213 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts2_tei); | ||
4209 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); | 4214 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); |
4210 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); | 4215 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); |
4211 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) | 4216 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) |
@@ -4214,6 +4219,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4214 | 4219 | ||
4215 | case STV090x_TSMODE_DVBCI: | 4220 | case STV090x_TSMODE_DVBCI: |
4216 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); | 4221 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); |
4222 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts2_tei); | ||
4217 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); | 4223 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x00); |
4218 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); | 4224 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); |
4219 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) | 4225 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) |
@@ -4222,6 +4228,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4222 | 4228 | ||
4223 | case STV090x_TSMODE_SERIAL_PUNCTURED: | 4229 | case STV090x_TSMODE_SERIAL_PUNCTURED: |
4224 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); | 4230 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); |
4231 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts2_tei); | ||
4225 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); | 4232 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); |
4226 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); | 4233 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x00); |
4227 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) | 4234 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) |
@@ -4230,6 +4237,7 @@ static int stv090x_set_tspath(struct stv090x_state *state) | |||
4230 | 4237 | ||
4231 | case STV090x_TSMODE_SERIAL_CONTINUOUS: | 4238 | case STV090x_TSMODE_SERIAL_CONTINUOUS: |
4232 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); | 4239 | reg = stv090x_read_reg(state, STV090x_P2_TSCFGH); |
4240 | STV090x_SETFIELD_Px(reg, TSFIFO_TEIUPDATE_FIELD, state->config->ts2_tei); | ||
4233 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); | 4241 | STV090x_SETFIELD_Px(reg, TSFIFO_SERIAL_FIELD, 0x01); |
4234 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); | 4242 | STV090x_SETFIELD_Px(reg, TSFIFO_DVBCI_FIELD, 0x01); |
4235 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) | 4243 | if (stv090x_write_reg(state, STV090x_P2_TSCFGH, reg) < 0) |
diff --git a/drivers/media/dvb/frontends/stv090x.h b/drivers/media/dvb/frontends/stv090x.h index 11754f2f6437..a3fefa717ed6 100644 --- a/drivers/media/dvb/frontends/stv090x.h +++ b/drivers/media/dvb/frontends/stv090x.h | |||
@@ -78,6 +78,9 @@ struct stv090x_config { | |||
78 | u32 ts1_clk; | 78 | u32 ts1_clk; |
79 | u32 ts2_clk; | 79 | u32 ts2_clk; |
80 | 80 | ||
81 | u8 ts1_tei : 1; | ||
82 | u8 ts2_tei : 1; | ||
83 | |||
81 | enum stv090x_i2crpt repeater_level; | 84 | enum stv090x_i2crpt repeater_level; |
82 | 85 | ||
83 | u8 tuner_bbgain; /* default: 10db */ | 86 | u8 tuner_bbgain; /* default: 10db */ |