Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66e6fbdf99420efe58685feda0ac1b73b33400e0
Commit:     66e6fbdf99420efe58685feda0ac1b73b33400e0
Parent:     6a0bc9a0162d10c551bb916a1a21bfede4db3203
Author:     Ricardo Cerqueira <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 20:52:08 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:03:49 2008 -0200

    V4L/DVB (6833): Don't limit cx88 audio routing to blackbird boards
    
    All cx2388 boards need the line-in audio to be routed from an external ADC
    (refered to as "ADC mode" in the spec sheet), since the chip is uncapable
    of dealing with baseband audio directly.
    So... this patch enables normal mode when using the tuner (TV or Radio), and
    enables ADC mode with any other source. It'll probably only work with boards
    that have supported ADCs (such as the Wolfson wm9775)
    
    Signed-off-by: Ricardo Cerqueira <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/cx88/cx88-video.c |   46 ++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-video.c 
b/drivers/media/video/cx88/cx88-video.c
index 1b80f0f..c8a5cd5 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -392,25 +392,41 @@ int cx88_video_mux(struct cx88_core *core, unsigned int 
input)
                break;
        }
 
-       if (core->board.mpeg & CX88_MPEG_BLACKBIRD) {
-               /* sets sound input from external adc */
-               if (INPUT(input).audioroute) {
-                       /* The wm8775 module has the "2" route hardwired into
-                          the initialization. Some boards may use different
-                          routes for different inputs. HVR-1300 surely does */
-                       if (core->board.audio_chip &&
-                           core->board.audio_chip == AUDIO_CHIP_WM8775) {
-                               struct v4l2_routing route;
-
-                               route.input = INPUT(input).audioroute;
-                               cx88_call_i2c_clients(core,
-                                       VIDIOC_INT_S_AUDIO_ROUTING,&route);
-                       }
+       /* if there are audioroutes defined, we have an external
+          ADC to deal with audio */
 
+       if (INPUT(input).audioroute) {
+
+               /* cx2388's C-ADC is connected to the tuner only.
+                  When used with S-Video, that ADC is busy dealing with
+                  chroma, so an external must be used for baseband audio */
+
+               if (INPUT(input).type != CX88_VMUX_TELEVISION &&
+                       INPUT(input).type != CX88_RADIO) {
+                       /* "ADC mode" */
+                       cx_write(AUD_I2SCNTL, 0x1);
                        cx_set(AUD_CTL, EN_I2SIN_ENABLE);
-               } else
+               } else {
+                       /* Normal mode */
+                       cx_write(AUD_I2SCNTL, 0x0);
                        cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
+               }
+
+               /* The wm8775 module has the "2" route hardwired into
+                  the initialization. Some boards may use different
+                  routes for different inputs. HVR-1300 surely does */
+               if (core->board.audio_chip &&
+                   core->board.audio_chip == AUDIO_CHIP_WM8775) {
+                       struct v4l2_routing route;
+
+                       route.input = INPUT(input).audioroute;
+                       cx88_call_i2c_clients(core,
+                               VIDIOC_INT_S_AUDIO_ROUTING,&route);
+
+               }
+
        }
+
        return 0;
 }
 EXPORT_SYMBOL(cx88_video_mux);
-
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