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

    V4L/DVB (5049): Pvrusb2: Enable radio mode for 24xxx devices
    
    These changes implement correct audio routing for radio mode on a
    24xxx device.
    
    Signed-off-by: Mike Isely <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c |    2 +-
 drivers/media/video/pvrusb2/pvrusb2-wm8775.c      |   16 +++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c 
b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index 8df969c..c2a154e 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -63,6 +63,7 @@ static void set_input(struct pvr2_v4l_cx2584x *ctxt)
                vid_input = CX25840_COMPOSITE7;
                aud_input = CX25840_AUDIO8;
                break;
+       case PVR2_CVAL_INPUT_RADIO: // Treat same as composite
        case PVR2_CVAL_INPUT_COMPOSITE:
                vid_input = CX25840_COMPOSITE3;
                aud_input = CX25840_AUDIO_SERIAL;
@@ -71,7 +72,6 @@ static void set_input(struct pvr2_v4l_cx2584x *ctxt)
                vid_input = CX25840_SVIDEO1;
                aud_input = CX25840_AUDIO_SERIAL;
                break;
-       case PVR2_CVAL_INPUT_RADIO:
        default:
                // Just set it to be composite input for now...
                vid_input = CX25840_COMPOSITE3;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c 
b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index 7794c34..3f6bc4b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -50,15 +50,21 @@ static void set_input(struct pvr2_v4l_wm8775 *ctxt)
 {
        struct v4l2_routing route;
        struct pvr2_hdw *hdw = ctxt->hdw;
-       int msk = 0;
 
        memset(&route,0,sizeof(route));
 
-       pvr2_trace(PVR2_TRACE_CHIPS,"i2c wm8775 set_input(val=%d msk=0x%x)",
-                  hdw->input_val,msk);
+       switch(hdw->input_val) {
+       case PVR2_CVAL_INPUT_RADIO:
+               route.input = 1;
+               break;
+       default:
+               /* All other cases just use the second input */
+               route.input = 2;
+               break;
+       }
+       pvr2_trace(PVR2_TRACE_CHIPS,"i2c wm8775 set_input(val=%d route=0x%x)",
+                  hdw->input_val,route.input);
 
-       // Always point to input #1 no matter what
-       route.input = 2;
        pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route);
 }
 
-
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