Should clear up rest of red. Add a required #define in the config for c200. Fix up some preprocessing directives. Hope it's all taken care of now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27141 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3eca575b6
commit
e0bb92f00f
|
@ -22,6 +22,7 @@
|
|||
#include <SDL_audio.h>
|
||||
#include "config.h"
|
||||
#include "audiohw.h"
|
||||
#include "pcm_sampr.h"
|
||||
|
||||
/**
|
||||
* Audio Hardware api. Make them do nothing as we cannot properly simulate with
|
||||
|
@ -162,10 +163,12 @@ void audiohw_set_eq_band_width(unsigned int band, int value)
|
|||
void audiohw_set_depth_3d(int value)
|
||||
{ (void)value; }
|
||||
#endif
|
||||
#if defined(HAVE_SAMPR_TYPE_REC)
|
||||
unsigned int pcm_sampr_type_rec_to_play(int samplerate)
|
||||
#ifdef HAVE_RECORDING
|
||||
#if SAMPR_TYPE_REC != 0
|
||||
unsigned int pcm_sampr_type_rec_to_play(unsigned int samplerate)
|
||||
{ return samplerate; }
|
||||
#endif
|
||||
#endif /* HAVE_RECORDING */
|
||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||
int mas_codec_readreg(int reg)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
||||
#define REC_SAMPR_DEFAULT SAMPR_22
|
||||
|
||||
/* because the samplerates don't match at each point, we must be able to
|
||||
* tell PCM which set of rates to use. not needed if recording rates are
|
||||
* a simple subset of playback rates and are equal values. */
|
||||
#define CONFIG_SAMPR_TYPES
|
||||
|
||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||
explicitly if different */
|
||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
||||
|
|
|
@ -324,7 +324,7 @@ extern const unsigned long rec_freq_sampr[REC_NUM_FREQ];
|
|||
#define SAMPR_TYPE_REC (0x01 << 24)
|
||||
#endif
|
||||
|
||||
unsigned int sampr_type_rec_to_play(unsigned int samplerate);
|
||||
unsigned int pcm_sampr_type_rec_to_play(unsigned int samplerate);
|
||||
|
||||
#else /* ndef CONFIG_SAMPR_TYPES */
|
||||
|
||||
|
|
|
@ -367,7 +367,8 @@ void pcm_set_frequency(unsigned int samplerate)
|
|||
unsigned int type = samplerate & SAMPR_TYPE_MASK;
|
||||
samplerate &= ~SAMPR_TYPE_MASK;
|
||||
|
||||
#ifdef SAMPR_TYPE_REC
|
||||
#ifdef HAVE_RECORDING
|
||||
#if SAMPR_TYPE_REC != 0
|
||||
/* For now, supported targets have direct conversion when configured with
|
||||
* CONFIG_SAMPR_TYPES.
|
||||
* Some hypothetical target with independent rates would need slightly
|
||||
|
@ -375,6 +376,7 @@ void pcm_set_frequency(unsigned int samplerate)
|
|||
if (type == SAMPR_TYPE_REC)
|
||||
samplerate = pcm_sampr_type_rec_to_play(samplerate);
|
||||
#endif
|
||||
#endif /* HAVE_RECORDING */
|
||||
#endif /* CONFIG_SAMPR_TYPES */
|
||||
|
||||
index = round_value_to_list32(samplerate, hw_freq_sampr,
|
||||
|
|
Loading…
Reference in New Issue