1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Christian Gmeiner 2007-06-11 23:39:07 +00:00
parent cfe0f4826a
commit 23279cd43a
15 changed files with 16 additions and 25 deletions

View file

@ -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 */

View file

@ -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;

View file

@ -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 */

View file

@ -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 **/

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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);

View file

@ -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_ */

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);