[PATCH v6 03/10] drm/connector: implement generic HDMI codec helpers
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Tue Dec 17 04:31:47 PST 2024
On Tue, Dec 17, 2024 at 08:43:10AM +0100, Maxime Ripard wrote:
> Hi,
>
> On Mon, Dec 16, 2024 at 07:47:32PM +0200, Dmitry Baryshkov wrote:
> > On Mon, Dec 16, 2024 at 06:04:41PM +0100, Maxime Ripard wrote:
> > > > +struct drm_connector_hdmi_codec_funcs {
> > > > + /**
> > > > + * @audio_startup:
> > > > + *
> > > > + * Called when ASoC starts an audio stream setup. The
> > > > + * @hdmi_audio_startup is optional.
> > > > + *
> > > > + * Returns:
> > > > + * 0 on success, a negative error code otherwise
> > > > + */
> > > > + int (*audio_startup)(struct drm_connector *connector);
> > > > +
> > > > + /**
> > > > + * @prepare:
> > > > + * Configures HDMI-encoder for audio stream. Can be called
> > > > + * multiple times for each setup. Mandatory.
> > > > + *
> > > > + * Returns:
> > > > + * 0 on success, a negative error code otherwise
> > > > + */
> > > > + int (*prepare)(struct drm_connector *connector,
> > > > + struct hdmi_codec_daifmt *fmt,
> > > > + struct hdmi_codec_params *hparms);
> > >
> > > Missing newline
> > >
> > > > + /**
> > > > + * @audio_shutdown:
> > > > + *
> > > > + * Shut down the audio stream. Mandatory.
> > > > + *
> > > > + * Returns:
> > > > + * 0 on success, a negative error code otherwise
> > > > + */
> > > > + void (*audio_shutdown)(struct drm_connector *connector);
> > >
> > > And thus we can probably just call that one shutdown?
> >
> > It should be called automatically by the sound system. I'd rather not
> > call items directly that we are not supposed to call.
>
> I meant that with my suggestion to call the function
> drm_connector_hdmi_audio_init, that structure would be called
> drm_connector_hdmi_audio_funcs, and thus the audio prefix in
> audio_shutdown is redundant.
I see. I posted the next iteration already, but I'll try to remember
this change for the next iteration.
--
With best wishes
Dmitry
More information about the Linux-mediatek
mailing list