1
0
Fork 0
forked from len0rd/rockbox

Have drivers merged for WM8711/21/31 since they are so similar but respect all register differences between codecs. Change minis to #define the actual codec type. If anything breaks check if OSCPD and CLKOUTPD need to be clear for the target- H10 is fine. A nice naming convention suggestion for WM codec multidrivers would be welcome rather than naming for a specific chip.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19367 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-12-08 21:09:56 +00:00
parent ed96b2a4dd
commit ea929a3e45
10 changed files with 218 additions and 440 deletions

View file

@ -256,8 +256,9 @@ static void set_prescaled_volume(void)
/* The WM codecs listed don't have suitable prescaler functionality, so we let
* the prescaler stay at 0 for these unless SW tone controls are in use */
#if defined(HAVE_SW_TONE_CONTROLS) || !(defined(HAVE_WM8975) \
|| defined(HAVE_WM8731) || defined(HAVE_WM8721) || defined(HAVE_WM8751) \
|| defined(HAVE_WM8758) || defined(HAVE_WM8985)) || defined(HAVE_TSC2100)
|| defined(HAVE_WM8711) || defined(HAVE_WM8721) || defined(HAVE_WM8731) \
|| defined(HAVE_WM8751) || defined(HAVE_WM8758) || defined(HAVE_WM8985)) \
|| defined(HAVE_TSC2100)
prescale = MAX(current_bass, current_treble);
if (prescale < 0)
@ -298,8 +299,8 @@ static void set_prescaled_volume(void)
#if CONFIG_CODEC == MAS3507D
dac_volume(tenthdb2reg(l), tenthdb2reg(r), false);
#elif defined(HAVE_UDA1380) || defined(HAVE_WM8975) || defined(HAVE_WM8758) \
|| defined(HAVE_WM8731) || defined(HAVE_WM8721) || defined(HAVE_WM8751) \
|| defined(HAVE_AS3514) || defined(HAVE_TSC2100)
|| defined(HAVE_WM8711) || defined(HAVE_WM8721) || defined(HAVE_WM8731) \
|| defined(HAVE_WM8751) || defined(HAVE_AS3514) || defined(HAVE_TSC2100)
audiohw_set_master_vol(tenthdb2master(l), tenthdb2master(r));
#if defined(HAVE_WM8975) || defined(HAVE_WM8758) \
|| (defined(HAVE_WM8751) && !defined(MROBE_100)) \
@ -625,8 +626,11 @@ void sound_set(int setting, int value)
sound_set_val(value);
}
#if (!defined(HAVE_AS3514) && !defined (HAVE_WM8731) && !defined(HAVE_WM8975) \
&& !defined(HAVE_WM8758) && !defined(HAVE_TSC2100)) || defined(SIMULATOR)
#if (!defined(HAVE_AS3514) && !defined(HAVE_WM8975) \
&& !defined(HAVE_WM8758) && !defined(HAVE_TSC2100) \
&& !defined (HAVE_WM8711) && !defined (HAVE_WM8721) \
&& !defined (HAVE_WM8731)) \
|| defined(SIMULATOR)
int sound_val2phys(int setting, int value)
{
#if CONFIG_CODEC == MAS3587F
@ -664,7 +668,8 @@ int sound_val2phys(int setting, int value)
break;
}
return result;
#elif defined(HAVE_TLV320) || defined(HAVE_WM8731)
#elif defined(HAVE_TLV320) || defined(HAVE_WM8711) \
|| defined(HAVE_WM8721) || defined(HAVE_WM8731)
int result = 0;
switch(setting)