mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Roman Smrž" <roman@amarulasolutions.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Peter Rosin" <peda@lysator.liu.se>,
	"Martin Povišer" <povik+lin@cutebit.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Shenghao Ding" <shenghao-ding@ti.com>,
	"Kevin Lu" <kevin-lu@ti.com>, "Baojun Xu" <baojun.xu@ti.com>,
	"Sen Wang" <sen@ti.com>, "Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	asahi@lists.linux.dev, linux-sound@vger.kernel.org,
	patches@opensource.cirrus.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com,
	"Michael Trimarchi" <michael@amarulasolutions.com>
Subject: Re: [PATCH v2 5/5] ASoC: pcm179x: Add support for pcm1975
Date: Wed, 11 Nov 2026 17:36:53 +0100	[thread overview]
Message-ID: <avSZpeqgC9Nh7ax4@garnet.lan> (raw)
In-Reply-To: <179304174310.199157.17471232393944903445.b4-review@b4>

On Mon, Oct 26, 2026 at 07:09:03PM +0000, Mark Brown wrote:
> > The PCM1795 is register compatible with the PCM1792A, but it encodes two
> > of the register 18 FMT[2:0] values differently: code 001 selects 32-bit
> > standard data instead of 20-bit, and code 100 selects 32-bit I2S instead
> > of 16-bit I2S. It has no 20-bit format at all. The PCM1796 shares the
> > PCM1792A encoding.
> 
> > +	{ .compatible = "ti,pcm1795", .data = (void *)PCM1795, },
> > +	{ .compatible = "ti,pcm1796", .data = (void *)PCM1796, },
> >  	{ }
> >  };
> 
> >  static const struct spi_device_id pcm179x_spi_ids[] = {
> >  	{ "pcm1792a", 0 },
> > +	{ "pcm1795", 0 },
> 
> Don't we need to set the driver data to PCM1795 like we do for the other
> DT based entries?

Yes, I'll fix that.

> > +static const struct pcm179x_fmt_table pcm1795_fmt[] = {
> > +	{ SND_SOC_DAIFMT_RIGHT_J, 16, 0 },
> > +	{ SND_SOC_DAIFMT_RIGHT_J, 24, 2 },
> > +	{ SND_SOC_DAIFMT_RIGHT_J, 32, 1 },
> > +	{ SND_SOC_DAIFMT_LEFT_J,  24, 3 },
> > +	{ SND_SOC_DAIFMT_I2S,     24, 5 },
> > +	{ SND_SOC_DAIFMT_I2S,     32, 4 },
> 
> Does this line up with the constraints advertised by the driver?  LEFT_J
> and S32 isn't here, but S16 is?  We're also not handling big endian.

Yes, the 32bit variant for LEFT_J should be here as well. But what
should be handled for big endian here? As far as I've understood,
the bit stream on wire would be the same regardless of byte order in
memory.

> > @@ -191,7 +241,7 @@ static struct snd_soc_dai_driver pcm179x_dai = {
> >  		.rates = SNDRV_PCM_RATE_CONTINUOUS,
> >  		.rate_min = 10000,
> >  		.rate_max = 200000,
> > -		.formats = PCM1792A_FORMATS, },
> > +		.formats = PCM179X_FORMATS, },
> 
> It'd probably be easier to just register different constraints depending
> on the device rather than having constraints in startup, you'd get much
> better reuse of the core code that way.  Dynamic updates are usually
> done for things that can vary at runtime like clock rates.

After rechecking the format list, all the supported variants should have
the same "formats" field, so I can remove the distinction for that point
altogether.

Best Regrads
	Roman Smrž

      reply	other threads:[~2026-11-11 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 10:33 [PATCH v2 0/5] ASoC: pcm179x: Add support for pcm1795 and pcm1796 Roman Smrž
2026-10-16 10:33 ` [PATCH v2 1/5] ASoC: dt-bindings: Add ti,pcm1795 and ti,pcm1796 Roman Smrž
2026-10-17 17:45   ` Krzysztof Kozlowski
2026-10-16 10:33 ` [PATCH v2 2/5] ASoC: pcm179x: Refactor regmap value lookup Roman Smrž
2026-10-16 10:33 ` [PATCH v2 3/5] ASoC: pcm179x: Add left-justified formats for pcm1792a Roman Smrž
2026-10-16 10:33 ` [PATCH v2 4/5] ASoC: pcm179x: Add compatible string for pcm1796 and spi_ids entry Roman Smrž
2026-10-16 10:33 ` [PATCH v2 5/5] ASoC: pcm179x: Add support for pcm1975 Roman Smrž
2026-10-26 19:09   ` Mark Brown
2026-11-11 16:36     ` Roman Smrž [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avSZpeqgC9Nh7ax4@garnet.lan \
    --to=roman@amarulasolutions.com \
    --cc=asahi@lists.linux.dev \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=michael@amarulasolutions.com \
    --cc=nuno.sa@analog.com \
    --cc=patches@opensource.cirrus.com \
    --cc=peda@lysator.liu.se \
    --cc=perex@perex.cz \
    --cc=povik+lin@cutebit.org \
    --cc=robh@kernel.org \
    --cc=sen@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®