diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-06-11 23:39:07 +0000 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-06-11 23:39:07 +0000 |
commit | 23279cd43adbd513102a033f4383bfda8d3770c4 (patch) | |
tree | a349febe721de4d5025d33ef0fa855503d2a5118 /firmware | |
parent | cfe0f4826a7439e5d9a931fec0cd28707af03ea5 (diff) | |
download | rockbox-23279cd43adbd513102a033f4383bfda8d3770c4.tar.gz rockbox-23279cd43adbd513102a033f4383bfda8d3770c4.zip |
some little more work on audio codec driver unification - more will follow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13620 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/audio/as3514.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/tlv320.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/uda1380.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8731l.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8751.c | 3 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 4 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8975.c | 4 | ||||
-rw-r--r-- | firmware/export/as3514.h | 1 | ||||
-rw-r--r-- | firmware/export/audiohw.h | 7 | ||||
-rw-r--r-- | firmware/export/tlv320.h | 1 | ||||
-rw-r--r-- | firmware/export/uda1380.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8731l.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8751.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8758.h | 1 | ||||
-rw-r--r-- | firmware/export/wm8975.h | 1 |
15 files changed, 16 insertions, 25 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 12a72fe0dd..a0a84e51c9 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c @@ -267,15 +267,13 @@ int audiohw_set_lineout_vol(int vol_l, int vol_r) return 0; } -int audiohw_mute(int mute) +void audiohw_mute(int mute) { if (mute) { as3514_write_or(HPH_OUT_L, (1 << 7)); } else { as3514_write_and(HPH_OUT_L, ~(1 << 7)); } - - return 0; } /* Nice shutdown of WM8758 codec */ diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c index 85d12602b2..2e43baaf8f 100644 --- a/firmware/drivers/audio/tlv320.c +++ b/firmware/drivers/audio/tlv320.c @@ -219,10 +219,10 @@ void audiohw_set_recvol(int left, int right, int type) } /** - * Mute (mute=true) or enable sound (mute=false) + * Mute (mute=1) or enable sound (mute=0) * */ -void audiohw_mute(bool mute) +void audiohw_mute(int mute) { unsigned value_dap = tlv320_regs[REG_DAP]; unsigned value_l, value_r; diff --git a/firmware/drivers/audio/uda1380.c b/firmware/drivers/audio/uda1380.c index 5c807de70b..ab0ff81352 100644 --- a/firmware/drivers/audio/uda1380.c +++ b/firmware/drivers/audio/uda1380.c @@ -163,7 +163,7 @@ void audiohw_set_treble(int value) * Mute (mute=1) or enable sound (mute=0) * */ -int audiohw_mute(int mute) +void audiohw_mute(int mute) { unsigned int value = uda1380_regs[REG_MUTE]; @@ -172,7 +172,7 @@ int audiohw_mute(int mute) else value = value & ~MUTE_MASTER; - return uda1380_write_reg(REG_MUTE, value); + uda1380_write_reg(REG_MUTE, value); } /* Returns 0 if successful or -1 if some register failed */ diff --git a/firmware/drivers/audio/wm8731l.c b/firmware/drivers/audio/wm8731l.c index 4c4f7cb1e7..c87c7d0125 100644 --- a/firmware/drivers/audio/wm8731l.c +++ b/firmware/drivers/audio/wm8731l.c @@ -82,7 +82,7 @@ int tenthdb2mixer(int db) return -db * 2 / 5; } -int audiohw_mute(int mute) +void audiohw_mute(int mute) { if (mute) { @@ -92,8 +92,6 @@ int audiohw_mute(int mute) /* Set DACMU = 0 to soft-un-mute the audio DACs. */ wmcodec_write(DACCTRL, 0x0); } - - return 0; } /** From ipodLinux **/ diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index 533bb7063a..346b4239a4 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c @@ -168,12 +168,11 @@ void audiohw_set_treble(int value) TREBCTRL_TREB(tone_tenthdb2hw(value))); } -int audiohw_mute(int mute) +void audiohw_mute(int mute) { /* Mute: Set DACMU = 1 to soft-mute the audio DACs. */ /* Unmute: Set DACMU = 0 to soft-un-mute the audio DACs. */ wmcodec_write(DACCTRL, mute ? DACCTRL_DACMU : 0); - return 0; } /* Nice shutdown of WM8751 codec */ diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index b73257ce51..bf3ec4c1de 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c @@ -151,7 +151,7 @@ void audiohw_set_treble(int value) (void)value; } -int audiohw_mute(int mute) +void audiohw_mute(int mute) { if (mute) { @@ -161,8 +161,6 @@ int audiohw_mute(int mute) /* Set DACMU = 0 to soft-un-mute the audio DACs. */ wmcodec_write(DACCTRL, 0x0); } - - return 0; } /* Nice shutdown of WM8758 codec */ diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c index 9adba907a7..5f90ff0a38 100644 --- a/firmware/drivers/audio/wm8975.c +++ b/firmware/drivers/audio/wm8975.c @@ -190,7 +190,7 @@ void audiohw_set_treble(int value) } } -int audiohw_mute(int mute) +void audiohw_mute(int mute) { if (mute) { @@ -200,8 +200,6 @@ int audiohw_mute(int mute) /* Set DACMU = 0 to soft-un-mute the audio DACs. */ wmcodec_write(DACCTRL, 0x0); } - - return 0; } /* Nice shutdown of WM8975 codec */ diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h index 5f37fd7fcf..98656c701d 100644 --- a/firmware/export/as3514.h +++ b/firmware/export/as3514.h @@ -29,7 +29,6 @@ extern int audiohw_init(void); extern void audiohw_enable_output(bool enable); 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 int audiohw_mute(int mute); extern void audiohw_close(void); extern void audiohw_set_sample_rate(int sampling_control); diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 65a2466dfc..b266868be2 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h @@ -89,4 +89,11 @@ struct sound_settings_info { * its audio settings. Keep in mind that the order must be correct! */ extern const struct sound_settings_info audiohw_settings[]; +/* All usable functions implemented by a audio codec drivers. Most of + * the function in sound settings are only called, when in audio codecs + * .h file suitable defines are added. + */ + +void audiohw_mute(int mute); + #endif /* _AUDIOHW_H_ */ diff --git a/firmware/export/tlv320.h b/firmware/export/tlv320.h index ebb126ddf5..15ac794cca 100644 --- a/firmware/export/tlv320.h +++ b/firmware/export/tlv320.h @@ -42,7 +42,6 @@ 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_mute(bool mute); extern void audiohw_close(void); extern void audiohw_enable_recording(bool source_mic); extern void audiohw_disable_recording(void); diff --git a/firmware/export/uda1380.h b/firmware/export/uda1380.h index c1fb6421ff..fd1b838b04 100644 --- a/firmware/export/uda1380.h +++ b/firmware/export/uda1380.h @@ -34,7 +34,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); extern void audiohw_set_treble(int value); -extern int audiohw_mute(int mute); extern void audiohw_close(void); /** * Sets frequency settings for DAC and ADC relative to MCLK diff --git a/firmware/export/wm8731l.h b/firmware/export/wm8731l.h index 5ef6d694e5..74e41a73d7 100644 --- a/firmware/export/wm8731l.h +++ b/firmware/export/wm8731l.h @@ -34,7 +34,6 @@ extern int audiohw_set_master_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); extern void audiohw_set_treble(int value); -extern int audiohw_mute(int mute); extern void audiohw_close(void); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); diff --git a/firmware/export/wm8751.h b/firmware/export/wm8751.h index efeaa3609d..89d2c6b21c 100644 --- a/firmware/export/wm8751.h +++ b/firmware/export/wm8751.h @@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); extern void audiohw_set_treble(int value); -extern int audiohw_mute(int mute); extern void audiohw_close(void); extern void audiohw_set_frequency(int fsel); diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index 5715f100da..e86af87f51 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h @@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); extern void audiohw_set_treble(int value); -extern int audiohw_mute(int mute); extern void audiohw_close(void); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); diff --git a/firmware/export/wm8975.h b/firmware/export/wm8975.h index c00303a6a8..609e05c622 100644 --- a/firmware/export/wm8975.h +++ b/firmware/export/wm8975.h @@ -35,7 +35,6 @@ extern int audiohw_set_lineout_vol(int vol_l, int vol_r); extern int audiohw_set_mixer_vol(int channel1, int channel2); extern void audiohw_set_bass(int value); extern void audiohw_set_treble(int value); -extern int audiohw_mute(int mute); extern void audiohw_close(void); extern void audiohw_set_nsorder(int order); extern void audiohw_set_sample_rate(int sampling_control); |