diff options
Diffstat (limited to 'firmware/target/arm/imx233/audio-imx233.h')
-rw-r--r-- | firmware/target/arm/imx233/audio-imx233.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/audio-imx233.h b/firmware/target/arm/imx233/audio-imx233.h new file mode 100644 index 0000000000..dd0cdeb63a --- /dev/null +++ b/firmware/target/arm/imx233/audio-imx233.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2013 by Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef __audio_imx233__ | ||
22 | #define __audio_imx233__ | ||
23 | |||
24 | #include "audio.h" | ||
25 | #include "audio-target.h" | ||
26 | |||
27 | /* target can override those functions to provide hooks to the audio code | ||
28 | * alternativelly, the default implementation provide support for GPIO | ||
29 | * controlled gates using the following defines | ||
30 | * NOTE by default gates are enabled by setting GPIO to 1 (except if inverted) | ||
31 | * | ||
32 | * IMX233_AUDIO_HP_GATE_BANK (gpio bank) | ||
33 | * IMX233_AUDIO_HP_GATE_PIN (gpio pin) | ||
34 | * IMX233_AUDIO_HP_GATE_INVERTED (define if inverted) | ||
35 | * | ||
36 | * IMX233_AUDIO_SPKR_GATE_BANK (gpio bank) | ||
37 | * IMX233_AUDIO_SPKR_GATE_PIN (gpio pin) | ||
38 | * IMX233_AUDIO_SPKR_GATE_INVERTED (define if inverted) | ||
39 | */ | ||
40 | // do some initialisation related to next functions | ||
41 | void imx233_audio_preinit(void); | ||
42 | void imx233_audio_postinit(void); | ||
43 | // enable/disable the HP audio gate (typically using a GPIO) | ||
44 | void imx233_audio_enable_hp(bool en); | ||
45 | // enable/disable the speaker audio gate (typically using a GPIO) | ||
46 | void imx233_audio_enable_spkr(bool en); | ||
47 | |||
48 | #endif /* __audio_imx233__ */ \ No newline at end of file | ||