summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_ca0132.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-05-29 10:42:14 +0200
committerTakashi Iwai <tiwai@suse.de>2015-05-29 10:42:14 +0200
commit225068ab274dbd5c3a43fd80a6d553ccdf7b2c6f (patch)
treeb9832b957377c6bfe5c6bce56b29a2eff03f3072 /sound/pci/hda/patch_ca0132.c
parent984a8547052711867332eeaec4141755fc040553 (diff)
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_ca0132.c')
-rw-r--r--sound/pci/hda/patch_ca0132.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 8dec790dae45..0f039abe9673 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -4709,6 +4709,10 @@ static int patch_ca0132(struct hda_codec *codec)
codec->spec = spec;
spec->codec = codec;
+ codec->patch_ops = ca0132_patch_ops;
+ codec->pcm_format_first = 1;
+ codec->no_sticky_stream = 1;
+
/* Detect codec quirk */
quirk = snd_pci_quirk_lookup(codec->bus->pci, ca0132_quirks);
if (quirk)
@@ -4737,10 +4741,6 @@ static int patch_ca0132(struct hda_codec *codec)
if (err < 0)
return err;
- codec->patch_ops = ca0132_patch_ops;
- codec->pcm_format_first = 1;
- codec->no_sticky_stream = 1;
-
return 0;
}