From patchwork Sun Sep 30 03:03:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Connor McAdams X-Patchwork-Id: 10621119 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 EB3F7112B for ; Sun, 30 Sep 2018 03:04:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8D8C27F82 for ; Sun, 30 Sep 2018 03:04:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9B0127EE2; Sun, 30 Sep 2018 03:04:47 +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 249C827EE2 for ; Sun, 30 Sep 2018 03:04:47 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BD1332678F6; Sun, 30 Sep 2018 05:04:19 +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 0B5DB2678F4; Sun, 30 Sep 2018 05:04:16 +0200 (CEST) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by alsa0.perex.cz (Postfix) with ESMTP id 551F92678F3 for ; Sun, 30 Sep 2018 05:04:13 +0200 (CEST) Received: by mail-qk1-f194.google.com with SMTP id c13-v6so6196385qkm.4 for ; Sat, 29 Sep 2018 20:04:12 -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=Q5P76N37fmmOIrfzPaLtOXsbuGCjX4GjBJQCYXczp3s=; b=dBKozE5bA/V/z2Vlge7xmPNkZ9TqWpGZxt9QdeqZ4tKjTXSU3N0kCDNFVop2uIC/em B58yWcYOfU0/Vd2f2vO164pejCBgkvI2S47OZp+1Tv00UElsvW/KwGnHKQDI62+bd78d tNQScYiEBwUe0J7xn6rYQtYdWY5l7T8DQ4AFCKqbNz3bt/Q2po84hmEVEwDwevjamdQN VB8QVatNsw/QThoKsD8nUD6XSK35K/h4YgkRiUe82gs7pknI/Jqvkqgek3uYWrHM/QhH +dLs/CJz5QbHzoUiFFnOJnlaqCGjiJfzaYfA737okoW1o9aIHqhg9teav6CAGD0bBti/ y+Jg== 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=Q5P76N37fmmOIrfzPaLtOXsbuGCjX4GjBJQCYXczp3s=; b=nWGQmzWtQRAKP44z/OTHZHp3xOnvmuka+FfhMkVoiopl7BPNI7wHqy8xcI8P6Zmqom WCoMqjrrdqSMnRaHHjc0m+mvrnZ8kycRISVI8DhFYkVGvbRxryaz3m5n3dYd8DSOeydv ei0SWiKn8ysHPJbNWMoPj2toPZ1JU1x9SDN2FFS2TYUYFwSd54vDJx4uJdj1APsCnJJv OG5vAdJ+JbtJhgtb7I16sg/ZJxs4WxB2GMc745OfAMSthLbzU1QWCaLX8mz/H/zp9Ak5 p4LhCSErrC9lIS3lI8qJetHie/hdATVcbjJa9FfNfoatytAosr5EBZifet1rh4wdpJkJ /EkQ== X-Gm-Message-State: ABuFfojGMHzOKENLHex/RhZE/zw73S0xpFDwU/bkLE827OB80KhI40Y0 OREnw9g2px9jPjU2x83RUJk= X-Google-Smtp-Source: ACcGV63/AGaMSfj6MVqZb00T/qHf6G/wMhU33TYGFrSx78HWDhtv2ZHXYkHYlSi9ruZobxwWCrfhjQ== X-Received: by 2002:a37:d6c2:: with SMTP id p63-v6mr3913868qkl.190.1538276649794; Sat, 29 Sep 2018 20:04:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 29 Sep 2018 20:04:09 -0700 (PDT) From: Connor McAdams To: Date: Sat, 29 Sep 2018 23:03:18 -0400 Message-Id: <1538276607-30234-4-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 03/11] ALSA: hda/ca0132 - Add ZxR quirks + new quirk check function 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 quirk ID's for the ZxR and it's daughter board, the DBPro. It also adds a function for determining the quirk for each board through HDA subsytem ID's instead of PCI subsystem ID's. Signed-off-by: Connor McAdams --- sound/pci/hda/patch_ca0132.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 5a3fb56..08dd85d 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -1071,6 +1071,8 @@ enum { QUIRK_ALIENWARE, QUIRK_ALIENWARE_M17XR4, QUIRK_SBZ, + QUIRK_ZXR, + QUIRK_ZXR_DBPRO, QUIRK_R3DI, QUIRK_R3D, QUIRK_AE5, @@ -8376,6 +8378,29 @@ static int ca0132_prepare_verbs(struct hda_codec *codec) return 0; } +/* + * The Sound Blaster ZxR shares the same PCI subsystem ID as some regular + * Sound Blaster Z cards. However, they have different HDA codec subsystem + * ID's. So, we check for the ZxR's subsystem ID, as well as the DBPro + * daughter boards ID. + */ +static void sbz_detect_quirk(struct hda_codec *codec) +{ + struct ca0132_spec *spec = codec->spec; + + switch (codec->core.subsystem_id) { + case 0x11020033: + spec->quirk = QUIRK_ZXR; + break; + case 0x1102003f: + spec->quirk = QUIRK_ZXR_DBPRO; + break; + default: + spec->quirk = QUIRK_SBZ; + break; + } +} + static int patch_ca0132(struct hda_codec *codec) { struct ca0132_spec *spec; @@ -8401,6 +8426,9 @@ static int patch_ca0132(struct hda_codec *codec) else spec->quirk = QUIRK_NONE; + if (spec->quirk == QUIRK_SBZ) + sbz_detect_quirk(codec); + spec->dsp_state = DSP_DOWNLOAD_INIT; spec->num_mixers = 1;