mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Connor McAdams <conmanx360@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: conmanx360@gmail.com, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Alastair Bridgewater <alastair.bridgewater@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH 04/11] ALSA: hda/ca0132 - Add ZxR pincfg
Date: Sat, 29 Sep 2018 23:03:19 -0400	[thread overview]
Message-ID: <1538276607-30234-5-git-send-email-conmanx360@gmail.com> (raw)
In-Reply-To: <1538276607-30234-1-git-send-email-conmanx360@gmail.com>

This patch adds a pincfg for the ZxR, and defines which pins are used
for both.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
---
 sound/pci/hda/patch_ca0132.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 08dd85d..4d23eb9 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -1107,6 +1107,21 @@ static const struct hda_pintbl sbz_pincfgs[] = {
 	{}
 };
 
+/* Sound Blaster ZxR pin configs taken from Windows Driver */
+static const struct hda_pintbl zxr_pincfgs[] = {
+	{ 0x0b, 0x01047110 }, /* Port G -- Lineout FRONT L/R */
+	{ 0x0c, 0x414510f0 }, /* SPDIF Out 1 - Disabled*/
+	{ 0x0d, 0x014510f0 }, /* Digital Out */
+	{ 0x0e, 0x41c520f0 }, /* SPDIF In - Disabled*/
+	{ 0x0f, 0x0122711f }, /* Port A -- BackPanel HP */
+	{ 0x10, 0x01017111 }, /* Port D -- Center/LFE */
+	{ 0x11, 0x01017114 }, /* Port B -- LineMicIn2 / Rear L/R */
+	{ 0x12, 0x01a271f0 }, /* Port C -- LineIn1 */
+	{ 0x13, 0x908700f0 }, /* What U Hear In*/
+	{ 0x18, 0x50d000f0 }, /* N/A */
+	{}
+};
+
 /* Recon3D pin configs taken from Windows Driver */
 static const struct hda_pintbl r3d_pincfgs[] = {
 	{ 0x0b, 0x01014110 }, /* Port G -- Lineout FRONT L/R */
@@ -8202,6 +8217,10 @@ static void ca0132_config(struct hda_codec *codec)
 		codec_dbg(codec, "%s: QUIRK_SBZ applied.\n", __func__);
 		snd_hda_apply_pincfgs(codec, sbz_pincfgs);
 		break;
+	case QUIRK_ZXR:
+		codec_dbg(codec, "%s: QUIRK_ZXR applied.\n", __func__);
+		snd_hda_apply_pincfgs(codec, zxr_pincfgs);
+		break;
 	case QUIRK_R3D:
 		codec_dbg(codec, "%s: QUIRK_R3D applied.\n", __func__);
 		snd_hda_apply_pincfgs(codec, r3d_pincfgs);
@@ -8261,6 +8280,37 @@ static void ca0132_config(struct hda_codec *codec)
 		spec->multiout.dig_out_nid = spec->dig_out;
 		spec->dig_in = 0x09;
 		break;
+	case QUIRK_ZXR:
+		spec->num_outputs = 2;
+		spec->out_pins[0] = 0x0B; /* Line out */
+		spec->out_pins[1] = 0x0F; /* Rear headphone out */
+		spec->out_pins[2] = 0x10; /* Center/LFE */
+		spec->out_pins[3] = 0x11; /* Rear surround */
+		spec->shared_out_nid = 0x2;
+		spec->unsol_tag_hp = spec->out_pins[1];
+		spec->unsol_tag_front_hp = spec->out_pins[2];
+
+		spec->adcs[0] = 0x7; /* Rear Mic / Line-in */
+		spec->adcs[1] = 0x8; /* Not connected, no front mic */
+		spec->adcs[2] = 0xa; /* what u hear */
+
+		spec->num_inputs = 2;
+		spec->input_pins[0] = 0x12; /* Rear Mic / Line-in */
+		spec->input_pins[1] = 0x13; /* What U Hear */
+		spec->shared_mic_nid = 0x7;
+		spec->unsol_tag_amic1 = spec->input_pins[0];
+		break;
+	case QUIRK_ZXR_DBPRO:
+		spec->adcs[0] = 0x8; /* ZxR DBPro Aux In */
+
+		spec->num_inputs = 1;
+		spec->input_pins[0] = 0x11; /* RCA Line-in */
+
+		spec->dig_out = 0x05;
+		spec->multiout.dig_out_nid = spec->dig_out;
+
+		spec->dig_in = 0x09;
+		break;
 	case QUIRK_AE5:
 		spec->num_outputs = 2;
 		spec->out_pins[0] = 0x0B; /* Line out */
-- 
2.7.4


  parent reply	other threads:[~2018-09-30  3:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30  3:03 [PATCH 00/11] Add ZxR support + bugfixes Connor McAdams
2018-09-30  3:03 ` [PATCH 01/11] ALSA: hda/ca0132 - Fix AE-5 control type Connor McAdams
2018-09-30  3:03 ` [PATCH 02/11] ALSA: hda/ca0132 - Fix surround sound with output effects Connor McAdams
2018-09-30  3:03 ` [PATCH 03/11] ALSA: hda/ca0132 - Add ZxR quirks + new quirk check function Connor McAdams
2018-09-30  3:03 ` Connor McAdams [this message]
2018-09-30  3:03 ` [PATCH 05/11] ALSA: hda/ca0132 - Add DBpro hda_codec_ops Connor McAdams
2018-10-01  2:10   ` Takashi Sakamoto
2018-09-30  3:03 ` [PATCH 06/11] ALSA: hda/ca0132 - Add ZxR init commands Connor McAdams
2018-09-30  3:03 ` [PATCH 07/11] ALSA: hda/ca0132 - Add ZxR DSP post-download commands Connor McAdams
2018-09-30  3:03 ` [PATCH 08/11] ALSA: hda/ca0132 - Add ZxR input/output select commands Connor McAdams
2018-09-30  3:03 ` [PATCH 09/11] ALSA: hda/ca0132 - Remove input select enum for ZxR Connor McAdams
2018-09-30  3:03 ` [PATCH 10/11] ALSA: hda/ca0132 - Add ZxR 600 ohm gain control Connor McAdams
2018-10-01  2:22   ` Takashi Sakamoto
2018-09-30  3:03 ` [PATCH 11/11] ALSA: hda/ca0132 - Add ZxR exit commands Connor McAdams
2018-10-01 14:03 ` [PATCH 00/11] Add ZxR support + bugfixes Takashi Sakamoto
2018-10-02 15:23 ` Takashi Iwai
2018-10-07 17:05   ` Connor McAdams
2018-10-08 15:10     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538276607-30234-5-git-send-email-conmanx360@gmail.com \
    --to=conmanx360@gmail.com \
    --cc=alastair.bridgewater@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome