diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-04-22 13:42:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:43 -0400 |
commit | a60b866567001e97b5bdc9811aee155ae759e48f (patch) | |
tree | 48dc119d29ce76c426e8436221ca33298ef48b54 /drivers/media/dvb | |
parent | e723ee00893f242cbccf5ef2faffdaa6afb8f244 (diff) |
V4L/DVB (7211): tda18271: remove duplicated channel configuration code from tda18271c1_tune
remove duplicated channel configuration code from tda18271c1_tune, instead
call function tda18271_channel_configuration
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-fe.c | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c index 7f7fab7cd5af..26042a977e4e 100644 --- a/drivers/media/dvb/frontends/tda18271-fe.c +++ b/drivers/media/dvb/frontends/tda18271-fe.c | |||
@@ -752,54 +752,8 @@ static int tda18271c1_tune(struct dvb_frontend *fe, | |||
752 | if (0 == tda18271_calc_rf_cal(fe, &freq)) | 752 | if (0 == tda18271_calc_rf_cal(fe, &freq)) |
753 | tda18271_write_regs(fe, R_EB14, 1); | 753 | tda18271_write_regs(fe, R_EB14, 1); |
754 | 754 | ||
755 | /* Channel Configuration */ | 755 | tda18271_channel_configuration(fe, ifc, freq, bw, std, radio); |
756 | |||
757 | switch (priv->mode) { | ||
758 | case TDA18271_ANALOG: | ||
759 | regs[R_EB22] = 0x2c; | ||
760 | break; | ||
761 | case TDA18271_DIGITAL: | ||
762 | regs[R_EB22] = 0x37; | ||
763 | break; | ||
764 | } | ||
765 | tda18271_write_regs(fe, R_EB22, 1); | ||
766 | |||
767 | regs[R_EP1] |= 0x40; /* set dis power level on */ | ||
768 | |||
769 | /* set standard */ | ||
770 | regs[R_EP3] &= ~0x1f; /* clear std bits */ | ||
771 | |||
772 | /* see table 22 */ | ||
773 | regs[R_EP3] |= std; | ||
774 | |||
775 | regs[R_EP4] &= ~0x03; /* set cal mode to normal */ | ||
776 | |||
777 | regs[R_EP4] &= ~0x1c; /* clear if level bits */ | ||
778 | switch (priv->mode) { | ||
779 | case TDA18271_ANALOG: | ||
780 | regs[R_MPD] &= ~0x80; /* IF notch = 0 */ | ||
781 | break; | ||
782 | case TDA18271_DIGITAL: | ||
783 | regs[R_EP4] |= 0x04; | ||
784 | regs[R_MPD] |= 0x80; | ||
785 | break; | ||
786 | } | ||
787 | |||
788 | if (radio) | ||
789 | regs[R_EP4] |= 0x80; | ||
790 | else | ||
791 | regs[R_EP4] &= ~0x80; | ||
792 | |||
793 | /* image rejection validity */ | ||
794 | tda18271_calc_ir_measure(fe, &freq); | ||
795 | |||
796 | /* calculate MAIN PLL */ | ||
797 | N = freq + ifc; | ||
798 | |||
799 | tda18271_calc_main_pll(fe, N); | ||
800 | 756 | ||
801 | tda18271_write_regs(fe, R_TM, 15); | ||
802 | msleep(5); | ||
803 | mutex_unlock(&priv->lock); | 757 | mutex_unlock(&priv->lock); |
804 | 758 | ||
805 | return 0; | 759 | return 0; |