Commit 997bdc0c authored by Abylay Ospan's avatar Abylay Ospan Committed by Mauro Carvalho Chehab

[media] cxd2841er: fix switch-case for DVB-C

DVB-C should use cxd2841er_read_agc_gain_c() to get the gain. The same
function is used for all DVB-C annex delivery systems.
Signed-off-by: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 313a7dfb
...@@ -1750,13 +1750,6 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe) ...@@ -1750,13 +1750,6 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe)
dev_dbg(&priv->i2c->dev, "%s()\n", __func__); dev_dbg(&priv->i2c->dev, "%s()\n", __func__);
switch (p->delivery_system) { switch (p->delivery_system) {
case SYS_DVBC_ANNEX_B:
case SYS_DVBC_ANNEX_C:
strength = 65535 - cxd2841er_read_agc_gain_c(
priv, p->delivery_system);
p->strength.stat[0].scale = FE_SCALE_RELATIVE;
p->strength.stat[0].uvalue = strength;
break;
case SYS_DVBT: case SYS_DVBT:
case SYS_DVBT2: case SYS_DVBT2:
strength = cxd2841er_read_agc_gain_t_t2(priv, strength = cxd2841er_read_agc_gain_t_t2(priv,
...@@ -1766,7 +1759,9 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe) ...@@ -1766,7 +1759,9 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe)
p->strength.stat[0].uvalue = strength * 366 / 100 - 89520; p->strength.stat[0].uvalue = strength * 366 / 100 - 89520;
break; /* Code moved out of the function */ break; /* Code moved out of the function */
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
strength = cxd2841er_read_agc_gain_t_t2(priv, case SYS_DVBC_ANNEX_B:
case SYS_DVBC_ANNEX_C:
strength = cxd2841er_read_agc_gain_c(priv,
p->delivery_system); p->delivery_system);
p->strength.stat[0].scale = FE_SCALE_DECIBEL; p->strength.stat[0].scale = FE_SCALE_DECIBEL;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment