Post Go back to editing

ADV7511 Produces Incompatible Audio from SPDIF for 480p/576p

This is really a confirmation of the problems that were reported in:

https://ez.analog.com/video/f/q-a/5218/adv7513-issue-on-some-tv-with-bt-656-spdif

Basically using SPDIF audio on the ADV7511 with 480p/576p video modes (and possibly others with a 27MHz pixel clock?), the ADV7511 produces an audio stream that many TVs and devices don't like.  Some just ignore the audio. Others refuse to even show an image. Those that show an image, tend to periodically lose lock and the display goes black for a second or two, while the TV/monitor regains lock.  If the SPDIF audio TX is disabled, then these stability problems go away.

We have been looking at this for months, and yet to find a solution.  Some important points:

1. It works on *some* monitors. This confirms that we are configuring the ADV7511 correctly to produce an audio-containing HDMI stream, that incorporates the SPDIF audio.

2. On the TVs that don't like the ADV7511's output, we can quite easily get HDMI with audio from other devices, e.g., a MimasA7 FPGA board which drives the HDMI directly from four pairs of differential pins direct from the FPGA.  Thus it isn't the TV.

From this, we deduce that either we have some incorrect setting on the ADV7511's setup, or the ADV7511 really does have a problem with this combination of SPDIF and 480p/576p video modes.

We are using a custom PCB that has no application processor, thus we can't use the official software driver.  If, however, you can provide the list of register settings that it applies, or whatever other magic it does, we would be glad to try that.  Holding back such information, however, will just help push us away from your products to something else -- like implementing the same as what the MimasA7 board has, which would also be much cheaper in production. Also, with the COVID19 fun, getting an ADV7511 eval board to us is going to take a long time -- longer thant it would for us to redesign our board to not need the ADV7511.  Thus if I request the purchase of one, that will cause the decision makers to instruct me to drop the ADV7511 immediately.

Basically we have to make the decision as to whether finding a way to make the ADV7511 work properly in this situation, or whether it is cheaper and faster for us to re-spin the part of the PCB to match what the MimasA7 board does. We already have test engineers working to verify the compatibility of that solution, because we don't really have any more time to waste on making the ADV7511 behave properly. This is our last-ditch effort to find a solution, and thus it would be in our collective interest to provide as much information as you can, including about the initialisation sequence that the official software driver does -- or at least a pointer to the source code for it, so that we can work that out for ourselves.

To see how we are initialising the device, please see:

https://github.com/MEGA65/mega65-core/blob/138-hdmi-audio-27mhz/src/vhdl/hdmi_i2c.vhdl

The table of register writes begins around line 160.  Each 16-bit value is a register/value pair, e.g., x"4110" means "write 0x10 into register 0x41".

N/CTS values have been checked multiple times for the 44.1KHz sample rate + 27Mz pixel clock.

The SPDIF audio TX has been checked under simulation and proved at the ADV7511's pin to confirm that it is exactly 44.1KHz.

When I get the chance a little later, I intend to modify our design to produce a video mode with a higher resolution, to see if we can provide conclusive evidence that it is SPDIF + video mode combination that is the problem.  But other than that, we have run out of things to check.  We would like to be able to proceed with the ADV7511, but unless we find a solution, we just don't have any possibility of retaining it in our design.

Can someone with the eval board please setup a 480p/576p 27MHz pixel clock video mode with 44.1KHz SPDIF audio, and try it on any Samsung TVs they have around, to see if they can also reproduce the problem?

