summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-09-30 22:12:35 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-01 11:56:57 -0400
commite43726df2cd1cb8275234d60b818d417cfe730b5 (patch)
tree6f1fb0659dccaafd47394c7de860d4dc3e46b0a4 /firmware/export
parent6459fa0765745e951a6731974164bbcdc9551dfe (diff)
downloadrockbox-e43726df2cd1cb8275234d60b818d417cfe730b5.tar.gz
rockbox-e43726df2cd1cb8275234d60b818d417cfe730b5.tar.bz2
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/export')
-rw-r--r--firmware/export/audiohw.h6
-rw-r--r--firmware/export/config/agptekrocker.h9
-rw-r--r--firmware/export/config/xduoox20.h8
-rw-r--r--firmware/export/config/xduoox3ii.h5
-rw-r--r--firmware/export/rocker_codec.h4
-rw-r--r--firmware/export/system.h2
-rw-r--r--firmware/export/xduoolinux_codec.h3
7 files changed, 17 insertions, 20 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 490c8fc571..34a253e893 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -223,7 +223,7 @@ struct sound_settings_info
#elif defined(HAVE_ROCKER_CODEC)
#include "rocker_codec.h"
#elif defined(HAVE_XDUOO_LINUX_CODEC)
-#include "rocker_codec.h"
+#include "xduoolinux_codec.h"
#endif
/* convert caps into defines */
@@ -452,6 +452,10 @@ void audiohw_set_volume(int vol_l, int vol_r);
void audiohw_set_lineout_volume(int vol_l, int vol_r);
#endif
+#ifdef AUDIOHW_HAVE_SET_OUTPUT
+void audiohw_set_output(void);
+#endif
+
#ifndef AUDIOHW_HAVE_CLIPPING
#if defined(AUDIOHW_HAVE_BASS) || defined(AUDIOHW_HAVE_TREBLE) \
|| defined(AUDIOHW_HAVE_EQ)
diff --git a/firmware/export/config/agptekrocker.h b/firmware/export/config/agptekrocker.h
index 31ef904109..f14e65f7e9 100644
--- a/firmware/export/config/agptekrocker.h
+++ b/firmware/export/config/agptekrocker.h
@@ -75,10 +75,6 @@
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x100000
-
-
-#define HAVE_ROCKER_CODEC
-
#define HAVE_HEADPHONE_DETECTION
/* KeyPad configuration for plugins */
@@ -108,10 +104,7 @@
#define CPU_FREQ 1008000000
/* No special storage */
-#define CONFIG_STORAGE (STORAGE_HOSTFS)//|STORAGE_SD)
-//#define MULTIDRIVE_DIR "/mnt/sd_0"
-//#define NUM_DRIVES 1
-//#define HAVE_HOTSWAP
+#define CONFIG_STORAGE STORAGE_HOSTFS
#define HAVE_STORAGE_FLUSH
/* Battery */
diff --git a/firmware/export/config/xduoox20.h b/firmware/export/config/xduoox20.h
index a61f2c3aa7..5da5ee00f3 100644
--- a/firmware/export/config/xduoox20.h
+++ b/firmware/export/config/xduoox20.h
@@ -63,18 +63,12 @@
/* define this if you have a real-time clock */
#define CONFIG_RTC APPLICATION
-/* Define if the device can wake from an RTC alarm */
-//#define HAVE_RTC_ALARM
-
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x80000
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x100000
-
-
-
#define HAVE_HEADPHONE_DETECTION
/* KeyPad configuration for plugins */
@@ -125,6 +119,8 @@
/* HW codec is flexible */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
+#define AUDIOHW_HAVE_SET_OUTPUT
+
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 2400 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 2400 /* min. capacity selectable */
diff --git a/firmware/export/config/xduoox3ii.h b/firmware/export/config/xduoox3ii.h
index 13072ea3dc..678577f5f4 100644
--- a/firmware/export/config/xduoox3ii.h
+++ b/firmware/export/config/xduoox3ii.h
@@ -60,9 +60,6 @@
/* define this if you have a real-time clock */
#define CONFIG_RTC APPLICATION
-/* Define if the device can wake from an RTC alarm */
-//#define HAVE_RTC_ALARM
-
/* The number of bytes reserved for loadable codecs */
#define CODEC_SIZE 0x80000
@@ -119,6 +116,8 @@
/* HW codec is flexible */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
+#define AUDIOHW_HAVE_SET_OUTPUT
+
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 2000 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 2000 /* min. capacity selectable */
diff --git a/firmware/export/rocker_codec.h b/firmware/export/rocker_codec.h
index 366900d717..673b12b494 100644
--- a/firmware/export/rocker_codec.h
+++ b/firmware/export/rocker_codec.h
@@ -2,5 +2,7 @@
#define __ROCKER_CODEC__
#define AUDIOHW_CAPS 0
-AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -1020, 0, -300, )
+AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -127, 0, -30)
#endif
+
+void audiohw_mute(int mute);
diff --git a/firmware/export/system.h b/firmware/export/system.h
index ebeef9c004..cfec235bc4 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -347,7 +347,7 @@ static inline void cpu_boost_unlock(void)
#ifndef SIMULATOR
bool dbg_ports(void);
#endif
-#if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SONY_NWZ_LINUX)
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SONY_NWZ_LINUX) || defined(AGPTEK_ROCKER) || defined(XDUOO_X3II) || defined(XDUOO_X20)
bool dbg_hw_info(void);
#endif
diff --git a/firmware/export/xduoolinux_codec.h b/firmware/export/xduoolinux_codec.h
index ccd49f09aa..ea0b2988f1 100644
--- a/firmware/export/xduoolinux_codec.h
+++ b/firmware/export/xduoolinux_codec.h
@@ -5,3 +5,6 @@
AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -127, 0, -30)
AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0)
#endif
+
+void audiohw_mute(int mute);
+void audiohw_set_output(void);