audio on the m:robe 100

- using the existing wm8751 driver (from gigabeat port) integrated into the portal player environment
- only 44.1kHz at the moment
- for some reason the output is very quiet
- due to the lack of usable buttons the easiest (?) way to start an audio file is to copy the .playlist_control, config.cfg and nvram.bin files from another target, where auto resume is enabled.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16117 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Kukla 2008-01-20 12:59:23 +00:00
parent 9e93b9e30a
commit 47cfed1f1b
4 changed files with 23 additions and 9 deletions

View file

@ -100,6 +100,10 @@ static int adaptivebass2hw(int value)
/* Reset and power up the WM8751 */
void audiohw_preinit(void)
{
#ifdef CPU_PP502x
i2s_reset();
#endif
/*
* 1. Switch on power supplies.
* By default the WM8751 is in Standby Mode, the DAC is

View file

@ -56,11 +56,7 @@
#define PLUGIN_BUFFER_SIZE 0x80000
/* Wolfsom audio codec */
/* TODO: #define HAVE_WM8751 */
#define HAVE_WM8731
/* WM8731 has no tone controls, so we use the software ones */
#define HAVE_SW_TONE_CONTROLS
#define HAVE_WM8751
#define AB_REPEAT_ENABLE 1

View file

@ -23,6 +23,10 @@
#include "audio.h"
#include "sound.h"
#ifdef HAVE_WM8751
#define MROBE100_44100HZ (0x40|(0x11 << 1)|1)
#endif
/** DMA **/
#ifdef CPU_PP502x
@ -81,15 +85,25 @@ struct dma_data dma_play_data NOCACHEBSS_ATTR =
};
static unsigned long pcm_freq NOCACHEDATA_ATTR = HW_SAMPR_DEFAULT; /* 44.1 is default */
#ifdef HAVE_WM8751
/* Samplerate control for audio codec */
static int sr_ctrl = MROBE100_44100HZ;
#endif
void pcm_set_frequency(unsigned int frequency)
{
(void)frequency;
pcm_freq = HW_SAMPR_DEFAULT;
#ifdef HAVE_WM8751
sr_ctrl = MROBE100_44100HZ;
#endif
}
void pcm_apply_settings(void)
{
#ifdef HAVE_WM8751
audiohw_set_frequency(sr_ctrl);
#endif
pcm_curr_sampr = pcm_freq;
}
@ -308,7 +322,7 @@ void pcm_play_dma_init(void)
/* Initialize default register values. */
audiohw_init();
#ifndef HAVE_WM8731
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751)
/* Power on */
audiohw_enable_output(true);
/* Unmute the master channel (DAC should be at zero point now). */

View file

@ -28,7 +28,7 @@
#include "audiohw.h"
#include "i2c-pp.h"
#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB)
#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100)
/* The H10's audio codec uses an I2C address of 0x1b */
#define I2C_AUDIO_ADDRESS 0x1b
#else
@ -96,13 +96,13 @@ void audiohw_init(void) {
#endif /* IPOD_1G2G/3G */
#endif
#ifdef HAVE_WM8731
#if defined(HAVE_WM8731) || defined(HAVE_WM8751)
audiohw_preinit();
#endif
}
#ifndef HAVE_WM8731
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751)
void audiohw_postinit(void)
{
}