From e217b960e4f82610946fcad764b8af017a4811c0 Mon Sep 17 00:00:00 2001 From: Raymond Yau Date: Wed, 30 Mar 2011 20:00:39 +0800 Subject: ALSA: emu10k1 - Remove CLFE-related controls for SB Live! Platinum CT4760P SB Live! Platinum CT4760P is just a 4 channels sound card with STAC9721 and Philips UDA1334 DAC. Signed-off-by: Raymond Yau Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emumixer.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/pci/emu10k1') diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 05afe06e353a..1b50a23232b5 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -1913,6 +1913,12 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, for (; *c; c += 2) rename_ctl(card, c[0], c[1]); + if (emu->card_capabilities->subsystem == 0x80401102) { /* SB Live! Platinum CT4760P */ + remove_ctl(card, "Center Playback Volume"); + remove_ctl(card, "LFE Playback Volume"); + remove_ctl(card, "Wave Center Playback Volume"); + remove_ctl(card, "Wave LFE Playback Volume"); + } if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */ rename_ctl(card, "Line2 Capture Volume", "Line1/Mic Capture Volume"); rename_ctl(card, "Analog Mix Capture Volume", "Line2 Capture Volume"); -- cgit v1.2.3 From b6a48404088d91514b9e78c3237976a5aa87cb14 Mon Sep 17 00:00:00 2001 From: Raymond Yau Date: Fri, 15 Apr 2011 11:42:42 +0800 Subject: ALSA: emu10k1 - Remove "Front" controls only for STAC9758/59 Remove "Front Playback Volume" and "Front Playback Switch" from emu10k1 only for STAC9758/59 Since commit 7eae36fbd5ea9db3d3fe0d671199121be782a5b3 "Fix the confliction of 'Front' control", the "Front Playback Volume" control created by commit edf8e4565c44bffbb4d09e8984df941d0ae9e6e8 "emu10k1: Front channels via fxbus 8 and 9" was removed "Front Playback Volume" and "Surround Playback Volume" have same dB range since I2S DAC of SB Live! and SB Live! Platinum does not has any hardware volume control. Signed-off-by: Raymond Yau Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emumixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci/emu10k1') diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 1b50a23232b5..9d890a5aec5a 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -1729,8 +1729,6 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, "Master Mono Playback Volume", "PCM Out Path & Mute", "Mono Output Select", - "Front Playback Switch", - "Front Playback Volume", "Surround Playback Switch", "Surround Playback Volume", "Center Playback Switch", @@ -1879,6 +1877,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, emu->rear_ac97 = 1; snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202); + remove_ctl(card,"Front Playback Volume"); + remove_ctl(card,"Front Playback Switch"); } /* remove unused AC97 controls */ snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202); -- cgit v1.2.3 From bfe9fc8aebc997ce8bcf8ac0586c84a247812064 Mon Sep 17 00:00:00 2001 From: Raymond Yau Date: Fri, 20 May 2011 14:32:04 +0800 Subject: ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live! As the "Wave", "Wave Surround" or "Front" Playback Volume must be changed to 70% (i.e. -12 dB) so that distortion won't occur when increase Bass and Treble from 50% to 100%, so the maximum gain in Bass and Treble are +12 dB. Signed-off-by: Raymond Yau Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emufx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/pci/emu10k1') diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 7a9401462c1c..dae4050ede5c 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -303,6 +303,9 @@ static const u32 db_table[101] = { static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); +/* EMU10K1 bass/treble db gain */ +static const DECLARE_TLV_DB_SCALE(snd_emu10k1_bass_treble_db_scale, -1200, 60, 0); + static const u32 onoff_table[2] = { 0x00000000, 0x00000001 }; @@ -2163,6 +2166,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) ctl->min = 0; ctl->max = 40; ctl->value[0] = ctl->value[1] = 20; + ctl->tlv = snd_emu10k1_bass_treble_db_scale; ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; ctl = &controls[i + 1]; ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; @@ -2172,6 +2176,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) ctl->min = 0; ctl->max = 40; ctl->value[0] = ctl->value[1] = 20; + ctl->tlv = snd_emu10k1_bass_treble_db_scale; ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; #define BASS_GPR 0x8c -- cgit v1.2.3