All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gianluca Boiano <morf3089@gmail.com>
To: "Wang, Sen" <sen@ti.com>
Cc: Gianluca Boiano <morf3089@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
	Baojun Xu <baojun.xu@ti.com>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] ASoC: codecs: add TAS2557 mono smart amplifier driver
Date: Sat, 11 Jul 2026 13:39:36 +0200	[thread overview]
Message-ID: <20260711113936.71958-1-morf3089@gmail.com> (raw)
In-Reply-To: <e3ee8a6f-dcd7-4205-bd3d-da34a1b9aa14@ti.com>

> +	unsigned int asi_offset;
>
> Why does asi_offset need to be computed in both hw_param and
> set_tdm_slot? Shouldn't setting it in one of them suffice? AFAIK both
> func ran once per stream request.

hw_params() was computing a default unconditionally, clobbering
whatever set_tdm_slot() had set. v2 adds a tdm_configured flag:
hw_params() only computes the default when set_tdm_slot() hasn't run.

> For the firmware parsing, could we possibly reuse/extend the defintion
> headers from
> https://elixir.bootlin.com/linux/v7.1.2/source/include/sound/tas2781-dsp.h#L43

Checked tas2781-fmwlib.c. Same magic (0x35353532), same TI toolchain
lineage, but the formats diverge past that: tas2557's header carries
DDC-name and description fields tas2781's doesn't, tas2557 has a
mandatory PLL block stage before power-up that none of tas2781's
parser variants have, and tas2781's parser is built around its
multi-amplifier device-index model that tas2557 doesn't need. Not
sharing code between the two.

> If write failed hw_params should return the corresponding error code
> from ret no? Right now hw_params will return success regardless.

Fixed in v2, both writes now return on failure instead of just
warning.

Gianluca

  parent reply	other threads:[~2026-07-11 11:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 22:13 [PATCH v1 0/2] ASoC: codecs: add Texas Instruments TAS2557 smart amplifier driver Gianluca Boiano
2026-07-09 22:13 ` [PATCH v1 1/2] dt-bindings: sound: add Texas Instruments TAS2557 Gianluca Boiano
2026-07-10  4:10   ` Wang, Sen
2026-07-11 11:39     ` Gianluca Boiano
2026-07-10 12:49   ` Mark Brown
2026-07-11 11:39     ` Gianluca Boiano
2026-07-09 22:13 ` [PATCH v1 2/2] ASoC: codecs: add TAS2557 mono smart amplifier driver Gianluca Boiano
2026-07-09 22:26   ` sashiko-bot
2026-07-10  4:40   ` Wang, Sen
2026-07-10 12:45     ` Mark Brown
2026-07-11 11:39     ` Gianluca Boiano [this message]
2026-07-10 13:55   ` Mark Brown
2026-07-11 11:40     ` Gianluca Boiano

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=20260711113936.71958-1-morf3089@gmail.com \
    --to=morf3089@gmail.com \
    --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=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.