From patchwork Wed Aug 8 17:34:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Connor McAdams X-Patchwork-Id: 10560435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98E8D13B4 for ; Wed, 8 Aug 2018 17:36:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 826172B25D for ; Wed, 8 Aug 2018 17:36:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 768842B265; Wed, 8 Aug 2018 17:36:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C93792B25D for ; Wed, 8 Aug 2018 17:36:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4B008267942; Wed, 8 Aug 2018 19:35:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 60F39267935; Wed, 8 Aug 2018 19:35:29 +0200 (CEST) Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by alsa0.perex.cz (Postfix) with ESMTP id 53D9526791D for ; Wed, 8 Aug 2018 19:35:26 +0200 (CEST) Received: by mail-io0-f193.google.com with SMTP id q19-v6so2464064ioh.11 for ; Wed, 08 Aug 2018 10:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2MDxi8G5QCQGcY68C2MmKrPRk4/p+/VvPDub72AlCxg=; b=sOAQseuMc/Q3zCxtmdkZGNuCCocmpzguidqf7RgNmmZvDrASFYbq+gYBQ0QQz1XMUB j6XIcU1PfXIgHO5cA1CrIOvE+I8oEjucXsbokjkl6k9fBaTWOGkVM4J7zHFTGT1C574L yZV6BKBAg5UbgeBPRwBvj9p1FE5MakkliELTtXpn27fj9lKtbtWIojGG7Bnqg1eRes0o 5B7Z4nrOTvOgnKTbxvV9qkKfVBM4bQ65/ijurE4EXG/l6l9T4PiquZ8n6JqCQGQYSMHE JAUbr4P2WpHaL8NHUGVyCTkfyB2YNMv6881jqx7aNmzAEXPtQNeWP4cnLmmJ8Ii0WusM dSNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2MDxi8G5QCQGcY68C2MmKrPRk4/p+/VvPDub72AlCxg=; b=OJTJ1tpWx/Q/RTOkRAuLPwBvCCLRqJqTz5o/FXmjMiRbcn/QI/zOmUII9asvdkyk2n gHJGpiyQx4QYzqaM66/OLGrF4jd3ULA38Gglxrthk7eKfLh7b10nJv9J4ljnZygCfMjm Jc1Z8Q9BVANZRONwE9DSYLCWCHRlTBxpr2fZbJrSjbC5ZNxAPWLmPbJfNNGWz5RQa5s1 iRNq3NNbycT0Ryf1BAe8SbRZCdcDuMVg8i7/3uREYg/NAMjn5a07z0QT3eJuOdakYtuH aKW5K6BK0mkna5Bu9G3xUlhXYx8PJHe9xgubzVVZJrJmCxe+ObzoEef5dBYmOOrcQxd8 7iEA== X-Gm-Message-State: AOUpUlEnZeEQs0cPy2TAuaYv9T+wDoaS7iOXuV5lwXq+lO5hbZpUDGuM izZ2F5rtTz1lxbmexDTglCM= X-Google-Smtp-Source: AA+uWPwYZ0XsU7SlydsLzZWJCirUGvzsKdx8FSE1QnqJC8JX9Kg1uSlWpmc7ZW2Z+Ehbknvmdj39SA== X-Received: by 2002:a6b:410f:: with SMTP id n15-v6mr3065419ioa.3.1533749725286; Wed, 08 Aug 2018 10:35:25 -0700 (PDT) Received: from localhost.localdomain ([2605:a000:1316:45c1:6d6b:de32:e032:aa21]) by smtp.googlemail.com with ESMTPSA id d8-v6sm1977480itj.10.2018.08.08.10.35.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Aug 2018 10:35:24 -0700 (PDT) From: Connor McAdams To: Date: Wed, 8 Aug 2018 13:34:21 -0400 Message-Id: <1533749663-8200-11-git-send-email-conmanx360@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533749663-8200-1-git-send-email-conmanx360@gmail.com> References: <1533749663-8200-1-git-send-email-conmanx360@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Alastair Bridgewater , Takashi Iwai , Connor McAdams Subject: [alsa-devel] [PATCH 10/11] ALSA: hda/ca0132 - Change mixer controls for Recon3D X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds changes to setup the Recon3D's mixer controls. Signed-off-by: Connor McAdams --- sound/pci/hda/patch_ca0132.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 18b97df..6f288d7 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -5781,11 +5781,11 @@ static const struct snd_kcontrol_new ca0132_mixer[] = { }; /* - * SBZ specific control mixer. Removes auto-detect for mic, and adds surround - * controls. Also sets both the Front Playback and Capture Volume controls to - * alt so they set the DSP's decibel level. + * Desktop specific control mixer. Removes auto-detect for mic, and adds + * surround controls. Also sets both the Front Playback and Capture Volume + * controls to alt so they set the DSP's decibel level. */ -static const struct snd_kcontrol_new sbz_mixer[] = { +static const struct snd_kcontrol_new desktop_mixer[] = { CA0132_ALT_CODEC_VOL("Front Playback Volume", 0x02, HDA_OUTPUT), CA0132_CODEC_MUTE("Front Playback Switch", VNID_SPK, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x04, 0, HDA_OUTPUT), @@ -5856,8 +5856,8 @@ static int ca0132_build_controls(struct hda_codec *codec) */ num_fx = OUT_EFFECTS_COUNT + IN_EFFECTS_COUNT; for (i = 0; i < num_fx; i++) { - /* SBZ breaks if Echo Cancellation is used */ - if (spec->quirk == QUIRK_SBZ) { + /* SBZ and R3D break if Echo Cancellation is used. */ + if (spec->quirk == QUIRK_SBZ || spec->quirk == QUIRK_R3D) { if (i == (ECHO_CANCELLATION - IN_EFFECT_START_NID + OUT_EFFECTS_COUNT)) continue; @@ -7609,9 +7609,13 @@ static int patch_ca0132(struct hda_codec *codec) /* Set which mixers each quirk uses. */ switch (spec->quirk) { case QUIRK_SBZ: - spec->mixers[0] = sbz_mixer; + spec->mixers[0] = desktop_mixer; snd_hda_codec_set_name(codec, "Sound Blaster Z"); break; + case QUIRK_R3D: + spec->mixers[0] = desktop_mixer; + snd_hda_codec_set_name(codec, "Recon3D"); + break; case QUIRK_R3DI: spec->mixers[0] = r3di_mixer; snd_hda_codec_set_name(codec, "Recon3Di");