[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFBinCDanNUqcM35gEn7yREY0egddGMCppemnxj57Wo065Rwww@mail.gmail.com>
Date: Mon, 6 Jan 2025 21:17:55 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Jerome Brunet <jbrunet@...libre.com>, broonie@...nel.org
Cc: linux-sound@...r.kernel.org, linux-amlogic@...ts.infradead.org,
s.nawrocki@...sung.com, lgirdwood@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 2/2] ASoC: dapm: add support for preparing streams
On Mon, Jan 6, 2025 at 3:28 PM Jerome Brunet <jbrunet@...libre.com> wrote:
>
> On Mon 06 Jan 2025 at 15:13, Martin Blumenstingl <martin.blumenstingl@...glemail.com> 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 a call to
> > snd_soc_dai_prepare() so the .prepare callback of the hdmi-codec is
> > called on those platforms.
> >
> > 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@...libre.com>
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
>
> Thanks for working on this. Overall it looks good.
>
> Not sure if the call the .prepare() should go at the beginning of
> POST_PMU, as done here, or at the end of PRE_PMU ?
I only know that .prepare() should be called later than .hw_params()
so this is what I came up with.
Mark, do you have any preferences or suggestions here?
Regarding the call to snd_soc_dai_prepare(): I'll take care of that in
v2 once the above question has been clarified.
Best regards,
Martin
Powered by blists - more mailing lists