From patchwork Sun Sep 30 03:03:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Connor McAdams X-Patchwork-Id: 10621129 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 E6D5C14BD for ; Sun, 30 Sep 2018 03:05:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5E1527EE2 for ; Sun, 30 Sep 2018 03:05:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA34827F85; Sun, 30 Sep 2018 03:05:23 +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.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 2B43527EE2 for ; Sun, 30 Sep 2018 03:05:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7BB8B267914; Sun, 30 Sep 2018 05:04:30 +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 B11ED26790E; Sun, 30 Sep 2018 05:04:25 +0200 (CEST) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by alsa0.perex.cz (Postfix) with ESMTP id 50C7E267902 for ; Sun, 30 Sep 2018 05:04:23 +0200 (CEST) Received: by mail-qk1-f195.google.com with SMTP id q12-v6so6152316qkl.13 for ; Sat, 29 Sep 2018 20:04:23 -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=lERNvumT98Bur5b4QVUwEDMXhuGofhPHyhmkm5ocxbo=; b=I6rBptCBt4uMnEzA372f6fa5Hsj2d1VE9mTkGSoyOVKG2zsSOcHpdv18Gs6qspecki Ir0a4Ei6ouFRZ4eoySonxZ1et0snKgCssXOWjH7Lywk4c8BjODB9ZAeVNggk1qKexOOq f90GLP9WN8o3DWqai3lUiylSTBa73xBHjnVexC06mIgM/SThZM8KUf58KWTct/vt+zuM nV8glMdx/6KgEjf5RgEnwjzs2KdbmiIz/eP2bQJXkhSgeFWtt3d9IebUXI5dDBntFud2 nc3qVFaQledO55aOrqVHf9fDVxoY8fjwGXaOafradLOu7jxp6sJXhn7Yj/h28QG67Hgk tLVw== 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=lERNvumT98Bur5b4QVUwEDMXhuGofhPHyhmkm5ocxbo=; b=ErmtlguqqFTP4KPSCGzGX/vz65otsQlS/HDL8UP59yXh2wA/wjozVsACy/DfN1tIGl kaevloSj+wt8iUhPZEd1gxUfHaK7J+p0WfiJjvSGL4mv+Ve5nowjTEVqOva1nlCxP0N3 2B59ora026jpJt4ZDZ2nVhp+x/PVSmpkrGh7ua9MPBBdehKzOGEOYFY8UQA4EAFbgEvg o5A/+bigCFSOXa0/hpCGI3FljpPbFDC3EgN3a9euQ2XXOqQav3iNO2kwFKn2KijmJgxp 0AR+g+BVkhKXD9uDb+cb/2Uy+GiOHkmKCz9S3k06GIS5nUL2emA3iF7R+7ppeLw3ghjz tY+w== X-Gm-Message-State: ABuFfojlJjAVJIYj09UV2/Dobo350HoiO7MbzMBvdjRrme/Q3DkREZ9f Ke8XjCZFrTNphn3aK0y8WUA= X-Google-Smtp-Source: ACcGV60Bth4Ht6/qWVKd9w9Lu9xJ7LglTEhJT+d0d0u4cJnPqHh2oAyk6ZDB0N5ByB/IcZc5lPC4NQ== X-Received: by 2002:a37:f8c:: with SMTP id 12-v6mr3972916qkp.224.1538276662775; Sat, 29 Sep 2018 20:04:22 -0700 (PDT) Received: from localhost.localdomain ([2605:a000:1316:4273:6520:8440:55b8:a001]) by smtp.googlemail.com with ESMTPSA id p1-v6sm4782028qkg.82.2018.09.29.20.04.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 29 Sep 2018 20:04:22 -0700 (PDT) From: Connor McAdams To: Date: Sat, 29 Sep 2018 23:03:24 -0400 Message-Id: <1538276607-30234-10-git-send-email-conmanx360@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538276607-30234-1-git-send-email-conmanx360@gmail.com> References: <1538276607-30234-1-git-send-email-conmanx360@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Alastair Bridgewater , Takashi Iwai , conmanx360@gmail.com Subject: [alsa-devel] [PATCH 09/11] ALSA: hda/ca0132 - Remove input select enum for ZxR 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 removes the input select control for the ZxR, as it only has one input option, rear microphone. Signed-off-by: Connor McAdams --- sound/pci/hda/patch_ca0132.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index bc8745f..f0781e4 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -6402,8 +6402,13 @@ static int ca0132_build_controls(struct hda_codec *codec) */ if (spec->use_alt_functions) { ca0132_alt_add_output_enum(codec); - ca0132_alt_add_input_enum(codec); ca0132_alt_add_mic_boost_enum(codec); + /* + * ZxR only has microphone input, there is no front panel + * header on the card, and aux-in is handled by the DBPro board. + */ + if (spec->quirk != QUIRK_ZXR) + ca0132_alt_add_input_enum(codec); } if (spec->quirk == QUIRK_AE5) { @@ -7665,6 +7670,14 @@ static void ca0132_init_chip(struct hda_codec *codec) spec->effects_switch[PLAY_ENHANCEMENT - EFFECT_START_NID] = 1; spec->effects_switch[CRYSTAL_VOICE - EFFECT_START_NID] = 0; + /* + * The ZxR doesn't have a front panel header, and it's line-in is on + * the daughter board. So, there is no input enum control, and we need + * to make sure that spec->in_enum_val is set properly. + */ + if (spec->quirk == QUIRK_ZXR) + spec->in_enum_val = REAR_MIC; + #ifdef ENABLE_TUNING_CONTROLS ca0132_init_tuning_defaults(codec); #endif