diff options
author | Connor McAdams <conmanx360@gmail.com> | 2018-09-29 23:03:23 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-02 17:21:30 +0200 |
commit | 55845949428007841af18011128735fc8cccf0e6 (patch) | |
tree | 6d3f15f6cef47ba71fdad47e0fbbc631ec96647e /sound/pci | |
parent | c25c73e06a70765578c86569086965b61973283f (diff) | |
download | linux-55845949428007841af18011128735fc8cccf0e6.tar.bz2 |
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: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 729766a57189..bc8745f48fff 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -4174,6 +4174,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ca0113_mmio_gpio_set(codec, 1, true); chipio_set_control_param(codec, 0x0d, 0x18); 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: chipio_set_control_param(codec, 0x0d, 0x24); r3di_gpio_out_set(codec, R3DI_LINE_OUT); @@ -4201,6 +4207,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ca0113_mmio_gpio_set(codec, 1, false); chipio_set_control_param(codec, 0x0d, 0x12); 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: chipio_set_control_param(codec, 0x0d, 0x21); r3di_gpio_out_set(codec, R3DI_HEADPHONE_OUT); @@ -4229,6 +4241,12 @@ static void ca0132_alt_select_out_quirk_handler(struct hda_codec *codec) ca0113_mmio_gpio_set(codec, 1, true); chipio_set_control_param(codec, 0x0d, 0x18); 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: chipio_set_control_param(codec, 0x0d, 0x24); r3di_gpio_out_set(codec, R3DI_LINE_OUT); @@ -4625,6 +4643,9 @@ static int ca0132_alt_select_in(struct hda_codec *codec) ca0113_mmio_gpio_set(codec, 0, false); tmp = FLOAT_THREE; break; + case QUIRK_ZXR: + tmp = FLOAT_THREE; + break; case QUIRK_R3DI: r3di_gpio_mic_set(codec, R3DI_REAR_MIC); tmp = FLOAT_ONE; @@ -4652,6 +4673,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec) chipio_write(codec, 0x18B098, 0x0000000C); chipio_write(codec, 0x18B09C, 0x0000000C); break; + case QUIRK_ZXR: + chipio_write(codec, 0x18B098, 0x0000000C); + chipio_write(codec, 0x18B09C, 0x000000CC); + break; case QUIRK_AE5: chipio_write(codec, 0x18B098, 0x0000000C); chipio_write(codec, 0x18B09C, 0x0000004C); |