//#include "hdmi_rx_edid.h"
-#define RX_VER0 "ver.2018-03-30"
+#define RX_VER0 "ver.2018-04-05"
/*
*
*
int real_sr;
};
-struct rx_audio_stat_s {
- /* audio packets received */
- bool aud_rcv_flag;
- /* audio stable status */
- bool aud_stb_flag;
- /* audio sample rate */
- int aud_sr;
- /* audio channel count
- * 0: refer to stream header,
- * 1: 2ch, 2: 3ch, 3: 4ch, 4: 5ch,
- * 5: 6ch, 6: 7ch, 7: 8ch
- */
- int aud_channel_cnt;
- /* audio coding type
- * 0: refer to stream header, 1: IEC60958 PCM,
- * 2: AC-3, 3: MPEG1 (Layers 1 and 2),
- * 4: MP3 (MPEG1 Layer 3), 5: MPEG2 (multichannel),
- * 6: AAC, 7: DTS, 8: ATRAC, 9: One Bit Audio,
- * 10: Dolby Digital Plus, 11: DTS-HD,
- * 12: MAT (MLP), 13: DST, 14: WMA Pro
- */
- int aud_type;
-};
-
struct rx_s {
enum chip_id_e chip_id;
/** HDMI RX received signal changed */
extern void hdmirx_set_video_mute(bool mute);
extern void hdmirx_config_video(void);
extern void rx_get_audinfo(struct aud_info_s *audio_info);
-extern void rx_get_audio_status(struct rx_audio_stat_s *aud_sts);
extern bool rx_clkrate_monitor(void);
extern unsigned char rx_get_hdcp14_sts(void);
if (irq_flag & IRQ_PACKET_FLAG)
rx_pkt_handler(PKT_BUFF_SET_FIFO);
- if ((irq_flag & IRQ_AUD_FLAG) &&
- (rx.aud_info.real_sr != 0))
+ if (irq_flag & IRQ_AUD_FLAG)
hdmirx_audio_fifo_rst();
/*irq_flag = 0;*/
//rx_set_eq_run_state(E_EQ_PASS);
hdmirx_config_video();
rx_aud_pll_ctl(1);
+ hdmirx_audio_fifo_rst();
rx.stable_timestamp = rx.timestamp;
rx_pr("Sig ready\n");
dump_state(1);
unsigned int demodctl;
unsigned int atsc;
};
+
+struct rx_audio_stat_s {
+ /*audio packets received*/
+ bool aud_rcv_flag;
+ /*audio stable status*/
+ bool aud_stb_flag;
+ /*audio sample rate*/
+ int aud_sr;
+ /**audio channel count*/
+ /*0: refer to stream header,*/
+ /*1: 2ch, 2: 3ch, 3: 4ch, 4: 5ch,*/
+ /*5: 6ch, 6: 7ch, 7: 8ch*/
+ int aud_channel_cnt;
+ /**audio coding type*/
+ /*0: refer to stream header, 1: IEC60958 PCM,*/
+ /*2: AC-3, 3: MPEG1 (Layers 1 and 2),*/
+ /*4: MP3 (MPEG1 Layer 3), 5: MPEG2 (multichannel),*/
+ /*6: AAC, 7: DTS, 8: ATRAC, 9: One Bit Audio,*/
+ /*10: Dolby Digital Plus, 11: DTS-HD,*/
+ /*12: MAT (MLP), 13: DST, 14: WMA Pro*/
+ int aud_type;
+};
+
extern int adc_set_pll_cntl(bool on, unsigned int module_sel, void *pDtvPara);
extern void tvafe_set_ddemod_default(void);/* add for dtv demod*/
+extern void rx_get_audio_status(struct rx_audio_stat_s *aud_sts);
#endif
#ifdef CONFIG_AMLOGIC_AO_CEC
#include <linux/amlogic/media/vout/hdmi_tx/hdmi_tx_cec_20.h>
#endif
+#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_HDMI
+#include <linux/amlogic/media/frame_provider/tvin/tvin.h>
+#endif
#include "i2s.h"
#include "audio_hw.h"
}
#endif
-#ifdef CONFIG_TVIN_HDMI
+#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_HDMI
/* call HDMI CEC API to enable arc audio */
static int aml_set_atmos_audio_edid(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
bool enable = ucontrol->value.integer.value[0];
p_aml_audio = snd_soc_card_get_drvdata(card);
- rx_set_atmos_flag(enable);
+ //rx_set_atmos_flag(enable);
p_aml_audio->atmos_edid_enable = enable;
return 0;
}
ucontrol->value.integer.value[0] = aud_sts.aud_type;
return 0;
}
-#endif /* CONFIG_TVIN_HDMI */
+#endif
+
#ifdef CONFIG_AM_DVB
static const char *const atv_audio_is_stable[] = {
"false",
aml_get_arc_audio,
aml_set_arc_audio),
#endif
-#ifdef CONFIG_TVIN_HDMI
+#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_HDMI
SOC_ENUM_EXT("HDMIIN audio stable", hdmi_in_status_enum[0],
aml_get_hdmiin_audio_stable,
NULL),