ALSA: hda - Set patch_ops before calling auto-parser
[deliverable/linux.git] / sound / pci / hda / patch_sigmatel.c
index 6ff92aba0f57cfcd64291acdfaaff82ed14e6ce0..bdcda6a410329aa32e246b2eb6f4ad90bd568ef5 100644 (file)
@@ -4417,6 +4417,7 @@ static int alloc_stac_spec(struct hda_codec *codec)
        codec->spec = spec;
        codec->no_trigger_sense = 1; /* seems common with STAC/IDT codecs */
        spec->gen.dac_min_mute = true;
+       codec->patch_ops = stac_patch_ops;
        return 0;
 }
 
@@ -4433,7 +4434,6 @@ static int patch_stac9200(struct hda_codec *codec)
        spec->linear_tone_beep = 1;
        spec->gen.own_eapd_ctl = 1;
 
-       codec->patch_ops = stac_patch_ops;
        codec->power_filter = snd_hda_codec_eapd_power_filter;
 
        snd_hda_add_verbs(codec, stac9200_eapd_init);
@@ -4466,8 +4466,6 @@ static int patch_stac925x(struct hda_codec *codec)
        spec->linear_tone_beep = 1;
        spec->gen.own_eapd_ctl = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_add_verbs(codec, stac925x_core_init);
 
        snd_hda_pick_fixup(codec, stac925x_models, stac925x_fixup_tbl,
@@ -4537,8 +4535,6 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
        spec->gen.own_eapd_ctl = 1;
        spec->gen.power_down_unused = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_pick_fixup(codec, stac92hd73xx_models, stac92hd73xx_fixup_tbl,
                           stac92hd73xx_fixups);
        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
@@ -4614,8 +4610,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
        spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
        spec->default_polarity = -1; /* no default cfg */
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_add_verbs(codec, stac92hd83xxx_core_init);
 
        snd_hda_pick_fixup(codec, stac92hd83xxx_models, stac92hd83xxx_fixup_tbl,
@@ -4664,8 +4658,6 @@ static int patch_stac92hd95(struct hda_codec *codec)
        spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids);
        spec->default_polarity = 0;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_pick_fixup(codec, stac92hd95_models, stac92hd95_fixup_tbl,
                           stac92hd95_fixups);
        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
@@ -4704,8 +4696,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
        spec->gen.mixer_nid = 0x17;
        spec->have_spdif_mux = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        /* GPIO0 = EAPD */
        spec->gpio_mask = 0x01;
        spec->gpio_dir = 0x01;
@@ -4784,8 +4774,6 @@ static int patch_stac922x(struct hda_codec *codec)
        spec->linear_tone_beep = 1;
        spec->gen.own_eapd_ctl = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_add_verbs(codec, stac922x_core_init);
 
        /* Fix Mux capture level; max to 2 */
@@ -4841,8 +4829,6 @@ static int patch_stac927x(struct hda_codec *codec)
        spec->aloopback_shift = 0;
        spec->eapd_switch = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_pick_fixup(codec, stac927x_models, stac927x_fixup_tbl,
                           stac927x_fixups);
        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
@@ -4904,8 +4890,6 @@ static int patch_stac9205(struct hda_codec *codec)
        /* Turn on/off EAPD per HP plugging */
        spec->eapd_switch = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_pick_fixup(codec, stac9205_models, stac9205_fixup_tbl,
                           stac9205_fixups);
        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
@@ -4977,8 +4961,6 @@ static int patch_stac9872(struct hda_codec *codec)
        spec->linear_tone_beep = 1;
        spec->gen.own_eapd_ctl = 1;
 
-       codec->patch_ops = stac_patch_ops;
-
        snd_hda_add_verbs(codec, stac9872_core_init);
 
        snd_hda_pick_fixup(codec, stac9872_models, stac9872_fixup_tbl,
This page took 0.025499 seconds and 5 git commands to generate.