ALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Aug 2015 06:52:55 +0000 (08:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 25 Aug 2015 06:52:55 +0000 (08:52 +0200)
In the commit [fa4f18b4f402: ALSA: hda - Refresh widgets sysfs at
probing Haswell+ HDMI codecs], snd_hdac_refresh_widget_sysfs() is
explicitly called in the codec driver.  But this results in refreshing
twice, as snd_hdac_refresh_widget_sysfs() itself calls
snd_hdac_refresh_widgets() function.

Instead, we can replace the call in snd_hda_codec_update_widgets()
with snd_hdac_refresh_widget_sysfs().  This also fixes the missing
sysfs update for ca0132, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_hdmi.c

index 792948418cf077d97b3816ba67f2fd79010246c5..2c021911f88a9f597c7dc4f2f810c5102b25bed3 100644 (file)
@@ -955,7 +955,7 @@ int snd_hda_codec_update_widgets(struct hda_codec *codec)
        hda_nid_t fg;
        int err;
 
-       err = snd_hdac_refresh_widgets(&codec->core);
+       err = snd_hdac_refresh_widget_sysfs(&codec->core);
        if (err < 0)
                return err;
 
index df982fc6a872e67e3ad107d0474ca11bc407c10f..a97db5fc8a151aa43c0c99edc6ccf7efc0eaa52a 100644 (file)
@@ -2331,7 +2331,6 @@ static int patch_generic_hdmi(struct hda_codec *codec)
        if (is_haswell_plus(codec)) {
                intel_haswell_enable_all_pins(codec, true);
                intel_haswell_fixup_enable_dp12(codec);
-               snd_hdac_refresh_widget_sysfs(&codec->core);
        }
 
        /* For Valleyview/Cherryview, only the display codec is in the display