aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_local.h8
-rw-r--r--sound/pci/hda/patch_via.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 29ed7d9b27e4..2e7493ef8ee0 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -562,6 +562,14 @@ static inline unsigned int get_wcaps_channels(u32 wcaps)
562 return chans; 562 return chans;
563} 563}
564 564
565static inline void snd_hda_override_wcaps(struct hda_codec *codec,
566 hda_nid_t nid, u32 val)
567{
568 if (nid >= codec->start_nid &&
569 nid < codec->start_nid + codec->num_nodes)
570 codec->wcaps[nid - codec->start_nid] = val;
571}
572
565u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction); 573u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction);
566int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, 574int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
567 unsigned int caps); 575 unsigned int caps);
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e5245544eb52..aed19c3f8466 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -910,6 +910,8 @@ static const struct hda_verb vt1708S_init_verbs[] = {
910static void override_mic_boost(struct hda_codec *codec, hda_nid_t pin, 910static void override_mic_boost(struct hda_codec *codec, hda_nid_t pin,
911 int offset, int num_steps, int step_size) 911 int offset, int num_steps, int step_size)
912{ 912{
913 snd_hda_override_wcaps(codec, pin,
914 get_wcaps(codec, pin) | AC_WCAP_IN_AMP);
913 snd_hda_override_amp_caps(codec, pin, HDA_INPUT, 915 snd_hda_override_amp_caps(codec, pin, HDA_INPUT,
914 (offset << AC_AMPCAP_OFFSET_SHIFT) | 916 (offset << AC_AMPCAP_OFFSET_SHIFT) |
915 (num_steps << AC_AMPCAP_NUM_STEPS_SHIFT) | 917 (num_steps << AC_AMPCAP_NUM_STEPS_SHIFT) |