diff options
| author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-11-19 15:50:52 +0000 |
|---|---|---|
| committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-11-19 15:50:52 +0000 |
| commit | c583f3c8d1bbed4a1f432bd22f15c126a95d63bb (patch) | |
| tree | b2527bf83096830db1f8262157a889faa0333f0f /firmware/export | |
| parent | 4f2473db6cecbb80323c5eee576b2e8e0901274f (diff) | |
| download | rockbox-c583f3c8d1bbed4a1f432bd22f15c126a95d63bb.zip rockbox-c583f3c8d1bbed4a1f432bd22f15c126a95d63bb.tar.gz rockbox-c583f3c8d1bbed4a1f432bd22f15c126a95d63bb.tar.bz2 rockbox-c583f3c8d1bbed4a1f432bd22f15c126a95d63bb.tar.xz | |
introduce general audiohw api for recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15687 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
| -rw-r--r-- | firmware/export/as3514.h | 5 | ||||
| -rw-r--r-- | firmware/export/audiohw.h | 32 | ||||
| -rw-r--r-- | firmware/export/tlv320.h | 4 | ||||
| -rw-r--r-- | firmware/export/uda1380.h | 4 | ||||
| -rw-r--r-- | firmware/export/wm8731.h | 5 | ||||
| -rw-r--r-- | firmware/export/wm8758.h | 5 | ||||
| -rw-r--r-- | firmware/export/wm8975.h | 5 |
7 files changed, 31 insertions, 29 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h index 955019f..82be135 100644 --- a/firmware/export/as3514.h +++ b/firmware/export/as3514.h @@ -30,11 +30,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); extern int audiohw_set_lineout_vol(int vol_l, int vol_r); extern void audiohw_set_sample_rate(int sampling_control); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_set_monitor(int enable); - /* Register Descriptions */ #define LINE_OUT_R 0x00 #define LINE_OUT_L 0x01 diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 9da1a38..c5093a1 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h @@ -109,8 +109,38 @@ void audiohw_close(void); /** * Mute or enable sound. - * @param mute true or false + * @param mute true or false. */ void audiohw_mute(bool mute); +#ifdef HAVE_RECORDING + +/** + * Enable recording. + * @param source_mic if this is true, we want to record from microphone, + * else we want to record FM/LineIn. + */ +void audiohw_enable_recording(bool source_mic); + +/** + * Disable recording. + */ +void audiohw_disable_recording(void); + +/** + * Set gain of recording source. + * @param left gain value. + * @param right will not be used if recording from micophone (mono). + * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN. + */ +void audiohw_set_recvol(int left, int right, int type); + +/** + * Enable or disable recording monitor. + * @param enable ture or false. + */ +void audiohw_set_monitor(bool enable); + +#endif /*HAVE_RECORDING*/ + #endif /* _AUDIOHW_H_ */ diff --git a/firmware/export/tlv320.h b/firmware/export/tlv320.h index af9b362..94c51aa 100644 --- a/firmware/export/tlv320.h +++ b/firmware/export/tlv320.h @@ -40,10 +40,6 @@ extern void audiohw_reset(void); extern void audiohw_set_frequency(unsigned fsel); extern void audiohw_enable_output(bool enable); extern void audiohw_set_headphone_vol(int vol_l, int vol_r); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_monitor(bool enable); #define HEADPHONE_MUTE 0x30 /* 0110000 = -73db */ diff --git a/firmware/export/uda1380.h b/firmware/export/uda1380.h index b4b83d1..2f35b29 100644 --- a/firmware/export/uda1380.h +++ b/firmware/export/uda1380.h @@ -45,10 +45,6 @@ extern void audiohw_set_treble(int value); * 88200: 3 = 50 to 100 SCLK, LRCK: Audio Clk / 2 */ extern void audiohw_set_frequency(unsigned fsel); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_set_monitor(int enable); #define UDA1380_ADDR 0x30 diff --git a/firmware/export/wm8731.h b/firmware/export/wm8731.h index 5e94a4e..3dc82b6 100644 --- a/firmware/export/wm8731.h +++ b/firmware/export/wm8731.h @@ -34,11 +34,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_set_monitor(int enable); - /* Register addresses and bits */ #define LINVOL 0x00 #define LINVOL_MASK 0x1f diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index 8a3c619..62fb04a 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h @@ -37,11 +37,6 @@ extern void audiohw_set_treble(int value); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_set_monitor(int enable); - extern void audiohw_set_equalizer_band(int band, int freq, int bw, int gain); #define RESET 0x00 diff --git a/firmware/export/wm8975.h b/firmware/export/wm8975.h index e97497e..ab162fc 100644 --- a/firmware/export/wm8975.h +++ b/firmware/export/wm8975.h @@ -37,11 +37,6 @@ extern void audiohw_set_treble(int value); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); -extern void audiohw_enable_recording(bool source_mic); -extern void audiohw_disable_recording(void); -extern void audiohw_set_recvol(int left, int right, int type); -extern void audiohw_set_monitor(int enable); - /* Register addresses */ #define LOUT1VOL 0x02 #define ROUT1VOL 0x03 |