diff options
Diffstat (limited to 'linux/drivers/media/video/saa7115.c')
-rw-r--r-- | linux/drivers/media/video/saa7115.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index c06997b00..1b67cc5d4 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -84,6 +84,7 @@ struct saa7115_state { v4l2_std_id std; int input; int enable; + int radio; int bright; int contrast; int hue; @@ -644,6 +645,9 @@ static int saa7115_set_v4lctrl(struct i2c_client *client, struct v4l2_control *c state->hue = ctrl->value; saa7115_write(client, 0x0d, state->hue); break; + + default: + return -EINVAL; } return 0; @@ -1053,6 +1057,8 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar struct v4l2_tuner *vt = arg; int status; + if (state->radio) + break; status = saa7115_read(client, 0x1f); saa7115_dbg("status: 0x%02x\n", status); @@ -1075,9 +1081,14 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar break; case VIDIOC_S_STD: + state->radio = 0; saa7115_set_v4lstd(client, *(v4l2_std_id *)arg); break; + case AUDC_SET_RADIO: + state->radio = 1; + break; + case VIDIOC_G_INPUT: *(int *)arg = state->input; break; @@ -1246,6 +1257,7 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) state->std = V4L2_STD_NTSC; state->input = -1; state->enable = 1; + state->radio = 0; state->bright = 128; state->contrast = 64; state->hue = 0; |