From patchwork Fri Jun 14 19:48:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fletcher Woodruff X-Patchwork-Id: 10996405 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 BDFBD14BB for ; Fri, 14 Jun 2019 19:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADC0428734 for ; Fri, 14 Jun 2019 19:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E7CE2873A; Fri, 14 Jun 2019 19:51:41 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E580428734 for ; Fri, 14 Jun 2019 19:51:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0F856189E; Fri, 14 Jun 2019 21:50:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F856189E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1560541899; bh=dG1pRCCTzrhg1y89X5jOkN7OS32tDsDqKRHG5Zzh7y0=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=VNzO7c/z5pZx2lnErzkiARRIuPF3C6z+CvZ1sGn8HR43AzY0x8JX4jNY198t1evLU 5fkzdjEs41mTwVi6wxsg3yDX35YcKl4nciQV3huYEp1/JQ59GnF8Fu5SW0Binqjbpt +9Dgf2QZ2YspEZ4/N/p6wC/mScmSpSscC1xPIOqg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7C4EDF89730; Fri, 14 Jun 2019 21:49:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14832F896CE; Fri, 14 Jun 2019 21:49:07 +0200 (CEST) Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 23DF1F80794 for ; Fri, 14 Jun 2019 21:48:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 23DF1F80794 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="AIQG4mZQ" Received: by mail-io1-xd44.google.com with SMTP id u19so8272668ior.9 for ; Fri, 14 Jun 2019 12:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5kBsnIJ7NqL+VBYhjfKTuJEIg2r/RGqZAAl6Deg+qXM=; b=AIQG4mZQBLBL0joUtzflM8CrmnXp77fhWpM8leg6gHb/3/vSIh0cokbNOjLKO1ltzz KXkyRtytvFQx+6OKl7AeLX+GopRpszVVM+t7CIQFJoPoCT98LvhtFEPwHleDbTwCp5Yd oc6uygi+tEOurlekSWQwt5ei9eq83eOdo5+vA= 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:mime-version :content-transfer-encoding; bh=5kBsnIJ7NqL+VBYhjfKTuJEIg2r/RGqZAAl6Deg+qXM=; b=kYmuwmHisqzESH8FIvCgCC2KOGJ6II8VlA45l3nksAspAQ5YwhEga5SxtVPoLYxQbc jXLYeHA6gOYgYkA0+yXW+0/8IQXoXIWvqSnnCPiMa4+qq+ArwrwJ0BH50HLCdgUIQxMT qAU4b2u7Wf8uOzRVgERTxM9J9Lah7UigwnCHtp9OjZct241EssgADkavMP9CWlCfjMAu tzH2/x9ChLCkQ4J2tJsoF5s+I4uJ+D4qLBDBn3AEfgxzw8YHSkY3WBHe8Q96Ogoo04Pa Q4tBSssX330rX1PuHlaKl+S9Nmu1GJjhfC1PyBPicM0efUkhCnmgS/bFKDHNFYKs0SiH 1B2A== X-Gm-Message-State: APjAAAWYJAigLvfxkLxSKG2PQCuediypEOqThW2Wewar5B1gHHQypwGf wrGUoXdKAA7ngVoU2GPGiWDl2Q== X-Google-Smtp-Source: APXvYqwZ0QGSQITrHvnL18bpJqSZpsG5/kxnGjtC5GEiUg1zQH3SEmE5ItsYqnIY8mPijv5NvlC42Q== X-Received: by 2002:a5e:c705:: with SMTP id f5mr66655255iop.113.1560541738017; Fri, 14 Jun 2019 12:48:58 -0700 (PDT) Received: from localhost ([2620:15c:183:200:33ce:f5cf:f863:d3a6]) by smtp.gmail.com with ESMTPSA id c1sm2739459ioc.43.2019.06.14.12.48.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 12:48:57 -0700 (PDT) From: Fletcher Woodruff To: linux-kernel@vger.kernel.org Date: Fri, 14 Jun 2019 13:48:50 -0600 Message-Id: <20190614194854.208436-1-fletcherw@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog MIME-Version: 1.0 Cc: Oder Chiou , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood , Mark Brown , Ross Zwisler , Fletcher Woodruff , Curtis Malainey Subject: [alsa-devel] [PATCH v7 0/4] Fix jack detection for Chromebook Pixel X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Headphone/mic jack detection doesn't work on the Chromebook Pixel 2015. This patch changes the irq implementation to support polarity flipping and fixes the configuration code so that correct GPIO pins are read from ACPI. With this series, plugging and unplugging the headphone jack switches between headphones and speakers automatically, and headset microphones are also detected. v7: - Rebase onto for-next branch of broonie/sound.git v6: - Move refactoring into its own patch - Reorder patches so that DT property names patch is first - Clarify commit message for patch which implements irq handler - Remove unused work struct - Make IRQ function return IRQ_HANDLED only if IRQs actually fire v5: - Fix void* parameter to devm_request_threaded_irq v4: - Fix incorrect void* cast in rt5677_irq() v3: - Update commit message for patch 1/3 to clarify why we implement our own irq_chip. v2: - Split IRQ change into two patches: adding and fixing potential race - Change config reading code to try both DT and ACPI style names Ben Zhang (2): ASoC: rt5677: clear interrupts by polarity flip ASoC: rt5677: handle concurrent interrupts Fletcher Woodruff (2): ASoC: rt5677: fall back to DT prop names on error ASoC: rt5677: move jack-detect init to i2c probe sound/soc/codecs/rt5677.c | 319 ++++++++++++++++++++++++++------------ sound/soc/codecs/rt5677.h | 13 +- 2 files changed, 236 insertions(+), 96 deletions(-)