mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
atv_demod: fix atv audio control interface. [1/1]
PD#SWPL-9934 Problem: 1.audio control calls crash on a non-tl1 platform. 1.fix atv audio control interface. Solution: 1.fix atv audio control interface. Verify: Verified by r311 and x301. Change-Id: Ib6d58cec96e7d57e1bfd8ae18524dcb5517c317e Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
This commit is contained in:
@@ -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 <nengwen.chen@amlogic.com>");
|
||||
MODULE_DESCRIPTION("aml atv demod device driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(AMLATVDEMOD_VER);
|
||||
|
||||
module_init(aml_atvdemod_init);
|
||||
module_exit(aml_atvdemod_exit);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user