From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 42111360EEA for ; Mon, 29 Jun 2026 12:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782734691; cv=none; b=focV5mGiKRhAC2IlKzvuZta9B3LFwBrViRL2ekGiAQW26jY7Kv6ZigAbySh8DyJX07/BJgXQ1Mybvc6+/XUMQB1nezhm63AXKWT06ip8+nPS6pQenlkWY211BcaXw4vYUPEb3g9OPMNJffr/RSFJuDburmyV2NdilYZgp2WS/fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782734691; c=relaxed/simple; bh=KucRsPEXVqSHA0jIYVaqXLRh/yGJufTgHGHlGxxDQnQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=IK2d2N/tEBjsNU553Isph8V/ztTRR2Fep4zFeh22/OCzno0b0MOlbmmCLhEtEzjSRnhuiHVfiX01AGHx06L/bTbUOIEWsDlbAF9PEqdUsAabk4Z8LaK6Ce+rDKZPzpnRU74lOSXZtMJn5VA5UyL0bVYSxJOjHahHUVa4RL+YySk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=UUYIQful; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="UUYIQful" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4926f8e02e8so19603835e9.0 for ; Mon, 29 Jun 2026 05:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1782734687; x=1783339487; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WJgZmqjC2QA9/uTc6kcbWKzkbTz9n7WrrEXRH7DelFo=; b=UUYIQfulgvCcXCYNnUi2Qdd7wnHM0+X+nFPEjfxVAKNf1ELmMehdOj/6XFoAlF3qnh 1gnSXDnGYiDySQikI9iOz35OIL905EgWx4yeuPlP9UrzPQUC4Tntrx9bfjcHUQsozOS0 yynZVKNIGpVdD4wC12Ei/JH8WB4gYVPYME//1ZUjqXBcCM48w9bIVosk71Hy2Xz/RoM5 sLL87g2VsWL23bjIrl6abBn9nsfEAgqILF8ph+aEd1718bDA37pIl71rw9VRVPpS7VFR 4C+vY7mnDsVkE8fgbm0sPkChyKR7WIGpNKzoy2FKCZ38XOUJatLDTy1980At9Nu1PvlV i4lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782734687; x=1783339487; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WJgZmqjC2QA9/uTc6kcbWKzkbTz9n7WrrEXRH7DelFo=; b=BtoG48Ud/kWd/sqhvMOqyC0/TWGsi/X/uecXF0BYQ+iVh2hYXY9S8IlsvW6iyL+W0E Ny+32S6TxMZ5LCYN8XS81NrT7wEpNhJJ0/+87IY99OWnpG42GHGQGcyPTeKWugUy2McK 7t6XQ4PUczgeor91IAStnV4tfIgCfX3HsLHTRIx6e42sQDZ+y+LoBHAzNNI+ugUSDNwJ EoNB2kZN9hnPTiAmaAmSZOtO4NMKb9R3Y+OKPiReG2oOMdEnQPbzg5xGWGyBxORggpBK WhviCp8zivFlp6280HJDDhW7pPqb16vp8yYNlAav837Jk8ZF7MpW45eiG4CYmunEg5XA /BJw== X-Forwarded-Encrypted: i=1; AFNElJ+C0RWG3XmyjwvxV8PvKydgi3YrvtU8dVBXfi+XuoXNvvPxKbPM9e0dQRKty7xaBRnA/KxiNW5BhByXsQY=@vger.kernel.org X-Gm-Message-State: AOJu0YzLc76Ix749yFOxPHtmy/dZlxFF4BRYdro6iBadYjv1XonY6NiW nzg68uo+8cx6WY+EpMMk/kSVji/8KcoZgiggxmsCRB8iuFuPi23ydGnMHKDsUSRiUYw= X-Gm-Gg: AfdE7cnfh0X5D8HItQ/+F62UrNWFVfIyf1zscJ6Lb/7pufo6AYHzXRiUrZA8dnTwLCv 2GVPkn35Z3d8eM/g1EDutujzRa7U8B4kAd0we9t5HsDMIfLzUGgg/yzmIauCMH9tZkihYCBtLlk tZqPwfhZPyWJmUQxYb/Fo12uVoNxxOw9QG3LnXJaxdHeFt7elyZvQ41PLEEXgSQ7fOR8FWIygRe 8gf7OZrbGvtwQ5QU/1zqru/06Hx3V4mq/mgw/CVFkf2q/+HbU1mggXRSo7Mfwu6Ot/8UhSaKr3+ 1OTKmPykK865abkx7eR+Ohw7/XXvpccBOJzq1W84wtPPCaUKw1byULiJr5ceKvQ3fPH4kkftn6J +2krN4jwAW2yGf8qCIqIBFCqkaMZYhqQk2gZEoptOwFX6gJDiab1E5Ql7dhg02StHIil4itveQr dNV4J9MUsdgwA= X-Received: by 2002:a05:600c:1d86:b0:490:d354:bcf4 with SMTP id 5b1f17b1804b1-49266885dc4mr247452875e9.27.1782734686627; Mon, 29 Jun 2026 05:04:46 -0700 (PDT) Received: from localhost ([2a01:e0a:3c5:5fb1:1d21:f5d5:2d3c:23a7]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-49269071d05sm317487775e9.11.2026.06.29.05.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 05:04:46 -0700 (PDT) From: Jerome Brunet To: Martin Blumenstingl Cc: Christian Hewitt , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Neil Armstrong , Kevin Hilman , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: meson: aiu: fifo-spdif: soft reset the S/PDIF datapath on start/stop In-Reply-To: (Martin Blumenstingl's message of "Fri, 26 Jun 2026 22:41:24 +0200") References: <20260626080422.4191435-1-christianshewitt@gmail.com> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Mon, 29 Jun 2026 14:04:44 +0200 Message-ID: <1jwlvha6xv.fsf@starbuckisacylon.baylibre.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: quoted-printable On ven. 26 juin 2026 at 22:41, Martin Blumenstingl wrote: > On Fri, Jun 26, 2026 at 10:04=E2=80=AFAM Christian Hewitt > wrote: >> >> 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 equivalen= t: >> it only toggles the IEC958 DCU, so a stale datapath FIFO can be replayed, >> producing the "machine gun noise" buffer underrun - on start when switch= ing >> 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). >> >> 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. >> >> Signed-off-by: Christian Hewitt > Reviewed-by: Martin Blumenstingl > > This matches the vendor driver, references: > - fast-reset SPDIF is triggered on enable and disable: [0] > - fast-reset SPDIF is triggered after all of the configuration is > written, then DCU_FF_CTRL is enabled: [1] Take what the vendor driver does with a grain of salt, especially when it comes to audio > > [...] >> 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); > It doesn't seem to make any difference, so just for the record: > The vendor driver first triggers AIU_RST_SOFT_958_FAST then disables DCU:= [2] > One could even wonder if there is any point in applying a reset when everything is stopped, if the enable path will apply this same reset before anything else is started again ? Does it really changes anything to the reported issue ? > > Best regards, > Martin > > > [0] https://github.com/endlessm/linux-s905x/blob/c1391ba1116aed801aaabfd9= c7bbb76fda9801ec/sound/soc/aml/m8/aml_audio_hw.c#L1016 > [1] https://github.com/endlessm/linux-s905x/blob/c1391ba1116aed801aaabfd9= c7bbb76fda9801ec/sound/soc/aml/m8/aml_audio_hw.c#L979-L983 > [2] https://github.com/endlessm/linux-s905x/blob/c1391ba1116aed801aaabfd9= c7bbb76fda9801ec/sound/soc/aml/m8/aml_audio_hw.c#L1016-L1018 --=20 Jerome