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

ALSA: hda/ca0132 - Add input selection commands for AE-5

This patch adds the input selection commands for the Sound BlasterX
AE-5.
Signed-off-by: default avatarConnor McAdams <conmanx360@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2283c85b
......@@ -4523,6 +4523,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
r3di_gpio_mic_set(codec, R3DI_REAR_MIC);
tmp = FLOAT_ONE;
break;
case QUIRK_AE5:
ca0113_mmio_command_set(codec, 0x48, 0x28, 0x00);
tmp = FLOAT_THREE;
break;
default:
tmp = FLOAT_ONE;
break;
......@@ -4537,10 +4541,15 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
chipio_set_stream_control(codec, 0x03, 1);
chipio_set_stream_control(codec, 0x04, 1);
if (spec->quirk == QUIRK_SBZ) {
switch (spec->quirk) {
case QUIRK_SBZ:
chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x0000000C);
break;
case QUIRK_AE5:
chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x0000004C);
break;
}
ca0132_alt_mic_boost_set(codec, spec->mic_boost_enum_val);
break;
......@@ -4554,6 +4563,9 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
case QUIRK_R3DI:
r3di_gpio_mic_set(codec, R3DI_REAR_MIC);
break;
case QUIRK_AE5:
ca0113_mmio_command_set(codec, 0x48, 0x28, 0x00);
break;
}
chipio_set_conn_rate(codec, MEM_CONNID_MICIN1, SR_96_000);
......@@ -4564,11 +4576,13 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
tmp = FLOAT_ZERO;
dspio_set_uint_param(codec, 0x80, 0x00, tmp);
if (spec->quirk == QUIRK_SBZ) {
switch (spec->quirk) {
case QUIRK_SBZ:
case QUIRK_AE5:
chipio_write(codec, 0x18B098, 0x00000000);
chipio_write(codec, 0x18B09C, 0x00000000);
break;
}
chipio_set_stream_control(codec, 0x03, 1);
chipio_set_stream_control(codec, 0x04, 1);
break;
......@@ -4584,6 +4598,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
r3di_gpio_mic_set(codec, R3DI_FRONT_MIC);
tmp = FLOAT_ONE;
break;
case QUIRK_AE5:
ca0113_mmio_command_set(codec, 0x48, 0x28, 0x3f);
tmp = FLOAT_THREE;
break;
default:
tmp = FLOAT_ONE;
break;
......@@ -4599,9 +4617,15 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
chipio_set_stream_control(codec, 0x03, 1);
chipio_set_stream_control(codec, 0x04, 1);
if (spec->quirk == QUIRK_SBZ) {
switch (spec->quirk) {
case QUIRK_SBZ:
chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x000000CC);
break;
case QUIRK_AE5:
chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x0000004C);
break;
}
ca0132_alt_mic_boost_set(codec, spec->mic_boost_enum_val);
break;
......@@ -4610,7 +4634,6 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
snd_hda_power_down_pm(codec);
return 0;
}
/*
......
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