From 606cf9caeb3b908426757924bfdce85cb854aa81 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Sat, 20 Jan 2007 01:56:04 -0300 Subject: V4L/DVB (5093): Pvrusb2: Emit VIDIOC_S_TUNER correctly Audio mode changes are not private to the audio chip - other I2C modules need to see this as well. And since the command in question is VIDIOC_S_TUNER which is a standard v4l2 command, we really should be broadcasting it out. This change sets up a broadcast pathway for VIDIOC_S_TUNER and also eliminates the now redundant code from the audio chip handler. This fix enables stereo reception for the FM radio Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c') diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c index 16fa075a1ee..49773764383 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c @@ -33,15 +33,17 @@ #define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__) #define OP_STANDARD 0 -#define OP_BCSH 1 -#define OP_VOLUME 2 -#define OP_FREQ 3 -#define OP_AUDIORATE 4 -#define OP_SIZE 5 -#define OP_LOG 6 +#define OP_AUDIOMODE 1 +#define OP_BCSH 2 +#define OP_VOLUME 3 +#define OP_FREQ 4 +#define OP_AUDIORATE 5 +#define OP_SIZE 6 +#define OP_LOG 7 static const struct pvr2_i2c_op * const ops[] = { [OP_STANDARD] = &pvr2_i2c_op_v4l2_standard, + [OP_AUDIOMODE] = &pvr2_i2c_op_v4l2_audiomode, [OP_BCSH] = &pvr2_i2c_op_v4l2_bcsh, [OP_VOLUME] = &pvr2_i2c_op_v4l2_volume, [OP_FREQ] = &pvr2_i2c_op_v4l2_frequency, @@ -54,6 +56,7 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) int id; id = cp->client->driver->id; cp->ctl_mask = ((1 << OP_STANDARD) | + (1 << OP_AUDIOMODE) | (1 << OP_BCSH) | (1 << OP_VOLUME) | (1 << OP_FREQ) | -- cgit v1.2.3