From cdbf33adf719a54221f4f5aac4b15b0dfe54d24d Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 22 May 2007 15:56:05 +0000 Subject: * move audio settings into audio codec drivers * add mas35xx driver for all mas35xx targets. Later mas35xx code from sound.c will move to this new driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13464 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/mas35xx.c | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 firmware/drivers/audio/mas35xx.c (limited to 'firmware/drivers/audio/mas35xx.c') diff --git a/firmware/drivers/audio/mas35xx.c b/firmware/drivers/audio/mas35xx.c new file mode 100644 index 0000000000..6a9d290049 --- /dev/null +++ b/firmware/drivers/audio/mas35xx.c @@ -0,0 +1,54 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: wm8975.c 13453 2007-05-20 23:10:15Z christian $ + * + * Driver for MAS35xx audio codec + * + * + * Copyright (c) 2007 by Christian Gmeiner + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "config.h" +#include "mas35xx.h" + +const struct sound_settings_info audiohw_settings[] = { +#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) + [SOUND_VOLUME] = {"dB", 0, 1,-100, 12, -25}, + [SOUND_BASS] = {"dB", 0, 1, -12, 12, 6}, + [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 6}, +#else /* MAS3507D */ + [SOUND_VOLUME] = {"dB", 0, 1, -78, 18, -18}, + [SOUND_BASS] = {"dB", 0, 1, -15, 15, 7}, + [SOUND_TREBLE] = {"dB", 0, 1, -15, 15, 7}, +#endif + [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, + [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, + [SOUND_STEREO_WIDTH] = {"%", 0, 1, 0, 255, 100}, +#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) + [SOUND_LOUDNESS] = {"dB", 0, 1, 0, 17, 0}, + [SOUND_AVC] = {"", 0, 1, -1, 4, 0}, + [SOUND_MDB_STRENGTH] = {"dB", 0, 1, 0, 127, 48}, + [SOUND_MDB_HARMONICS] = {"%", 0, 1, 0, 100, 50}, + [SOUND_MDB_CENTER] = {"Hz", 0, 10, 20, 300, 60}, + [SOUND_MDB_SHAPE] = {"Hz", 0, 10, 50, 300, 90}, + [SOUND_MDB_ENABLE] = {"", 0, 1, 0, 1, 0}, + [SOUND_SUPERBASS] = {"", 0, 1, 0, 1, 0}, +#endif +#if CONFIG_CODEC == MAS3587F + [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 15, 8}, + [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 15, 8}, + [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 15, 2}, +#endif +}; -- cgit v1.2.3