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
This commit is contained in:
Aidan MacDonald 2026-02-19 17:10:58 +00:00
parent 9a6e3799e1
commit 33cdbf87d7
3 changed files with 11 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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__ */