From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796289012; b=l0X8cZJWKaY+wJIJi99UMOXsLC+kvYtO1VVHgCSxsxVCs6aKP418sac6I73YQmSmXqPO dGm2FV9rXpYFNrL1lDP/Wf5kVr1A4728TQfij3lOuPKG25+LIUv6YhY5qArUBoeHvDSwB 3n7skSTJLX1gIdparpaoZPfTTBLzJx/L8rTrXmP9nMvnZMx/EBD60pskQEErU5zVP96PX aBxR/nQcwJhlfS0PIxTspH0l0sNnUz627y64OZMdMH/V9AOj9cSWKIEf4vRZmnm9x585U WvAmhiYhXfHGMpR4X9sM9dD7vAInLaYpwDWw2dFDU54icXAPjgHBx8hJ63acyDNX0Ow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796289012; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=aovDMa7dhMwielgin3rR483pHsVIKvTrxsb886SXr5Q=; b=elDGXIYWd07TlxwZ4In9SAS6ka+km0GkC6gwr+f3+DHnCDbYPQMHIejAjH2mjRQCrLVd z9kq65F4cPRxAgc8AH6l+L4GwF93r/GFKf8pdGA8U0tcjDK6syR8rYlQ4x6MSm6tetHKW oJCwbQURe0FX76FIKgXHcZlkKpw2G5AskG61ZTr/XkxG/AiQ31My2gi5mPL2sKY6JJW7f 2vizgMCKbTrJTxB82K10PLAGOVmXU7M0PayYP6T3vp5KzKUl83uH+LV8I1Gof+5QbDk71 qrERCwTUKoYcjknYnt+xkreXsBAhvCTq0RT1pnPIxf/v7HpelCr5urvcMGYXOILnmOQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lnu10V5r; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 411AF606A322; Thu, 3 Dec 2026 09:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lnu10V5r Received: by smtp.kernel.org (Postfix) with ESMTPSA id 845B91F000C1; Thu, 3 Dec 2026 09:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796289011; bh=aovDMa7dhMwielgin3rR483pHsVIKvTrxsb886SXr5Q=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=lnu10V5rAhrehE1wCbKJIuSDeaey6sAOM9JsB/2ZBOOI4Lsq3K+GSjK60+Tcl9wSM a/zSSIRijr3kOZYra6+YcZNDerYfHpXwK3lkO92vMmCrXYzzqaAl/ig9LfR8iu5icg n9Rs5ymtCRCu88dVAao+yu2Y6o7O/X7tWaDskuKsGdtqtPifOIiVE7S55rL8G4/FL0 ZSSsgryY8AvArTs3Ek5DHHwkGv77v/u1n7qCInYe0qwrJtbfMp9bAAoiyG9AvyVyOy aiKyCkhIzM0fRnjCbAXSfI7VeYLJ1hwVcDN+UGtJBKTTghyj4k1x6w4aKKupgpaH/8 +Yl9xD4CCCg1A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 5/5] ASoC: pcm179x: Add support for pcm1975 Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?Um9tYW4gU21yxb4=?= Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261203-work-v3-5-e8a96f1c44e8@amarulasolutions.com> References: <20261203-work-v3-0-e8a96f1c44e8@amarulasolutions.com> <20261203-work-v3-5-e8a96f1c44e8@amarulasolutions.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 09:10:11 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Medium] ASoC: pcm179x: device_get_match_data() ignores SPI/I2C ID tables for PCM1795 - [Medium] ASoC: pcm179x: advertises S16 formats unsupported by PCM1795 I2S and LEFT_J - [Low] ASoC: pcm179x: commit subject misspells pcm1795 as pcm1975 -- commit 286abf7a34191f88264a3710eaa536e931b8370f Author: Roman Smr=C5=BE ASoC: pcm179x: Add support for pcm1975 This commit adds support for the TI PCM1795 DAC to the pcm179x ASoC codec driver, introducing per-model register 18 FMT[2:0] lookup tables and resolving the codec model via device_get_match_data(). > ASoC: pcm179x: Add support for pcm1975 [Severity: Low] This isn't a bug, but "pcm1975" in the subject is a typo for "pcm1795". [ ... ] > diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c > index 559ecaa32f59b..8b21a141f6657 100644 > --- a/sound/soc/codecs/pcm179x.c > +++ b/sound/soc/codecs/pcm179x.c [ ... ] > @@ -191,7 +227,7 @@ static struct snd_soc_dai_driver pcm179x_dai =3D { > .rates =3D SNDRV_PCM_RATE_CONTINUOUS, > .rate_min =3D 10000, > .rate_max =3D 200000, > - .formats =3D PCM1792A_FORMATS, }, > + .formats =3D PCM179X_FORMATS, }, > .ops =3D &pcm179x_dai_ops, > }; [Severity: Medium] As reported by Mark Brown on v2 [1], does pcm179x_dai still advertise 16-bit formats that PCM1795 does not support in I2S or LEFT_J mode? PCM179X_FORMATS includes SNDRV_PCM_FMTBIT_S16_LE (expanded to S16_BE by .endianness =3D 1), whereas pcm1795_fmt[] only accepts 16-bit samples in RIGHT_J mode. On a PCM1795 wired in I2S mode, userspace sees 16-bit as natively supported, skips software conversion, and fails in pcm179x_hw_params() with -EINVAL. Constraining the advertised formats based on the model and configured DAI format (preserving big-endian variants) would let userspace negotiate a supported format. > @@ -226,6 +262,8 @@ int pcm179x_common_init(struct device *dev, struct re= gmap *regmap) > if (!pcm179x) > return -ENOMEM; > =20 > + pcm179x->codec_model =3D > + (enum pcm179x_type)(uintptr_t)device_get_match_data(dev); > pcm179x->regmap =3D regmap; > dev_set_drvdata(dev, pcm179x); [Severity: Medium] As reported by Mark Brown on v2 [1], does device_get_match_data() ignore the SPI and I2C ID tables when probing without an OF node? device_get_match_data() only queries fwnode match data, so instantiating a PCM1795 via spi_board_info or I2C sysfs new_device returns NULL and silently misidentifies the codec as PCM1792A. pcm179x_hw_params() then writes the wrong register 18 FMT[2:0] encodings (such as 5 instead of 4 for 32-bit I2S), breaking playback. The PCM1795 and PCM1796 values added to pcm179x_spi_ids[] are never read, and pcm179x_i2c_ids[] lacks per-model entries so a pcm1795 I2C device cannot bind when CONFIG_OF is disabled. Resolving the model in pcm179x_spi_probe() and pcm179x_i2c_probe() via spi_get_device_match_data() and i2c_get_match_data() (with per-model entries in pcm179x_i2c_ids[]) and passing it to pcm179x_common_init() would cover both OF and ID-table probes. [1] https://lore.kernel.org/r/179304174310.199157.17471232393944903445.b4-r= eview@b4 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-work-v3-0-= e8a96f1c44e8@amarulasolutions.com?part=3D5