* 0: select from ATV;
* 1: select from ADEC;
*/
-void fratv_src_select(int src)
+void fratv_src_select(bool src)
{
- audiobus_update_bits(EE_AUDIO_FRATV_CTRL0, 0x1 << 20, (bool)src << 20);
+ audiobus_update_bits(EE_AUDIO_FRATV_CTRL0, 0x1 << 20, src << 20);
+}
+
+void fratv_LR_swap(bool swap)
+{
+ audiobus_update_bits(EE_AUDIO_FRATV_CTRL0, 0x1 << 19, swap << 19);
}
void cec_arc_enable(int src, bool enable)
extern int audio_locker_get(void);
extern void fratv_enable(bool enable);
-extern void fratv_src_select(int src);
+
+extern void fratv_src_select(bool src);
+
+extern void fratv_LR_swap(bool swap);
extern void cec_arc_enable(int src, bool enable);
#endif
msb = 15;
lsb = 0;
- fratv_src_select(1);
+ /* commented it, selected by atv demod,
+ * select 0 for non standard signal.
+ */
+ /* fratv_src_select(1); */
} else if (src == FRHDMIRX) {
if (p_extn->hdmirx_mode) { /* PAO */
);
if (audio_in_source == 1) {
- /* ATV from adec */
- aml_audin_write(AUDIN_ATV_DEMOD_CTRL, 7);
+ /* commented it, selected by atv demod,
+ * select 0 for non standard signal.
+ */
+ /*aml_audin_write(AUDIN_ATV_DEMOD_CTRL, 7);*/
aml_audin_update_bits(AUDIN_FIFO2_CTRL,
(0x7 << AUDIN_FIFO_DIN_SEL),
(ATV_ADEC << AUDIN_FIFO_DIN_SEL));
}
+/* source select
+ * 0: select from ATV;
+ * 1: select from ADEC;
+ */
+void atv_src_select(bool src)
+{
+ aml_audin_update_bits(AUDIN_ATV_DEMOD_CTRL,
+ 0x3, (src << 1) && src);
+}
+
+void atv_LR_swap(bool swap)
+{
+ aml_audin_update_bits(AUDIN_ATV_DEMOD_CTRL,
+ 0x1 << 2, swap << 2);
+}
+
static void spdifin_reg_set(void)
{
/* get clk81 clk_rate */
extern bool is_audbuf_gate_rm(void);
extern void chipset_set_spdif_pao(void);
+extern void atv_src_select(bool src);
+extern void atv_LR_swap(bool swap);
+
extern unsigned int IEC958_mode_codec;
extern unsigned int clk81;