Commit 42aa3a16 authored by Connor McAdams's avatar Connor McAdams Committed by Takashi Iwai

ALSA: hda/ca0132 - Add Recon3D input and output select commands

This patch adds commands to the alternative input and output select
commands to support the Recon3D.
Signed-off-by: default avatarConnor McAdams <conmanx360@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c986f50c
...@@ -3993,6 +3993,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec) ...@@ -3993,6 +3993,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec)
chipio_set_control_param(codec, 0x0D, 0x24); chipio_set_control_param(codec, 0x0D, 0x24);
r3di_gpio_out_set(codec, R3DI_LINE_OUT); r3di_gpio_out_set(codec, R3DI_LINE_OUT);
break; break;
case QUIRK_R3D:
chipio_set_control_param(codec, 0x0D, 0x24);
ca0132_mmio_gpio_set(codec, 1, true);
break;
} }
/* disable headphone node */ /* disable headphone node */
...@@ -4029,6 +4033,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec) ...@@ -4029,6 +4033,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec)
chipio_set_control_param(codec, 0x0D, 0x21); chipio_set_control_param(codec, 0x0D, 0x21);
r3di_gpio_out_set(codec, R3DI_HEADPHONE_OUT); r3di_gpio_out_set(codec, R3DI_HEADPHONE_OUT);
break; break;
case QUIRK_R3D:
chipio_set_control_param(codec, 0x0D, 0x21);
ca0132_mmio_gpio_set(codec, 0x1, false);
break;
} }
snd_hda_codec_write(codec, spec->out_pins[0], 0, snd_hda_codec_write(codec, spec->out_pins[0], 0,
...@@ -4071,6 +4079,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec) ...@@ -4071,6 +4079,10 @@ static int ca0132_alt_select_out(struct hda_codec *codec)
chipio_set_control_param(codec, 0x0D, 0x24); chipio_set_control_param(codec, 0x0D, 0x24);
r3di_gpio_out_set(codec, R3DI_LINE_OUT); r3di_gpio_out_set(codec, R3DI_LINE_OUT);
break; break;
case QUIRK_R3D:
ca0132_mmio_gpio_set(codec, 1, true);
chipio_set_control_param(codec, 0x0D, 0x24);
break;
} }
/* enable line out node */ /* enable line out node */
pin_ctl = snd_hda_codec_read(codec, spec->out_pins[0], 0, pin_ctl = snd_hda_codec_read(codec, spec->out_pins[0], 0,
...@@ -4328,6 +4340,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ...@@ -4328,6 +4340,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
case REAR_MIC: case REAR_MIC:
switch (spec->quirk) { switch (spec->quirk) {
case QUIRK_SBZ: case QUIRK_SBZ:
case QUIRK_R3D:
ca0132_mmio_gpio_set(codec, 0, false); ca0132_mmio_gpio_set(codec, 0, false);
tmp = FLOAT_THREE; tmp = FLOAT_THREE;
break; break;
...@@ -4360,6 +4373,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ...@@ -4360,6 +4373,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
ca0132_mic_boost_set(codec, 0); ca0132_mic_boost_set(codec, 0);
switch (spec->quirk) { switch (spec->quirk) {
case QUIRK_SBZ: case QUIRK_SBZ:
case QUIRK_R3D:
ca0132_mmio_gpio_set(codec, 0, false); ca0132_mmio_gpio_set(codec, 0, false);
break; break;
case QUIRK_R3DI: case QUIRK_R3DI:
...@@ -4386,6 +4400,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ...@@ -4386,6 +4400,7 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
case FRONT_MIC: case FRONT_MIC:
switch (spec->quirk) { switch (spec->quirk) {
case QUIRK_SBZ: case QUIRK_SBZ:
case QUIRK_R3D:
ca0132_mmio_gpio_set(codec, 0, true); ca0132_mmio_gpio_set(codec, 0, true);
ca0132_mmio_gpio_set(codec, 5, false); ca0132_mmio_gpio_set(codec, 5, false);
tmp = FLOAT_THREE; tmp = FLOAT_THREE;
......
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