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

ALSA: hda/ca0132 - Add ZxR input/output select commands

This patch adds commands for selecting input and output on the Sound
Blaster ZxR. The ZxR has no front panel header, and has line-in on the
separate daughter board, so it only does rear-mic.
Signed-off-by: default avatarConnor McAdams <conmanx360@gmail.com>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c25c73e0
...@@ -4174,6 +4174,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ...@@ -4174,6 +4174,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec)
ca0113_mmio_gpio_set(codec, 1, true); ca0113_mmio_gpio_set(codec, 1, true);
chipio_set_control_param(codec, 0x0d, 0x18); chipio_set_control_param(codec, 0x0d, 0x18);
break; break;
case QUIRK_ZXR:
ca0113_mmio_gpio_set(codec, 2, true);
ca0113_mmio_gpio_set(codec, 3, true);
ca0113_mmio_gpio_set(codec, 5, false);
chipio_set_control_param(codec, 0x0d, 0x24);
break;
case QUIRK_R3DI: case QUIRK_R3DI:
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);
...@@ -4201,6 +4207,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ...@@ -4201,6 +4207,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec)
ca0113_mmio_gpio_set(codec, 1, false); ca0113_mmio_gpio_set(codec, 1, false);
chipio_set_control_param(codec, 0x0d, 0x12); chipio_set_control_param(codec, 0x0d, 0x12);
break; break;
case QUIRK_ZXR:
ca0113_mmio_gpio_set(codec, 2, false);
ca0113_mmio_gpio_set(codec, 3, false);
ca0113_mmio_gpio_set(codec, 5, true);
chipio_set_control_param(codec, 0x0d, 0x21);
break;
case QUIRK_R3DI: case QUIRK_R3DI:
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);
...@@ -4229,6 +4241,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ...@@ -4229,6 +4241,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec)
ca0113_mmio_gpio_set(codec, 1, true); ca0113_mmio_gpio_set(codec, 1, true);
chipio_set_control_param(codec, 0x0d, 0x18); chipio_set_control_param(codec, 0x0d, 0x18);
break; break;
case QUIRK_ZXR:
ca0113_mmio_gpio_set(codec, 2, true);
ca0113_mmio_gpio_set(codec, 3, true);
ca0113_mmio_gpio_set(codec, 5, false);
chipio_set_control_param(codec, 0x0d, 0x24);
break;
case QUIRK_R3DI: case QUIRK_R3DI:
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);
...@@ -4625,6 +4643,9 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ...@@ -4625,6 +4643,9 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
ca0113_mmio_gpio_set(codec, 0, false); ca0113_mmio_gpio_set(codec, 0, false);
tmp = FLOAT_THREE; tmp = FLOAT_THREE;
break; break;
case QUIRK_ZXR:
tmp = FLOAT_THREE;
break;
case QUIRK_R3DI: case QUIRK_R3DI:
r3di_gpio_mic_set(codec, R3DI_REAR_MIC); r3di_gpio_mic_set(codec, R3DI_REAR_MIC);
tmp = FLOAT_ONE; tmp = FLOAT_ONE;
...@@ -4652,6 +4673,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ...@@ -4652,6 +4673,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
chipio_write(codec, 0x18B098, 0x0000000C); chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x0000000C); chipio_write(codec, 0x18B09C, 0x0000000C);
break; break;
case QUIRK_ZXR:
chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x000000CC);
break;
case QUIRK_AE5: case QUIRK_AE5:
chipio_write(codec, 0x18B098, 0x0000000C); chipio_write(codec, 0x18B098, 0x0000000C);
chipio_write(codec, 0x18B09C, 0x0000004C); chipio_write(codec, 0x18B09C, 0x0000004C);
......
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