From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 C87762C2363 for ; Sun, 1 Mar 2026 08:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772352371; cv=none; b=XD8UCjzOacFf1losXrDkmgpGPbjNj8rewaI8nGH1b3mPWHYvNGEthpq5mpB9fcttOqxsVzBjO95V/yizQGy7hCXPnzTJd+wpRgMbZ8fpbbp5nY6SV3MpwR4603jwR6mAD6vooWyUCFLEgJKK6DhkKXFh4WdWMQQzfY9JBbalrlc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772352371; c=relaxed/simple; bh=URUffd83HAMRz7HWjO4F6ZoezvrN+kfv+dGBuqFAmzY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=CWk3O241KulMHn7M+J/0DnhDLVTTZQ/XzfgW8e7gCpnRoTZwZazfgPFgofaD75GmLZDgFc0n7DzbrGVh/P58CsqAPhMeP/lTQ7kazh4xBq3rbDGx5AFQqf1DlB9sDhMXTmHlN0TgeDhl5D8ffADBg2TrhoxyzSj8c+MDUH1vTmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D4CZMD28; arc=none smtp.client-ip=209.85.216.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D4CZMD28" Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-358d80f60ccso1401821a91.3 for ; Sun, 01 Mar 2026 00:06:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772352368; x=1772957168; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=enGdRrsaB6ZR8xDsA9BNubZAoRwYGJLgTDSI2U7J/do=; b=D4CZMD28wTEtL/hk1VvEa3UpeE/BwFb9DqyNAa0HMER3u1X7OM49aQjyP1mJmD48gL z1I8Aot7VdCW1wPD0LLDlmkVlFfo7DjBOtfjII8K+5Lnzz/YVDPUUbppYrNbMDVheL56 KzUR+/ommhy1XgCDQTpL4fAYtL0lG8ES03Qu3UAlyoG7tDplQzxUPtbXYQonW8G+TbZi 3HEz+RLW4K5zrlNyaQkFuuJU7mBVY5fWBdt4u6cZmyDs2HVU6LRbvBd+Y9NKTmvaVhgg CunnpmO2w2TvRxNCXb8CVXUjaXMJsd1PqZ+GRtXLLU/SezVkgndjsCjhOWssrQtNzoTR uz+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772352368; x=1772957168; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=enGdRrsaB6ZR8xDsA9BNubZAoRwYGJLgTDSI2U7J/do=; b=KjbdLt78k0FeYy8sPg1rPg3xVZQvf72czsudnefVV0lTprYxaYW9lCCkt8s41S29UF Jwh+fDbXiE7sT6i69OkeMKLjOfvqCtpK9TquYF3AGwrQSGZEAJ2gEyLnvBZvn6SOmc+y cgCXMH/UBo8PH6xjokdqviFq8inS8WICWlhQ3GXejnmXKN9lSPtacz145oBpvop8Po4l nt3thl8++7tuliA0LvUx37LlBvvkPajYO99w/T0oAJXNEl+zTR284R/o8XJHXR/YMqhV c0DtOHVpdSQpYfxbL5LN2eW0rvd6nVngT3Z4dH2Ar7Pfo4c/n2iGpfo8w/PQ+2fGh1Wd sPUg== X-Forwarded-Encrypted: i=1; AJvYcCWPwFDw0HMa8FFl1HamxDrVWm62dYHOByH6wu0pX0g4d8UWWDyfdV+56mr0RJGW+uAbNbvTV30TRUlfs64=@vger.kernel.org X-Gm-Message-State: AOJu0YwjbCFZ4kqM9Zhsa71q5O1zhUW/+DpnEc+JXD7EnPGI8ZY+v8rB doApqsDCEqlXMa3fawbf2YS4tU/YDu7s+WPGGvO4lH+C93ozreAU1b8G X-Gm-Gg: ATEYQzzMcuY2rUV2X6PppxqpHFNP0Ag4YiIwFFZOvQvqY8P7AUEB0Evgqr6Y5G81ubA Ypm9YpnQi424hJatNecM2TyyLVLdtDLGNHbp8onbQdYr3XSFgxkP5npPtj9uHyHkCjeWUH5No3k ZHTlrj0QxGg9qstP3hBJ4E7CXBMG4PgrGlUpWMduASbSQ9nIYQzDkfMI6SuynBSaEEyPEWW8IHx zZfrcStOQFsfDIrso6FQMXDEIPOF/v6U7RK/Ra/oiux7cYAAVdLo+y02qxZ4sE63jqgSAawF9kG 169IoYmLJj0QuIvTzdG8UoDxINTVoWFHibwnj0L7d5cNexbYlXU3ilc8yEyWJwtMSWz1ziIsmHZ MwAFs6ZvjTldIcNLs9KH5JVRF7UToSsdj/WjkfgdOsEZLukpqr+kI21kWPssb9CY41fosAPsc+E B6ft3D/OvWF+phhMm5Exy8IinP25xNE8SPvyCTTP+vRz6Hec/l9SakJpBjdhQX5GEYIstOX2a/E waH2KYAFG6pPDAbfTJbhf2buLKJdW93aKRe2kT+Uz74Tkex8vNjd7tVt5I++fcmJjbuoOR0rH36 X-Received: by 2002:a17:90b:3dc8:b0:359:8727:6448 with SMTP id 98e67ed59e1d1-3598727677amr1667062a91.17.1772352367924; Sun, 01 Mar 2026 00:06:07 -0800 (PST) Received: from [192.168.2.3] ([2403:581e:d87e:0:fc2d:ed31:e80e:412d]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-359135ef1d7sm8885384a91.5.2026.03.01.00.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2026 00:06:07 -0800 (PST) From: James Calligeros Subject: [PATCH v3 0/7] ASoC: basic support for configuring bus keepers Date: Sun, 01 Mar 2026 18:05:19 +1000 Message-Id: <20260301-tdm-idle-slots-v3-0-c6ac5351489a@gmail.com> 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: 7bit X-B4-Tracking: v=1; b=H4sIAD/zo2kC/2WOQQqDMBBFryJZNyUTrdSueo/SRUxGHVAjiYQW8 e4dhYK0y/eH95hFRAyEUdyyRQRMFMmPDPkpE7YzY4uSHLPQSl9AK5CzG3jqUcbez1GCqk3Fp9K ZQrA0BWzotQcfT+aO4uzDe+8n2NZvqvpNJZBK5ldn6qasrQK8t4Oh/mz9ILZU0gdd/32SNOvoC leVBeQG7VFf1/UDGPBWnOsAAAA= X-Change-ID: 20251201-tdm-idle-slots-10ba92516da4 To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Kuninori Morimoto , Shengjiu Wang , Jaroslav Kysela , Takashi Iwai , Shenghao Ding , Kevin Lu , Baojun Xu , Frank Li Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, James Calligeros X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4466; i=jcalligeros99@gmail.com; h=from:subject:message-id; bh=URUffd83HAMRz7HWjO4F6ZoezvrN+kfv+dGBuqFAmzY=; b=owGbwMvMwCV2xczoYuD3ygTG02pJDJmLPyd/fhnxamfW29rG17umLWie13V2beT0qq2a6eqtE QcdY+zUOiayMIhxMViKKbJsaBLymG3EdrNfpHIvzBxWJpAh0iINDEDAwsCXm5hXaqRjpGeqbahn aKRjrGPEwMUpAFNtdoSRYV9L4Ay5BVaLZm0u6XvVO/Hwo2MZma/kv+7bmvqBd+vrkNOMDO9jLdO Plvya5iNc9fXvLK+ggHPZ6htE1QM9TIIXXm6R4gcA X-Developer-Key: i=jcalligeros99@gmail.com; a=openpgp; fpr=B08212489B3206D98F1479BDD43632D151F77960 Hi all, This series introduces some infrastructure to allow platform drivers to specify what a DAI should be doing when it is not active on the bus. The primary use case for this is configuring bus keepers which may be integrated into various codecs. The instigating use case for this functionality is an interesting bus topology on Apple Silicon laptops with multiple codecs. Most Apple Silicon laptops have six codecs split into groups of three, driving a pair of dual opposed woofers and a tweeter for L/R stereo sound. These codecs report the voltage and current across their connected voice coils back to the SoC via the SDOUT pin, represented as PCM data sent via configurable TDM slots. This data is used in conjunction with the connected speaker's Thiele/Small Parameters to ensure that the speaker is not being driven to levels that would permanently damage them. This is integrated into CoreAudio on macOS. speakersafetyd[1] handles this for Linux. All of the codec SDOUT pins are attached to a single receiver port on the SoC's I2S peripheral, however are split across two physical data lines (one each for the left and right codec groups). The receiver has an OR gate in front of it, which is used to sum the two lines. If at any point a codec is trying to transmit data, and the "opposite" line ends up floating high, the transmitting codec's data will be corrupted. We need to guarantee that the idle line stays idle. In the downstream Asahi Linux kernel[2], we set up one codec in each group to zero-fill or pull down its line while a codec on the opposite line is actively transmitting. This is done entirely in the codec driver, however this approach is over-fit for this one use case. This sort of functionality may also be of use for other hardware, so following previous mailing list discussions[3], I have tried to expose the functionality in a more configurable and generic way. I have integrated this approach into our downstream platform driver and select Devicetrees as an example of how this mechanism is intended to be used[4]. Regards, James [1] https://github.com/AsahiLinux/speakersafetyd [2] https://github.com/AsahiLinux/linux/tree/bits/070-audio [3] https://lore.kernel.org/asahi/20250227-apple-codec-changes-v3-17-cbb130030acf@gmail.com/ [4] https://github.com/chadmed/tree/tdm-revised2 --- Changes in v3: - Rebased patch set - Elided unnecessary $defs in tdm-slot.yaml - Referenced entire tdm-slot.yaml instead of per-property definitions in imx-audio-card.yaml - Changed repetitive TDM slot property definitions to patternProperties in tdm-slot.yaml - Link to v2: https://lore.kernel.org/r/20251221-tdm-idle-slots-v2-0-ed4d96413aec@gmail.com Changes in v2: - Reworked tdm-slot.yaml schema to silence dtschema warnings - Properly referenced new tdm-slot.yaml schema in affected bindings, again silencing dtschema warnings - Add PULLUP and DRIVE_HIGH as possible bus keeper modes - Reworded commit messages and cover letter to more clearly explain what the goal is here - Link to v1: https://lore.kernel.org/r/20251209-tdm-idle-slots-v1-0-38dabf6bc01e@gmail.com --- James Calligeros (7): ASoC: dt-bindings: convert tdm-slot to YAML ASoC: dt-bindings: update tdm-slot.txt references to tdm-slot.yaml ASoC: dt-bindings: add TDM slot idle mode properties ASoC: soc-dai: define possible idle TDM slot modes ASoC: soc-dai: add common operation to set TDM idle mode ASoC: tas2764: expose SDOUT bus keeper via set_tdm_idle operation ASoC: tas2770: expose SDOUT bus keeper via set_tdm_idle .../bindings/sound/imx-audio-card.yaml | 9 +-- .../bindings/sound/simple-card.yaml | 14 +--- .../bindings/sound/tdm-slot.txt | 29 -------- .../bindings/sound/tdm-slot.yaml | 52 ++++++++++++++ include/sound/soc-dai.h | 22 ++++++ sound/soc/codecs/tas2764.c | 95 +++++++++++++++++++++++++ sound/soc/codecs/tas2764.h | 11 +++ sound/soc/codecs/tas2770.c | 75 +++++++++++++++++++ sound/soc/codecs/tas2770.h | 12 ++++ sound/soc/soc-dai.c | 40 +++++++++++ 10 files changed, 312 insertions(+), 47 deletions(-) --- base-commit: d898041bfb8667f4bad10abba5dedd7edd88c751 change-id: 20251201-tdm-idle-slots-10ba92516da4 Best regards, -- James Calligeros