diff --git a/drivers/amlogic/atv_demod/atv_demod_driver.c b/drivers/amlogic/atv_demod/atv_demod_driver.c index 93acb746545e..f243aecd9af1 100644 --- a/drivers/amlogic/atv_demod/atv_demod_driver.c +++ b/drivers/amlogic/atv_demod/atv_demod_driver.c @@ -740,6 +740,10 @@ static int aml_atvdemod_probe(struct platform_device *pdev) dev->audio_reg_base = ioremap(round_down(0xff60074c, 0x3), 4); pr_info("audio_reg_base = 0x%p.\n", dev->audio_reg_base); + } else { + dev->audio_reg_base = NULL; + + pr_info("audio_reg_base = NULL.\n"); } aml_atvdemod_dt_parse(dev); @@ -883,6 +887,7 @@ static void __exit aml_atvdemod_exit(void) MODULE_AUTHOR("nengwen.chen "); MODULE_DESCRIPTION("aml atv demod device driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(AMLATVDEMOD_VER); module_init(aml_atvdemod_init); module_exit(aml_atvdemod_exit); diff --git a/drivers/amlogic/atv_demod/atvauddemod_func.c b/drivers/amlogic/atv_demod/atvauddemod_func.c index a2654bb4c97c..eaec1c1ad506 100644 --- a/drivers/amlogic/atv_demod/atvauddemod_func.c +++ b/drivers/amlogic/atv_demod/atvauddemod_func.c @@ -30,6 +30,15 @@ #include "atv_demod_driver.h" #include "atv_demod_access.h" +#ifdef CONFIG_AMLOGIC_SND_SOC_AUGE +#include "sound/soc/amlogic/auge/audio_utils.h" +#endif + +#ifdef CONFIG_AMLOGIC_SND_SOC_MESON +#include "sound/soc/amlogic/meson/audio_hw.h" +#endif + + /* #define AUDIO_MOD_DET_INTERNAL */ /* ademod_debug_en for audio demod debug */ @@ -1667,17 +1676,22 @@ void set_outputmode_status_init(void) void set_output_left_right_exchange(unsigned int ch) { + /* after tl */ + if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) { #ifdef CONFIG_AMLOGIC_SND_SOC_AUGE - if (ch) - fratv_LR_swap(true); - else - fratv_LR_swap(false); -#else - if (ch) - atv_LR_swap(true); - else - atv_LR_swap(false); + if (ch) + fratv_LR_swap(true); + else + fratv_LR_swap(false); #endif + } else { +#ifdef CONFIG_AMLOGIC_SND_SOC_MESON + if (ch) + atv_LR_swap(true); + else + atv_LR_swap(false); +#endif + } } /* atv audio source select @@ -1686,15 +1700,20 @@ void set_output_left_right_exchange(unsigned int ch) */ void audio_source_select(int source) { + /* after tl */ + if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) { #ifdef CONFIG_AMLOGIC_SND_SOC_AUGE - if (source) - fratv_src_select(true); - else - fratv_src_select(false); -#else - if (source) - atv_LR_swap(true); - else - atv_LR_swap(false); + if (source) + fratv_src_select(true); + else + fratv_src_select(false); #endif + } else { +#ifdef CONFIG_AMLOGIC_SND_SOC_MESON + if (source) + atv_src_select(true); + else + atv_src_select(false); +#endif + } } diff --git a/drivers/amlogic/atv_demod/atvauddemod_func.h b/drivers/amlogic/atv_demod/atvauddemod_func.h index e5f304a812a8..9ecc978f904b 100644 --- a/drivers/amlogic/atv_demod/atvauddemod_func.h +++ b/drivers/amlogic/atv_demod/atvauddemod_func.h @@ -20,11 +20,6 @@ #include "aud_demod_reg.h" -#ifdef CONFIG_AMLOGIC_SND_SOC_AUGE -#include "sound/soc/amlogic/auge/audio_utils.h" -#else -#include "sound/soc/amlogic/meson/audio_hw.h" -#endif extern unsigned int signal_audmode;