diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-15 21:41:46 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-15 21:41:46 +0000 |
| commit | 8f8fbac1fddee1df554d6fe9f9ac344404257b82 (patch) | |
| tree | 5a5526618155edd41e66bd357e52492aacbffcbf /firmware/export | |
| parent | 566eae2e119f3c57b1df0782ddcc29fccedbf816 (diff) | |
| download | rockbox-8f8fbac1fddee1df554d6fe9f9ac344404257b82.zip rockbox-8f8fbac1fddee1df554d6fe9f9ac344404257b82.tar.gz rockbox-8f8fbac1fddee1df554d6fe9f9ac344404257b82.tar.bz2 rockbox-8f8fbac1fddee1df554d6fe9f9ac344404257b82.tar.xz | |
Philips tuner prepared, new middle layer to abstract which tuner is used
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5289 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
| -rw-r--r-- | firmware/export/config-ondiofm.h | 2 | ||||
| -rw-r--r-- | firmware/export/config.h | 6 | ||||
| -rw-r--r-- | firmware/export/fmradio_i2c.h | 26 | ||||
| -rw-r--r-- | firmware/export/hwcompat.h | 1 | ||||
| -rw-r--r-- | firmware/export/tuner.h | 49 |
5 files changed, 80 insertions, 4 deletions
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 437f868..f459934 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h @@ -41,7 +41,7 @@ #define FIRMWARE_OFFSET_FILE_DATA 24 /* Define this if you have an FM Radio */ -#define CONFIG_TUNER TEA5767 +#define CONFIG_TUNER (S1A0903X01 | TEA5767) /* to be decided at runtime */ /* How to detect USB */ #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ diff --git a/firmware/export/config.h b/firmware/export/config.h index 76a2bd9..823a5dc 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -22,9 +22,9 @@ /* symbolic names for multiple choice configurations: */ -/* CONFIG_TUNER */ -#define S1A0903X01 0 /* Samsung */ -#define TEA5767 1 /* Philips */ +/* CONFIG_TUNER (note these are combineable bit-flags) */ +#define S1A0903X01 0x01 /* Samsung */ +#define TEA5767 0x02 /* Philips */ /* CONFIG_HWCODEC */ #define MAS3587F 3587 diff --git a/firmware/export/fmradio_i2c.h b/firmware/export/fmradio_i2c.h new file mode 100644 index 0000000..06b7f9f --- /dev/null +++ b/firmware/export/fmradio_i2c.h @@ -0,0 +1,26 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * Physical interface of the Philips TEA5767 in Archos Ondio + * + * Copyright (C) 2004 by Jörg Hohensohn + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef FMRADIO_I2C_H +#define FMRADIO_I2C_H + +void fmradio_i2c_read(unsigned char* p_data); /* reads 5 byte */ +void fmradio_i2c_set(const unsigned char* p_data); /* writes 5 bytes */ + +#endif diff --git a/firmware/export/hwcompat.h b/firmware/export/hwcompat.h index ef3892b..66f29f8 100644 --- a/firmware/export/hwcompat.h +++ b/firmware/export/hwcompat.h @@ -27,6 +27,7 @@ #define USB_ACTIVE_HIGH 0x0100 #define PR_ACTIVE_HIGH 0x0100 #define LCD_CONTRAST_BIAS 0x0200 +#define TUNER_MODEL 0x0800 int read_rom_version(void); int read_hw_mask(void); diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h new file mode 100644 index 0000000..ae31c6d --- /dev/null +++ b/firmware/export/tuner.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * Tuner abstraction layer + * + * Copyright (C) 2004 Jörg Hohensohn + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __TUNER_SAMSUNG_H__ +#define __TUNER_SAMSUNG_H__ + +/* settings to the tuner layer */ +#define RADIO_INIT 0 +#define RADIO_FREQUENCY 1 +#define RADIO_MUTE 2 +#define RADIO_IF_MEASUREMENT 3 +#define RADIO_SENSITIVITY 4 +#define RADIO_FORCE_MONO 5 +/* readback from the tuner layer */ +#define RADIO_PRESENT 0 +#define RADIO_IF_MEASURED 1 +#define RADIO_STEREO 2 + +#ifdef CONFIG_TUNER + +#if (CONFIG_TUNER & S1A0903X01) +void samsung_set(int setting, int value); +int samsung_get(int setting); +#endif + +#if (CONFIG_TUNER & TEA5767) +void philips_set(int setting, int value); +int philips_get(int setting); +#endif + +#endif /* #ifdef CONFIG_TUNER */ + +#endif |