1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2012 by Amaury Pouly
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
25 #include "audioout-imx233.h"
26 #include "audioin-imx233.h"
27 #include "pinctrl-imx233.h"
29 static int input_source
= AUDIO_SRC_PLAYBACK
;
30 static unsigned input_flags
= 0;
31 static int output_source
= AUDIO_SRC_PLAYBACK
;
33 static void select_audio_path(void)
35 /* route audio to HP */
36 imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO
);
37 imx233_enable_gpio_output(1, 30, true);
38 imx233_set_gpio_output(1, 30, true);
40 if(input_source
== AUDIO_SRC_PLAYBACK
)
41 imx233_audioout_select_hp_input(false);
43 imx233_audioout_select_hp_input(true);
46 void audio_input_mux(int source
, unsigned flags
)
50 input_source
= source
;
55 void audio_set_output_source(int source
)
58 output_source
= source
;