forked from len0rd/rockbox
More samplerates for playback for ipod 1g/2g, and fix the ipod mini 1g/2g which also use WM8721.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18669 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b297eb9d9d
commit
f60c1ae050
2 changed files with 35 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ void audiohw_enable_output(bool enable)
|
||||||
|
|
||||||
/* DACSEL=1 */
|
/* DACSEL=1 */
|
||||||
wmcodec_write(0x4, 0x10);
|
wmcodec_write(0x4, 0x10);
|
||||||
|
|
||||||
/* set power register to POWEROFF=0 on OUTPD=0, DACPD=0 */
|
/* set power register to POWEROFF=0 on OUTPD=0, DACPD=0 */
|
||||||
wmcodec_write(PDCTRL, 0x67);
|
wmcodec_write(PDCTRL, 0x67);
|
||||||
|
|
||||||
|
|
@ -123,7 +123,7 @@ void audiohw_enable_output(bool enable)
|
||||||
|
|
||||||
/* 5. Set DACMU = 0 to soft-un-mute the audio DACs. */
|
/* 5. Set DACMU = 0 to soft-un-mute the audio DACs. */
|
||||||
wmcodec_write(DAPCTRL, 0x0);
|
wmcodec_write(DAPCTRL, 0x0);
|
||||||
|
|
||||||
audiohw_mute(0);
|
audiohw_mute(0);
|
||||||
} else {
|
} else {
|
||||||
audiohw_mute(1);
|
audiohw_mute(1);
|
||||||
|
|
@ -168,7 +168,29 @@ 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;
|
||||||
|
switch(sampling_control)
|
||||||
|
{
|
||||||
|
case SAMPR_96:
|
||||||
|
rate = WM8721_USB24_96000HZ;
|
||||||
|
break;
|
||||||
|
case SAMPR_88:
|
||||||
|
rate = WM8721_USB24_88200HZ;
|
||||||
|
break;
|
||||||
|
case SAMPR_48:
|
||||||
|
rate = WM8721_USB24_48000HZ;
|
||||||
|
break;
|
||||||
|
case SAMPR_44:
|
||||||
|
rate = WM8721_USB24_44100HZ;
|
||||||
|
break;
|
||||||
|
case SAMPR_32:
|
||||||
|
rate = WM8721_USB24_32000HZ;
|
||||||
|
break;
|
||||||
|
case SAMPR_8:
|
||||||
|
rate = WM8721_USB24_8000HZ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
codec_set_active(0x0);
|
codec_set_active(0x0);
|
||||||
wmcodec_write(SAMPCTRL, sampling_control);
|
wmcodec_write(SAMPCTRL, rate);
|
||||||
codec_set_active(0x1);
|
codec_set_active(0x1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,16 @@
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility
|
||||||
/*#define HAVE_RECORDING*/
|
#define HAVE_RECORDING */
|
||||||
|
|
||||||
|
/* define the bitmask of hardware sample rates */
|
||||||
|
#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
|
||||||
|
SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8)
|
||||||
|
|
||||||
|
/* define the bitmask of recording sample rates
|
||||||
|
#define REC_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
|
||||||
|
SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8) */
|
||||||
|
|
||||||
/* define this if you have a bitmap LCD display */
|
/* define this if you have a bitmap LCD display */
|
||||||
#define HAVE_LCD_BITMAP
|
#define HAVE_LCD_BITMAP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue