Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Clean up patch_ca0132()
Browse files Browse the repository at this point in the history
This patch cleans up the patch_ca0132() function with suggestions from
Takashi Sakamoto.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Connor McAdams authored and Takashi Iwai committed Oct 9, 2018
1 parent a88bcc8 commit ebabde1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -8697,10 +8697,6 @@ 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)
Expand All @@ -8711,6 +8707,15 @@ static int patch_ca0132(struct hda_codec *codec)
if (spec->quirk == QUIRK_SBZ)
sbz_detect_quirk(codec);

if (spec->quirk == QUIRK_ZXR_DBPRO)
codec->patch_ops = dbpro_patch_ops;
else
codec->patch_ops = ca0132_patch_ops;

codec->pcm_format_first = 1;
codec->no_sticky_stream = 1;


spec->dsp_state = DSP_DOWNLOAD_INIT;
spec->num_mixers = 1;

Expand All @@ -8725,7 +8730,6 @@ static int patch_ca0132(struct hda_codec *codec)
snd_hda_codec_set_name(codec, "Sound Blaster ZxR");
break;
case QUIRK_ZXR_DBPRO:
codec->patch_ops = dbpro_patch_ops;
break;
case QUIRK_R3D:
spec->mixers[0] = desktop_mixer;
Expand Down

0 comments on commit ebabde1

Please sign in to comment.