Skip to content
Snippets Groups Projects
Commit 0a323770 authored by Jose Alberto Reguero's avatar Jose Alberto Reguero Committed by Mauro Carvalho Chehab
Browse files

[media] [PATH,1/2] mxl5007 move reset to attach


This patch move the soft reset to the attach function because with dual
tuners, when one tuner do reset, the other one is perturbed, and the
stream has errors.

Signed-off-by: default avatarJose Alberto Reguero <jareguero@telefonica.net>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 47ebe3f9
No related branches found
No related tags found
No related merge requests found
...@@ -531,10 +531,6 @@ static int mxl5007t_tuner_init(struct mxl5007t_state *state, ...@@ -531,10 +531,6 @@ static int mxl5007t_tuner_init(struct mxl5007t_state *state,
struct reg_pair_t *init_regs; struct reg_pair_t *init_regs;
int ret; int ret;
ret = mxl5007t_soft_reset(state);
if (mxl_fail(ret))
goto fail;
/* calculate initialization reg array */ /* calculate initialization reg array */
init_regs = mxl5007t_calc_init_regs(state, mode); init_regs = mxl5007t_calc_init_regs(state, mode);
...@@ -900,7 +896,20 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe, ...@@ -900,7 +896,20 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
/* existing tuner instance */ /* existing tuner instance */
break; break;
} }
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
ret = mxl5007t_soft_reset(state);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
if (mxl_fail(ret))
goto fail;
fe->tuner_priv = state; fe->tuner_priv = state;
mutex_unlock(&mxl5007t_list_mutex); mutex_unlock(&mxl5007t_list_mutex);
memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops, memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment