mirror of https://gitee.com/openkylin/linux.git
[PATCH] dvb: dst: fix symbol rate setting
Make the Symbolrate setting card specific. Signed-off-by: Manu Abraham <manu@kromtek.com> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f30db067a5
commit
f612c57934
|
@ -324,12 +324,12 @@ static int dst_set_polarization(struct dst_state *state)
|
||||||
{
|
{
|
||||||
switch (state->voltage) {
|
switch (state->voltage) {
|
||||||
case SEC_VOLTAGE_13: // vertical
|
case SEC_VOLTAGE_13: // vertical
|
||||||
printk("%s: Polarization=[Vertical]\n", __FUNCTION__);
|
dprintk("%s: Polarization=[Vertical]\n", __FUNCTION__);
|
||||||
state->tx_tuna[8] &= ~0x40; //1
|
state->tx_tuna[8] &= ~0x40; //1
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SEC_VOLTAGE_18: // horizontal
|
case SEC_VOLTAGE_18: // horizontal
|
||||||
printk("%s: Polarization=[Horizontal]\n", __FUNCTION__);
|
dprintk("%s: Polarization=[Horizontal]\n", __FUNCTION__);
|
||||||
state->tx_tuna[8] |= 0x40; // 0
|
state->tx_tuna[8] |= 0x40; // 0
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ static int dst_set_polarization(struct dst_state *state)
|
||||||
static int dst_set_freq(struct dst_state *state, u32 freq)
|
static int dst_set_freq(struct dst_state *state, u32 freq)
|
||||||
{
|
{
|
||||||
state->frequency = freq;
|
state->frequency = freq;
|
||||||
if (debug > 4)
|
if (verbose > 4)
|
||||||
dprintk("%s: set Frequency %u\n", __FUNCTION__, freq);
|
dprintk("%s: set Frequency %u\n", __FUNCTION__, freq);
|
||||||
|
|
||||||
if (state->dst_type == DST_TYPE_IS_SAT) {
|
if (state->dst_type == DST_TYPE_IS_SAT) {
|
||||||
|
@ -451,7 +451,6 @@ static fe_code_rate_t dst_get_fec(struct dst_state* state)
|
||||||
|
|
||||||
static int dst_set_symbolrate(struct dst_state* state, u32 srate)
|
static int dst_set_symbolrate(struct dst_state* state, u32 srate)
|
||||||
{
|
{
|
||||||
u8 *val;
|
|
||||||
u32 symcalc;
|
u32 symcalc;
|
||||||
u64 sval;
|
u64 sval;
|
||||||
|
|
||||||
|
@ -463,7 +462,6 @@ static int dst_set_symbolrate(struct dst_state* state, u32 srate)
|
||||||
if (debug > 4)
|
if (debug > 4)
|
||||||
dprintk("%s: set symrate %u\n", __FUNCTION__, srate);
|
dprintk("%s: set symrate %u\n", __FUNCTION__, srate);
|
||||||
srate /= 1000;
|
srate /= 1000;
|
||||||
val = &state->tx_tuna[0];
|
|
||||||
|
|
||||||
if (state->type_flags & DST_TYPE_HAS_SYMDIV) {
|
if (state->type_flags & DST_TYPE_HAS_SYMDIV) {
|
||||||
sval = srate;
|
sval = srate;
|
||||||
|
@ -474,17 +472,19 @@ static int dst_set_symbolrate(struct dst_state* state, u32 srate)
|
||||||
if (debug > 4)
|
if (debug > 4)
|
||||||
dprintk("%s: set symcalc %u\n", __FUNCTION__, symcalc);
|
dprintk("%s: set symcalc %u\n", __FUNCTION__, symcalc);
|
||||||
|
|
||||||
val[5] = (u8) (symcalc >> 12);
|
state->tx_tuna[5] = (u8) (symcalc >> 12);
|
||||||
val[6] = (u8) (symcalc >> 4);
|
state->tx_tuna[6] = (u8) (symcalc >> 4);
|
||||||
val[7] = (u8) (symcalc << 4);
|
state->tx_tuna[7] = (u8) (symcalc << 4);
|
||||||
} else {
|
} else {
|
||||||
val[5] = (u8) (srate >> 16) & 0x7f;
|
state->tx_tuna[5] = (u8) (srate >> 16) & 0x7f;
|
||||||
val[6] = (u8) (srate >> 8);
|
state->tx_tuna[6] = (u8) (srate >> 8);
|
||||||
val[7] = (u8) srate;
|
state->tx_tuna[7] = (u8) srate;
|
||||||
|
}
|
||||||
|
state->tx_tuna[8] &= ~0x20;
|
||||||
|
if (state->type_flags & DST_TYPE_HAS_OBS_REGS) {
|
||||||
|
if (srate > 8000)
|
||||||
|
state->tx_tuna[8] |= 0x20;
|
||||||
}
|
}
|
||||||
val[8] &= ~0x20;
|
|
||||||
if (srate > 8000)
|
|
||||||
val[8] |= 0x20;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue