hdmirx: optimize audio fifo config [1/1]
authorHang Cheng <hang.cheng@amlogic.com>
Thu, 14 Mar 2019 10:35:45 +0000 (18:35 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 15 Mar 2019 11:12:20 +0000 (03:12 -0800)
PD#SWPL-5579

Problem:
audio fifo underflow after switch audio pattern
on chroma 2233: only 2ch audio in, but audio fifo
is configed to read out 8ch afifo. chroma 2233
may change from multi-channel(witch audio overflows
and workaround to config read out all subpackets)
to 2-channel audio pattern, then issue happens.
so need to reset audio fifo config.

Solution:
except for workaround case, always config audio
fifo to only store valid subpackets.

Verify:
tl1

Change-Id: If32a55330fa7ebd9f6359a460eea4ad62872207b
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c

index 55f57c0..31990c6 100644 (file)
@@ -41,7 +41,7 @@
  *
  *
  */
-#define RX_VER1 "ver.2019/02/13"
+#define RX_VER1 "ver.2019/03/14"
 /*
  *
  *
index 0d3b6ad..8191700 100644 (file)
@@ -474,6 +474,8 @@ static int hdmi_rx_ctrl_irq_handler(void)
                         */
                        if (rx.aud_info.auds_layout)
                                rx_afifo_store_all_subpkt(true);
+                       else
+                               rx_afifo_store_all_subpkt(false);
                        //if (rx.aud_info.real_sr != 0)
                                //error |= hdmirx_audio_fifo_rst();
                }
@@ -481,6 +483,7 @@ static int hdmi_rx_ctrl_irq_handler(void)
                        if (log_level & 0x100)
                                rx_pr("[irq] UNDERFL\n");
                        rx.irq_flag |= IRQ_AUD_FLAG;
+                       rx_afifo_store_all_subpkt(false);
                        //if (rx.aud_info.real_sr != 0)
                                //error |= hdmirx_audio_fifo_rst();
                }