AnsweredAssumed Answered

HDMI audio distortion

Question asked by Eric Zerbib on May 4, 2017
Latest reply on May 8, 2017 by igorpadykov

We are using the Solidrun Hummingboard based on Imx6d on a Video HDMI decoder application

The kernel used is Linux KDS-DEC4-1 3.14.59-rt59+ #1 SMP PREEMPT Wed May 3 17:29:38 IDT 2017 armv7l GNU/Linux

Running gstreamer based on alsa for audio by this command

gst-launch-1.0 -v --no-fault rtspsrc location=rtsp://192.168.68.150:554/stream latency=10 name=demux 
demux. ! rtph264depay ! h264parse ! imxvpudec ! queue max-size-time=0 max-size-buffers=0 leaky=2 ! imxipuvideosink sync=true use-vsync=true
demux. ! rtpmp4adepay ! avdec_aac ! audioconvert ! alsasink device=sysdefault:CARD=imxhdmisoc

the audio is clear during a long time but sometimes after 1day of continuous playing the audio is suddenly heard with distortion, restarting the pipeline fix the problem.

 

Using a tee in gstreamer pipeline which output on both hdmi sound card and on the Sgt5000 card as following show that pthe problem only appears on the HDMI card while on the Audio Analog Codec card the problem is not heard which make me think that the problem is not on the gstreamer layer

gst-launch-1.0 -v --no-fault rtspsrc location=rtsp://192.168.1.39:554/stream latency=10 name=demux 
demux. ! rtph264depay ! h264parse ! imxvpudec ! queue max-size-time=0 max-size-buffers=0 leaky=2 ! imxipuvideosink sync=true use-vsync=true
demux. ! rtpmp4adepay ! avdec_aac ! audioconvert !
tee name=t
     t. ! queue ! alsasink device=sysdefault:CARD=imxhdmisoc
     t. ! queue ! alsasink device=sysdefault:CARD=Codec

We are suspecting the problem is related to the errata

http://cache.nxp.com/assets/documents/data/en/errata/IMX6DQCE.pdf 

ERR005171 - HDMI: HDMI Tx audio may have noise due to audio DMA FIFO overflowbut it's mentioned that a workaround is already implemented in our BSP which is after the  imx_3.0.35_4.1.0. freescale release

- Could you indicate me what is the file to check in our linux kernel to see the workaround

- Is there a way that I  can I detect the problem by myself such as checking a imx6 register I have dump all the HDMI registers changes from good hearing and bad hearing and theses are the only differences

root@KDS-DEC4-1:~/regs# diff -y 140.good 140.bad 
HDMI_BASE:0x00120000 =0x36f000ff | HDMI_BASE:0x00120000 =0x36f100ff
HDMI_IH_PHY_STAT0:0x00120104 =0x00 | HDMI_IH_PHY_STAT0:0x00120104 =0x02
HDMI_IH_VP_STAT0:0x00120107 =0x02 | HDMI_IH_VP_STAT0:0x00120107 =0x57
HDMI_IH_MUTE_CEC_STAT0:0x00120186 =0x7f | HDMI_IH_MUTE_CEC_STAT0:0x00120186 =0x68
HDMI_PHY_STAT0:0x00123004 =0xf3 | HDMI_PHY_STAT0:0x00123004 =0x03
:0x00123609 =0x23 | :0x00123609 =0x17
:0x0012360c =0x28 | :0x0012360c =0xc8
:0x0012360d =0xbc | :0x0012360d =0x9d
:0x00123617 =0x00 | :0x00123617 =0x01


-Is there a way to fix the problem without restart the gstreamer pipeline

thanks you in Advance

 

 

Outcomes