From 14f05437a67bfa0692c4bdfeafdc9ec0559d7166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= Date: Fri, 13 Nov 2026 04:08:39 +0800 Subject: [PATCH 1/2] ASoC: cs42l81: Initialize the stereo playback mixer sources The iPad 5 codec setup programmed the slot layout but left the playback mixer sources at whatever reset or iOS had left there, which can leave one speaker silent or both playing the same channel. Route mixer buses 0 and 1 to the two incoming stereo slots, as iOS does. From orchard PR #124 (commit bef17c42), unchanged. Only the iPad 5 (J71s/J71t/J72s/J72t) uses this codec. --- ...tialize-stereo-playback-mixer-source.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 kernel/patches/drivers/sound/0010-ASoC-cs42l81-initialize-stereo-playback-mixer-source.patch diff --git a/kernel/patches/drivers/sound/0010-ASoC-cs42l81-initialize-stereo-playback-mixer-source.patch b/kernel/patches/drivers/sound/0010-ASoC-cs42l81-initialize-stereo-playback-mixer-source.patch new file mode 100644 index 00000000..7df19984 --- /dev/null +++ b/kernel/patches/drivers/sound/0010-ASoC-cs42l81-initialize-stereo-playback-mixer-source.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= +Date: Wed, 11 Nov 2026 16:06:48 +0100 +Subject: [PATCH] ASoC: cs42l81: initialize stereo playback mixer sources + +The ASP slot geometry is configured at power-up but the playback mixer +source selectors are left to their previous values. This can retain a +silent or duplicated channel after codec reset or firmware use. + +Follow AppleCS42L81Audio::updateRouting by assigning mb00 and mb01 to +ASP RX slots 0 and 1 before enabling the playback path. Keep the +existing stereo power and volume sequence unchanged. + +[Orchard: from orchard PR #124, commit bef17c42; unchanged] + +Assisted-by: LLM +--- + sound/soc/codecs/cs42l81.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/sound/soc/codecs/cs42l81.c b/sound/soc/codecs/cs42l81.c +index fc2e93b55..418f91d36 100644 +--- a/sound/soc/codecs/cs42l81.c ++++ b/sound/soc/codecs/cs42l81.c +@@ -81,6 +81,9 @@ + #define CS42L81_INT_STATUS4 0x007b + #define CS42L81_INT_STATUS5 0x007c + #define CS42L81_INT_STATUS6 0x0106 ++/* Playback mixer bus n source: 0x19 + slot selects ASP RX slot. */ ++#define CS42L81_MIX_SRC(n) (0x010b + (n)) ++#define CS42L81_MIX_SRC_ASP(n) (0x19 + (n)) + /* ASP TX slot n source: 0x18 = ADC A, 0x1c = ADC B (0x20/0x24 = DMIC2A/B) */ + #define CS42L81_ASP_TX_SRC(n) (0x0115 + (n)) /* n = 0..9 */ + /* ADC channel n source, same codes as ASP_TX_SRC */ +@@ -318,6 +321,14 @@ static void cs42l81_set_asp(struct cs42l81 *cs) + /* The codec drives BCLK/LRCK (the MCA is the clock consumer). */ + regmap_write(map, CS42L81_ASP_CLK, CS42L81_ASP_CLK_PROVIDER | c); + ++ /* ++ * iOS updateRouting maps mixer buses mb00/mb01 to ASP RX slots ++ * 0/1. Program the sources as well as the slot geometry: reset or ++ * a previous user of the codec need not leave a stereo route. ++ */ ++ regmap_write(map, CS42L81_MIX_SRC(0), CS42L81_MIX_SRC_ASP(0)); ++ regmap_write(map, CS42L81_MIX_SRC(1), CS42L81_MIX_SRC_ASP(1)); ++ + /* ASP RX slot n: byte offset n * b, width b bytes */ + for (n = 0; n < CS42L81_ASP_SLOTS; n++) + regmap_write(map, CS42L81_ASP_RX_SLOT(n), From 0b36f43519593a0ed3d597ba26d00d677cd2d097 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Fri, 13 Nov 2026 04:08:39 +0800 Subject: [PATCH 2/2] j71t: Speakers work Berkay tested the speakers on J71t on 2026-11-11 with the mixer source fix (orchard PR #124). Headphones are not covered: the jack is not detected, and wired output is selected by hand. --- devices/j71t/device.toml | 2 +- docs/compatibility.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/j71t/device.toml b/devices/j71t/device.toml index 1a78c1d1..c850227b 100644 --- a/devices/j71t/device.toml +++ b/devices/j71t/device.toml @@ -51,6 +51,6 @@ suspend = "untested" resume = "untested" usb_serial = "untested" usb_network = "untested" -audio_output = "untested" +audio_output = "working" audio_input = "untested" camera = "missing" diff --git a/docs/compatibility.md b/docs/compatibility.md index 25ce8915..bb495d0a 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -161,7 +161,7 @@ Boards Orchard builds for. States: working, untested, missing, none (no such har | `n66` | untested | missing | untested | missing | untested | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | untested | untested | untested | untested | missing | missing | missing | | `n69u` | untested | missing | untested | missing | untested | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | untested | untested | untested | untested | missing | missing | missing | | `n71` | untested | missing | untested | missing | untested | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | untested | untested | untested | untested | missing | missing | missing | -| `j71t` | untested | untested | untested | untested | untested | missing | missing | untested | missing | untested | untested | untested | untested | untested | none | untested | untested | untested | untested | untested | untested | untested | untested | untested | missing | +| `j71t` | untested | untested | untested | untested | untested | missing | missing | untested | missing | untested | untested | untested | untested | untested | none | untested | untested | untested | untested | untested | untested | untested | working | untested | missing | | `j72t` | untested | untested | untested | untested | untested | missing | missing | untested | missing | untested | untested | untested | untested | untested | missing | untested | untested | untested | untested | untested | untested | untested | untested | untested | missing | | `n66m` | untested | missing | untested | missing | untested | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | untested | untested | untested | untested | missing | missing | missing | | `n69` | untested | missing | untested | missing | untested | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | missing | untested | untested | untested | untested | missing | missing | missing |