aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opti9xx
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2009-12-12 03:51:03 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-12 04:42:25 -0500
commite9d0a803c127e2e30afb0df780ccb3af4e2adb28 (patch)
treea3e3ad0bbd31ebb1c4f95f6d308db5723b44086d /sound/isa/opti9xx
parentb2e8d7dab9d82be3851b8cbcc1ab64b1b2575844 (diff)
ALSA: opti93x: use dB scale for mixer controls
Add dB scale for mixer controls. Fix dB scale for Master Volume control. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/opti9xx')
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index ea4a67120468..b0ea310c87de 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -547,32 +547,40 @@ __skip_mpu:
547 547
548#ifdef OPTi93X 548#ifdef OPTi93X
549 549
550static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0); 550static const DECLARE_TLV_DB_SCALE(db_scale_5bit_3db_step, -9300, 300, 0);
551static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
552static const DECLARE_TLV_DB_SCALE(db_scale_4bit_12db_max, -3300, 300, 0);
551 553
552static struct snd_kcontrol_new snd_opti93x_controls[] = { 554static struct snd_kcontrol_new snd_opti93x_controls[] = {
553WSS_DOUBLE("Master Playback Switch", 0, 555WSS_DOUBLE("Master Playback Switch", 0,
554 OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 7, 7, 1, 1), 556 OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 7, 7, 1, 1),
555WSS_DOUBLE_TLV("Master Playback Volume", 0, 557WSS_DOUBLE_TLV("Master Playback Volume", 0,
556 OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 1, 1, 31, 1, 558 OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 1, 1, 31, 1,
557 db_scale_6bit), 559 db_scale_5bit_3db_step),
558WSS_DOUBLE("PCM Playback Volume", 0, 560WSS_DOUBLE_TLV("PCM Playback Volume", 0,
559 CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 31, 1), 561 CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 31, 1,
560WSS_DOUBLE("FM Playback Volume", 0, 562 db_scale_5bit),
561 CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 1, 1, 15, 1), 563WSS_DOUBLE_TLV("FM Playback Volume", 0,
564 CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 1, 1, 15, 1,
565 db_scale_4bit_12db_max),
562WSS_DOUBLE("Line Playback Switch", 0, 566WSS_DOUBLE("Line Playback Switch", 0,
563 CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1), 567 CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1),
564WSS_DOUBLE("Line Playback Volume", 0, 568WSS_DOUBLE_TLV("Line Playback Volume", 0,
565 CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 0, 0, 15, 1), 569 CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 0, 0, 15, 1,
570 db_scale_4bit_12db_max),
566WSS_DOUBLE("Mic Playback Switch", 0, 571WSS_DOUBLE("Mic Playback Switch", 0,
567 OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 7, 7, 1, 1), 572 OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 7, 7, 1, 1),
568WSS_DOUBLE("Mic Playback Volume", 0, 573WSS_DOUBLE_TLV("Mic Playback Volume", 0,
569 OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 1, 1, 15, 1), 574 OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 1, 1, 15, 1,
570WSS_DOUBLE("CD Playback Volume", 0, 575 db_scale_4bit_12db_max),
571 CS4231_AUX1_LEFT_INPUT, CS4231_AUX1_RIGHT_INPUT, 1, 1, 15, 1), 576WSS_DOUBLE_TLV("CD Playback Volume", 0,
577 CS4231_AUX1_LEFT_INPUT, CS4231_AUX1_RIGHT_INPUT, 1, 1, 15, 1,
578 db_scale_4bit_12db_max),
572WSS_DOUBLE("Aux Playback Switch", 0, 579WSS_DOUBLE("Aux Playback Switch", 0,
573 OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 7, 7, 1, 1), 580 OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 7, 7, 1, 1),
574WSS_DOUBLE("Aux Playback Volume", 0, 581WSS_DOUBLE_TLV("Aux Playback Volume", 0,
575 OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 1, 1, 15, 1), 582 OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 1, 1, 15, 1,
583 db_scale_4bit_12db_max),
576}; 584};
577 585
578static int __devinit snd_opti93x_mixer(struct snd_wss *chip) 586static int __devinit snd_opti93x_mixer(struct snd_wss *chip)