diff options
author | Mike Isely <isely@pobox.com> | 2007-01-19 22:56:04 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-01-19 22:56:04 -0600 |
commit | 19c10d50ad524bab82155c690457b1af90631226 (patch) | |
tree | 6d33a26a3b623f8b63b6de9f038eb30d28f7bc2a /linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | |
parent | 6af46f716fc68b280bd9eadb67ab578f4f820b45 (diff) | |
download | mediapointer-dvb-s2-19c10d50ad524bab82155c690457b1af90631226.tar.gz mediapointer-dvb-s2-19c10d50ad524bab82155c690457b1af90631226.tar.bz2 |
pvrusb2: Emit VIDIOC_S_TUNER correctly
From: Mike Isely <isely@pobox.com>
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 <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index b1f680962..c650e02cc 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c @@ -140,6 +140,29 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_volume = { }; +static void set_audiomode(struct pvr2_hdw *hdw) +{ + struct v4l2_tuner vt; + memset(&vt,0,sizeof(vt)); + vt.audmode = hdw->audiomode_val; + pvr2_i2c_core_cmd(hdw,VIDIOC_S_TUNER,&vt); +} + + +static int check_audiomode(struct pvr2_hdw *hdw) +{ + return (hdw->input_dirty || + hdw->audiomode_dirty); +} + + +const struct pvr2_i2c_op pvr2_i2c_op_v4l2_audiomode = { + .check = check_audiomode, + .update = set_audiomode, + .name = "v4l2_audiomode", +}; + + static void set_frequency(struct pvr2_hdw *hdw) { unsigned long fv; |