imx233: try to improve audio quality
Change-Id: Idaee93fae8d407e5968f8571c54957b7b87da3bb
This commit is contained in:
parent
4dd2c5277b
commit
d119fb1fc5
2 changed files with 22 additions and 1 deletions
|
@ -53,6 +53,13 @@ void imx233_audioout_preinit(void)
|
|||
__REG_CLR(HW_AUDIOOUT_PWRDN) = HW_AUDIOOUT_PWRDN__HEADPHONE;
|
||||
/* Set HP mode to AB */
|
||||
__REG_SET(HW_AUDIOOUT_ANACTRL) = HW_AUDIOOUT_ANACTRL__HP_CLASSAB;
|
||||
/* change biais to -50% */
|
||||
__REG_CLR(HW_AUDIOOUT_TEST) = HW_AUDIOOUT_TEST__HP_I1_ADJ_BM;
|
||||
__REG_SET(HW_AUDIOOUT_TEST) = HW_AUDIOOUT_TEST__HP_I1_ADJ_M_50;
|
||||
__REG_CLR(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BM;
|
||||
__REG_SET(HW_AUDIOOUT_REFCTRL) = 1 << HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BP;
|
||||
__REG_SET(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__RAISE_REF;
|
||||
__REG_SET(HW_AUDIOOUT_REFCTRL) = HW_AUDIOOUT_REFCTRL__XTAL_BGR_BIAS;
|
||||
/* Stop holding to ground */
|
||||
__REG_CLR(HW_AUDIOOUT_ANACTRL) = HW_AUDIOOUT_ANACTRL__HP_HOLD_GND;
|
||||
/* Set dmawait count to 31 (see errata, workaround random stop) */
|
||||
|
|
|
@ -86,7 +86,13 @@
|
|||
#define HW_AUDIOOUT_PWRDN__SPEAKER (1 << 24)
|
||||
|
||||
#define HW_AUDIOOUT_REFCTRL (*(volatile uint32_t *)(HW_AUDIOOUT_BASE + 0x80))
|
||||
#define HW_AUDIOOUT_REFCTRL__LOW_PWR (1 << 19)
|
||||
#define HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BP 16
|
||||
#define HW_AUDIOOUT_REFCTRL__BIAS_CTRL_BM (3 << 16)
|
||||
#define HW_AUDIOOUT_REFCTRL__LOW_PWR (1 << 19)
|
||||
#define HW_AUDIOOUT_REFCTRL__VBG_ADJ_BP 20
|
||||
#define HW_AUDIOOUT_REFCTRL__VBG_ADJ_BM (3 << 20)
|
||||
#define HW_AUDIOOUT_REFCTRL__XTAL_BGR_BIAS (1 << 24)
|
||||
#define HW_AUDIOOUT_REFCTRL__RAISE_REF (1 << 25)
|
||||
|
||||
#define HW_AUDIOOUT_ANACTRL (*(volatile uint32_t *)(HW_AUDIOOUT_BASE + 0x90))
|
||||
#define HW_AUDIOOUT_ANACTRL__HP_CLASSAB (1 << 4)
|
||||
|
@ -98,6 +104,14 @@
|
|||
#define HW_AUDIOOUT_ANACTRL__SHORT_LR_STS (1 << 24)
|
||||
#define HW_AUDIOOUT_ANACTRL__SHORT_CM_STS (1 << 28)
|
||||
|
||||
#define HW_AUDIOOUT_TEST (*(volatile uint32_t *)(HW_AUDIOOUT_BASE + 0xa0))
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_BM (3 << 22)
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_BP 22
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_NOMINAL (0 << 22)
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_M_50 (1 << 22)
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_P_100 (2 << 22)
|
||||
#define HW_AUDIOOUT_TEST__HP_I1_ADJ_P_50 (3 << 22)
|
||||
|
||||
#define HW_AUDIOOUT_ANACLKCTRL (*(volatile uint32_t *)(HW_AUDIOOUT_BASE + 0xe0))
|
||||
#define HW_AUDIOOUT_ANACLKCTRL__DACDIV_BP 0
|
||||
#define HW_AUDIOOUT_ANACLKCTRL__DACDIV_BM (7 << 0)
|
||||
|
|
Loading…
Reference in a new issue