Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp702338rdb; Thu, 22 Feb 2024 17:52:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX486epC3QK6dvkSwJV5HB3BLBQKqRzxoZs1e1LnIclnIBDBMvigc3RL49MSLStsdlF8mxGfTaqJKxHG8WYKGkhs2Tyso0Ze8+p8qXihA== X-Google-Smtp-Source: AGHT+IGHszhUO33QkROS6lUiNhSab4jdGXbEusMPpiTW0xPf740x5K+wf8iEGEu6qJDomv/On+bz X-Received: by 2002:a05:6a20:c401:b0:19c:ac7f:c3e4 with SMTP id en1-20020a056a20c40100b0019cac7fc3e4mr483934pzb.42.1708653176256; Thu, 22 Feb 2024 17:52:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708653176; cv=pass; d=google.com; s=arc-20160816; b=Lp50JKcUY/1k4mqH5ZfWDCXkloNUIbXd/MG7UR93sqQzJfTveoCYWMnvWHsN1TsSOi jFEY2Zr2Uz6gFI91kAUwmdJb813Ho0IECiQ3ePa3i/KYJWw1A3UQQcXHvht9R2Iot0ww gcs8EYnoRSDlm5C945sM2zycMeJtAZISy4kEaUmpIUQwOIPtaXha3BCE2pgpBNB0Yz+L ZGB/rw6ix4UxNMGF9mPMLD67Y6ZURixCE+tkYfSJCx5ixX7TRZ7PABWld6Xrd9bj9dfD f/SIZlsm8S+RXPmagXQ3AMhZvR3tdUqo3wLgvW2BSpOKgodzlk2uvunQxRYDSC+fzk/d lCSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=f8fdxfyE8JeRzZy2wx8TnXdmsh6ScwBE8q0M4faYeBA=; fh=LyOUUyERizBut43yg2bQgiL8MyPFN7nnSRizOKM8oK8=; b=09YBE86E3cZQpIvR/2vBD12zGvJoKx6t+ZTjoP/xbOgT7Qw8uSv/h5oXcaQTBT4mbh dYrnfC0B3f6T6z/9kuEIKp94yeKXeISidjvrkj+2IhmNcfNPyF6kZDZGQnwCtZ3yfPtl DBn8MazgP80s/WwG2yG3Obkp7QmvaSjynsAONt3kqDMYDHsTo0Nl4EcqOgcw12CeYeuH MNnMKQaDpvWxISqtrS910pK8s9arJUIQw5JPh1wrPzGUHjPKXNE5F2qIFYvp70OdWEio IQIEU5eSgMCQVjnGjR+5j9m7slTT5WV1koHW3hZUHjWUtl105VCFgl/BkjNUZ1+Cighp OUJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=VgoLDlY9; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-77655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bw18-20020a056a00409200b006e4e4406e1asi3535pfb.350.2024.02.22.17.52.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 17:52:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=VgoLDlY9; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-77655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F13A4285EC4 for ; Fri, 23 Feb 2024 01:52:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 011F6D26B; Fri, 23 Feb 2024 01:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="VgoLDlY9" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B232B645; Fri, 23 Feb 2024 01:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653152; cv=none; b=QjG9kBSuGyZNkCpQ2W5OtceaYF6H/wBl2AIV+XLDVkyIDxWsxgvv3XJYSVbrVKacyVtEuTAipaLwrVwKqRr8WWs8IQRQeukhModpw2r2rzsxPUbWOHKPWSZ4jLGvt9llD1uhrwrIMVVPE2Ncq9KcGPTsevbC7YvZYMguujnGn04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653152; c=relaxed/simple; bh=ZdTOrLkg/qf7wFKH1nhH7OcmYSUdowUaRsJjf+n31IQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JsuwATf9o/OdpIuVx7vfeuo1HvmXP/Ir0lCLnlITScojKmamLn9B5I7Cij9CmIQfCG06vmB3Ex40FGnvX7gCWlQiPiZq31UQm/MmuYZYCLwtWAiP+f1ogTZvaCkxTtG4j/99TqRMJ14171YtxYQKy/SzNfNMiV8oEBhQ9e/UPzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=VgoLDlY9; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708653140; bh=ZdTOrLkg/qf7wFKH1nhH7OcmYSUdowUaRsJjf+n31IQ=; h=From:To:Cc:Subject:Date:From; b=VgoLDlY9OJ/xjChBR72wKD4pPi0joITT85F6KeVVD9zA8bLrxlasSNexuZK4DXhDo sEjGAxBYEdmoG2utxMlSvZh33LJzmOu46M340lt8U/2YAP1UIlsE2nsPzau8M2Z2IH ERp3YJRXDX74C4FX0zd/PiVpwIlArSR6JyO8x5ac= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= 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 v2 0/5] Add support for jack detection to codec present in A64 SoC Date: Fri, 23 Feb 2024 02:52:10 +0100 Message-ID: <20240223015219.3618111-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. :) v2: - use set_jack/get_jack_type - get rid of some custom poking inside card internals to figure out what kind of jack port we should setup the codec for - read jack-type from OF as suggested here: https://elixir.bootlin.com/linux/latest/source/sound/soc/soc-component.c#L288 - add DT bindings 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 Ondrej Jirman (1): dt-bindings: sound: Add jack-type property to sun8i-a33-codec 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/allwinner,sun8i-a33-codec.yaml | 9 + sound/soc/sunxi/sun50i-codec-analog.c | 73 +++- sound/soc/sunxi/sun8i-codec.c | 359 +++++++++++++++++- 3 files changed, 421 insertions(+), 20 deletions(-) -- 2.43.0