From 06971be8cd75234e76adab165e8c28275b2ab080 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 13 Feb 2008 11:19:23 +0000 Subject: Return value of audiohw_set_xxx_vol is never used and most of the time we have a return 0; --> kick it git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16300 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/as3514.c | 8 ++------ firmware/drivers/audio/uda1380.c | 8 ++++---- firmware/drivers/audio/wm8721.c | 4 +--- firmware/drivers/audio/wm8731.c | 3 +-- firmware/drivers/audio/wm8751.c | 6 ++---- firmware/drivers/audio/wm8758.c | 12 +++--------- firmware/drivers/audio/wm8975.c | 8 ++------ firmware/drivers/audio/wm8985.c | 6 ++---- 8 files changed, 17 insertions(+), 38 deletions(-) (limited to 'firmware/drivers/audio') diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 80ada46f80..08d4d538a4 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c @@ -218,7 +218,7 @@ void audiohw_enable_output(bool enable) } } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { unsigned int hph_r = as3514.regs[HPH_OUT_R] & ~0x1f; unsigned int hph_l = as3514.regs[HPH_OUT_L] & ~0x1f; @@ -262,16 +262,12 @@ int audiohw_set_master_vol(int vol_l, int vol_r) as3514_write(mix_reg_l, mix_l); as3514_write(HPH_OUT_R, hph_r); as3514_write(HPH_OUT_L, hph_l); - - return 0; } -int audiohw_set_lineout_vol(int vol_l, int vol_r) +void audiohw_set_lineout_vol(int vol_l, int vol_r) { as3514_write(LINE_OUT_R, vol_r); as3514_write(LINE_OUT_L, (1 << 6) | vol_l); - - return 0; } void audiohw_mute(bool mute) diff --git a/firmware/drivers/audio/uda1380.c b/firmware/drivers/audio/uda1380.c index 91bc9a1a8e..ce69ef6b80 100644 --- a/firmware/drivers/audio/uda1380.c +++ b/firmware/drivers/audio/uda1380.c @@ -125,18 +125,18 @@ static int uda1380_write_reg(unsigned char reg, unsigned short value) /** * Sets left and right master volume (0(max) to 252(muted)) */ -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { - return uda1380_write_reg(REG_MASTER_VOL, + uda1380_write_reg(REG_MASTER_VOL, MASTER_VOL_LEFT(vol_l) | MASTER_VOL_RIGHT(vol_r)); } /** * Sets mixer volume for both channels (0(max) to 228(muted)) */ -int audiohw_set_mixer_vol(int channel1, int channel2) +void audiohw_set_mixer_vol(int channel1, int channel2) { - return uda1380_write_reg(REG_MIX_VOL, + uda1380_write_reg(REG_MIX_VOL, MIX_VOL_CH_1(channel1) | MIX_VOL_CH_2(channel2)); } diff --git a/firmware/drivers/audio/wm8721.c b/firmware/drivers/audio/wm8721.c index dd3c1332fc..1090b70b07 100644 --- a/firmware/drivers/audio/wm8721.c +++ b/firmware/drivers/audio/wm8721.c @@ -141,7 +141,7 @@ void audiohw_enable_output(bool enable) } } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ /* 1111111 == +6dB */ @@ -150,8 +150,6 @@ int audiohw_set_master_vol(int vol_l, int vol_r) /* 0101111 == mute (0x2f) */ wmcodec_write(LOUTVOL, VOLUME_ZC_WAIT | vol_l); wmcodec_write(ROUTVOL, VOLUME_ZC_WAIT | vol_r); - - return 0; } /* Nice shutdown of WM8721 codec */ diff --git a/firmware/drivers/audio/wm8731.c b/firmware/drivers/audio/wm8731.c index e0e7cb38c0..7d25849158 100644 --- a/firmware/drivers/audio/wm8731.c +++ b/firmware/drivers/audio/wm8731.c @@ -188,7 +188,7 @@ void audiohw_postinit(void) #endif } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ /* 1111111 == +6dB */ @@ -197,7 +197,6 @@ int audiohw_set_master_vol(int vol_l, int vol_r) /* 0101111 == mute (0x2f) */ wm8731_write(LOUTVOL, LOUTVOL_LZCEN | (vol_l & LOUTVOL_LHPVOL_MASK)); wm8731_write(ROUTVOL, ROUTVOL_RZCEN | (vol_r & ROUTVOL_RHPVOL_MASK)); - return 0; } /* Nice shutdown of WM8731 codec */ diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index f228c170c8..831f16ab17 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c @@ -164,7 +164,7 @@ void audiohw_postinit(void) #endif } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ /* 1111111 == +6dB */ @@ -174,15 +174,13 @@ int audiohw_set_master_vol(int vol_l, int vol_r) wmcodec_write(LOUT1, LOUT1_BITS | LOUT1_LOUT1VOL(vol_l)); wmcodec_write(ROUT1, ROUT1_BITS | ROUT1_ROUT1VOL(vol_r)); - return 0; } #ifndef MROBE_100 -int audiohw_set_lineout_vol(int vol_l, int vol_r) +void audiohw_set_lineout_vol(int vol_l, int vol_r) { wmcodec_write(LOUT2, LOUT2_BITS | LOUT2_LOUT2VOL(vol_l)); wmcodec_write(ROUT2, ROUT2_BITS | ROUT2_ROUT2VOL(vol_r)); - return 0; } #endif diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index a9f10fbe67..8f452f7a09 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c @@ -118,30 +118,24 @@ void audiohw_enable_output(bool enable) } } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { /* OUT1 */ wmcodec_write(LOUT1VOL, 0x080 | vol_l); wmcodec_write(ROUT1VOL, 0x180 | vol_r); - - return 0; } -int audiohw_set_lineout_vol(int vol_l, int vol_r) +void audiohw_set_lineout_vol(int vol_l, int vol_r) { /* OUT2 */ wmcodec_write(LOUT2VOL, vol_l); wmcodec_write(ROUT2VOL, 0x100 | vol_r); - - return 0; } -int audiohw_set_mixer_vol(int channel1, int channel2) +void audiohw_set_mixer_vol(int channel1, int channel2) { (void)channel1; (void)channel2; - - return 0; } void audiohw_set_bass(int value) diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c index 7762224254..297aabda78 100644 --- a/firmware/drivers/audio/wm8975.c +++ b/firmware/drivers/audio/wm8975.c @@ -124,7 +124,7 @@ void audiohw_enable_output(bool enable) -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ /* 1111111 == +6dB */ @@ -135,17 +135,13 @@ int audiohw_set_master_vol(int vol_l, int vol_r) /* OUT1 */ wmcodec_write(LOUT1VOL, VOLUME_ZC_WAIT | vol_l); wmcodec_write(ROUT1VOL, VOLUME_ZC_WAIT | 0x100 | vol_r); - - return 0; } -int audiohw_set_lineout_vol(int vol_l, int vol_r) +void audiohw_set_lineout_vol(int vol_l, int vol_r) { /* OUT2 */ wmcodec_write(LOUT2VOL, VOLUME_ZC_WAIT | vol_l); wmcodec_write(ROUT2VOL, VOLUME_ZC_WAIT | 0x100 | vol_r); - - return 0; } void audiohw_set_bass(int value) diff --git a/firmware/drivers/audio/wm8985.c b/firmware/drivers/audio/wm8985.c index 3117b06f98..ad19a589fe 100644 --- a/firmware/drivers/audio/wm8985.c +++ b/firmware/drivers/audio/wm8985.c @@ -55,22 +55,20 @@ void audiohw_enable_output(bool enable) (void)enable; } -int audiohw_set_master_vol(int vol_l, int vol_r) +void audiohw_set_master_vol(int vol_l, int vol_r) { #warning function not implemented (void)vol_l; (void)vol_r; - return 0; } -int audiohw_set_lineout_vol(int vol_l, int vol_r) +void audiohw_set_lineout_vol(int vol_l, int vol_r) { #warning function not implemented (void)vol_l; (void)vol_r; - return 0; } void audiohw_set_bass(int value) -- cgit v1.2.3