diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-08-17 22:38:27 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-25 09:57:06 +0200 |
commit | ace457c77ba8c0705e14d95c65e73d7e569bd7b9 (patch) | |
tree | d887d4984ac52f7df0223da993ea9b224382b265 /sound/isa | |
parent | 9e44c6e40fb383e6b1d0df0c9e375a98e11828d1 (diff) | |
download | kernel_samsung_espresso10-ace457c77ba8c0705e14d95c65e73d7e569bd7b9.zip kernel_samsung_espresso10-ace457c77ba8c0705e14d95c65e73d7e569bd7b9.tar.gz kernel_samsung_espresso10-ace457c77ba8c0705e14d95c65e73d7e569bd7b9.tar.bz2 |
ALSA: wss_lib: snd_wss_calibrate_mute improvement
Mute sound by setting mute bit without
setting volume to 0. It makes both source code
and binary shorter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/wss/wss_lib.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index c5beec6..2a5defa 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -574,7 +574,7 @@ static void snd_wss_calibrate_mute(struct snd_wss *chip, int mute) { unsigned long flags; - mute = mute ? 1 : 0; + mute = mute ? 0x80 : 0; spin_lock_irqsave(&chip->reg_lock, flags); if (chip->calibrate_mute == mute) { spin_unlock_irqrestore(&chip->reg_lock, flags); @@ -589,34 +589,34 @@ static void snd_wss_calibrate_mute(struct snd_wss *chip, int mute) chip->image[CS4231_LOOPBACK]); } snd_wss_dout(chip, CS4231_AUX1_LEFT_INPUT, - mute ? 0x80 : chip->image[CS4231_AUX1_LEFT_INPUT]); + mute | chip->image[CS4231_AUX1_LEFT_INPUT]); snd_wss_dout(chip, CS4231_AUX1_RIGHT_INPUT, - mute ? 0x80 : chip->image[CS4231_AUX1_RIGHT_INPUT]); + mute | chip->image[CS4231_AUX1_RIGHT_INPUT]); snd_wss_dout(chip, CS4231_AUX2_LEFT_INPUT, - mute ? 0x80 : chip->image[CS4231_AUX2_LEFT_INPUT]); + mute | chip->image[CS4231_AUX2_LEFT_INPUT]); snd_wss_dout(chip, CS4231_AUX2_RIGHT_INPUT, - mute ? 0x80 : chip->image[CS4231_AUX2_RIGHT_INPUT]); + mute | chip->image[CS4231_AUX2_RIGHT_INPUT]); snd_wss_dout(chip, CS4231_LEFT_OUTPUT, - mute ? 0x80 : chip->image[CS4231_LEFT_OUTPUT]); + mute | chip->image[CS4231_LEFT_OUTPUT]); snd_wss_dout(chip, CS4231_RIGHT_OUTPUT, - mute ? 0x80 : chip->image[CS4231_RIGHT_OUTPUT]); + mute | chip->image[CS4231_RIGHT_OUTPUT]); if (!(chip->hardware & WSS_HW_AD1848_MASK)) { snd_wss_dout(chip, CS4231_LEFT_LINE_IN, - mute ? 0x80 : chip->image[CS4231_LEFT_LINE_IN]); + mute | chip->image[CS4231_LEFT_LINE_IN]); snd_wss_dout(chip, CS4231_RIGHT_LINE_IN, - mute ? 0x80 : chip->image[CS4231_RIGHT_LINE_IN]); + mute | chip->image[CS4231_RIGHT_LINE_IN]); snd_wss_dout(chip, CS4231_MONO_CTRL, mute ? 0xc0 : chip->image[CS4231_MONO_CTRL]); } if (chip->hardware == WSS_HW_INTERWAVE) { snd_wss_dout(chip, CS4231_LEFT_MIC_INPUT, - mute ? 0x80 : chip->image[CS4231_LEFT_MIC_INPUT]); + mute | chip->image[CS4231_LEFT_MIC_INPUT]); snd_wss_dout(chip, CS4231_RIGHT_MIC_INPUT, - mute ? 0x80 : chip->image[CS4231_RIGHT_MIC_INPUT]); + mute | chip->image[CS4231_RIGHT_MIC_INPUT]); snd_wss_dout(chip, CS4231_LINE_LEFT_OUTPUT, - mute ? 0x80 : chip->image[CS4231_LINE_LEFT_OUTPUT]); + mute | chip->image[CS4231_LINE_LEFT_OUTPUT]); snd_wss_dout(chip, CS4231_LINE_RIGHT_OUTPUT, - mute ? 0x80 : chip->image[CS4231_LINE_RIGHT_OUTPUT]); + mute | chip->image[CS4231_LINE_RIGHT_OUTPUT]); } chip->calibrate_mute = mute; spin_unlock_irqrestore(&chip->reg_lock, flags); |