diff options
| author | David Henningsson <david.henningsson@canonical.com> | 2012-08-16 08:11:09 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-08-16 08:14:56 -0400 |
| commit | 5e68fb3cab23b327e9f15803607e697d7eea1966 (patch) | |
| tree | b1a9df94e069b24cd03c311adc579f4f4026f886 | |
| parent | e9ba389c5ffc4dd29dfe17e00e48877302111135 (diff) | |
ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx
Instead of blindly initializing a volume knob widget, first check
that there actually is a volume knob widget.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
| -rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 94040ccf8e8f..ea5775a1a7db 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -4272,7 +4272,8 @@ static int stac92xx_init(struct hda_codec *codec) | |||
| 4272 | unsigned int gpio; | 4272 | unsigned int gpio; |
| 4273 | int i; | 4273 | int i; |
| 4274 | 4274 | ||
| 4275 | snd_hda_sequence_write(codec, spec->init); | 4275 | if (spec->init) |
| 4276 | snd_hda_sequence_write(codec, spec->init); | ||
| 4276 | 4277 | ||
| 4277 | /* power down adcs initially */ | 4278 | /* power down adcs initially */ |
| 4278 | if (spec->powerdown_adcs) | 4279 | if (spec->powerdown_adcs) |
| @@ -5748,7 +5749,6 @@ again: | |||
| 5748 | /* fallthru */ | 5749 | /* fallthru */ |
| 5749 | case 0x111d76b4: /* 6 Port without Analog Mixer */ | 5750 | case 0x111d76b4: /* 6 Port without Analog Mixer */ |
| 5750 | case 0x111d76b5: | 5751 | case 0x111d76b5: |
| 5751 | spec->init = stac92hd71bxx_core_init; | ||
| 5752 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 5752 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
| 5753 | spec->num_dmics = stac92xx_connected_ports(codec, | 5753 | spec->num_dmics = stac92xx_connected_ports(codec, |
| 5754 | stac92hd71bxx_dmic_nids, | 5754 | stac92hd71bxx_dmic_nids, |
| @@ -5773,7 +5773,6 @@ again: | |||
| 5773 | spec->stream_delay = 40; /* 40 milliseconds */ | 5773 | spec->stream_delay = 40; /* 40 milliseconds */ |
| 5774 | 5774 | ||
| 5775 | /* disable VSW */ | 5775 | /* disable VSW */ |
| 5776 | spec->init = stac92hd71bxx_core_init; | ||
| 5777 | unmute_init++; | 5776 | unmute_init++; |
| 5778 | snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0); | 5777 | snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0); |
| 5779 | snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3); | 5778 | snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3); |
| @@ -5788,7 +5787,6 @@ again: | |||
| 5788 | 5787 | ||
| 5789 | /* fallthru */ | 5788 | /* fallthru */ |
| 5790 | default: | 5789 | default: |
| 5791 | spec->init = stac92hd71bxx_core_init; | ||
| 5792 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 5790 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
| 5793 | spec->num_dmics = stac92xx_connected_ports(codec, | 5791 | spec->num_dmics = stac92xx_connected_ports(codec, |
| 5794 | stac92hd71bxx_dmic_nids, | 5792 | stac92hd71bxx_dmic_nids, |
| @@ -5796,6 +5794,9 @@ again: | |||
| 5796 | break; | 5794 | break; |
| 5797 | } | 5795 | } |
| 5798 | 5796 | ||
| 5797 | if (get_wcaps_type(get_wcaps(codec, 0x28)) == AC_WID_VOL_KNB) | ||
| 5798 | spec->init = stac92hd71bxx_core_init; | ||
| 5799 | |||
| 5799 | if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) | 5800 | if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) |
| 5800 | snd_hda_sequence_write_cache(codec, unmute_init); | 5801 | snd_hda_sequence_write_cache(codec, unmute_init); |
| 5801 | 5802 | ||
