Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Clean up ca0132_init function.
Browse files Browse the repository at this point in the history
This patch cleans up ca0132_init by removing unnecessary commands and
ordering things better.

Signed-off-by: Connor McAdams <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Conmanx360 authored and tiwai committed Aug 8, 2018
1 parent a62e473 commit d97420d
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -7249,14 +7249,12 @@ static int ca0132_init(struct hda_codec *codec)

ca0132_refresh_widget_caps(codec);

if (spec->quirk == QUIRK_SBZ)
ca0132_mmio_gpio_set(codec, 7, true);

switch (spec->quirk) {
case QUIRK_R3DI:
r3di_setup_defaults(codec);
break;
case QUIRK_SBZ:
sbz_setup_defaults(codec);
break;
default:
ca0132_setup_defaults(codec);
Expand Down Expand Up @@ -7287,20 +7285,12 @@ static int ca0132_init(struct hda_codec *codec)
ca0132_gpio_setup(codec);

snd_hda_sequence_write(codec, spec->spec_init_verbs);
switch (spec->quirk) {
case QUIRK_SBZ:
sbz_setup_defaults(codec);
ca0132_alt_select_out(codec);
ca0132_alt_select_in(codec);
break;
case QUIRK_R3DI:
if (spec->use_alt_functions) {
ca0132_alt_select_out(codec);
ca0132_alt_select_in(codec);
break;
default:
} else {
ca0132_select_out(codec);
ca0132_select_mic(codec);
break;
}

snd_hda_jack_report_sync(codec);
Expand Down

0 comments on commit d97420d

Please sign in to comment.