summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/audio
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r--firmware/drivers/audio/as3514.c9
-rw-r--r--firmware/drivers/audio/sdl.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index 34dc9ad29f..957aba8dbb 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -327,6 +327,15 @@ void audiohw_close(void)
void audiohw_set_frequency(int fsel)
{
+#if defined(SANSA_E200) || defined(SANSA_C200)
+ if ((unsigned)fsel >= HW_NUM_FREQ)
+ fsel = HW_FREQ_DEFAULT;
+
+ as3514_write(AS3514_PLLMODE, hw_freq_sampr[fsel] < 24000 ?
+ PLLMODE_LRCK_8_23 : PLLMODE_LRCK_24_48);
+
+ audiohw_set_sampr_dividers(fsel);
+#endif
(void)fsel;
}
diff --git a/firmware/drivers/audio/sdl.c b/firmware/drivers/audio/sdl.c
index c063192873..f4c622d7a6 100644
--- a/firmware/drivers/audio/sdl.c
+++ b/firmware/drivers/audio/sdl.c
@@ -162,6 +162,10 @@ 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)
+ { return samplerate; }
+#endif
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int mas_codec_readreg(int reg)
{