devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Maciej Strozek <mstrozek@opensource.cirrus.com>,
	Takashi Iwai <tiwai@suse.com>,
	Faiz Nabi Kuchay <fkuchay@oss.qualcomm.com>,
	Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>,
	patches@opensource.cirrus.com, linux-sound@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 11/11] ASoC: codecs: add Qualcomm Tambora (WCD9378) SDCA codec
Date: Mon, 7 Sep 2026 23:37:49 +0100	[thread overview]
Message-ID: <c7fec9d0-b79f-437c-ba8b-37858842c545@oss.qualcomm.com> (raw)
In-Reply-To: <005e3c81-778a-47bc-a8ae-fb5c38ea2e2c@linux.dev>

On 9/7/26 8:47 PM, Pierre-Louis Bossart wrote:
> My take is that rather than encode all properties in C, it's probably
> worth exploring a DT representation of the concepts that *can* be used
> fairly easily and make the life of codec vendors easier - not as a> literal translation of ACPI.

Two things are getting mixed here:

  A. Representation: how the SDCA info is expressed as ACPI
     DisCo, DT properties, static C tables, or a firmware blob.

  B. Reuse of the generic class function drivers, which ultimately
     consume struct sdca_function_data.

Whatever A looks like, we end up at the same struct sdca_function_data
that B consumes.  sdca_parse_function() converts ACPI DisCo to it
today; populate_function() does the same from static C tables; a DT
parser would do it from DT.  Same runtime after that.

Static C tables at least mirror the SDCA spec's own entity/control
structure, so the code stays readable against the spec rather than
inventing a new shape.  They are also a byte-for-byte match against
Qualcomm's QcSimpleJack.asl and a live Lenovo T14s DSDT, so we are not
maintaining them as a fork of the vendor source, they are a
mechanical transcription with a verifiable origin.

We landed on static C tables here because the previous DT round was
clear: "if it's derivable from the compat string, keep it out of DT"
(https://lkml.org/lkml/2026/7/29/1166).

As Mark pointed out, DT + SDCA has two use-cases today:

  1. Devices that have a reference ACPI table but boot Linux with DT
     because no ACPI enablement package (PEP) exists on the SoC yet.
     this is what I'm working on.

  2. Devices with no ACPI reference at all. I'm not sure any of the
     SDCA codecs in sound/soc/codecs/*sdca* today falls into that category.

Solving both in one shot requires SDCA DT bindings that either
translate to struct sdca_function_data, or represent the SDCA spec
fully in DT and share the same parser flow.

I agree a DT expression of the *concepts*  not a literal DisCo
mirror would be a better A.  I want to bring that back to LPC 2026
DT MC as a concrete proposal grounded in the earlier DT-maintainer
feedback rather than re-litigating it inline on this series.  Because
B stays put, switching A later is a change inside populate_function,
not an ABI break. so landing this series does not close the door on
the representation you're asking for.

--srini
> 
> Putting everything in C seems like a code management nightmare to me.


  parent reply	other threads:[~2026-09-07 22:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07  8:37 [PATCH v2 00/11] ASoC: SDCA: enable on DT platforms and add Qualcomm WCD9378 (Tambora) codec Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 01/11] ASoC: SDCA: allow building without ACPI Srinivas Kandagatla
2026-09-07  8:54   ` Richard Fitzgerald
2026-09-07  9:09     ` Takashi Iwai
2026-09-07  8:37 ` [PATCH v2 02/11] ASoC: SDCA: export PM helpers keyed on sdca_class_drv Srinivas Kandagatla
2026-09-07  8:50   ` sashiko-bot
2026-09-07  9:43     ` Srinivas Kandagatla
2026-09-08 16:22   ` Charles Keepax
2026-09-08 17:49     ` Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 03/11] ASoC: SDCA: expose class SoundWire probe/remove/read_prop as library Srinivas Kandagatla
2026-09-07  8:51   ` sashiko-bot
2026-09-07 11:31   ` Pierre-Louis Bossart
2026-09-07 13:29     ` Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 04/11] ASoC: SDCA: add hw_ops with hw_init hook Srinivas Kandagatla
2026-09-07 11:29   ` Pierre-Louis Bossart
2026-09-07 13:33     ` Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 05/11] ASoC: SDCA: add populate_function hw_op for DT function data Srinivas Kandagatla
2026-09-07 11:28   ` Pierre-Louis Bossart
2026-09-07 13:16     ` Charles Keepax
2026-09-08 16:25   ` Charles Keepax
2026-09-08 18:00     ` Srinivas Kandagatla
2026-09-09  8:34       ` Charles Keepax
2026-09-07  8:37 ` [PATCH v2 06/11] ASoC: SDCA: class_function: xlate sound-dai cell by entity index Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 07/11] ASoC: SDCA: register SDCA_FUNCTION_TYPE_SIMPLE_JACK in class function driver Srinivas Kandagatla
2026-09-07 11:32   ` Pierre-Louis Bossart
2026-09-07  8:37 ` [PATCH v2 08/11] ASoC: SDCA: make find_sdca_control_reset() return void Srinivas Kandagatla
2026-09-07 11:32   ` Pierre-Louis Bossart
2026-09-07 13:03     ` Charles Keepax
2026-09-07 13:16       ` Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 09/11] ASoC: SDCA: add sdca_apply_default_control_classifiers() helper Srinivas Kandagatla
2026-09-07  8:37 ` [PATCH v2 10/11] dt-bindings: sound: qcom: add Tambora WCD9378 SDCA codec Srinivas Kandagatla
2026-09-07  8:56   ` sashiko-bot
2026-09-07  8:37 ` [PATCH v2 11/11] ASoC: codecs: add Qualcomm Tambora (WCD9378) " Srinivas Kandagatla
2026-09-07  9:01   ` sashiko-bot
2026-09-07 11:32   ` Pierre-Louis Bossart
2026-09-07 13:03     ` Srinivas Kandagatla
2026-09-07 19:47       ` Pierre-Louis Bossart
2026-09-07 21:26         ` Mark Brown
2026-09-07 22:37         ` Srinivas Kandagatla [this message]
2026-09-08  8:49           ` Charles Keepax
2026-09-08  9:09             ` Srinivas Kandagatla
2026-09-08 10:37               ` Richard Fitzgerald
2026-09-08 12:31                 ` Srinivas Kandagatla
2026-09-08 13:20                   ` Charles Keepax
2026-09-08 13:34                     ` Srinivas Kandagatla
2026-09-08 14:22                       ` Pierre-Louis Bossart
2026-09-08 15:33                         ` Charles Keepax
2026-09-08 15:34                           ` Srinivas Kandagatla
2026-09-08 15:58   ` Uwe Kleine-König
2026-09-08 16:20   ` Charles Keepax

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=c7fec9d0-b79f-437c-ba8b-37858842c545@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fkuchay@oss.qualcomm.com \
    --cc=jorijnvdgraaf@catcrafts.net \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mstrozek@opensource.cirrus.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.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;
as well as URLs for NNTP newsgroup(s).