mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-16 08:32:36 -05:00
FS#9609 FM radio support for the Gigabeat S, seeking/scanning is not yet
implemented but manual tuning works nicely. Thanks to Rafaël Carré, Bertrik Sikken and Robert Menes for suggestions and debugging help. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19372 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a13c162719
commit
65f61d6cce
13 changed files with 354 additions and 9 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include "config.h"
|
||||
/* These must always be included with audio.h for this to compile under
|
||||
cetain conditions. Do it here or else spread the complication around to
|
||||
many files. */
|
||||
|
|
|
|||
|
|
@ -69,9 +69,14 @@
|
|||
/* The number of bytes reserved for loadable plugins */
|
||||
#define PLUGIN_BUFFER_SIZE 0x80000
|
||||
|
||||
/* Define this if you have a SI4700 fm radio tuner */
|
||||
#define CONFIG_TUNER SI4700
|
||||
|
||||
/* Define this if you have the WM8978 audio codec */
|
||||
#define HAVE_WM8978
|
||||
|
||||
#define INPUT_SRC_CAPS SRC_CAP_FMRADIO
|
||||
|
||||
#define HW_SAMPR_CAPS (SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
|
||||
SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
|
||||
SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
|
||||
|
|
@ -114,7 +119,7 @@
|
|||
|
||||
/* Define the bitmask of modules used */
|
||||
#define SPI_MODULE_MASK (USE_CSPI2_MODULE)
|
||||
#define I2C_MODULE_MASK (USE_I2C1_MODULE)
|
||||
#define I2C_MODULE_MASK (USE_I2C1_MODULE | USE_I2C2_MODULE)
|
||||
#define GPIO_EVENT_MASK (USE_GPIO1_EVENTS)
|
||||
|
||||
/* Define this if target has an additional number of threads specific to it */
|
||||
|
|
|
|||
|
|
@ -25,6 +25,18 @@
|
|||
#ifndef _SI4700_H_
|
||||
#define _SI4700_H_
|
||||
|
||||
#define HAVE_RADIO_REGION
|
||||
|
||||
struct si4700_region_data
|
||||
{
|
||||
unsigned char deemphasis; /* 0: 50us, 1: 75us */
|
||||
unsigned char band; /* 0: us/europe, 1: japan */
|
||||
unsigned char spacing; /* 0: us/australia (200kHz), 1: europe/japan (100kHz), 2: (50kHz) */
|
||||
} __attribute__((packed));
|
||||
|
||||
extern const struct si4700_region_data si4700_region_data[TUNER_NUM_REGIONS];
|
||||
|
||||
void si4700_init(void);
|
||||
int si4700_set(int setting, int value);
|
||||
int si4700_get(int setting);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ int tenthdb2master(int db);
|
|||
void audiohw_set_headphone_vol(int vol_l, int vol_r);
|
||||
void audiohw_set_frequency(int sampling_control);
|
||||
|
||||
void wmc_set(unsigned int reg, unsigned int bits);
|
||||
void wmc_clear(unsigned int reg, unsigned int bits);
|
||||
|
||||
#define WMC_I2C_ADDR 0x34
|
||||
|
||||
/* Registers */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue