From patchwork Tue Sep 18 18:33:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Connor McAdams X-Patchwork-Id: 10604791 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 9C20C14DA for ; Tue, 18 Sep 2018 18:45:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 897D22B07A for ; Tue, 18 Sep 2018 18:45:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E0092B9AF; Tue, 18 Sep 2018 18:45:51 +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 355832BA5E for ; Tue, 18 Sep 2018 18:45:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4BE442678FE; Tue, 18 Sep 2018 20:35:04 +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 2A4702678EE; Tue, 18 Sep 2018 20:35:02 +0200 (CEST) Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by alsa0.perex.cz (Postfix) with ESMTP id CA1CF2678CC for ; Tue, 18 Sep 2018 20:34:58 +0200 (CEST) Received: by mail-qt0-f196.google.com with SMTP id l42-v6so2646813qtf.13 for ; Tue, 18 Sep 2018 11:34:58 -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=pHHeGolKO1w+IspvZQ9xwsP7zrrpUFlXJw555hGFu1U=; b=mN0kcKPGzApILPAy5chzYEJwBW0xxniyQKdHiVUU7ohii0Fl547S2/Qxn63Is6Mu4c FR+3BH/srWg5ZKHtBZYrs6wZVWIlxjxyu5Q2BmXPVSij1IAZydWYeYNBCVTxBaB2t81U 2yEzKLv1uccar0vt6WQkQGUzckJWqpwB7tjYHX6bT+1wBahXdkTroMwA3OXuWSmxP/eY 2Q3l0LPMfqPrXlnBwH6XLzokf64tSWIQ12p39uJ8kaJp6/AF9xToeRg76FeO28SRqWbM x9OYBMot5rLwwoDPPYY2cico5S3rl4C9r+/2IjktWqiAtqWIMaQZtFbfFECLVWbDxHVt XF8A== 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=pHHeGolKO1w+IspvZQ9xwsP7zrrpUFlXJw555hGFu1U=; b=iWry34LWE2cQFySZpuWfnw3X3jCC3temE6lIlFjw5mf0zAicYS6D6szmG2DX1DgfKN Qii1cw6LJ8KThSK0FpKckBukC/fEfDteniB++OE2uS6sVvbuqh5Q8oY+2Ox19iIqV2n2 9+AEEoXu0OVE9Ho2GPnCZXPjWDoWjxyk6Q8+Avz5aBOzqFJPgIRicSmGdG9m7MI3LVBX +B54XnpNdFquNbKlRjEk2tiWV3gk7BnZVVNJogxep2Z+ilLR76+upvDj8JTNekf3/v/9 s9lRwIheXzsShP7yWSHP30/hvZBE18wn1amM8X4Tz475XwQv1jn9o7l1hKbyxqOWrUt9 4Hjw== X-Gm-Message-State: APzg51BvnkUoMF4vv/yOllTYwaY2lRTZ+Qdu2iCFE3u+juRBWYSs4qBc 2WGp8BPuGdlyMpQDYCgHXw4= X-Google-Smtp-Source: ANB0VdYa7YWMJ8E8zcp8JcFAhP5bAOTxPY860A/T4vkBMZVx/7EROarJrLVeluzMT5hRFNI6G8pJLA== X-Received: by 2002:a0c:f7d2:: with SMTP id f18-v6mr22212043qvo.83.1537295698123; Tue, 18 Sep 2018 11:34:58 -0700 (PDT) Received: from localhost.localdomain ([2605:a000:1316:4273:719d:df26:b0cf:931a]) by smtp.googlemail.com with ESMTPSA id m15-v6sm13819101qki.1.2018.09.18.11.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Sep 2018 11:34:57 -0700 (PDT) From: Connor McAdams To: Date: Tue, 18 Sep 2018 14:33:43 -0400 Message-Id: <1537295625-8082-16-git-send-email-conmanx360@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537295625-8082-1-git-send-email-conmanx360@gmail.com> References: <1537295625-8082-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 15/15] ALSA: hda/ca0132 - Add AE-5 exit 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 exit commands for the AE-5. 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 7048cc0..9541ab5 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -7665,6 +7665,31 @@ static void r3d_exit_chip(struct hda_codec *codec) snd_hda_codec_write(codec, 0x01, 0, 0x794, 0x5b); } +static void ae5_exit_chip(struct hda_codec *codec) +{ + chipio_set_stream_control(codec, 0x03, 0); + chipio_set_stream_control(codec, 0x04, 0); + + ca0113_mmio_command_set(codec, 0x30, 0x32, 0x3f); + ca0113_mmio_command_set(codec, 0x48, 0x07, 0x83); + ca0113_mmio_command_set(codec, 0x48, 0x07, 0x83); + ca0113_mmio_command_set(codec, 0x30, 0x30, 0x00); + ca0113_mmio_command_set(codec, 0x30, 0x2b, 0x00); + ca0113_mmio_command_set(codec, 0x30, 0x2d, 0x00); + ca0113_mmio_gpio_set(codec, 0, false); + ca0113_mmio_gpio_set(codec, 1, false); + + snd_hda_codec_write(codec, 0x01, 0, 0x793, 0x00); + snd_hda_codec_write(codec, 0x01, 0, 0x794, 0x53); + + chipio_set_control_param(codec, CONTROL_PARAM_ASI, 0); + + chipio_set_stream_control(codec, 0x18, 0); + chipio_set_stream_control(codec, 0x0c, 0); + + snd_hda_codec_write(codec, 0x01, 0, 0x724, 0x83); +} + static void ca0132_exit_chip(struct hda_codec *codec) { /* put any chip cleanup stuffs here. */ @@ -8109,6 +8134,9 @@ static void ca0132_free(struct hda_codec *codec) case QUIRK_R3D: r3d_exit_chip(codec); break; + case QUIRK_AE5: + ae5_exit_chip(codec); + break; case QUIRK_R3DI: r3di_gpio_shutdown(codec); break;