Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp408674rbb; Sat, 24 Feb 2024 05:57:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRGGYZcVz7TKscW3suoZRmpVIMWZ+8k8YrMAIZE0nPxLrx4GwoMrlbHKPgE1zOT3kOkk2OCCMbWfjMYZpOJUYF3C3+0AMuXaJNfVPUBQ== X-Google-Smtp-Source: AGHT+IHalQG+LvMkAhysGgreb42/tY+8yUslQGOVqGrV8MYbtzUgc+FIcWm3hRi4IiPfSO8R8mr6 X-Received: by 2002:a05:6a21:1518:b0:1a0:dda5:259 with SMTP id nq24-20020a056a21151800b001a0dda50259mr3708516pzb.0.1708783026350; Sat, 24 Feb 2024 05:57:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708783026; cv=pass; d=google.com; s=arc-20160816; b=VMbAWKEOavtEwc15ePPg8I15oYVR9PBURxfjIzonFmP/PA30wTXdc+cFc+G80mrom2 AWLNtnSUPjnzVPhmXqoupVn82ujbyaJX0geB4oAwozQ5m6x0tKyNSL9xb08VldLojSqV JpYFVZJJ1yqosq6I9UhoucKMrBkILQMWI73DKwNUXZmeFBFCwRPF7aKeuXeC85yR8yWV w/eXIqGRhDF3k916uQdTlZxsNwJzxI0B/xzqXsKdQJ8oAdUYqgH3iPVDkrwHeMhx7hA9 QfpZecfO7ypFb909nzn7+6NXdWq07hvQ2KFIxke1WG54mCDpOl0L4jB/ZDMRGOvd/iR+ 92Bw== 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=BtptTc38Fo4YUTAEjUDBJT4+tGt26BbgQPuKT5WgtPM=; b=hmyyIGIYWWPJwVBIf2T1OMUqcixnuQtf0wt/sFDdmPcREhjcOnYoMd0zQgY4pK7sPS eg4oLI6T8xU8hS9tNy+pDi3HCb1dcow8FGFYbcw1ERLmdngK/leJslp3W5aTeBu4RuUQ UaiXjdGqJLy2ZLcze+MeVZtobUl/xRS4qjauk1KV0zYUjFPkJc0hkqEM6fC2d6raFhte yx//anCZVwkNjR0A/yD2yVpJlWDVJ0eAtKdKIgRc/or+aGIHexleQ3W3Q3JBy8WAldVQ 1fY7NLyT47LlS0968kL0nDcfZ3e7rO3KueGaqAy2uH0Q6kFdLG7yl7c6+XAUeQpJyfPM lQaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=ghV2nPFV; 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-79692-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79692-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 g16-20020a633750000000b005dc4eb22ed9si941832pgn.166.2024.02.24.05.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 05:57:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79692-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=ghV2nPFV; 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-79692-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79692-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 10E8428329D for ; Sat, 24 Feb 2024 13:57:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEAFA45C18; Sat, 24 Feb 2024 13:55:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="ghV2nPFV" 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 A20FD3F9D8; Sat, 24 Feb 2024 13:55:09 +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=1708782912; cv=none; b=WULfPpypaG+J1Vp+Eun1iYF+Ybd9H4+iD6kV61Ht4ysHDul/t7G1rhb57OQufz77JsvoAtaaEeVotn9Z2fpvSqkqX9Rj7WIYaW719xcwJs/PSbIs8ewvV2BBqm56zyjsTgOshyP7ajxsMC6/qCipo4k3WYqUHLcxB3z0nomja6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708782912; c=relaxed/simple; bh=ZdTOrLkg/qf7wFKH1nhH7OcmYSUdowUaRsJjf+n31IQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dqvOn/VPi9Hnc2fgT5fy26zG/4k9A3GUF6ERlq91wq8H/43v28rbwaSJAmCgLSnx2tYTazBdf6aPvMp5Pr3QpU//4HDAnAxPKWN1q+8KqYD/irrOUhQVyNRrJQXpFyclsGuT3e+MCo98ZFvfX3xocsgk0VNI7xCtUgyYtkmKD5w= 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=ghV2nPFV; 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=1708782907; bh=ZdTOrLkg/qf7wFKH1nhH7OcmYSUdowUaRsJjf+n31IQ=; h=From:To:Cc:Subject:Date:From; b=ghV2nPFVjKO14UGccN3rXpU5361OkGdsnlFc+EPQiEijflmKOSJvXVVnOWqERaLia v8SBR8AvGUndbw/tLtwCjCu9YOR9GSD0/g/k87i40dulFob/BqRh9sn1Qv7W5KbhpD rJArs/+k/ODf+1XKCMRUT/LMNlw7oWZswM53gSVk= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= To: linux-kernel@vger.kernel.org, Liam Girdwood , Rob Herring , Conor Dooley , 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, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [RESEND PATCH v2 0/5] Add support for jack detection to codec present in A64 SoC Date: Sat, 24 Feb 2024 14:54:53 +0100 Message-ID: <20240224135501.3822390-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