Philip Rowlands wrote:

Looking back through the list archives I see you've done quite a bit of
work on the the tda988x sound issue. Could you (or anyone) summarise the
sum of all knowledge on the OP1/OP2 pins, "black magic" settings, etc.?
I'm particularly interested on what combinations have helped; in the
archives I can see only examples of setting both port1 and port2
together.
I started writing a section in the README.tda9887 about it, but realized there's really not much to add. Here's what I had:
Q5. Ports?  Wtf Ports?
A5. Yeah I don't know either. Audio output demodulated (split) from the source
   signal and output analog on the AUD pin of the tda9887.  This signal is
   normally fed into the ADC2 block of the cx25840 digitizer.  However,
   it appears that some versions of the PVR-150 and 500 instead use one of
   the two auxilary output ports (OP1/OP2) of the chip instead of the AUD
   pin.

That really doesn't say anything though, because who cares? I instead added this description of black magic: Q5. What was the old "black magic" patch or "no_black_magic" module parameter
   do, and why isn't it around any more?
A5. In early development of the cx25840 driver, there was an unkown I2C
   transfer which made the audio work for the PAL-land developer.  Since
   it was unknown what this data was, it was added as a raw I2C write
   in the cx25840 driver.
   Later, it was determined that this was the configuration of the tda9887
   chip and the module was included into the ivtv project.  The code to do
   the mystery initialization was removed from the cx25840 driver (since it
   it didn't belong there anyway).
   For the record, the black magic code initialized the chip the same as
   the module parameters "pal=i port1=0 port2=0" do.

I've attached the updated README.
The tda9887 chip is Philips' I2C-bus contrlled multistandard alignment-free
IF-PLL demodulator with FM radio chip, which means it extracts various formats
of audio from an input signal.

The tda9887 configuration is a source of many audio problems on both NTSC 
and PAL systems using the PVR-150 or PVR-500 capture card.  A misconfigured
tda9887 may be identified by:
  -- Missing audio on all channels
  -- Missing audio on some channels
  -- Audio accompanied by a high frequency tone
  -- "Staticy" audio on all channels
  -- "Crackley" audio on all channels
  -- Staticy and Crackley audio on some channels and missing audio on others
  -- An overwhelming sense of frustration

Q1. How do I know if I have a tda9887 chip on my card?
A1. You can look at the card and phyisically look for it, usually a 32-pin
    square surface-mount component 5mm on each side or a 24-pin rectangle
    between 5.3-7.5mm.  An easier way however is to probe it.  Once ivtv
    is loaded, simply modprobe tda9887.  If you see a line in your dmesg
    output like:
        tda9885/6/7: chip found @ 0x43
    You've got one, congratulations!  You should add:
        options ivtv tda9887=0
    To your modprobe.conf to tell ivtv automatically load this module 
    when it initializes.

Q2. What are the module parameters to the tda9887?
A1. 
    debug - integer
      0 (default) - no debug messages
      1 - debug messages for commands
      2 - report status after commands (kernel 2.6.8 or above)
    port1 - integer flag - Disable port1 output
      0 - port1 output enabled
      1 (default) - port1 output disabled
    port2 - integer flag - Disable port2 output
      0 - port2 output enabled
      1 (default) - port2 output disabled
    qss - integer flag - Force quasi split sound mode
      unset (default) - use default for selected audio format
      0 - force intercarrier mode
      1 - force QSS mode
   adjust - integer - Tuner takeover point adjustment
      0x1f - +15dB
      0x10 (default) - +0dB
      0x00 - -16dB
   pal - string - Select PAL region
      b -
      B -
      g -
      G - Select PAL-B/G
      i -
      I - Select PAL-I
      d - 
      D -
      k -
      K - Select PAL-DK
    secam - string - Select SECAM region
      d -
      D -
      k -
      K - Select SECAM-DK
      l - 
      L - Select SECAM-L

Q3. Wow, I have no idea what you just said there.  What module parameters are
    needed for *my* card?
A3. Depends on your card.  At the *very* least, you need to specify your audio
    standard if you're in PAL or SECAM land.  For example, in PAL-DK:
        options tda9887 pal=k
    On an unrelated note, you'll want to specify this for your tuner too:
        options tuner pal=k

Q4. What do I do still don't have sound, or only some channels have sound?
A4. If you've already specified your PAL/SECAM flavor, the problem might be
    a disabled port is needed.  Some cards require their output ports be 
    enabled in order to produce sound. Note that the port flags are inverted,
    so to enabled both output ports you need:
        options tda9887 port1=0 port2=0 [pal/secam selector]
    Some people have reported success with only one port activated, so it may
    be beneficial to try each port separately if switching them both on
    doesn't work for you.

Q5. What was the old "black magic" patch or "no_black_magic" module parameter
    do, and why isn't it around any more?
A5. In early development of the cx25840 driver, there was an unkown I2C
    transfer which made the audio work for the PAL-land developer.  Since 
    it was unknown what this data was, it was added as a raw I2C write
    in the cx25840 driver.  
    Later, it was determined that this was the configuration of the tda9887
    chip and the module was included into the ivtv project.  The code to do
    the mystery initialization was removed from the cx25840 driver (since it
    it didn't belong there anyway).  
    For the record, the black magic code initialized the chip the same as  
    the module parameters "pal=i port1=0 port2=0" do.

Reply via email to