diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-09-30 22:12:35 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-01 11:56:57 -0400 |
commit | e43726df2cd1cb8275234d60b818d417cfe730b5 (patch) | |
tree | 6f1fb0659dccaafd47394c7de860d4dc3e46b0a4 /firmware/target/hosted/agptek | |
parent | 6459fa0765745e951a6731974164bbcdc9551dfe (diff) | |
download | rockbox-e43726df2cd1cb8275234d60b818d417cfe730b5.tar.gz rockbox-e43726df2cd1cb8275234d60b818d417cfe730b5.zip |
hosted pcm-alsa improvements
* xduoo x3ii/x20: Better line out support
* less granular volume settings (too many steps before)
* Better handling of swiching sample rates
* Log actual sample rate in debug menu
Most credit goes to Roman Stolyarov
Additional integration [re]work by myself
Change-Id: I63af3740678cf2ed3170f61534e1029c81826bb6
Diffstat (limited to 'firmware/target/hosted/agptek')
-rw-r--r-- | firmware/target/hosted/agptek/debug-agptek.c | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/firmware/target/hosted/agptek/debug-agptek.c b/firmware/target/hosted/agptek/debug-agptek.c index 33f3ac4b97..b4fcb4246b 100644 --- a/firmware/target/hosted/agptek/debug-agptek.c +++ b/firmware/target/hosted/agptek/debug-agptek.c | |||
@@ -1,6 +1,52 @@ | |||
1 | #include <stdbool.h> | 1 | /*************************************************************************** |
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2020 by Solomon Peachy | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
2 | 20 | ||
3 | bool debug_hw_info(void) | 21 | #include "config.h" |
22 | #include "font.h" | ||
23 | #include "lcd.h" | ||
24 | #include "kernel.h" | ||
25 | #include "button.h" | ||
26 | |||
27 | #ifndef BOOTLOADER | ||
28 | |||
29 | #include "pcm-alsa.h" | ||
30 | |||
31 | static int line = 0; | ||
32 | |||
33 | bool dbg_hw_info(void) | ||
4 | { | 34 | { |
5 | return false; | 35 | int btn = 0; |
36 | |||
37 | lcd_setfont(FONT_SYSFIXED); | ||
38 | |||
39 | while(btn ^ BUTTON_POWER) { | ||
40 | lcd_clear_display(); | ||
41 | line = 0; | ||
42 | |||
43 | lcd_putsf(0, line++, "pcm srate: %d", pcm_alsa_get_rate()); | ||
44 | btn = button_read_device(); | ||
45 | |||
46 | lcd_update(); | ||
47 | sleep(HZ/16); | ||
48 | } | ||
49 | return true; | ||
6 | } | 50 | } |
51 | |||
52 | #endif /* !BOOTLOADER */ | ||