From patchwork Thu Feb 22 18:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 13567942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07254C54791 for ; Thu, 22 Feb 2024 18:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xmDzStrdpJmcqvCzMxEtDFrDqUQftOzjS30kzwMwTQw=; b=LJiGJkpEBq8hz2 Lf6tIiD9Avef2Ut4bUHL+TTOviWDZBWzWaKJv/tqYZ3+IMauNb9s2GDRmvxFgGsdFvCNibfyZFtCE LiOeu32vTLRuSF0dmkiGUYA/noQi6+5Uvg8berrK7ZTaR1wJZR75AqLQRG1ukIqN+OrgkgQU7yKU3 w+jHdvGExUjKxQ1ZLjcWJla4NDAKfN5VAl09wlcCSCnyJfPpPoE4Rg6UYorN2yeCrS4kNn//65X7M Kaw+/wjCHMvCXyCiMdI5ITcC5AqGcgIAnyzc3Ym5dXFYEA/1tamhAZUQ56xk0tisp+1ZyrmJ1lJUG iiDGwQGfit/u4w3mBaPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDyX-000000068br-06af; Thu, 22 Feb 2024 18:39:17 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDyT-000000068Zh-1v5q for linux-arm-kernel@bombadil.infradead.org; Thu, 22 Feb 2024 18:39:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=TyytIujxG3Ikl6cnv6knUNgmoqpVqzSMLYe+uh7SKG0=; b=uXq0c67RwVHddDn+WOr+lISz8R SrhddOWa7cTga+dzA5YdDXH2kwTOJeZkTOgJTTQe/1nlLapfEm9a+FpAXYqXbLlt4XJxmUPyauiDm bNSzEy4es+TA2gDNAEEKFmxhXvj21Dw7iFFkQaBgzkKx18IXJsvJpN7gpzyFMcVGPzQhPdyJhFlG3 pZgtdaAE4kOZSAWWtFPnHqK8z1dzyEigtPbKuk+WjrEbIsRK2vDnSaJsDj017g1T+/ewtVrln0T05 6qXbNHBclIvGhheYrdMNSPStV2ZNtdwxSAZ0gTeWXCGEk827wGpUdIzYDvp5p5QsDHa8Wu5+yITVp CVR6nDBg==; Received: from vps.xff.cz ([195.181.215.36]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdDex-00000004JMX-1JfP for linux-arm-kernel@lists.infradead.org; Thu, 22 Feb 2024 18:19:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708625933; bh=tVlCmtfnoRWyJBq9HUe/Vjtl8lpr2sLtXU1tQdi2rsg=; h=From:To:Cc:Subject:Date:From; b=NYF280GFCZvSQ/yfp5TVqU9IGDB+6wYDZaUUvQBZn11o9TKa/JuS2Mnvzx107Opgm xHYjTSCcZ0gXK/l/l5WyLOFKhMOt4R7lczgsfRKLIHA6CHo+FCfq6mh1waTr/Vhfhi bkiT5KtmTnt6ca6gQYyRV6BWeZPLqHpYf0s4VXxs= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Ondrej Jirman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Arnaud Ferraris , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 0/4] Add support for jack detection to codec present in A64 SoC Date: Thu, 22 Feb 2024 19:18:43 +0100 Message-ID: <20240222181851.3398254-1-megi@xff.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240222_181903_493230_C17F4E25 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ondrej Jirman This series adds support for jack detection to this codec. I used and tested this on Pinephone. It works quite nicely. I tested it against Android headset mic button resistor specification. The patches are improved and debugged version of the original ones from Arnaud Ferraris and Samuel Holland, imrpoved to better handle headset button presses and with more robust plug-in/out event debouncing. Please take a look. :) Thank you very much, Ondřej Jirman Arnaud Ferraris (2): ASoC: sun50i-codec-analog: Enable jack detection on startup ASoC: sun8i-codec: Implement jack and accessory detection Samuel Holland (2): ASoC: sun50i-codec-analog: Move suspend/resume to set_bias_level ASoC: sun8i-codec: Enable bus clock at STANDBY and higher bias sound/soc/sunxi/sun50i-codec-analog.c | 73 ++++- sound/soc/sunxi/sun8i-codec.c | 388 +++++++++++++++++++++++++- 2 files changed, 443 insertions(+), 18 deletions(-)