1
0
Fork 0
forked from len0rd/rockbox

Codepolice: the patch I accepted contained some tabs. Oops

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18668 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2008-09-29 20:50:26 +00:00
parent a28154940d
commit b297eb9d9d
2 changed files with 38 additions and 38 deletions

View file

@ -223,28 +223,28 @@ void audiohw_set_nsorder(int order)
void audiohw_set_sample_rate(int sampling_control) void audiohw_set_sample_rate(int sampling_control)
{ {
int rate = 0; int rate = 0;
switch(sampling_control) switch(sampling_control)
{ {
case SAMPR_96: case SAMPR_96:
rate = WM8731_USB24_96000HZ; rate = WM8731_USB24_96000HZ;
break; break;
case SAMPR_88: case SAMPR_88:
rate = WM8731_USB24_88200HZ; rate = WM8731_USB24_88200HZ;
break; break;
case SAMPR_48: case SAMPR_48:
rate = WM8731_USB24_48000HZ; rate = WM8731_USB24_48000HZ;
break; break;
case SAMPR_44: case SAMPR_44:
rate = WM8731_USB24_44100HZ; rate = WM8731_USB24_44100HZ;
break; break;
case SAMPR_32: case SAMPR_32:
rate = WM8731_USB24_32000HZ; rate = WM8731_USB24_32000HZ;
break; break;
case SAMPR_8: case SAMPR_8:
rate = WM8731_USB24_8000HZ; rate = WM8731_USB24_8000HZ;
break; break;
} }
codec_set_active(false); codec_set_active(false);
wmcodec_write(SAMPCTRL, rate); wmcodec_write(SAMPCTRL, rate);
codec_set_active(true); codec_set_active(true);

View file

@ -96,9 +96,9 @@ static int sr_ctrl = MROBE100_44100HZ;
void pcm_set_frequency(unsigned int frequency) void pcm_set_frequency(unsigned int frequency)
{ {
#ifdef HAVE_WM8731 #ifdef HAVE_WM8731
pcm_freq = frequency; pcm_freq = frequency;
#else #else
(void)frequency; (void)frequency;
pcm_freq = HW_SAMPR_DEFAULT; pcm_freq = HW_SAMPR_DEFAULT;
#endif #endif
#ifdef HAVE_WM8751 #ifdef HAVE_WM8751
@ -113,7 +113,7 @@ void pcm_apply_settings(void)
#endif #endif
#ifdef HAVE_WM8731 #ifdef HAVE_WM8731
audiohw_set_sample_rate(pcm_freq); audiohw_set_sample_rate(pcm_freq);
#endif #endif
pcm_curr_sampr = pcm_freq; pcm_curr_sampr = pcm_freq;
} }