Commit 30ae3307 authored by Abylay Ospan's avatar Abylay Ospan Committed by Mauro Carvalho Chehab

[media] Sanity check when initializing DVB-S/S2 demodulator

Avoid error message:
cxd2841er_read_status_s(): invalid state 1
Always force demod to shutdown state before initializing
Signed-off-by: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent c5ea46da
...@@ -3133,6 +3133,18 @@ static int cxd2841er_init_s(struct dvb_frontend *fe) ...@@ -3133,6 +3133,18 @@ static int cxd2841er_init_s(struct dvb_frontend *fe)
{ {
struct cxd2841er_priv *priv = fe->demodulator_priv; struct cxd2841er_priv *priv = fe->demodulator_priv;
/* sanity. force demod to SHUTDOWN state */
if (priv->state == STATE_SLEEP_S) {
dev_dbg(&priv->i2c->dev, "%s() forcing sleep->shutdown\n",
__func__);
cxd2841er_sleep_s_to_shutdown(priv);
} else if (priv->state == STATE_ACTIVE_S) {
dev_dbg(&priv->i2c->dev, "%s() forcing active->sleep->shutdown\n",
__func__);
cxd2841er_active_s_to_sleep_s(priv);
cxd2841er_sleep_s_to_shutdown(priv);
}
dev_dbg(&priv->i2c->dev, "%s()\n", __func__); dev_dbg(&priv->i2c->dev, "%s()\n", __func__);
cxd2841er_shutdown_to_sleep_s(priv); cxd2841er_shutdown_to_sleep_s(priv);
/* SONY_DEMOD_CONFIG_SAT_IFAGCNEG set to 1 */ /* SONY_DEMOD_CONFIG_SAT_IFAGCNEG set to 1 */
......
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