[PATCH v6 03/10] drm/connector: implement generic HDMI codec helpers
Maxime Ripard
mripard at kernel.org
Mon Dec 16 23:43:10 PST 2024
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.
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241217/f5014c57/attachment.sig>
More information about the linux-arm-kernel
mailing list