diff options
Diffstat (limited to 'firmware/target/arm/audio-pp.c')
-rw-r--r-- | firmware/target/arm/audio-pp.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/firmware/target/arm/audio-pp.c b/firmware/target/arm/audio-pp.c index ba52118e0f..b170518af4 100644 --- a/firmware/target/arm/audio-pp.c +++ b/firmware/target/arm/audio-pp.c | |||
@@ -40,6 +40,23 @@ void audio_input_mux(int source, unsigned flags) | |||
40 | static bool last_recording = false; | 40 | static bool last_recording = false; |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #if defined(IPOD_COLOR) || defined (IPOD_4G) | ||
44 | /* The usual magic from IPL - I'm guessing this configures the headphone | ||
45 | socket to be input or output. */ | ||
46 | if (recording && source != AUDIO_SRC_PLAYBACK) | ||
47 | { | ||
48 | /* input */ | ||
49 | GPIO_CLEAR_BITWISE(GPIOI_OUTPUT_VAL, 0x40); | ||
50 | GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x04); | ||
51 | } | ||
52 | else | ||
53 | { | ||
54 | /* output */ | ||
55 | GPIO_SET_BITWISE(GPIOI_OUTPUT_VAL, 0x40); | ||
56 | GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x04); | ||
57 | } | ||
58 | #endif /* IPOD_COLOR || IPOD_4G */ | ||
59 | |||
43 | switch (source) | 60 | switch (source) |
44 | { | 61 | { |
45 | default: /* playback - no recording */ | 62 | default: /* playback - no recording */ |
@@ -109,4 +126,3 @@ void audio_input_mux(int source, unsigned flags) | |||
109 | last_source = source; | 126 | last_source = source; |
110 | } /* audio_input_mux */ | 127 | } /* audio_input_mux */ |
111 | #endif /* INPUT_SRC_CAPS != 0 */ | 128 | #endif /* INPUT_SRC_CAPS != 0 */ |
112 | |||