mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
imx233: introduce generic audio routing driver
Change-Id: Icd439e02dd9835778d2733fc01a9306552b36966
This commit is contained in:
parent
d8368d58b0
commit
e735ce4693
2 changed files with 178 additions and 0 deletions
48
firmware/target/arm/imx233/audio-imx233.h
Normal file
48
firmware/target/arm/imx233/audio-imx233.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2013 by Amaury Pouly
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef __audio_imx233__
|
||||
#define __audio_imx233__
|
||||
|
||||
#include "audio.h"
|
||||
#include "audio-target.h"
|
||||
|
||||
/* target can override those functions to provide hooks to the audio code
|
||||
* alternativelly, the default implementation provide support for GPIO
|
||||
* controlled gates using the following defines
|
||||
* NOTE by default gates are enabled by setting GPIO to 1 (except if inverted)
|
||||
*
|
||||
* IMX233_AUDIO_HP_GATE_BANK (gpio bank)
|
||||
* IMX233_AUDIO_HP_GATE_PIN (gpio pin)
|
||||
* IMX233_AUDIO_HP_GATE_INVERTED (define if inverted)
|
||||
*
|
||||
* IMX233_AUDIO_SPKR_GATE_BANK (gpio bank)
|
||||
* IMX233_AUDIO_SPKR_GATE_PIN (gpio pin)
|
||||
* IMX233_AUDIO_SPKR_GATE_INVERTED (define if inverted)
|
||||
*/
|
||||
// do some initialisation related to next functions
|
||||
void imx233_audio_preinit(void);
|
||||
void imx233_audio_postinit(void);
|
||||
// enable/disable the HP audio gate (typically using a GPIO)
|
||||
void imx233_audio_enable_hp(bool en);
|
||||
// enable/disable the speaker audio gate (typically using a GPIO)
|
||||
void imx233_audio_enable_spkr(bool en);
|
||||
|
||||
#endif /* __audio_imx233__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue