Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+11 -9
+2 -2
firmware/export/audiohw.h
··· 241 241 #include "fiiolinux_codec.h" 242 242 #elif defined(HAVE_EROSQ_LINUX_CODEC) 243 243 #include "erosqlinux_codec.h" 244 - #elif defined(HAVE_TLV320AIC3104) 245 - #include "tlv320aic3104_codec.h" 244 + #elif defined(HAVE_ECHOPLAYER_CODEC) 245 + #include "echoplayer_codec.h" 246 246 #elif defined(HAVE_HIBY_LINUX_CODEC) 247 247 #include "hibylinux_codec.h" 248 248 #endif
+1 -1
firmware/export/config/echor1.h
··· 54 54 #define INPUT_SRC_CAPS SRC_CAP_MIC 55 55 #define AUDIOHW_CAPS MIC_GAIN_CAP 56 56 #define HAVE_RECORDING 57 - #define HAVE_TLV320AIC3104 // TODO: Sansa connect uses the AIC3106, possible code sharing? 57 + #define HAVE_ECHOPLAYER_CODEC 58 58 #define HAVE_SW_TONE_CONTROLS 59 59 #define HAVE_SW_VOLUME_CONTROL 60 60 #define DEFAULT_REC_MIC_GAIN 12
+8 -6
firmware/export/tlv320aic3104_codec.h firmware/export/echoplayer_codec.h
··· 18 18 * KIND, either express or implied. 19 19 * 20 20 ****************************************************************************/ 21 + #ifndef __ECHOPLAYER_CODEC_H__ 22 + #define __ECHOPLAYER_CODEC_H__ 21 23 22 - #ifndef __TLV320AIC3104_CODEC__ 23 - #define __TLV320AIC3104_CODEC__ 24 + /* -79 to 0 dB in 0.5 dB steps; software volume control 25 + * is used because the hardware volume controls "click" 26 + * when changing the volume */ 27 + AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -790, 0, -200); 24 28 25 - // FIXME: range 26 - AUDIOHW_SETTING(VOLUME, "dB", 0, 2, -74, -2, -40) 27 - AUDIOHW_SETTING(MIC_GAIN, "dB", 0, 1, 0, 63, 12) 29 + AUDIOHW_SETTING(MIC_GAIN, "dB", 0, 1, 0, 63, 12); 28 30 29 - #endif /* __TLV320AIC3104_CODEC__ */ 31 + #endif /* __ECHOPLAYER_CODEC_H__ */