mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
imx233: add audioin init code, add adc dma interrupts, fix register defines
Change-Id: I204afbd3390f8dcde6ea1315ea6aa8dde12d3749
This commit is contained in:
parent
cd89b31133
commit
0aca81d807
5 changed files with 27 additions and 5 deletions
|
|
@ -18,10 +18,16 @@
|
|||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "audioout-imx233.h"
|
||||
#include "audioin-imx233.h"
|
||||
|
||||
void imx233_audioin_preinit(void)
|
||||
{
|
||||
/* Enable AUDIOIN block */
|
||||
imx233_reset_block(&HW_AUDIOIN_CTRL);
|
||||
/* Enable ADC */
|
||||
__REG_CLR(HW_AUDIOIN_ANACLKCTRL) = HW_AUDIOIN_ANACLKCTRL__CLKGATE;
|
||||
/* Set word-length to 16-bit */
|
||||
__REG_SET(HW_AUDIOIN_CTRL) = HW_AUDIOIN_CTRL__WORD_LENGTH;
|
||||
}
|
||||
|
||||
void imx233_audioin_postinit(void)
|
||||
|
|
@ -30,4 +36,9 @@ void imx233_audioin_postinit(void)
|
|||
|
||||
void imx233_audioin_close(void)
|
||||
{
|
||||
/* TODO mute */
|
||||
/* Gate off ADC */
|
||||
__REG_SET(HW_AUDIOIN_ANACLKCTRL) = HW_AUDIOIN_ANACLKCTRL__CLKGATE;
|
||||
/* will also gate off the module */
|
||||
__REG_CLR(HW_AUDIOIN_CTRL) = HW_AUDIOIN_CTRL__RUN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue