Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: <linux-sound@vger.kernel.org>,
	<linux-amlogic@lists.infradead.org>, <s.nawrocki@samsung.com>,
	<lgirdwood@gmail.com>, <broonie@kernel.org>,
	<linux-kernel@vger.kernel.org>, <jbrunet@baylibre.com>
Subject: Re: [RFC v2 2/2] ASoC: dapm: add support for preparing streams
Date: Mon, 13 Jan 2025 14:14:45 +0000	[thread overview]
Message-ID: <Z4Uf1XmwYH3TIcAO@opensource.cirrus.com> (raw)
In-Reply-To: <20250110210730.705613-3-martin.blumenstingl@googlemail.com>

On Fri, Jan 10, 2025 at 10:07:30PM +0100, Martin Blumenstingl wrote:
> Codec driver can implement .hw_params and/or .prepare from struct
> snd_soc_dai_ops. For codec-to-codec links only the former (.hw_params)
> callback has been called.
> 
> On platforms like Amlogic Meson8/8b/8m2 the SoC's sound card
> (sound/soc/meson/gx-card.c) uses a codec-to-codec link for the HDMI
> codec output because further digital routing is required after the
> backend. The new DRM HDMI (audio) codec framework (which internally
> uses sound/soc/codecs/hdmi-codec.c) relies on the .prepare callback
> of the hdmi-codec to be called. Implement calls to
> snd_soc_dai_prepare() so the .prepare callback is called. In this
> case the mandatory part is the call to prepare the sink (which is
> the hdmi-codec on those platforms). Also call snd_soc_dai_prepare()
> for the source to stay consistent with the rest of the code (even
> though it's not strictly necessary to make the DRM HDMI codec
> framework work on Amlogic Meson8/8b/8m2).
> 
> For platforms or sound cards without a codec-to-codec link with
> additional parameters (which applies to most hardware) this changes
> nothing as the .prepare callback is already called via
> snd_pcm_do_prepare() (as well as dpcm_fe_dai_prepare() and
> dpcm_be_dai_prepare()) on those.
> 
> Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

  reply	other threads:[~2025-01-13 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 21:07 [RFC v2 0/2] ASoC: prepare streams on codec-to-codec links Martin Blumenstingl
2025-01-10 21:07 ` [RFC v2 1/2] ASoC: soc-dai: add snd_soc_dai_prepare() and use it internally Martin Blumenstingl
2025-01-13 14:13   ` Charles Keepax
2025-01-10 21:07 ` [RFC v2 2/2] ASoC: dapm: add support for preparing streams Martin Blumenstingl
2025-01-13 14:14   ` Charles Keepax [this message]
2025-01-13 14:53 ` [RFC v2 0/2] ASoC: prepare streams on codec-to-codec links Jerome Brunet

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=Z4Uf1XmwYH3TIcAO@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=s.nawrocki@samsung.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