diff options
Diffstat (limited to 'apps/audio_path.c')
-rw-r--r-- | apps/audio_path.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/audio_path.c b/apps/audio_path.c index 6709d4421d..3f43badc25 100644 --- a/apps/audio_path.c +++ b/apps/audio_path.c | |||
@@ -164,3 +164,16 @@ int audio_get_spdif_sample_rate(void) | |||
164 | #endif /* HAVE_SPDIF_IN */ | 164 | #endif /* HAVE_SPDIF_IN */ |
165 | 165 | ||
166 | #endif /* PLATFORM_NATIVE */ | 166 | #endif /* PLATFORM_NATIVE */ |
167 | |||
168 | #ifdef HAVE_SPEAKER | ||
169 | void audio_enable_speaker(int mode) | ||
170 | { | ||
171 | #ifdef HAVE_HEADPHONE_DETECTION | ||
172 | /* if needed, query jack state */ | ||
173 | if(mode == 2) | ||
174 | mode = !headphones_inserted(); | ||
175 | #endif | ||
176 | /* treat any nonzero value as enable */ | ||
177 | audiohw_enable_speaker(mode); | ||
178 | } | ||
179 | #endif | ||