diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-30 10:57:37 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:45:18 -0400 |
commit | f640c3205aca4fe231beccc9e719c946cf3fee7a (patch) | |
tree | 4fd4b1db6e426e2640be9eaecab71f14ab27d1cc /sound/pci/ice1712/prodigy192.c | |
parent | 680ef792a1afdb3bf38e4a0296cce996a5b95317 (diff) |
[ALSA] Add dB scale information to ice1724 driver
Added the dB scale information to each board support code of ice1724 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712/prodigy192.c')
-rw-r--r-- | sound/pci/ice1712/prodigy192.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c index fdb5cb8fac97..41b2605daa3a 100644 --- a/sound/pci/ice1712/prodigy192.c +++ b/sound/pci/ice1712/prodigy192.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "envy24ht.h" | 35 | #include "envy24ht.h" |
36 | #include "prodigy192.h" | 36 | #include "prodigy192.h" |
37 | #include "stac946x.h" | 37 | #include "stac946x.h" |
38 | #include <sound/tlv.h> | ||
38 | 39 | ||
39 | static inline void stac9460_put(struct snd_ice1712 *ice, int reg, unsigned char val) | 40 | static inline void stac9460_put(struct snd_ice1712 *ice, int reg, unsigned char val) |
40 | { | 41 | { |
@@ -356,6 +357,9 @@ static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl | |||
356 | } | 357 | } |
357 | #endif | 358 | #endif |
358 | 359 | ||
360 | static DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0); | ||
361 | static DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0); | ||
362 | |||
359 | /* | 363 | /* |
360 | * mixers | 364 | * mixers |
361 | */ | 365 | */ |
@@ -368,14 +372,18 @@ static struct snd_kcontrol_new stac_controls[] __devinitdata = { | |||
368 | .get = stac9460_dac_mute_get, | 372 | .get = stac9460_dac_mute_get, |
369 | .put = stac9460_dac_mute_put, | 373 | .put = stac9460_dac_mute_put, |
370 | .private_value = 1, | 374 | .private_value = 1, |
375 | .tlv = { .p = db_scale_dac } | ||
371 | }, | 376 | }, |
372 | { | 377 | { |
373 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 378 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
379 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
380 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
374 | .name = "Master Playback Volume", | 381 | .name = "Master Playback Volume", |
375 | .info = stac9460_dac_vol_info, | 382 | .info = stac9460_dac_vol_info, |
376 | .get = stac9460_dac_vol_get, | 383 | .get = stac9460_dac_vol_get, |
377 | .put = stac9460_dac_vol_put, | 384 | .put = stac9460_dac_vol_put, |
378 | .private_value = 1, | 385 | .private_value = 1, |
386 | .tlv = { .p = db_scale_dac } | ||
379 | }, | 387 | }, |
380 | { | 388 | { |
381 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 389 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -387,11 +395,14 @@ static struct snd_kcontrol_new stac_controls[] __devinitdata = { | |||
387 | }, | 395 | }, |
388 | { | 396 | { |
389 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 397 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
398 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
399 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
390 | .name = "DAC Volume", | 400 | .name = "DAC Volume", |
391 | .count = 6, | 401 | .count = 6, |
392 | .info = stac9460_dac_vol_info, | 402 | .info = stac9460_dac_vol_info, |
393 | .get = stac9460_dac_vol_get, | 403 | .get = stac9460_dac_vol_get, |
394 | .put = stac9460_dac_vol_put, | 404 | .put = stac9460_dac_vol_put, |
405 | .tlv = { .p = db_scale_dac } | ||
395 | }, | 406 | }, |
396 | { | 407 | { |
397 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 408 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -404,11 +415,14 @@ static struct snd_kcontrol_new stac_controls[] __devinitdata = { | |||
404 | }, | 415 | }, |
405 | { | 416 | { |
406 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 417 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
418 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
419 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
407 | .name = "ADC Volume", | 420 | .name = "ADC Volume", |
408 | .count = 1, | 421 | .count = 1, |
409 | .info = stac9460_adc_vol_info, | 422 | .info = stac9460_adc_vol_info, |
410 | .get = stac9460_adc_vol_get, | 423 | .get = stac9460_adc_vol_get, |
411 | .put = stac9460_adc_vol_put, | 424 | .put = stac9460_adc_vol_put, |
425 | .tlv = { .p = db_scale_adc } | ||
412 | }, | 426 | }, |
413 | #if 0 | 427 | #if 0 |
414 | { | 428 | { |