diff options
author | Matthew Ranostay <mranostay@embeddedalley.com> | 2009-01-26 09:33:52 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-01-26 10:50:26 -0500 |
commit | ca8d33fc9fafe373362d35107f01fba1e73fb966 (patch) | |
tree | 5bcdbc3e5bd96717e333c5d8d38d37fec77ed20a | |
parent | 70040c07402ef5a3fad2133daffb7ee61b0d4641 (diff) |
ALSA: hda: 92hd71xxx disable unmute support for codecs that don't have input amps
Some revisions of the 92hd71xxx codec families don't have input amps
on ports 0xa, 0xd and 0xf, so probe the widget caps on port 0xa and
check for support, if found run snd_hda_sequence_write_cache() on the
stac92hd71xxx_unmute_core_init verb list.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 80a4c288b31..03b26426611 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -858,26 +858,25 @@ static struct hda_verb stac92hd83xxx_core_init[] = { | |||
858 | static struct hda_verb stac92hd71bxx_core_init[] = { | 858 | static struct hda_verb stac92hd71bxx_core_init[] = { |
859 | /* set master volume and direct control */ | 859 | /* set master volume and direct control */ |
860 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 860 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
861 | /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ | ||
862 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
863 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
864 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
865 | {} | 861 | {} |
866 | }; | 862 | }; |
867 | 863 | ||
868 | #define HD_DISABLE_PORTF 2 | 864 | #define HD_DISABLE_PORTF 1 |
869 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { | 865 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { |
870 | /* start of config #1 */ | 866 | /* start of config #1 */ |
871 | 867 | ||
872 | /* connect port 0f to audio mixer */ | 868 | /* connect port 0f to audio mixer */ |
873 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, | 869 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, |
874 | /* unmute right and left channels for node 0x0f */ | ||
875 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
876 | /* start of config #2 */ | 870 | /* start of config #2 */ |
877 | 871 | ||
878 | /* set master volume and direct control */ | 872 | /* set master volume and direct control */ |
879 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 873 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
880 | /* unmute right and left channels for nodes 0x0a, 0xd */ | 874 | {} |
875 | }; | ||
876 | |||
877 | static struct hda_verb stac92hd71bxx_unmute_core_init[] = { | ||
878 | /* unmute right and left channels for nodes 0x0f, 0xa, 0x0d */ | ||
879 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
881 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 880 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
882 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 881 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
883 | {} | 882 | {} |
@@ -4942,6 +4941,7 @@ static struct hda_input_mux stac92hd71bxx_dmux = { | |||
4942 | static int patch_stac92hd71bxx(struct hda_codec *codec) | 4941 | static int patch_stac92hd71bxx(struct hda_codec *codec) |
4943 | { | 4942 | { |
4944 | struct sigmatel_spec *spec; | 4943 | struct sigmatel_spec *spec; |
4944 | struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init; | ||
4945 | int err = 0; | 4945 | int err = 0; |
4946 | 4946 | ||
4947 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 4947 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
@@ -5015,6 +5015,7 @@ again: | |||
5015 | 5015 | ||
5016 | /* disable VSW */ | 5016 | /* disable VSW */ |
5017 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; | 5017 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; |
5018 | unmute_init++; | ||
5018 | stac_change_pin_config(codec, 0xf, 0x40f000f0); | 5019 | stac_change_pin_config(codec, 0xf, 0x40f000f0); |
5019 | break; | 5020 | break; |
5020 | case 0x111d7603: /* 6 Port with Analog Mixer */ | 5021 | case 0x111d7603: /* 6 Port with Analog Mixer */ |
@@ -5031,6 +5032,9 @@ again: | |||
5031 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 5032 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
5032 | } | 5033 | } |
5033 | 5034 | ||
5035 | if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) | ||
5036 | snd_hda_sequence_write_cache(codec, unmute_init); | ||
5037 | |||
5034 | spec->aloopback_mask = 0x50; | 5038 | spec->aloopback_mask = 0x50; |
5035 | spec->aloopback_shift = 0; | 5039 | spec->aloopback_shift = 0; |
5036 | 5040 | ||