mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 07:20:53 +07:00
media: dvb-frontends/stv0910: cosmetics: fixup comments, misc
Fix up block comment style, whitespaces, c++ style comments et al. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
ddb6a90dcd
commit
4f979d5cf0
@ -207,136 +207,136 @@ static int write_shared_reg(struct stv *state, u16 reg, u8 mask, u8 val)
|
||||
return status;
|
||||
}
|
||||
|
||||
struct slookup s1_sn_lookup[] = {
|
||||
{ 0, 9242 }, /*C/N= 0dB*/
|
||||
{ 5, 9105 }, /*C/N=0.5dB*/
|
||||
{ 10, 8950 }, /*C/N=1.0dB*/
|
||||
{ 15, 8780 }, /*C/N=1.5dB*/
|
||||
{ 20, 8566 }, /*C/N=2.0dB*/
|
||||
{ 25, 8366 }, /*C/N=2.5dB*/
|
||||
{ 30, 8146 }, /*C/N=3.0dB*/
|
||||
{ 35, 7908 }, /*C/N=3.5dB*/
|
||||
{ 40, 7666 }, /*C/N=4.0dB*/
|
||||
{ 45, 7405 }, /*C/N=4.5dB*/
|
||||
{ 50, 7136 }, /*C/N=5.0dB*/
|
||||
{ 55, 6861 }, /*C/N=5.5dB*/
|
||||
{ 60, 6576 }, /*C/N=6.0dB*/
|
||||
{ 65, 6330 }, /*C/N=6.5dB*/
|
||||
{ 70, 6048 }, /*C/N=7.0dB*/
|
||||
{ 75, 5768 }, /*C/N=7.5dB*/
|
||||
{ 80, 5492 }, /*C/N=8.0dB*/
|
||||
{ 85, 5224 }, /*C/N=8.5dB*/
|
||||
{ 90, 4959 }, /*C/N=9.0dB*/
|
||||
{ 95, 4709 }, /*C/N=9.5dB*/
|
||||
{ 100, 4467 }, /*C/N=10.0dB*/
|
||||
{ 105, 4236 }, /*C/N=10.5dB*/
|
||||
{ 110, 4013 }, /*C/N=11.0dB*/
|
||||
{ 115, 3800 }, /*C/N=11.5dB*/
|
||||
{ 120, 3598 }, /*C/N=12.0dB*/
|
||||
{ 125, 3406 }, /*C/N=12.5dB*/
|
||||
{ 130, 3225 }, /*C/N=13.0dB*/
|
||||
{ 135, 3052 }, /*C/N=13.5dB*/
|
||||
{ 140, 2889 }, /*C/N=14.0dB*/
|
||||
{ 145, 2733 }, /*C/N=14.5dB*/
|
||||
{ 150, 2587 }, /*C/N=15.0dB*/
|
||||
{ 160, 2318 }, /*C/N=16.0dB*/
|
||||
{ 170, 2077 }, /*C/N=17.0dB*/
|
||||
{ 180, 1862 }, /*C/N=18.0dB*/
|
||||
{ 190, 1670 }, /*C/N=19.0dB*/
|
||||
{ 200, 1499 }, /*C/N=20.0dB*/
|
||||
{ 210, 1347 }, /*C/N=21.0dB*/
|
||||
{ 220, 1213 }, /*C/N=22.0dB*/
|
||||
{ 230, 1095 }, /*C/N=23.0dB*/
|
||||
{ 240, 992 }, /*C/N=24.0dB*/
|
||||
{ 250, 900 }, /*C/N=25.0dB*/
|
||||
{ 260, 826 }, /*C/N=26.0dB*/
|
||||
{ 270, 758 }, /*C/N=27.0dB*/
|
||||
{ 280, 702 }, /*C/N=28.0dB*/
|
||||
{ 290, 653 }, /*C/N=29.0dB*/
|
||||
{ 300, 613 }, /*C/N=30.0dB*/
|
||||
{ 310, 579 }, /*C/N=31.0dB*/
|
||||
{ 320, 550 }, /*C/N=32.0dB*/
|
||||
{ 330, 526 }, /*C/N=33.0dB*/
|
||||
{ 350, 490 }, /*C/N=33.0dB*/
|
||||
{ 400, 445 }, /*C/N=40.0dB*/
|
||||
{ 450, 430 }, /*C/N=45.0dB*/
|
||||
{ 500, 426 }, /*C/N=50.0dB*/
|
||||
{ 510, 425 } /*C/N=51.0dB*/
|
||||
static struct slookup s1_sn_lookup[] = {
|
||||
{ 0, 9242 }, /* C/N= 0dB */
|
||||
{ 5, 9105 }, /* C/N= 0.5dB */
|
||||
{ 10, 8950 }, /* C/N= 1.0dB */
|
||||
{ 15, 8780 }, /* C/N= 1.5dB */
|
||||
{ 20, 8566 }, /* C/N= 2.0dB */
|
||||
{ 25, 8366 }, /* C/N= 2.5dB */
|
||||
{ 30, 8146 }, /* C/N= 3.0dB */
|
||||
{ 35, 7908 }, /* C/N= 3.5dB */
|
||||
{ 40, 7666 }, /* C/N= 4.0dB */
|
||||
{ 45, 7405 }, /* C/N= 4.5dB */
|
||||
{ 50, 7136 }, /* C/N= 5.0dB */
|
||||
{ 55, 6861 }, /* C/N= 5.5dB */
|
||||
{ 60, 6576 }, /* C/N= 6.0dB */
|
||||
{ 65, 6330 }, /* C/N= 6.5dB */
|
||||
{ 70, 6048 }, /* C/N= 7.0dB */
|
||||
{ 75, 5768 }, /* C/N= 7.5dB */
|
||||
{ 80, 5492 }, /* C/N= 8.0dB */
|
||||
{ 85, 5224 }, /* C/N= 8.5dB */
|
||||
{ 90, 4959 }, /* C/N= 9.0dB */
|
||||
{ 95, 4709 }, /* C/N= 9.5dB */
|
||||
{ 100, 4467 }, /* C/N=10.0dB */
|
||||
{ 105, 4236 }, /* C/N=10.5dB */
|
||||
{ 110, 4013 }, /* C/N=11.0dB */
|
||||
{ 115, 3800 }, /* C/N=11.5dB */
|
||||
{ 120, 3598 }, /* C/N=12.0dB */
|
||||
{ 125, 3406 }, /* C/N=12.5dB */
|
||||
{ 130, 3225 }, /* C/N=13.0dB */
|
||||
{ 135, 3052 }, /* C/N=13.5dB */
|
||||
{ 140, 2889 }, /* C/N=14.0dB */
|
||||
{ 145, 2733 }, /* C/N=14.5dB */
|
||||
{ 150, 2587 }, /* C/N=15.0dB */
|
||||
{ 160, 2318 }, /* C/N=16.0dB */
|
||||
{ 170, 2077 }, /* C/N=17.0dB */
|
||||
{ 180, 1862 }, /* C/N=18.0dB */
|
||||
{ 190, 1670 }, /* C/N=19.0dB */
|
||||
{ 200, 1499 }, /* C/N=20.0dB */
|
||||
{ 210, 1347 }, /* C/N=21.0dB */
|
||||
{ 220, 1213 }, /* C/N=22.0dB */
|
||||
{ 230, 1095 }, /* C/N=23.0dB */
|
||||
{ 240, 992 }, /* C/N=24.0dB */
|
||||
{ 250, 900 }, /* C/N=25.0dB */
|
||||
{ 260, 826 }, /* C/N=26.0dB */
|
||||
{ 270, 758 }, /* C/N=27.0dB */
|
||||
{ 280, 702 }, /* C/N=28.0dB */
|
||||
{ 290, 653 }, /* C/N=29.0dB */
|
||||
{ 300, 613 }, /* C/N=30.0dB */
|
||||
{ 310, 579 }, /* C/N=31.0dB */
|
||||
{ 320, 550 }, /* C/N=32.0dB */
|
||||
{ 330, 526 }, /* C/N=33.0dB */
|
||||
{ 350, 490 }, /* C/N=33.0dB */
|
||||
{ 400, 445 }, /* C/N=40.0dB */
|
||||
{ 450, 430 }, /* C/N=45.0dB */
|
||||
{ 500, 426 }, /* C/N=50.0dB */
|
||||
{ 510, 425 } /* C/N=51.0dB */
|
||||
};
|
||||
|
||||
struct slookup s2_sn_lookup[] = {
|
||||
{ -30, 13950 }, /*C/N=-2.5dB*/
|
||||
{ -25, 13580 }, /*C/N=-2.5dB*/
|
||||
{ -20, 13150 }, /*C/N=-2.0dB*/
|
||||
{ -15, 12760 }, /*C/N=-1.5dB*/
|
||||
{ -10, 12345 }, /*C/N=-1.0dB*/
|
||||
{ -5, 11900 }, /*C/N=-0.5dB*/
|
||||
{ 0, 11520 }, /*C/N= 0dB*/
|
||||
{ 5, 11080 }, /*C/N= 0.5dB*/
|
||||
{ 10, 10630 }, /*C/N= 1.0dB*/
|
||||
{ 15, 10210 }, /*C/N= 1.5dB*/
|
||||
{ 20, 9790 }, /*C/N= 2.0dB*/
|
||||
{ 25, 9390 }, /*C/N= 2.5dB*/
|
||||
{ 30, 8970 }, /*C/N= 3.0dB*/
|
||||
{ 35, 8575 }, /*C/N= 3.5dB*/
|
||||
{ 40, 8180 }, /*C/N= 4.0dB*/
|
||||
{ 45, 7800 }, /*C/N= 4.5dB*/
|
||||
{ 50, 7430 }, /*C/N= 5.0dB*/
|
||||
{ 55, 7080 }, /*C/N= 5.5dB*/
|
||||
{ 60, 6720 }, /*C/N= 6.0dB*/
|
||||
{ 65, 6320 }, /*C/N= 6.5dB*/
|
||||
{ 70, 6060 }, /*C/N= 7.0dB*/
|
||||
{ 75, 5760 }, /*C/N= 7.5dB*/
|
||||
{ 80, 5480 }, /*C/N= 8.0dB*/
|
||||
{ 85, 5200 }, /*C/N= 8.5dB*/
|
||||
{ 90, 4930 }, /*C/N= 9.0dB*/
|
||||
{ 95, 4680 }, /*C/N= 9.5dB*/
|
||||
{ 100, 4425 }, /*C/N=10.0dB*/
|
||||
{ 105, 4210 }, /*C/N=10.5dB*/
|
||||
{ 110, 3980 }, /*C/N=11.0dB*/
|
||||
{ 115, 3765 }, /*C/N=11.5dB*/
|
||||
{ 120, 3570 }, /*C/N=12.0dB*/
|
||||
{ 125, 3315 }, /*C/N=12.5dB*/
|
||||
{ 130, 3140 }, /*C/N=13.0dB*/
|
||||
{ 135, 2980 }, /*C/N=13.5dB*/
|
||||
{ 140, 2820 }, /*C/N=14.0dB*/
|
||||
{ 145, 2670 }, /*C/N=14.5dB*/
|
||||
{ 150, 2535 }, /*C/N=15.0dB*/
|
||||
{ 160, 2270 }, /*C/N=16.0dB*/
|
||||
{ 170, 2035 }, /*C/N=17.0dB*/
|
||||
{ 180, 1825 }, /*C/N=18.0dB*/
|
||||
{ 190, 1650 }, /*C/N=19.0dB*/
|
||||
{ 200, 1485 }, /*C/N=20.0dB*/
|
||||
{ 210, 1340 }, /*C/N=21.0dB*/
|
||||
{ 220, 1212 }, /*C/N=22.0dB*/
|
||||
{ 230, 1100 }, /*C/N=23.0dB*/
|
||||
{ 240, 1000 }, /*C/N=24.0dB*/
|
||||
{ 250, 910 }, /*C/N=25.0dB*/
|
||||
{ 260, 836 }, /*C/N=26.0dB*/
|
||||
{ 270, 772 }, /*C/N=27.0dB*/
|
||||
{ 280, 718 }, /*C/N=28.0dB*/
|
||||
{ 290, 671 }, /*C/N=29.0dB*/
|
||||
{ 300, 635 }, /*C/N=30.0dB*/
|
||||
{ 310, 602 }, /*C/N=31.0dB*/
|
||||
{ 320, 575 }, /*C/N=32.0dB*/
|
||||
{ 330, 550 }, /*C/N=33.0dB*/
|
||||
{ 350, 517 }, /*C/N=35.0dB*/
|
||||
{ 400, 480 }, /*C/N=40.0dB*/
|
||||
{ 450, 466 }, /*C/N=45.0dB*/
|
||||
{ 500, 464 }, /*C/N=50.0dB*/
|
||||
{ 510, 463 }, /*C/N=51.0dB*/
|
||||
static struct slookup s2_sn_lookup[] = {
|
||||
{ -30, 13950 }, /* C/N=-2.5dB */
|
||||
{ -25, 13580 }, /* C/N=-2.5dB */
|
||||
{ -20, 13150 }, /* C/N=-2.0dB */
|
||||
{ -15, 12760 }, /* C/N=-1.5dB */
|
||||
{ -10, 12345 }, /* C/N=-1.0dB */
|
||||
{ -5, 11900 }, /* C/N=-0.5dB */
|
||||
{ 0, 11520 }, /* C/N= 0dB */
|
||||
{ 5, 11080 }, /* C/N= 0.5dB */
|
||||
{ 10, 10630 }, /* C/N= 1.0dB */
|
||||
{ 15, 10210 }, /* C/N= 1.5dB */
|
||||
{ 20, 9790 }, /* C/N= 2.0dB */
|
||||
{ 25, 9390 }, /* C/N= 2.5dB */
|
||||
{ 30, 8970 }, /* C/N= 3.0dB */
|
||||
{ 35, 8575 }, /* C/N= 3.5dB */
|
||||
{ 40, 8180 }, /* C/N= 4.0dB */
|
||||
{ 45, 7800 }, /* C/N= 4.5dB */
|
||||
{ 50, 7430 }, /* C/N= 5.0dB */
|
||||
{ 55, 7080 }, /* C/N= 5.5dB */
|
||||
{ 60, 6720 }, /* C/N= 6.0dB */
|
||||
{ 65, 6320 }, /* C/N= 6.5dB */
|
||||
{ 70, 6060 }, /* C/N= 7.0dB */
|
||||
{ 75, 5760 }, /* C/N= 7.5dB */
|
||||
{ 80, 5480 }, /* C/N= 8.0dB */
|
||||
{ 85, 5200 }, /* C/N= 8.5dB */
|
||||
{ 90, 4930 }, /* C/N= 9.0dB */
|
||||
{ 95, 4680 }, /* C/N= 9.5dB */
|
||||
{ 100, 4425 }, /* C/N=10.0dB */
|
||||
{ 105, 4210 }, /* C/N=10.5dB */
|
||||
{ 110, 3980 }, /* C/N=11.0dB */
|
||||
{ 115, 3765 }, /* C/N=11.5dB */
|
||||
{ 120, 3570 }, /* C/N=12.0dB */
|
||||
{ 125, 3315 }, /* C/N=12.5dB */
|
||||
{ 130, 3140 }, /* C/N=13.0dB */
|
||||
{ 135, 2980 }, /* C/N=13.5dB */
|
||||
{ 140, 2820 }, /* C/N=14.0dB */
|
||||
{ 145, 2670 }, /* C/N=14.5dB */
|
||||
{ 150, 2535 }, /* C/N=15.0dB */
|
||||
{ 160, 2270 }, /* C/N=16.0dB */
|
||||
{ 170, 2035 }, /* C/N=17.0dB */
|
||||
{ 180, 1825 }, /* C/N=18.0dB */
|
||||
{ 190, 1650 }, /* C/N=19.0dB */
|
||||
{ 200, 1485 }, /* C/N=20.0dB */
|
||||
{ 210, 1340 }, /* C/N=21.0dB */
|
||||
{ 220, 1212 }, /* C/N=22.0dB */
|
||||
{ 230, 1100 }, /* C/N=23.0dB */
|
||||
{ 240, 1000 }, /* C/N=24.0dB */
|
||||
{ 250, 910 }, /* C/N=25.0dB */
|
||||
{ 260, 836 }, /* C/N=26.0dB */
|
||||
{ 270, 772 }, /* C/N=27.0dB */
|
||||
{ 280, 718 }, /* C/N=28.0dB */
|
||||
{ 290, 671 }, /* C/N=29.0dB */
|
||||
{ 300, 635 }, /* C/N=30.0dB */
|
||||
{ 310, 602 }, /* C/N=31.0dB */
|
||||
{ 320, 575 }, /* C/N=32.0dB */
|
||||
{ 330, 550 }, /* C/N=33.0dB */
|
||||
{ 350, 517 }, /* C/N=35.0dB */
|
||||
{ 400, 480 }, /* C/N=40.0dB */
|
||||
{ 450, 466 }, /* C/N=45.0dB */
|
||||
{ 500, 464 }, /* C/N=50.0dB */
|
||||
{ 510, 463 }, /* C/N=51.0dB */
|
||||
};
|
||||
|
||||
struct slookup padc_lookup[] = {
|
||||
{ 0, 118000 }, /* PADC=+0dBm */
|
||||
{ -100, 93600 }, /* PADC=-1dBm */
|
||||
{ -200, 74500 }, /* PADC=-2dBm */
|
||||
{ -300, 59100 }, /* PADC=-3dBm */
|
||||
{ -400, 47000 }, /* PADC=-4dBm */
|
||||
{ -500, 37300 }, /* PADC=-5dBm */
|
||||
{ -600, 29650 }, /* PADC=-6dBm */
|
||||
{ -700, 23520 }, /* PADC=-7dBm */
|
||||
{ -900, 14850 }, /* PADC=-9dBm */
|
||||
static struct slookup padc_lookup[] = {
|
||||
{ 0, 118000 }, /* PADC= +0dBm */
|
||||
{ -100, 93600 }, /* PADC= -1dBm */
|
||||
{ -200, 74500 }, /* PADC= -2dBm */
|
||||
{ -300, 59100 }, /* PADC= -3dBm */
|
||||
{ -400, 47000 }, /* PADC= -4dBm */
|
||||
{ -500, 37300 }, /* PADC= -5dBm */
|
||||
{ -600, 29650 }, /* PADC= -6dBm */
|
||||
{ -700, 23520 }, /* PADC= -7dBm */
|
||||
{ -900, 14850 }, /* PADC= -9dBm */
|
||||
{ -1100, 9380 }, /* PADC=-11dBm */
|
||||
{ -1300, 5910 }, /* PADC=-13dBm */
|
||||
{ -1500, 3730 }, /* PADC=-15dBm */
|
||||
@ -350,7 +350,8 @@ struct slookup padc_lookup[] = {
|
||||
* Tracking carrier loop carrier QPSK 1/4 to 8PSK 9/10 long Frame
|
||||
*********************************************************************/
|
||||
static u8 s2car_loop[] = {
|
||||
/* Modcod 2MPon 2MPoff 5MPon 5MPoff 10MPon 10MPoff
|
||||
/*
|
||||
* Modcod 2MPon 2MPoff 5MPon 5MPoff 10MPon 10MPoff
|
||||
* 20MPon 20MPoff 30MPon 30MPoff
|
||||
*/
|
||||
|
||||
@ -393,7 +394,8 @@ static u8 s2car_loop[] = {
|
||||
* Tracking carrier loop carrier 16APSK 2/3 to 32APSK 9/10 long Frame
|
||||
**********************************************************************/
|
||||
|
||||
/* Modcod 2MPon 2MPoff 5MPon 5MPoff 10MPon 10MPoff 20MPon
|
||||
/*
|
||||
* Modcod 2MPon 2MPoff 5MPon 5MPoff 10MPon 10MPoff 20MPon
|
||||
* 20MPoff 30MPon 30MPoff
|
||||
*/
|
||||
|
||||
@ -692,24 +694,24 @@ static int get_bit_error_rate_s(struct stv *state, u32 *bernumerator,
|
||||
static u32 dvbs2_nbch(enum dvbs2_mod_cod mod_cod, enum dvbs2_fectype fectype)
|
||||
{
|
||||
static u32 nbch[][2] = {
|
||||
{ 0, 0}, /* DUMMY_PLF */
|
||||
{16200, 3240}, /* QPSK_1_4, */
|
||||
{21600, 5400}, /* QPSK_1_3, */
|
||||
{25920, 6480}, /* QPSK_2_5, */
|
||||
{32400, 7200}, /* QPSK_1_2, */
|
||||
{38880, 9720}, /* QPSK_3_5, */
|
||||
{43200, 10800}, /* QPSK_2_3, */
|
||||
{48600, 11880}, /* QPSK_3_4, */
|
||||
{51840, 12600}, /* QPSK_4_5, */
|
||||
{54000, 13320}, /* QPSK_5_6, */
|
||||
{57600, 14400}, /* QPSK_8_9, */
|
||||
{58320, 16000}, /* QPSK_9_10, */
|
||||
{43200, 9720}, /* 8PSK_3_5, */
|
||||
{48600, 10800}, /* 8PSK_2_3, */
|
||||
{51840, 11880}, /* 8PSK_3_4, */
|
||||
{54000, 13320}, /* 8PSK_5_6, */
|
||||
{57600, 14400}, /* 8PSK_8_9, */
|
||||
{58320, 16000}, /* 8PSK_9_10, */
|
||||
{ 0, 0}, /* DUMMY_PLF */
|
||||
{16200, 3240}, /* QPSK_1_4, */
|
||||
{21600, 5400}, /* QPSK_1_3, */
|
||||
{25920, 6480}, /* QPSK_2_5, */
|
||||
{32400, 7200}, /* QPSK_1_2, */
|
||||
{38880, 9720}, /* QPSK_3_5, */
|
||||
{43200, 10800}, /* QPSK_2_3, */
|
||||
{48600, 11880}, /* QPSK_3_4, */
|
||||
{51840, 12600}, /* QPSK_4_5, */
|
||||
{54000, 13320}, /* QPSK_5_6, */
|
||||
{57600, 14400}, /* QPSK_8_9, */
|
||||
{58320, 16000}, /* QPSK_9_10, */
|
||||
{43200, 9720}, /* 8PSK_3_5, */
|
||||
{48600, 10800}, /* 8PSK_2_3, */
|
||||
{51840, 11880}, /* 8PSK_3_4, */
|
||||
{54000, 13320}, /* 8PSK_5_6, */
|
||||
{57600, 14400}, /* 8PSK_8_9, */
|
||||
{58320, 16000}, /* 8PSK_9_10, */
|
||||
{43200, 10800}, /* 16APSK_2_3, */
|
||||
{48600, 11880}, /* 16APSK_3_4, */
|
||||
{51840, 12600}, /* 16APSK_4_5, */
|
||||
@ -853,7 +855,7 @@ static int stop(struct stv *state)
|
||||
write_reg(state, RSTV0910_P2_TSCFGH + state->regoff,
|
||||
state->tscfgh | 0x01);
|
||||
read_reg(state, RSTV0910_P2_PDELCTRL1 + state->regoff, &tmp);
|
||||
tmp &= ~0x01; /*release reset DVBS2 packet delin*/
|
||||
tmp &= ~0x01; /* release reset DVBS2 packet delin */
|
||||
write_reg(state, RSTV0910_P2_PDELCTRL1 + state->regoff, tmp);
|
||||
/* Blind optim*/
|
||||
write_reg(state, RSTV0910_P2_AGC2O + state->regoff, 0x5B);
|
||||
@ -870,38 +872,38 @@ static int init_search_param(struct stv *state)
|
||||
u8 tmp;
|
||||
|
||||
read_reg(state, RSTV0910_P2_PDELCTRL1 + state->regoff, &tmp);
|
||||
tmp |= 0x20; // Filter_en (no effect if SIS=non-MIS
|
||||
tmp |= 0x20; /* Filter_en (no effect if SIS=non-MIS */
|
||||
write_reg(state, RSTV0910_P2_PDELCTRL1 + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_PDELCTRL2 + state->regoff, &tmp);
|
||||
tmp &= ~0x02; // frame mode = 0
|
||||
tmp &= ~0x02; /* frame mode = 0 */
|
||||
write_reg(state, RSTV0910_P2_PDELCTRL2 + state->regoff, tmp);
|
||||
|
||||
write_reg(state, RSTV0910_P2_UPLCCST0 + state->regoff, 0xe0);
|
||||
write_reg(state, RSTV0910_P2_ISIBITENA + state->regoff, 0x00);
|
||||
|
||||
read_reg(state, RSTV0910_P2_TSSTATEM + state->regoff, &tmp);
|
||||
tmp &= ~0x01; // nosync = 0, in case next signal is standard TS
|
||||
tmp &= ~0x01; /* nosync = 0, in case next signal is standard TS */
|
||||
write_reg(state, RSTV0910_P2_TSSTATEM + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_TSCFGL + state->regoff, &tmp);
|
||||
tmp &= ~0x04; // embindvb = 0
|
||||
tmp &= ~0x04; /* embindvb = 0 */
|
||||
write_reg(state, RSTV0910_P2_TSCFGL + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_TSINSDELH + state->regoff, &tmp);
|
||||
tmp &= ~0x80; // syncbyte = 0
|
||||
tmp &= ~0x80; /* syncbyte = 0 */
|
||||
write_reg(state, RSTV0910_P2_TSINSDELH + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_TSINSDELM + state->regoff, &tmp);
|
||||
tmp &= ~0x08; // token = 0
|
||||
tmp &= ~0x08; /* token = 0 */
|
||||
write_reg(state, RSTV0910_P2_TSINSDELM + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_TSDLYSET2 + state->regoff, &tmp);
|
||||
tmp &= ~0x30; // hysteresis threshold = 0
|
||||
tmp &= ~0x30; /* hysteresis threshold = 0 */
|
||||
write_reg(state, RSTV0910_P2_TSDLYSET2 + state->regoff, tmp);
|
||||
|
||||
read_reg(state, RSTV0910_P2_PDELCTRL0 + state->regoff, &tmp);
|
||||
tmp = (tmp & ~0x30) | 0x10; // isi obs mode = 1, observe min ISI
|
||||
tmp = (tmp & ~0x30) | 0x10; /* isi obs mode = 1, observe min ISI */
|
||||
write_reg(state, RSTV0910_P2_PDELCTRL0 + state->regoff, tmp);
|
||||
|
||||
return 0;
|
||||
@ -952,11 +954,11 @@ static int set_vth_default(struct stv *state)
|
||||
static int set_vth(struct stv *state)
|
||||
{
|
||||
static struct slookup vthlookup_table[] = {
|
||||
{250, 8780}, /*C/N=1.5dB*/
|
||||
{100, 7405}, /*C/N=4.5dB*/
|
||||
{40, 6330}, /*C/N=6.5dB*/
|
||||
{12, 5224}, /*C/N=8.5dB*/
|
||||
{5, 4236} /*C/N=10.5dB*/
|
||||
{250, 8780}, /* C/N= 1.5dB */
|
||||
{100, 7405}, /* C/N= 4.5dB */
|
||||
{40, 6330}, /* C/N= 6.5dB */
|
||||
{12, 5224}, /* C/N= 8.5dB */
|
||||
{5, 4236} /* C/N=10.5dB */
|
||||
};
|
||||
|
||||
int i;
|
||||
@ -1001,7 +1003,8 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
init_search_param(state);
|
||||
|
||||
if (p->stream_id != NO_STREAM_ID_FILTER) {
|
||||
/* Backwards compatibility to "crazy" API.
|
||||
/*
|
||||
* Backwards compatibility to "crazy" API.
|
||||
* PRBS X root cannot be 0, so this should always work.
|
||||
*/
|
||||
if (p->stream_id & 0xffffff00)
|
||||
@ -1022,22 +1025,22 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
state->cur_scrambling_code = scrambling_code;
|
||||
}
|
||||
|
||||
if (p->symbol_rate <= 1000000) { /* SR <=1Msps */
|
||||
if (p->symbol_rate <= 1000000) { /* SR <=1Msps */
|
||||
state->demod_timeout = 3000;
|
||||
state->fec_timeout = 2000;
|
||||
} else if (p->symbol_rate <= 2000000) { /* 1Msps < SR <=2Msps */
|
||||
} else if (p->symbol_rate <= 2000000) { /* 1Msps < SR <=2Msps */
|
||||
state->demod_timeout = 2500;
|
||||
state->fec_timeout = 1300;
|
||||
} else if (p->symbol_rate <= 5000000) { /* 2Msps< SR <=5Msps */
|
||||
} else if (p->symbol_rate <= 5000000) { /* 2Msps< SR <=5Msps */
|
||||
state->demod_timeout = 1000;
|
||||
state->fec_timeout = 650;
|
||||
} else if (p->symbol_rate <= 10000000) { /* 5Msps< SR <=10Msps */
|
||||
} else if (p->symbol_rate <= 10000000) { /* 5Msps< SR <=10Msps */
|
||||
state->demod_timeout = 700;
|
||||
state->fec_timeout = 350;
|
||||
} else if (p->symbol_rate < 20000000) { /* 10Msps< SR <=20Msps */
|
||||
} else if (p->symbol_rate < 20000000) { /* 10Msps< SR <=20Msps */
|
||||
state->demod_timeout = 400;
|
||||
state->fec_timeout = 200;
|
||||
} else { /* SR >=20Msps */
|
||||
} else { /* SR >=20Msps */
|
||||
state->demod_timeout = 300;
|
||||
state->fec_timeout = 200;
|
||||
}
|
||||
@ -1065,7 +1068,7 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
|
||||
enable_puncture_rate(state, FEC_NONE);
|
||||
|
||||
/* 8PSK 3/5, 8PSK 2/3 Poff tracking optimization WA*/
|
||||
/* 8PSK 3/5, 8PSK 2/3 Poff tracking optimization WA */
|
||||
write_reg(state, RSTV0910_P2_ACLC2S2Q + state->regoff, 0x0B);
|
||||
write_reg(state, RSTV0910_P2_ACLC2S28 + state->regoff, 0x0A);
|
||||
write_reg(state, RSTV0910_P2_BCLC2S2Q + state->regoff, 0x84);
|
||||
@ -1078,8 +1081,10 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
write_reg(state, RSTV0910_P2_BCLC2S216A + state->regoff, 0x84);
|
||||
write_reg(state, RSTV0910_P2_BCLC2S232A + state->regoff, 0x84);
|
||||
|
||||
/* Reset CAR3, bug DVBS2->DVBS1 lock*/
|
||||
/* Note: The bit is only pulsed -> no lock on shared register needed */
|
||||
/*
|
||||
* Reset CAR3, bug DVBS2->DVBS1 lock
|
||||
* Note: The bit is only pulsed -> no lock on shared register needed
|
||||
*/
|
||||
write_reg(state, RSTV0910_TSTRES0, state->nr ? 0x04 : 0x08);
|
||||
write_reg(state, RSTV0910_TSTRES0, 0);
|
||||
|
||||
@ -1098,7 +1103,7 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
write_reg(state, RSTV0910_P2_CFRUP1 + state->regoff,
|
||||
(freq >> 8) & 0xff);
|
||||
write_reg(state, RSTV0910_P2_CFRUP0 + state->regoff, (freq & 0xff));
|
||||
/*CFR Low Setting*/
|
||||
/* CFR Low Setting */
|
||||
freq = -freq;
|
||||
write_reg(state, RSTV0910_P2_CFRLOW1 + state->regoff,
|
||||
(freq >> 8) & 0xff);
|
||||
@ -1120,7 +1125,7 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
|
||||
|
||||
static int init_diseqc(struct stv *state)
|
||||
{
|
||||
u16 offs = state->nr ? 0x40 : 0; /* Address offset */
|
||||
u16 offs = state->nr ? 0x40 : 0; /* Address offset */
|
||||
u8 freq = ((state->base->mclk + 11000 * 32) / (22000 * 32));
|
||||
|
||||
/* Disable receiver */
|
||||
@ -1144,26 +1149,26 @@ static int probe(struct stv *state)
|
||||
if (id != 0x51)
|
||||
return -EINVAL;
|
||||
|
||||
/* Configure the I2C repeater to off */
|
||||
/* Configure the I2C repeater to off */
|
||||
write_reg(state, RSTV0910_P1_I2CRPT, 0x24);
|
||||
/* Configure the I2C repeater to off */
|
||||
write_reg(state, RSTV0910_P2_I2CRPT, 0x24);
|
||||
/* Set the I2C to oversampling ratio */
|
||||
write_reg(state, RSTV0910_I2CCFG, 0x88); /* state->i2ccfg */
|
||||
|
||||
write_reg(state, RSTV0910_OUTCFG, 0x00); /* OUTCFG */
|
||||
write_reg(state, RSTV0910_PADCFG, 0x05); /* RFAGC Pads Dev = 05 */
|
||||
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
||||
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
|
||||
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
|
||||
write_reg(state, RSTV0910_OUTCFG, 0x00); /* OUTCFG */
|
||||
write_reg(state, RSTV0910_PADCFG, 0x05); /* RFAGC Pads Dev = 05 */
|
||||
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
||||
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
|
||||
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
|
||||
|
||||
if (state->single)
|
||||
write_reg(state, RSTV0910_GENCFG, 0x14); /* GENCFG */
|
||||
write_reg(state, RSTV0910_GENCFG, 0x14); /* GENCFG */
|
||||
else
|
||||
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
|
||||
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
|
||||
|
||||
write_reg(state, RSTV0910_P1_TNRCFG2, 0x02); /* IQSWAP = 0 */
|
||||
write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */
|
||||
write_reg(state, RSTV0910_P1_TNRCFG2, 0x02); /* IQSWAP = 0 */
|
||||
write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */
|
||||
|
||||
write_reg(state, RSTV0910_P1_CAR3CFG, 0x02);
|
||||
write_reg(state, RSTV0910_P2_CAR3CFG, 0x02);
|
||||
@ -1184,7 +1189,7 @@ static int probe(struct stv *state)
|
||||
/* TS output */
|
||||
write_reg(state, RSTV0910_P1_TSCFGH, state->tscfgh | 0x01);
|
||||
write_reg(state, RSTV0910_P1_TSCFGH, state->tscfgh);
|
||||
write_reg(state, RSTV0910_P1_TSCFGM, 0xC0); /* Manual speed */
|
||||
write_reg(state, RSTV0910_P1_TSCFGM, 0xC0); /* Manual speed */
|
||||
write_reg(state, RSTV0910_P1_TSCFGL, 0x20);
|
||||
|
||||
/* Speed = 67.5 MHz */
|
||||
@ -1192,7 +1197,7 @@ static int probe(struct stv *state)
|
||||
|
||||
write_reg(state, RSTV0910_P2_TSCFGH, state->tscfgh | 0x01);
|
||||
write_reg(state, RSTV0910_P2_TSCFGH, state->tscfgh);
|
||||
write_reg(state, RSTV0910_P2_TSCFGM, 0xC0); /* Manual speed */
|
||||
write_reg(state, RSTV0910_P2_TSCFGM, 0xC0); /* Manual speed */
|
||||
write_reg(state, RSTV0910_P2_TSCFGL, 0x20);
|
||||
|
||||
/* Speed = 67.5 MHz */
|
||||
@ -1425,7 +1430,8 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)
|
||||
manage_matype_info(state);
|
||||
|
||||
if (state->receive_mode == RCVMODE_DVBS2) {
|
||||
/* FSTV0910_P2_MANUALSX_ROLLOFF,
|
||||
/*
|
||||
* FSTV0910_P2_MANUALSX_ROLLOFF,
|
||||
* FSTV0910_P2_MANUALS2_ROLLOFF = 0
|
||||
*/
|
||||
state->demod_bits &= ~0x84;
|
||||
@ -1435,12 +1441,12 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)
|
||||
read_reg(state,
|
||||
RSTV0910_P2_PDELCTRL2 + state->regoff,
|
||||
&tmp);
|
||||
/*reset DVBS2 packet delinator error counter */
|
||||
/* reset DVBS2 packet delinator error counter */
|
||||
tmp |= 0x40;
|
||||
write_reg(state,
|
||||
RSTV0910_P2_PDELCTRL2 + state->regoff,
|
||||
tmp);
|
||||
/*reset DVBS2 packet delinator error counter */
|
||||
/* reset DVBS2 packet delinator error counter */
|
||||
tmp &= ~0x40;
|
||||
write_reg(state,
|
||||
RSTV0910_P2_PDELCTRL2 + state->regoff,
|
||||
@ -1462,11 +1468,12 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)
|
||||
RSTV0910_P2_ERRCTRL1 + state->regoff,
|
||||
BER_SRC_S | state->berscale);
|
||||
}
|
||||
/*Reset the Total packet counter */
|
||||
/* Reset the Total packet counter */
|
||||
write_reg(state,
|
||||
RSTV0910_P2_FBERCPT4 + state->regoff, 0x00);
|
||||
/* Reset the packet Error counter2 (and Set it to
|
||||
* infinit error count mode )
|
||||
/*
|
||||
* Reset the packet Error counter2 (and Set it to
|
||||
* infinit error count mode)
|
||||
*/
|
||||
write_reg(state,
|
||||
RSTV0910_P2_ERRCTRL2 + state->regoff, 0xc1);
|
||||
@ -1683,17 +1690,17 @@ static struct dvb_frontend_ops stv0910_ops = {
|
||||
FE_CAN_MULTISTREAM
|
||||
},
|
||||
.sleep = sleep,
|
||||
.release = release,
|
||||
.i2c_gate_ctrl = gate_ctrl,
|
||||
.release = release,
|
||||
.i2c_gate_ctrl = gate_ctrl,
|
||||
.set_frontend = set_parameters,
|
||||
.get_frontend_algo = get_algo,
|
||||
.get_frontend = get_frontend,
|
||||
.tune = tune,
|
||||
.get_frontend_algo = get_algo,
|
||||
.get_frontend = get_frontend,
|
||||
.tune = tune,
|
||||
.read_status = read_status,
|
||||
.set_tone = set_tone,
|
||||
|
||||
.diseqc_send_master_cmd = send_master_cmd,
|
||||
.diseqc_send_burst = send_burst,
|
||||
.diseqc_send_burst = send_burst,
|
||||
};
|
||||
|
||||
static struct stv_base *match_base(struct i2c_adapter *i2c, u8 adr)
|
||||
@ -1738,8 +1745,8 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
|
||||
state->nr = nr;
|
||||
state->regoff = state->nr ? 0 : 0x200;
|
||||
state->search_range = 16000000;
|
||||
state->demod_bits = 0x10; /* Inversion : Auto with reset to 0 */
|
||||
state->receive_mode = RCVMODE_NONE;
|
||||
state->demod_bits = 0x10; /* Inversion : Auto with reset to 0 */
|
||||
state->receive_mode = RCVMODE_NONE;
|
||||
state->cur_scrambling_code = (~0U);
|
||||
state->single = cfg->single ? 1 : 0;
|
||||
|
||||
@ -1767,8 +1774,8 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
|
||||
}
|
||||
list_add(&base->stvlist, &stvlist);
|
||||
}
|
||||
state->fe.ops = stv0910_ops;
|
||||
state->fe.demodulator_priv = state;
|
||||
state->fe.ops = stv0910_ops;
|
||||
state->fe.demodulator_priv = state;
|
||||
state->nr = nr;
|
||||
|
||||
dev_info(&i2c->dev, "%s demod found at adr %02X on %s\n",
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user