echoplayer: add echoplayer-specific codec header

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 33cdbf87d7ed6022ced7ff4c0812e461697896f3
Author: Aidan MacDonald <[email protected]>
Date:   Thu Feb 19 17:10:58 2026 +0000

    echoplayer: add echoplayer-specific codec header
    
    Remove the generic TLV320AIC3104 codec header. The codec
    is sufficiently complex that a one-size-fits-all driver
    isn't really feasible, eg. due to different clocking and
    output configurations.
    
    It's easier for targets to have their own audio headers
    tailored to their use case than a generic header with
    lots of ifdefs.
    
    Change-Id: I63d92d57c28ddd7da7aa3174bd583d8afb1aa56d

diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index e0a8df2f54..65570abb5b 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -241,8 +241,8 @@ struct sound_settings_info
 #include "fiiolinux_codec.h"
 #elif defined(HAVE_EROSQ_LINUX_CODEC)
 #include "erosqlinux_codec.h"
-#elif defined(HAVE_TLV320AIC3104)
-#include "tlv320aic3104_codec.h"
+#elif defined(HAVE_ECHOPLAYER_CODEC)
+#include "echoplayer_codec.h"
 #elif defined(HAVE_HIBY_LINUX_CODEC)
 #include "hibylinux_codec.h"
 #endif
diff --git a/firmware/export/config/echor1.h b/firmware/export/config/echor1.h
index c2027d975d..6b39778507 100644
--- a/firmware/export/config/echor1.h
+++ b/firmware/export/config/echor1.h
@@ -54,7 +54,7 @@
 #define INPUT_SRC_CAPS  SRC_CAP_MIC
 #define AUDIOHW_CAPS    MIC_GAIN_CAP
 #define HAVE_RECORDING
-#define HAVE_TLV320AIC3104 // TODO: Sansa connect uses the AIC3106, possible code sharing?
+#define HAVE_ECHOPLAYER_CODEC
 #define HAVE_SW_TONE_CONTROLS
 #define HAVE_SW_VOLUME_CONTROL
 #define DEFAULT_REC_MIC_GAIN  12
diff --git a/firmware/export/tlv320aic3104_codec.h b/firmware/export/echoplayer_codec.h
similarity index 73%
rename from firmware/export/tlv320aic3104_codec.h
rename to firmware/export/echoplayer_codec.h
index 7caee62f4e..73f69646e6 100644
--- a/firmware/export/tlv320aic3104_codec.h
+++ b/firmware/export/echoplayer_codec.h
@@ -18,12 +18,14 @@
  * KIND, either express or implied.
  *
  ****************************************************************************/
+#ifndef __ECHOPLAYER_CODEC_H__
+#define __ECHOPLAYER_CODEC_H__
 
-#ifndef __TLV320AIC3104_CODEC__
-#define __TLV320AIC3104_CODEC__
+/* -79 to 0 dB in 0.5 dB steps; software volume control
+ * is used because the hardware volume controls "click"
+ * when changing the volume */
+AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -790, 0, -200);
 
-// FIXME: range
-AUDIOHW_SETTING(VOLUME, "dB", 0,  2, -74, -2, -40)
-AUDIOHW_SETTING(MIC_GAIN, "dB", 0, 1, 0, 63, 12)
+AUDIOHW_SETTING(MIC_GAIN, "dB", 0, 1, 0, 63, 12);
 
-#endif /* __TLV320AIC3104_CODEC__ */
+#endif /* __ECHOPLAYER_CODEC_H__ */
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.