Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330719
b: refs/heads/master
c: 4a03daf
h: refs/heads/master
i:
  330717: 4c20062
  330715: 47644f1
  330711: a21956b
  330703: 6bd7b40
  330687: d91a5af
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Aug 9, 2012
1 parent f758c41 commit 9a548c6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc7a74bad1ae1d68a1a9999634baeb4bae277a92
refs/heads/master: 4a03dafc7b0a347854bc0a8652ffa314150fd1e5
13 changes: 13 additions & 0 deletions trunk/drivers/media/dvb/frontends/au8522_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ int au8522_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
}
EXPORT_SYMBOL(au8522_i2c_gate_ctrl);

int au8522_analog_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct au8522_state *state = fe->demodulator_priv;

dprintk("%s(%d)\n", __func__, enable);

if (enable)
return au8522_writereg(state, 0x106, 1);
else
return au8522_writereg(state, 0x106, 0);
}
EXPORT_SYMBOL(au8522_analog_i2c_gate_ctrl);

/* Reset the demod hardware and reset all of the configuration registers
to a default state. */
int au8522_get_state(struct au8522_state **state, struct i2c_adapter *i2c,
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/media/dvb/frontends/au8522_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,6 @@ static int au8522_s_video_routing(struct v4l2_subdev *sd,

au8522_reset(sd, 0);

/* Jam open the i2c gate to the tuner. We do this here to handle the
case where the user went into digital mode (causing the gate to be
closed), and then came back to analog mode */
au8522_writereg(state, 0x106, 1);

if (input == AU8522_COMPOSITE_CH1) {
au8522_setup_cvbs_mode(state);
} else if (input == AU8522_SVIDEO_CH13) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/dvb/frontends/au8522_dig.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config,
sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;

state->frontend.ops.analog_ops.i2c_gate_ctrl = au8522_analog_i2c_gate_ctrl;

if (au8522_init(&state->frontend) != 0) {
printk(KERN_ERR "%s: Failed to initialize correctly\n",
__func__);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/frontends/au8522_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ int au8522_get_state(struct au8522_state **state, struct i2c_adapter *i2c,
u8 client_address);
void au8522_release_state(struct au8522_state *state);
int au8522_i2c_gate_ctrl(struct dvb_frontend *fe, int enable);
int au8522_analog_i2c_gate_ctrl(struct dvb_frontend *fe, int enable);
int au8522_led_ctrl(struct au8522_state *state, int led);

/* REGISTERS */
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/media/video/au0828/au0828-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,9 @@ static int vidioc_s_frequency(struct file *file, void *priv,

dev->ctrl_freq = freq->frequency;

if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);

if (dev->std_set_in_tuner_core == 0) {
/* If we've never sent the standard in tuner core, do so now. We
don't do this at device probe because we don't want to incur
Expand All @@ -1552,6 +1555,9 @@ static int vidioc_s_frequency(struct file *file, void *priv,

v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, freq);

if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0);

au0828_analog_stream_reset(dev);

return 0;
Expand Down

0 comments on commit 9a548c6

Please sign in to comment.