diff options
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r-- | firmware/drivers/audio/nwzlinux-codec.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/firmware/drivers/audio/nwzlinux-codec.c b/firmware/drivers/audio/nwzlinux-codec.c index 36ebaa8b79..7d730ce68b 100644 --- a/firmware/drivers/audio/nwzlinux-codec.c +++ b/firmware/drivers/audio/nwzlinux-codec.c | |||
@@ -277,6 +277,29 @@ static void hw_close(void) | |||
277 | close(fd_hw); | 277 | close(fd_hw); |
278 | } | 278 | } |
279 | 279 | ||
280 | /* Acoustic and Cue/Rev control how the volume curve, but it is not clear | ||
281 | * what the intention of these modes are and the OF does not seem to use | ||
282 | * them by default */ | ||
283 | bool audiohw_acoustic_enabled(void) | ||
284 | { | ||
285 | return alsa_controls_get_bool("CODEC Acoustic Switch"); | ||
286 | } | ||
287 | |||
288 | void audiohw_enable_acoustic(bool en) | ||
289 | { | ||
290 | alsa_controls_set_bool("CODEC Acoustic Switch", en); | ||
291 | } | ||
292 | |||
293 | bool audiohw_cuerev_enabled(void) | ||
294 | { | ||
295 | return alsa_controls_get_bool("CODEC Cue/Rev Switch"); | ||
296 | } | ||
297 | |||
298 | void audiohw_enable_cuerev(bool en) | ||
299 | { | ||
300 | alsa_controls_set_bool("CODEC Cue/Rev Switch", en); | ||
301 | } | ||
302 | |||
280 | void audiohw_preinit(void) | 303 | void audiohw_preinit(void) |
281 | { | 304 | { |
282 | alsa_controls_init(); | 305 | alsa_controls_init(); |
@@ -287,8 +310,8 @@ void audiohw_preinit(void) | |||
287 | /* Acoustic and Cue/Rev control how the volume curve, but it is not clear | 310 | /* Acoustic and Cue/Rev control how the volume curve, but it is not clear |
288 | * what the intention of these modes are and the OF does not seem to use | 311 | * what the intention of these modes are and the OF does not seem to use |
289 | * them by default */ | 312 | * them by default */ |
290 | alsa_controls_set_bool("CODEC Acoustic Switch", false); | 313 | audiohw_enable_acoustic(false); |
291 | alsa_controls_set_bool("CODEC Cue/Rev Switch", false); | 314 | audiohw_enable_cuerev(false); |
292 | /* not sure exactly what it means */ | 315 | /* not sure exactly what it means */ |
293 | alsa_controls_set_enum("Playback Src Switch", "Music"); | 316 | alsa_controls_set_enum("Playback Src Switch", "Music"); |
294 | /* use headphone output */ | 317 | /* use headphone output */ |