diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-17 12:21:36 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:41:37 -0400 |
commit | c256652466127872f1b2e510431dc25524ba40ba (patch) | |
tree | a7fcb9fb643f70eb2c6702f1a161e92312e9eecf /sound | |
parent | e05d696424f21b59eccff35d04938f0d6588cd94 (diff) |
[ALSA] Add missing TLV callbacks for HD-audio codecs
Added missing TLV callbacks for HD-audio codec supports.
Also cleaned up the tlv callback for ad1986a (no mutex is needed there).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 16 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 1 |
3 files changed, 4 insertions, 14 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 043256c67d1f..71abc2aa61a6 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -452,19 +452,6 @@ static int ad1986a_pcm_amp_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl | |||
452 | return change; | 452 | return change; |
453 | } | 453 | } |
454 | 454 | ||
455 | static int ad1986a_pcm_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, | ||
456 | unsigned int size, unsigned int __user *_tlv) | ||
457 | { | ||
458 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
459 | struct ad198x_spec *ad = codec->spec; | ||
460 | |||
461 | mutex_lock(&ad->amp_mutex); | ||
462 | snd_hda_mixer_amp_tlv(kcontrol, op_flag, size, _tlv); | ||
463 | mutex_unlock(&ad->amp_mutex); | ||
464 | return 0; | ||
465 | } | ||
466 | |||
467 | |||
468 | #define ad1986a_pcm_amp_sw_info snd_hda_mixer_amp_switch_info | 455 | #define ad1986a_pcm_amp_sw_info snd_hda_mixer_amp_switch_info |
469 | 456 | ||
470 | static int ad1986a_pcm_amp_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 457 | static int ad1986a_pcm_amp_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
@@ -507,7 +494,7 @@ static struct snd_kcontrol_new ad1986a_mixers[] = { | |||
507 | .info = ad1986a_pcm_amp_vol_info, | 494 | .info = ad1986a_pcm_amp_vol_info, |
508 | .get = ad1986a_pcm_amp_vol_get, | 495 | .get = ad1986a_pcm_amp_vol_get, |
509 | .put = ad1986a_pcm_amp_vol_put, | 496 | .put = ad1986a_pcm_amp_vol_put, |
510 | .tlv = { .c = ad1986a_pcm_amp_tlv }, | 497 | .tlv = { .c = snd_hda_mixer_amp_tlv }, |
511 | .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT) | 498 | .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT) |
512 | }, | 499 | }, |
513 | { | 500 | { |
@@ -654,6 +641,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { | |||
654 | .info = snd_hda_mixer_amp_volume_info, | 641 | .info = snd_hda_mixer_amp_volume_info, |
655 | .get = snd_hda_mixer_amp_volume_get, | 642 | .get = snd_hda_mixer_amp_volume_get, |
656 | .put = ad1986a_laptop_master_vol_put, | 643 | .put = ad1986a_laptop_master_vol_put, |
644 | .tlv = { .c = snd_hda_mixer_amp_tlv }, | ||
657 | .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | 645 | .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), |
658 | }, | 646 | }, |
659 | { | 647 | { |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f857e963ff45..79d361260b27 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5540,6 +5540,7 @@ static struct snd_kcontrol_new alc262_fujitsu_mixer[] = { | |||
5540 | .info = snd_hda_mixer_amp_volume_info, | 5540 | .info = snd_hda_mixer_amp_volume_info, |
5541 | .get = snd_hda_mixer_amp_volume_get, | 5541 | .get = snd_hda_mixer_amp_volume_get, |
5542 | .put = alc262_fujitsu_master_vol_put, | 5542 | .put = alc262_fujitsu_master_vol_put, |
5543 | .tlv = { .c = snd_hda_mixer_amp_tlv }, | ||
5543 | .private_value = HDA_COMPOSE_AMP_VAL(0x0c, 3, 0, HDA_OUTPUT), | 5544 | .private_value = HDA_COMPOSE_AMP_VAL(0x0c, 3, 0, HDA_OUTPUT), |
5544 | }, | 5545 | }, |
5545 | { | 5546 | { |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7eaf755b014b..887b52e96ec4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1528,6 +1528,7 @@ static struct snd_kcontrol_new vaio_mixer[] = { | |||
1528 | .info = snd_hda_mixer_amp_volume_info, | 1528 | .info = snd_hda_mixer_amp_volume_info, |
1529 | .get = snd_hda_mixer_amp_volume_get, | 1529 | .get = snd_hda_mixer_amp_volume_get, |
1530 | .put = vaio_master_vol_put, | 1530 | .put = vaio_master_vol_put, |
1531 | .tlv = { .c = snd_hda_mixer_amp_tlv }, | ||
1531 | .private_value = HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | 1532 | .private_value = HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), |
1532 | }, | 1533 | }, |
1533 | { | 1534 | { |