Paul.

  • As a follow up: I have setup a 720p output with the SPDIF audio, and that, too, has the same problem: I can receive it on some devices, but on others, like the Samsung TVs I have here, there is no audio.

  • Hi,

     In reference to the thread, https://ez.analog.com/video/f/q-a/5218/adv7513-issue-on-some-tv-with-bt-656-spdif,this has mentioned already "If you are testing with consumer devices, we suggest that you use the official software driver to configure the board rather than scripts".

    In our eval board we are not facing any issue. Have you crosscheck with reference one ?

    Thanks,

    Poornima

  • Hello,

    First, thank you for trying to reproduce the problem. 

    As I mentioned, we don't have the evaluation board, and our design has no processor, it has only an FPGA.  This means we can't use the official software driver.  Rather, we have our VHDL implementation that sets various registers to various vallues. This is quite easy for us to adapt to set any registers to any values required.

    Also, with COVID19, we can't easily get an eval board shipped here to us in the middle of the desert.  Thus I need to work with the possibilities we have.  In terms of moving forward, here are several things that seem to me to be worth exploring:

    1. Could you please provide me with the complete set of register values that were loaded into the ADV7511 in your test, so that I can compare those with what I have here, and fix any discrepencies.  This would hopefully not take too much of your time, but would help me tremendously.  Alternatively, if there is sourrce code for the official software driver, we could attempt to simulate that to determine the register settings required.  Can you also please confirm that you are feeding it 44.1KHz stereo audio via SPDIF mode, not any other mode?

    2. Second, if you are able to lay hands on them, here are two example models of Samsung TV that exhibit the problem for us: T24B300EW and UA40EH6000M.  I would be interested to hear what models of TV and monitor you have tested with, to see if we can find any of those among the devices we have here, so that we can get a common testing platform between us.

    3. If you think that we can find a shipping solution that can deliver to postcode 5701 in Australia, we would be interested in trying to get hold of an evaluation board, so that we can try that path to a common testing platform -- but we have had problems with, e.g., DHL, claiming that they can't deliver to Australia at the moment, presumably due to the lack of scheduled flights to carry their freight.

    Thanks for your help,

    Paul.

  • Hi,

      We have verified this before in our software driver but not now and also we have not verified with the models the one you have specified- T24B300EW and UA40EH6000M .

       Due to COVID19, now we could not able to verify with different source and sink with different Fs.

       Please let us know whether you are facing issue only with 44.1khz or other Fs too?

       Please find the script under 6646.AVES3_Folder-EVAL-ADV7612-7511.zip, register 72 writes belong to ADV7511.

       Also make sure with recommended N and CTS value for 44.1Khz fs. Refer section 4.4.2 at https://www.analog.com/media/en/technical-documentation/evaluation-documentation/ADV7511W-Programming-Guide.pdf

    Note: The ADV7511W is capable of accepting two-channel LPCM and encoded multi-channel audio up to a 192KHz sampling rate via the Sony/Philips Digital Interface (SPDIF). The detected sampling frequency for SPDIF (from 32KHz to 192KHz) can be read in register 0x04[7:4]. For SPDIF, by setting the Audio Frequency Select register (0x0C[7]) to 1, the sampling frequency used to determine pixel repeat can be obtained by the Sampling Frequency register (0x15[7:4]) instead of extracted from the stream; however the sampling frequency read in the SPDIF Sampling Frequency register (0x04) will be sent in the audio sample packet channel status. The ADV7511W is capable of accepting SPDIF with or without an MCLK input. When no MCLK is present, the ADV7511W uses MCLK to internally generate the MCLK and determine the CTS value. 

    Thanks,

    Poornima

  • Okay. I now have access to an Agilent HDMI protocol analyser and am taking a fresh look at this.

    The analyser reports several problems with the HDMI output from the ADV7511:

    1. "Error: No Audio InfoFrame exists on two video fields". So audio info frames are not being sent. This would explain why some monitors produce no audio.

    Note that I have register 0x44 set to 0x79, so the sending of audio frames IS enabled.

    2. "Error in 2 out 02 2 General Control Packet".  This would explain why monitors go blank. The logged general control packets are:

    --------------------- Frame No = 2 ----------------------


    # General Control Packet

      HB00=0x03, HB01=0x00, HB02=0x00

      PB00=0x10, PB01=0x04, PB02=0x00, PB03=0x00, PB04=0x00, PB05=0x00, PB06=0x00

      PB07=0x10, PB08=0x04, PB09=0x00, PB10=0x00, PB11=0x00, PB12=0x00, PB13=0x00

      PB14=0x10, PB15=0x04, PB16=0x00, PB17=0x00, PB18=0x00, PB19=0x00, PB20=0x00

      PB21=0x10, PB22=0x04, PB23=0x00, PB24=0x00, PB25=0x00, PB26=0x00, PB27=0x00

      The above General Control Packet starts at  476 pixel in   1 line


    # General Control Packet

      HB00=0x03, HB01=0x00, HB02=0x00

      PB00=0x10, PB01=0x04, PB02=0x00, PB03=0x00, PB04=0x00, PB05=0x00, PB06=0x00

      PB07=0x10, PB08=0x04, PB09=0x00, PB10=0x00, PB11=0x00, PB12=0x00, PB13=0x00

      PB14=0x10, PB15=0x04, PB16=0x00, PB17=0x00, PB18=0x00, PB19=0x00, PB20=0x00

      PB21=0x10, PB22=0x04, PB23=0x00, PB24=0x00, PB25=0x00, PB26=0x00, PB27=0x00

      The above General Control Packet starts at  476 pixel in   626 line

    So it looks very much like there is a problem with controlling the chip in this mode.  It is entirely possible that we have stuffed up the I2C register settings, but we can find nothing in the programmer's guide that explains what the problem might be. A full dump of the I2C registers we used during these tests follows:

    00:14001880007530007530108E00180113
    10:2537200003003000466204A800001C00
    20:1CBF04A81E70021E000004A808121BAC
    30:00000000000000000000008011114400
    40:C010707E7970000010A8808004000000
    50:0000020D001219000000000000000000
    60:00000000000000000000000000000000
    70:010A0001000000000000000000000000
    80:00000000000000000000000000000000
    90:00000000C00020000302E01830611000
    A0:0000A4A4080400000000004000004006
    B0:00000000000000002000000000000000
    C0:00000000001016000203000002000104
    D0:3CFF8080800000000000000000001001
    E0:D0780000600000000000000000000000
    F0:00000000007511000000100060000058

    Switching to 720x480p 60Hz, the audio info frames suddenly ARE getting sent, but the General Control Packets are still broken.

    Any suggestions?

  • Update: I have tracked down part of the problem:  Audio Info frames are not sent if the VSYNC signal is badly placed.  We now have it producing Audio Info frames and Audio Sample frames, and passing all tests of our N5998A HDMI Protocol Analyser, however many TVs and monitors still don't produce any sound, in particular Samsung ones (we will test more again soon). The main difference I can see in the audio data using the protocol analyser, is that the ADV7511 tends to put only one or at most two samples in each HDMI Audio Sample frame, and thus sends them more often, than our alternative implementation using an FPGA to directly produce the HDMI waveforms, which stuffs all Audio Sample frames with the maximum 4 samples.

  • Hi,

      Please let me know,  Have you tried to extract the audio before re-inserting into Tx for both audio and no audio cases ?

      Please refer expert comment here https://ez.analog.com/video/f/q-a/8454/spdif-enable-register-of-adv7511w to know what are all the things we need to take care to enable the SPDIF Audio.

    Thanks,

    Poornima

  • Hello,

    With our HDMI protocol analyser we were able to confirm that the SPDIF audio *IS* being transmitted. Indeed *some* monitors even produce sound.  It's just that most don't, and some lose video display for a half-second or so every minute or more if audio is enabled.  Also, it seems that there is something weird with the audio sample rate. We had to actually provide the audio sample pulses at a lowe frequency. 

    Anyway we have now given up on the ADV7511 as a solution: It took less time to get an FPGA to directly produce a 100% HDMI 1.4a compliant video and audio signal with out a driver chip than we have wasted on trying to make the ADV7511 behave in any coherent manner.  It might be that we have made some stupid mistake, but nonetheless we were able to make a solution from scratch faster than trying to use the ADV7511.

    Paul.

  • Hi,

     Initially just check with FPGA, then establish the connection with driver chip ADV7511.

     Then only you can able to know where the issue arise ?

     Please note that we have not faced any issue with our eval board - EVAL-ADV7612-7511.

     Also cross check your configuration here AdvantivTm EVAL-ADV7612-7511 Video Evaluation Board

    Thanks,

    Poornima