Commit d97420d2 authored by Connor McAdams's avatar Connor McAdams Committed by Takashi Iwai

ALSA: hda/ca0132 - Clean up ca0132_init function.

This patch cleans up ca0132_init by removing unnecessary commands and
ordering things better.
Signed-off-by: default avatarConnor McAdams <conmanx360@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a62e4739
...@@ -7249,14 +7249,12 @@ static int ca0132_init(struct hda_codec *codec) ...@@ -7249,14 +7249,12 @@ static int ca0132_init(struct hda_codec *codec)
ca0132_refresh_widget_caps(codec); ca0132_refresh_widget_caps(codec);
if (spec->quirk == QUIRK_SBZ)
ca0132_mmio_gpio_set(codec, 7, true);
switch (spec->quirk) { switch (spec->quirk) {
case QUIRK_R3DI: case QUIRK_R3DI:
r3di_setup_defaults(codec); r3di_setup_defaults(codec);
break; break;
case QUIRK_SBZ: case QUIRK_SBZ:
sbz_setup_defaults(codec);
break; break;
default: default:
ca0132_setup_defaults(codec); ca0132_setup_defaults(codec);
...@@ -7287,20 +7285,12 @@ static int ca0132_init(struct hda_codec *codec) ...@@ -7287,20 +7285,12 @@ static int ca0132_init(struct hda_codec *codec)
ca0132_gpio_setup(codec); ca0132_gpio_setup(codec);
snd_hda_sequence_write(codec, spec->spec_init_verbs); snd_hda_sequence_write(codec, spec->spec_init_verbs);
switch (spec->quirk) { if (spec->use_alt_functions) {
case QUIRK_SBZ:
sbz_setup_defaults(codec);
ca0132_alt_select_out(codec);
ca0132_alt_select_in(codec);
break;
case QUIRK_R3DI:
ca0132_alt_select_out(codec); ca0132_alt_select_out(codec);
ca0132_alt_select_in(codec); ca0132_alt_select_in(codec);
break; } else {
default:
ca0132_select_out(codec); ca0132_select_out(codec);
ca0132_select_mic(codec); ca0132_select_mic(codec);
break;
} }
snd_hda_jack_report_sync(codec); snd_hda_jack_report_sync(codec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment