diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-05-22 04:01:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-22 04:01:29 -0400 |
commit | 02e5fbf622aabf68bdc02282a17a3aeed054237a (patch) | |
tree | 60f2d4e09464dbf338c832bb39f861f29779b86b /sound/pci/emu10k1 | |
parent | b759b3ac9aee3afb01c21b603970ebb200c8048e (diff) | |
parent | bfe9fc8aebc997ce8bcf8ac0586c84a247812064 (diff) |
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 5 | ||||
-rw-r--r-- | sound/pci/emu10k1/emumixer.c | 10 |
2 files changed, 13 insertions, 2 deletions
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] = { | |||
303 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); | 303 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); |
304 | static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); | 304 | static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); |
305 | 305 | ||
306 | /* EMU10K1 bass/treble db gain */ | ||
307 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_bass_treble_db_scale, -1200, 60, 0); | ||
308 | |||
306 | static const u32 onoff_table[2] = { | 309 | static const u32 onoff_table[2] = { |
307 | 0x00000000, 0x00000001 | 310 | 0x00000000, 0x00000001 |
308 | }; | 311 | }; |
@@ -2163,6 +2166,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) | |||
2163 | ctl->min = 0; | 2166 | ctl->min = 0; |
2164 | ctl->max = 40; | 2167 | ctl->max = 40; |
2165 | ctl->value[0] = ctl->value[1] = 20; | 2168 | ctl->value[0] = ctl->value[1] = 20; |
2169 | ctl->tlv = snd_emu10k1_bass_treble_db_scale; | ||
2166 | ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; | 2170 | ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; |
2167 | ctl = &controls[i + 1]; | 2171 | ctl = &controls[i + 1]; |
2168 | ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 2172 | ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
@@ -2172,6 +2176,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) | |||
2172 | ctl->min = 0; | 2176 | ctl->min = 0; |
2173 | ctl->max = 40; | 2177 | ctl->max = 40; |
2174 | ctl->value[0] = ctl->value[1] = 20; | 2178 | ctl->value[0] = ctl->value[1] = 20; |
2179 | ctl->tlv = snd_emu10k1_bass_treble_db_scale; | ||
2175 | ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; | 2180 | ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; |
2176 | 2181 | ||
2177 | #define BASS_GPR 0x8c | 2182 | #define BASS_GPR 0x8c |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 05afe06e353a..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, | |||
1729 | "Master Mono Playback Volume", | 1729 | "Master Mono Playback Volume", |
1730 | "PCM Out Path & Mute", | 1730 | "PCM Out Path & Mute", |
1731 | "Mono Output Select", | 1731 | "Mono Output Select", |
1732 | "Front Playback Switch", | ||
1733 | "Front Playback Volume", | ||
1734 | "Surround Playback Switch", | 1732 | "Surround Playback Switch", |
1735 | "Surround Playback Volume", | 1733 | "Surround Playback Volume", |
1736 | "Center Playback Switch", | 1734 | "Center Playback Switch", |
@@ -1879,6 +1877,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
1879 | emu->rear_ac97 = 1; | 1877 | emu->rear_ac97 = 1; |
1880 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); | 1878 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT); |
1881 | snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202); | 1879 | snd_ac97_write_cache(emu->ac97, AC97_HEADPHONE, 0x0202); |
1880 | remove_ctl(card,"Front Playback Volume"); | ||
1881 | remove_ctl(card,"Front Playback Switch"); | ||
1882 | } | 1882 | } |
1883 | /* remove unused AC97 controls */ | 1883 | /* remove unused AC97 controls */ |
1884 | snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202); | 1884 | snd_ac97_write_cache(emu->ac97, AC97_SURROUND_MASTER, 0x0202); |
@@ -1913,6 +1913,12 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
1913 | for (; *c; c += 2) | 1913 | for (; *c; c += 2) |
1914 | rename_ctl(card, c[0], c[1]); | 1914 | rename_ctl(card, c[0], c[1]); |
1915 | 1915 | ||
1916 | if (emu->card_capabilities->subsystem == 0x80401102) { /* SB Live! Platinum CT4760P */ | ||
1917 | remove_ctl(card, "Center Playback Volume"); | ||
1918 | remove_ctl(card, "LFE Playback Volume"); | ||
1919 | remove_ctl(card, "Wave Center Playback Volume"); | ||
1920 | remove_ctl(card, "Wave LFE Playback Volume"); | ||
1921 | } | ||
1916 | if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */ | 1922 | if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */ |
1917 | rename_ctl(card, "Line2 Capture Volume", "Line1/Mic Capture Volume"); | 1923 | rename_ctl(card, "Line2 Capture Volume", "Line1/Mic Capture Volume"); |
1918 | rename_ctl(card, "Analog Mix Capture Volume", "Line2 Capture Volume"); | 1924 | rename_ctl(card, "Analog Mix Capture Volume", "Line2 Capture Volume"); |