On Mon, Jul 13, 2009 at 1:10 AM, Andy Walls<[email protected]> wrote:
>> Hi Andy,
>>
>> The audio still does not work consistently with this version. Let me
>> know if there is any way I can check whether the new settings got
>> applied.
>
> Well, if you conpiled the modules with the CONFIG_ADV_DEBUG (?) option,
> then you can use v4l2-dbg to look at the registers of the chips.
> Something like this will show you the change is in effect:
>
> $ su - root
>
> # v4l2-dbg -d /dev/video0 -S
> host0: cx23416    revision 0x00000000
> i2c 0x1b: wm8775     revision 0x00000000
> i2c 0x44: cx25843    revision 0x00008433
>
> # v4l2-dbg -d /dev/video0 -c cx25840 --list-registers=min=0x110,max=0x113
> ioctl: VIDIOC_DBG_G_REGISTER
>
>          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
> 00000110: 0c 74 76 01
>          ^^^^^^^^^^^
>              |
> Indicator of the change, when set to line-in at 48 ksps.
>
>
>
> Here's my guess at the audio processing chain on your card:
>
>
>              +----------+                                       
> +---------------+
>              |     Sel0 |<--------------------------------------| GPIO14      
>   |
>              |     Sel1 |<--------------------------------------| GPIO15      
>   |
>              |          |                                       |             
>   |
> (FM AF L)---->| 74HC4052 |                                       |            
>    |
> (FM AF R)---->|          |         +----------------+------------|I2C Data & 
> CLK |
>              | Dual 4:1 |         V                V            |             
>   |
>              | Mux      |     +------+      +--------------+    |             
>   |
> Line-in L --->|          |     |WM8739|      |   CX25841    |    |   CX23416  
>    |
> Line-in R --->|          |---->|Analog|----->|I2S Data In   |    |            
>    |
>              |          |---->|to I2S|------|I2S Clock     |    |             
>   |
> White Conn?-->|          |     |Audio |      | I2S Data Out |--->|I2S Data In 
>    |
>              |          |     +------+      | I2S Clock    |----|I2S Clock    
>   |
>              +----------+                   |              |    |             
>   |
> Tuner SIF ---------------------------------->|SIF In        |    
> +---------------+
>                                             |              |
>                                             +--------------+
>
>
> I realize your card doesn't have FM radio audio, but variants of it with
> the same PCB do have FM.
>
> The above picutre is just my guess.  Without having the card in hand,
> it's hard to actaully trace the wiring.  So let's look at where thing
> could be going wrong for Line-in audio:
>
>
> 1. I could be setting the 74HC4052 dual 4:1 multiplexer wrong.  The
> datasheet is here:
>
> http://www.datasheetcatalog.com/datasheets_pdf/7/4/H/C/74HC4052.shtml
>
> So if you could trace how line-in L & R run over to the chip, that would
> eliminate an unknown.
>
> 2. I could be using the wrong GPIO pins from the CX23416 for controlling
> the 74HC4052 mux.  Floating GPIO pins for driving the mux selection
> would explain why sometimes audio works and sometimes doesn't.  The best
> thing to do is to trace the selection inputs from the 74HC4052 back to
> the CX23416's BGA and figure out which balls in the grid are driving
> those lines.  An alternative would be to begin experimenting with pairs
> of GPIO pins in the ivtv-cards.c entry for your card, or use ivtv-ctl to
> manipulate GPIO pins interactively to see when audio works (or you
> change the state of the select pins on the 74HC4052 mux.
>
>
> 3. The WM8739 does actually have a volume control internally, that we
> are not explicitly setting - I'm using whatever the WM8739 module does
> by default.  v4l2-dbg could be used to set the WM8739 volume control
> registers manually to see if that makes audio work.
>
> The datasheet is here:
> http://dl.ivtvdriver.org/datasheets/audio/WM8739.pdf
>
>
> 4. The baseband audio processing in the CX25841 could not be working or
> have it's volume set too low.  The volume controls available with
> v4l2-ctl should let you set the volume and mute of this device.  If
> you're interested, the datasheet is here:
>
> http://dl.ivtvdriver.org/datasheets/video/cx25840.pdf
>
> Sections 3.24 and 3.25 show the chip's audio processing capabilities.
> I2S audio shoudl be coming in through Sample Rate Convertor (SRC) 1,
> passing through a baseband processing path and exiting through SRC3 to
> the CX23416.  AC97 audio isn't used, and I'm fairly sure nor is
> Ancillary mode audio.
>
>
> So what do you feel like looking at first?  I'd at least like you to
> verify my overall block diagaram as best you can by visually inspecting
> the traces on the board. (My diagram amounts to 1 big assumption right
> now.)
>
> Regards,
> Andy
>
>
>> Regards
>> Ravi
>>
>
>

Hi Andy,

I checked the MUX input connections and the signal path, and your
diagram is right. The MUX input pins are connected as follows -


             +----------+
+---------------+
             |     Sel0 |<--------------------------------------|
GPIO14        |
             |     Sel1 |<--------------------------------------|
GPIO15        |
             |          |                                       |
         |
(FM AF L)--->| 74HC4052 |                                       |
         |
(FM AF R)--->|Y2        |         +----------------+------------|I2C
Data & CLK |
             | Dual 4:1 |         V                V            |
         |
             | Mux      |     +------+      +--------------+    |
         |
Line-in L -->|          |     |WM8739|      |   CX25841    |    |
CX23416     |
Line-in R -->|Y1        |---->|Analog|----->|I2S Data In   |    |
         |
             |          |---->|to I2S|------|I2S Clock     |    |
         |
White Conn?->|Y0        |     |Audio |      | I2S Data Out |--->|I2S
Data In    |
             |          |     +------+      | I2S Clock    |----|I2S
Clock      |
             +----------+                   |              |    |
         |
Tuner SIF---------------------------------->|SIF In        |
+---------------+
                                            |              |


The MUX select final connections are not visible when they enter the
BGA area. So could not check the GPIO connections. But they seem to be
going to the general area where GPIO14/15 (balls B12/C11) are located,
but that is probably not enough to confirm.

Anyhow, I think it is not a MUX problem, because I was looking at this
block diagram and realized the tuner audio is a totally separate path.
However the tuner audio also behaves the same erratic way as Line-in
on the card (choppy/intermittent or totally silent). So could it be
something to do with CX23416 itself?


Regards
Ravi

_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to