zenxfi3: acquire audio gate pins
Change-Id: I47775568b3ee7383e440e2999b0acd98f0d5c57a
This commit is contained in:
parent
3166ca80ef
commit
9b395741f3
1 changed files with 19 additions and 2 deletions
|
@ -29,12 +29,29 @@
|
|||
static int input_source = AUDIO_SRC_PLAYBACK;
|
||||
static unsigned input_flags = 0;
|
||||
static int output_source = AUDIO_SRC_PLAYBACK;
|
||||
static bool initialized = false;
|
||||
|
||||
static void init(void)
|
||||
{
|
||||
/* HP gate */
|
||||
imx233_pinctrl_acquire_pin(1, 30, "hp gate");
|
||||
imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO);
|
||||
imx233_enable_gpio_output(1, 30, true);
|
||||
imx233_set_gpio_output(1, 30, false);
|
||||
/* SPKR gate */
|
||||
imx233_pinctrl_acquire_pin(1, 22, "spkr gate");
|
||||
imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO);
|
||||
imx233_enable_gpio_output(1, 22, true);
|
||||
imx233_set_gpio_output(1, 22, false);
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
static void select_audio_path(void)
|
||||
{
|
||||
if(!initialized)
|
||||
init();
|
||||
/* route audio to HP */
|
||||
imx233_set_pin_function(1, 30, PINCTRL_FUNCTION_GPIO);
|
||||
imx233_enable_gpio_output(1, 30, true);
|
||||
imx233_set_gpio_output(1, 30, true);
|
||||
|
||||
if(input_source == AUDIO_SRC_PLAYBACK)
|
||||
|
|
Loading…
Reference in a new issue