diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-29 11:42:14 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-29 11:42:14 +0300 |
commit | 225068ab274dbd5c3a43fd80a6d553ccdf7b2c6f (patch) | |
tree | b9832b957377c6bfe5c6bce56b29a2eff03f3072 /sound/pci/hda/patch_cirrus.c | |
parent | 984a8547052711867332eeaec4141755fc040553 (diff) | |
download | linux-225068ab274dbd5c3a43fd80a6d553ccdf7b2c6f.tar.xz |
ALSA: hda - Set patch_ops before calling auto-parser
... so that the parser code can overwrite some optional ops. For
Realtek and others, it can be set solely in the spec allocator, so it
results in a good code cleanup, too.
With this change, we can finally remove the local stream_pm setup and
rely on the generic parser's automatic setting.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 50e9dd675579..25ccf781fbe7 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -584,6 +584,7 @@ static int patch_cs420x(struct hda_codec *codec) if (!spec) return -ENOMEM; + codec->patch_ops = cs_patch_ops; spec->gen.automute_hook = cs_automute; codec->single_adc_amp = 1; @@ -595,8 +596,6 @@ static int patch_cs420x(struct hda_codec *codec) if (err < 0) goto error; - codec->patch_ops = cs_patch_ops; - snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); return 0; @@ -738,6 +737,7 @@ static int patch_cs4208(struct hda_codec *codec) if (!spec) return -ENOMEM; + codec->patch_ops = cs_patch_ops; spec->gen.automute_hook = cs_automute; /* exclude NID 0x10 (HP) from output volumes due to different steps */ spec->gen.out_vol_mask = 1ULL << 0x10; @@ -756,8 +756,6 @@ static int patch_cs4208(struct hda_codec *codec) if (err < 0) goto error; - codec->patch_ops = cs_patch_ops; - snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); return 0; @@ -1150,6 +1148,7 @@ static int patch_cs4210(struct hda_codec *codec) if (!spec) return -ENOMEM; + codec->patch_ops = cs421x_patch_ops; spec->gen.automute_hook = cs_automute; snd_hda_pick_fixup(codec, cs421x_models, cs421x_fixup_tbl, @@ -1167,8 +1166,6 @@ static int patch_cs4210(struct hda_codec *codec) if (err < 0) goto error; - codec->patch_ops = cs421x_patch_ops; - snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); return 0; @@ -1187,11 +1184,12 @@ static int patch_cs4213(struct hda_codec *codec) if (!spec) return -ENOMEM; + codec->patch_ops = cs421x_patch_ops; + err = cs421x_parse_auto_config(codec); if (err < 0) goto error; - codec->patch_ops = cs421x_patch_ops; return 0; error: |