diff options
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c b/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c index 0bb9e49506..e307057978 100644 --- a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c @@ -62,19 +62,13 @@ void audiohw_init(void) audiohw_preinit(); - GPIO3_DR |= (1 << 21); /* Turn on analogue LDO */ + imx31_regset32(&GPIO3_DR, (1 << 21)); /* Turn on analogue LDO */ } void audiohw_enable_headphone_jack(bool enable) { - if (enable) - { - GPIO3_DR |= (1 << 22); /* Turn on headphone jack output */ - } - else - { - GPIO3_DR &= ~(1 << 22); /* Turn off headphone jack output */ - } + /* Turn headphone jack output on or off. */ + imx31_regmod32(&GPIO3_DR, enable ? (1 << 22) : 0, (1 << 22)); } void wmcodec_write(int reg, int data) |