27fac88548
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17254 a1c6a512-1295-4272-9138-f99709370657
60 lines
1.9 KiB
C
60 lines
1.9 KiB
C
/***************************************************************************
|
|
* __________ __ ___.
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
* \/ \/ \/ \/ \/
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2008 by Michael Sevakis
|
|
*
|
|
* Driver for WM8978 audio codec
|
|
*
|
|
* 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 "system.h"
|
|
#include "audiohw.h"
|
|
#include "wmcodec.h"
|
|
#include "audio.h"
|
|
|
|
const struct sound_settings_info audiohw_settings[] = {
|
|
[SOUND_VOLUME] = {"dB", 0, 1, -58, 6, -25},
|
|
[SOUND_BASS] = {"dB", 0, 1, -12, 12, 0},
|
|
[SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0},
|
|
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
|
|
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
|
|
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
|
|
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
|
|
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
|
|
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
|
|
#if 0
|
|
[SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
|
|
[SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
|
|
#endif
|
|
};
|
|
|
|
void audiohw_preinit(void)
|
|
{
|
|
wmcodec_write(WM8978_SOFTWARE_RESET, 0);
|
|
}
|
|
|
|
void audiohw_postinit(void)
|
|
{
|
|
sleep(HZ);
|
|
}
|
|
|
|
void audiohw_close(void)
|
|
{
|
|
}
|
|
|
|
void audiohw_mute(bool mute)
|
|
{
|
|
(void)mute;
|
|
}
|