Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1382122ab49a7f01fa107608eaf664b12055b8b
Commit:     f1382122ab49a7f01fa107608eaf664b12055b8b
Parent:     5a8a0a16422eec744ec220ccea472eef74b67180
Author:     Mike Isely <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 27 23:23:22 2006 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Feb 21 13:34:32 2007 -0200

    V4L/DVB (5047): Pvrusb2: Fix tuning calculation when in radio mode
    
    Frequency units in V4L2 are apparently different when in radio mode
    compared to tv mode.  Why?  Who knows.  This change adapts the driver
    appropriately - so that internally we always only deal in Hz and don't
    have to muck with craziness like this.
    
    Signed-off-by: Mike Isely <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c 
b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
index c092083..c885a9c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
@@ -146,10 +146,15 @@ static void set_frequency(struct pvr2_hdw *hdw)
        fv = hdw->freqVal;
        pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_freq(%lu)",fv);
        memset(&freq,0,sizeof(freq));
-       freq.frequency = fv / 62500;
+       if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
+               // ((fv * 1000) / 62500)
+               freq.frequency = (fv * 2) / 125;
+               freq.type = V4L2_TUNER_RADIO;
+       } else {
+               freq.frequency = fv / 62500;
+               freq.type = V4L2_TUNER_ANALOG_TV;
+       }
        freq.tuner = 0;
-       freq.type = (hdw->input_val == PVR2_CVAL_INPUT_RADIO) ?
-                    V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
        pvr2_i2c_core_cmd(hdw,VIDIOC_S_FREQUENCY,&freq);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to