Commit 5e68fb3cab23b327e9f15803607e697d7eea1966

Authored by David Henningsson
Committed by Takashi Iwai
1 parent e9ba389c5f

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>

Showing 1 changed file with 5 additions and 4 deletions Side-by-side Diff

sound/pci/hda/patch_sigmatel.c
... ... @@ -4272,7 +4272,8 @@
4272 4272 unsigned int gpio;
4273 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 4278 /* power down adcs initially */
4278 4279 if (spec->powerdown_adcs)
... ... @@ -5748,7 +5749,6 @@
5748 5749 /* fallthru */
5749 5750 case 0x111d76b4: /* 6 Port without Analog Mixer */
5750 5751 case 0x111d76b5:
5751   - spec->init = stac92hd71bxx_core_init;
5752 5752 codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
5753 5753 spec->num_dmics = stac92xx_connected_ports(codec,
5754 5754 stac92hd71bxx_dmic_nids,
... ... @@ -5773,7 +5773,6 @@
5773 5773 spec->stream_delay = 40; /* 40 milliseconds */
5774 5774  
5775 5775 /* disable VSW */
5776   - spec->init = stac92hd71bxx_core_init;
5777 5776 unmute_init++;
5778 5777 snd_hda_codec_set_pincfg(codec, 0x0f, 0x40f000f0);
5779 5778 snd_hda_codec_set_pincfg(codec, 0x19, 0x40f000f3);
5780 5779  
... ... @@ -5788,13 +5787,15 @@
5788 5787  
5789 5788 /* fallthru */
5790 5789 default:
5791   - spec->init = stac92hd71bxx_core_init;
5792 5790 codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
5793 5791 spec->num_dmics = stac92xx_connected_ports(codec,
5794 5792 stac92hd71bxx_dmic_nids,
5795 5793 STAC92HD71BXX_NUM_DMICS);
5796 5794 break;
5797 5795 }
  5796 +
  5797 + if (get_wcaps_type(get_wcaps(codec, 0x28)) == AC_WID_VOL_KNB)
  5798 + spec->init = stac92hd71bxx_core_init;
5798 5799  
5799 5800 if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
5800 5801 snd_hda_sequence_write_cache(codec, unmute_init);