From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 40BD91AA797 for ; Fri, 26 Jun 2026 08:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782461385; cv=none; b=KQpu8ethU+zdqQ9Sj06yvhZiTbtdq0d0UJHqpiZH0SeXEO7IJjw7Q64/Tei05CIk+tChxDXKUHJ7yuO0l/cW0uEIb42+XL4SRp9NX3qlhMKKltfqEAVuO++V2/WXtE2antvRkqp71paZCqnTEufy+wmLGY2QC8OuTX2oqFfA5b8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782461385; c=relaxed/simple; bh=74oB9dCRg/IuKwvTPv0f5zd2Mnk280z9T3MLJIHjosU=; h=From:Content-Type:Mime-Version:Subject:Date:References:To: In-Reply-To:Message-Id; b=kOZSozPwOENswxsgsvD9usX4/ESHzuo6si6Vj1z3qB7HD4rtG9e/M+oz97tJlRuDK540uINAfLhO8hPnN5L23eM7hNHQKZ5BYVIymu10wyUpIN+IDRHrnM8l8GuCCiKCkNCY6X4Sl4+GXP3Py0SSbdUJfDNN4Q6ipUAT20R4dlE= 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=etbhwODZ; arc=none smtp.client-ip=209.85.167.46 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="etbhwODZ" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5aea5e1775fso486644e87.0 for ; Fri, 26 Jun 2026 01:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782461382; x=1783066182; darn=vger.kernel.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=74oB9dCRg/IuKwvTPv0f5zd2Mnk280z9T3MLJIHjosU=; b=etbhwODZciferbRCuk1Y+nwuk9+l3z9qB2LFulFiaXOhr/OKZdL2Qyv4VUYYeoDgDF 9yG2LsyOqScil+5VxSD/7IoCgxuTAMX8IsQzkKFbrUfTGKbgoACMLkXMuIJW2Y27lsmC Epb/dlz2Op+MDZzCMcVq2wR3FlcURDJQYXhZGXj7eo/EwgpWbXjTTT/FcbDUDQ9VwaVG GSaIX88rxOsp90oZcv3tInQHgaj+TH3i+Bfwxw+Z5LwLho7SfeeATT8v4pukefinKjj9 66L3n/EDe9zimY1KKztD78SlnHZ0HFbBi9m/r6FulQg2qqnDg0oJIxRxhTzbROHd+Onn DTlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782461382; x=1783066182; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=74oB9dCRg/IuKwvTPv0f5zd2Mnk280z9T3MLJIHjosU=; b=oeXtCL9tLf1/8utdJZ/gk2CAfQTlfTOyA6xqa/ClVpGEpgtxEPUdmBEr/cjJZrb3OV zUGHvRaU5iGuZW29tz0CiZAVOmKyG9Ot6ie6KoptVuYh//++Oi7P6e8GNtBUXKURmQEK BS2LAytNNkSTAljinljwjEzKjXLMFW3j0ctRy0fYzy1H9yYOZVEHVIkKBSXs9+qkhX5G 5pOxi5OmrMUxulT7Mardb5uFh9Ejber+cYXbu4FL1OGOi6H1gtVBm/YCodYkz+v+kC3y Dyl3FrAiVOlgIt41V5V8ZELPZursYYLTtvgcssF1FrdTa/EePA0lwg20iqNGhVLut1LA LWPw== X-Forwarded-Encrypted: i=1; AHgh+RoW4MWp9nini2RfM6SgfuDCuY74REXtKJ9pNcVJsRtvSRsj99jw9j8gS7ZUd6FXpwKaOBBEIEIUKWVKox4=@vger.kernel.org X-Gm-Message-State: AOJu0YwwPwYX7Rkv534PAGB1IVtQkRDYX5Sw9pznBwD1lRRTfKxz+fMM pTBvixNANw59lfffFjdzBQuXlPyYBl3FSZzIbUa6Uo2WZaMkS2GXGF/r X-Gm-Gg: AfdE7ck4CvXtZs/4gcfh5aD7dS+t2rW2bH55Iq0n9cVFgjR/6hVIczsyOQOAmQVw1Bt B+jROM2nvxA3FfF2DtSElcKRJJJvTqidd5yAEGqJoaS+D6Jik0fE7p8kEFu//yEVdwGZndKhWYD MKkVDqaluI/gobtqf7cM94URn1bKC0F6zO+ufyZt8GktPCCv/ZhwzkCIaJsgRgDdGdJPZZU0buR WcS91bHZwkB1Z2qphTUP9QhKMiSwbH2ux5SoaIz88DWelCVGiPmESyRUgkmxIJu4t9U3DBxaoAE sS0blkinuRFtqMEHmks3ERj3Bpny1E1AT82ur9VP7iuE7xldbbjxM56q/bEDVP+WWxwZt6HlmA8 424AP1f1lVI3ITmEGOot253b5FspEi6Cq0M/Yh0PnO8cdtKeHiudu0HqV6Durn0jdEWiIB1nFej qQ09EwvE6zmaHlYMLWx3VCDs0WtyPhSaUzPJnikXEB6w== X-Received: by 2002:a05:6512:3087:b0:5ad:5daa:9c90 with SMTP id 2adb3069b0e04-5aea1f579b6mr2196508e87.52.1782461382239; Fri, 26 Jun 2026 01:09:42 -0700 (PDT) Received: from smtpclient.apple ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aea80d4722sm186240e87.26.2026.06.26.01.09.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2026 01:09:41 -0700 (PDT) From: Christian Hewitt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH] ASoC: meson: aiu: fifo-spdif: soft reset the S/PDIF datapath on start/stop Date: Fri, 26 Jun 2026 12:09:26 +0400 References: <20260626080422.4191435-1-christianshewitt@gmail.com> To: Jerome Brunet , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org In-Reply-To: <20260626080422.4191435-1-christianshewitt@gmail.com> Message-Id: <82AA2E33-70B4-4EEC-882A-EABDB51904FA@gmail.com> X-Mailer: Apple Mail (2.3864.600.51.1.1) > On 26 Jun 2026, at 12:04=E2=80=AFpm, Christian Hewitt = wrote: >=20 > The I2S FIFO soft-resets its fast domain on start (AIU_RST_SOFT bit 0 = + > AIU_I2S_SYNC read in aiu_fifo_i2s_trigger), mirroring the downstream > vendor driver's audio_out_i2s_enable(). The S/PDIF FIFO has no = equivalent: > it only toggles the IEC958 DCU, so a stale datapath FIFO can be = replayed, > producing the "machine gun noise" buffer underrun - on start when = switching > outputs, and on stop when playback ends. The latter is audible on = devices > with an always-on S/PDIF-fed DAC (e.g. the ES7144 on the WeTek Play2). >=20 > The vendor driver resets the IEC958 fast domain (AIU_RST_SOFT bit 2) = on > both enable and disable (audio_hw_958_enable), and when reconfiguring > (audio_hw_958_reset clears AIU_958_DCU_FF_CTRL then resets). Do the = same: > reset before enabling the DCU on start, and after disabling it on = stop. Fixes: 6ae9ca9ce986bf ("ASoC: meson: aiu: add i2s and spdif support=E2=80=9D= ) ^ I can send a v2 with it done properly if needed? > Signed-off-by: Christian Hewitt > --- > sound/soc/meson/aiu-fifo-spdif.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/sound/soc/meson/aiu-fifo-spdif.c = b/sound/soc/meson/aiu-fifo-spdif.c > index e0e00ec026dc..826055a71421 100644 > --- a/sound/soc/meson/aiu-fifo-spdif.c > +++ b/sound/soc/meson/aiu-fifo-spdif.c > @@ -24,6 +24,7 @@ > #define AIU_MEM_IEC958_CONTROL_MODE_16BIT BIT(7) > #define AIU_MEM_IEC958_CONTROL_MODE_LINEAR BIT(8) > #define AIU_MEM_IEC958_BUF_CNTL_INIT BIT(0) > +#define AIU_RST_SOFT_958_FAST BIT(2) >=20 > #define AIU_FIFO_SPDIF_BLOCK 8 >=20 > @@ -68,12 +69,16 @@ static int fifo_spdif_trigger(struct = snd_pcm_substream *substream, int cmd, > case SNDRV_PCM_TRIGGER_START: > case SNDRV_PCM_TRIGGER_RESUME: > case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: > + snd_soc_component_write(component, AIU_RST_SOFT, > + AIU_RST_SOFT_958_FAST); > fifo_spdif_dcu_enable(component, true); > break; > case SNDRV_PCM_TRIGGER_SUSPEND: > case SNDRV_PCM_TRIGGER_PAUSE_PUSH: > case SNDRV_PCM_TRIGGER_STOP: > fifo_spdif_dcu_enable(component, false); > + snd_soc_component_write(component, AIU_RST_SOFT, > + AIU_RST_SOFT_958_FAST); > break; > default: > return -EINVAL; > --=20 > 2.43.0