aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorManu Abraham <manu@kromtek.com>2005-09-09 16:02:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:43 -0400
commitf612c5793449ac653b2f4531696d8e74e771e3d3 (patch)
tree0895f3def5d5c07a3144a01ba11c686f1dbe111a /drivers/media/dvb
parentf30db067a593aeb3fdd97ec0a3e6399ea566f2ad (diff)
[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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 6c34ac9cefdd..66e69b8e1a0c 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -324,12 +324,12 @@ static int dst_set_polarization(struct dst_state *state)
324{ 324{
325 switch (state->voltage) { 325 switch (state->voltage) {
326 case SEC_VOLTAGE_13: // vertical 326 case SEC_VOLTAGE_13: // vertical
327 printk("%s: Polarization=[Vertical]\n", __FUNCTION__); 327 dprintk("%s: Polarization=[Vertical]\n", __FUNCTION__);
328 state->tx_tuna[8] &= ~0x40; //1 328 state->tx_tuna[8] &= ~0x40; //1
329 break; 329 break;
330 330
331 case SEC_VOLTAGE_18: // horizontal 331 case SEC_VOLTAGE_18: // horizontal
332 printk("%s: Polarization=[Horizontal]\n", __FUNCTION__); 332 dprintk("%s: Polarization=[Horizontal]\n", __FUNCTION__);
333 state->tx_tuna[8] |= 0x40; // 0 333 state->tx_tuna[8] |= 0x40; // 0
334 break; 334 break;
335 335
@@ -344,7 +344,7 @@ static int dst_set_polarization(struct dst_state *state)
344static int dst_set_freq(struct dst_state *state, u32 freq) 344static int dst_set_freq(struct dst_state *state, u32 freq)
345{ 345{
346 state->frequency = freq; 346 state->frequency = freq;
347 if (debug > 4) 347 if (verbose > 4)
348 dprintk("%s: set Frequency %u\n", __FUNCTION__, freq); 348 dprintk("%s: set Frequency %u\n", __FUNCTION__, freq);
349 349
350 if (state->dst_type == DST_TYPE_IS_SAT) { 350 if (state->dst_type == DST_TYPE_IS_SAT) {
@@ -451,7 +451,6 @@ static fe_code_rate_t dst_get_fec(struct dst_state* state)
451 451
452static int dst_set_symbolrate(struct dst_state* state, u32 srate) 452static int dst_set_symbolrate(struct dst_state* state, u32 srate)
453{ 453{
454 u8 *val;
455 u32 symcalc; 454 u32 symcalc;
456 u64 sval; 455 u64 sval;
457 456
@@ -463,7 +462,6 @@ static int dst_set_symbolrate(struct dst_state* state, u32 srate)
463 if (debug > 4) 462 if (debug > 4)
464 dprintk("%s: set symrate %u\n", __FUNCTION__, srate); 463 dprintk("%s: set symrate %u\n", __FUNCTION__, srate);
465 srate /= 1000; 464 srate /= 1000;
466 val = &state->tx_tuna[0];
467 465
468 if (state->type_flags & DST_TYPE_HAS_SYMDIV) { 466 if (state->type_flags & DST_TYPE_HAS_SYMDIV) {
469 sval = srate; 467 sval = srate;
@@ -474,17 +472,19 @@ static int dst_set_symbolrate(struct dst_state* state, u32 srate)
474 if (debug > 4) 472 if (debug > 4)
475 dprintk("%s: set symcalc %u\n", __FUNCTION__, symcalc); 473 dprintk("%s: set symcalc %u\n", __FUNCTION__, symcalc);
476 474
477 val[5] = (u8) (symcalc >> 12); 475 state->tx_tuna[5] = (u8) (symcalc >> 12);
478 val[6] = (u8) (symcalc >> 4); 476 state->tx_tuna[6] = (u8) (symcalc >> 4);
479 val[7] = (u8) (symcalc << 4); 477 state->tx_tuna[7] = (u8) (symcalc << 4);
480 } else { 478 } else {
481 val[5] = (u8) (srate >> 16) & 0x7f; 479 state->tx_tuna[5] = (u8) (srate >> 16) & 0x7f;
482 val[6] = (u8) (srate >> 8); 480 state->tx_tuna[6] = (u8) (srate >> 8);
483 val[7] = (u8) srate; 481 state->tx_tuna[7] = (u8) srate;
482 }
483 state->tx_tuna[8] &= ~0x20;
484 if (state->type_flags & DST_TYPE_HAS_OBS_REGS) {
485 if (srate > 8000)
486 state->tx_tuna[8] |= 0x20;
484 } 487 }
485 val[8] &= ~0x20;
486 if (srate > 8000)
487 val[8] |= 0x20;
488 return 0; 488 return 0;
489} 489}
490 490