mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Fix-m the ruddiness.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19401 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e69d567d9e
commit
4bbaef6fd5
6 changed files with 8 additions and 12 deletions
|
|
@ -157,10 +157,10 @@ void audiohw_set_frequency(int fsel)
|
||||||
/* All rates available for 11.2896MHz besides 8.021 */
|
/* All rates available for 11.2896MHz besides 8.021 */
|
||||||
static const unsigned char values_src[HW_NUM_FREQ] =
|
static const unsigned char values_src[HW_NUM_FREQ] =
|
||||||
{
|
{
|
||||||
[HW_FREQ_11] = (0x8 << 2) | SRC_CLKIN,
|
HW_HAVE_11_([HW_FREQ_11] = (0x8 << 2) | SRC_CLKIN,)
|
||||||
[HW_FREQ_22] = (0x8 << 2) | SRC_CLKIN,
|
HW_HAVE_22_([HW_FREQ_22] = (0x8 << 2) | SRC_CLKIN,)
|
||||||
[HW_FREQ_44] = (0x8 << 2),
|
HW_HAVE_44_([HW_FREQ_44] = (0x8 << 2),)
|
||||||
[HW_FREQ_88] = (0xf << 2),
|
HW_HAVE_88_([HW_FREQ_88] = (0xf << 2),)
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned value_dap, value_pc;
|
unsigned value_dap, value_pc;
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,6 @@ void audiohw_close(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void audiohw_set_frequency(int fsel)
|
void audiohw_set_frequency(int fsel)
|
||||||
|
{
|
||||||
(void)fsel;
|
(void)fsel;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ void audiohw_preinit(void)
|
||||||
wmcodec_write(OUTCTRL, OUTCTRL_VROI);
|
wmcodec_write(OUTCTRL, OUTCTRL_VROI);
|
||||||
wmcodec_write(CLKCTRL, CLKCTRL_MS); /* WM8758 is clock master */
|
wmcodec_write(CLKCTRL, CLKCTRL_MS); /* WM8758 is clock master */
|
||||||
|
|
||||||
audiohw_set_sample_rate(HW_FREQ_44);
|
audiohw_set_frequency(HW_FREQ_44);
|
||||||
|
|
||||||
wmcodec_write(LOUTMIX, LOUTMIX_DACL2LMIX);
|
wmcodec_write(LOUTMIX, LOUTMIX_DACL2LMIX);
|
||||||
wmcodec_write(ROUTMIX, ROUTMIX_DACR2RMIX);
|
wmcodec_write(ROUTMIX, ROUTMIX_DACR2RMIX);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ void audio_input_mux(int source, unsigned flags)
|
||||||
(void)flags;
|
(void)flags;
|
||||||
/* Prevent pops from unneeded switching */
|
/* Prevent pops from unneeded switching */
|
||||||
static int last_source = AUDIO_SRC_PLAYBACK;
|
static int last_source = AUDIO_SRC_PLAYBACK;
|
||||||
#ifdef HAVE_FMRADIO_REC
|
#ifdef HAVE_FMRADIO_REC
|
||||||
bool recording = flags & SRCF_RECORDING;
|
bool recording = flags & SRCF_RECORDING;
|
||||||
static bool last_recording = false;
|
static bool last_recording = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -43,7 +43,7 @@ void audio_input_mux(int source, unsigned flags)
|
||||||
#if defined(IPOD_COLOR) || defined (IPOD_4G)
|
#if defined(IPOD_COLOR) || defined (IPOD_4G)
|
||||||
/* The usual magic from IPL - I'm guessing this configures the headphone
|
/* The usual magic from IPL - I'm guessing this configures the headphone
|
||||||
socket to be input or output. */
|
socket to be input or output. */
|
||||||
if (recording && source != AUDIO_SRC_PLAYBACK)
|
if ((flags & SRCF_RECORDING) && source != AUDIO_SRC_PLAYBACK)
|
||||||
{
|
{
|
||||||
/* input */
|
/* input */
|
||||||
GPIO_CLEAR_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
|
GPIO_CLEAR_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,6 @@ struct dma_data dma_play_data SHAREDBSS_ATTR =
|
||||||
.state = 0
|
.state = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned long pcm_sampr SHAREDDATA_ATTR = HW_SAMPR_DEFAULT; /* 44.1 is default */
|
|
||||||
|
|
||||||
void pcm_postinit(void)
|
void pcm_postinit(void)
|
||||||
{
|
{
|
||||||
audiohw_postinit();
|
audiohw_postinit();
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,6 @@
|
||||||
#include "audiohw.h"
|
#include "audiohw.h"
|
||||||
#include "dsp-target.h"
|
#include "dsp-target.h"
|
||||||
|
|
||||||
static int pcm_fsel = HW_FREQ_DEFAULT;
|
|
||||||
|
|
||||||
void pcm_play_dma_init(void)
|
void pcm_play_dma_init(void)
|
||||||
{
|
{
|
||||||
IO_CLK_O1DIV = 3;
|
IO_CLK_O1DIV = 3;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue