lkml.org 
[lkml]   [2019]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] ASoC: hdmi-codec: Add an op to set callback function for plug event
On Fri, Jul 5, 2019 at 8:12 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Fri, Jul 05, 2019 at 03:08:37PM +0800, Tzung-Bi Shih wrote:
> > On Fri, Jul 5, 2019 at 12:26 PM Cheng-Yi Chiang <cychiang@chromium.org> wrote:
>
> > > +typedef void (*hdmi_codec_plugged_cb)(struct platform_device *dev,
> > > + bool plugged);
> > > +
>
> > The callback prototype is "weird" by struct platform_device. Is it
> > possible to having snd_soc_component instead of platform_device?
>
> Or if it's got to be a device why not just a generic device so
> we're not tied to a particular bus here?

My intention was to invoke the call in dw-hdmi.c like this:

hdmi->plugged_cb(hdmi->audio,
result == connector_status_connected);

Here hdmi->audio is a platform_device.
I think dw-hdmi can not get snd_soc_component easily.
I can use a generic device here so the ops is more general.
The calling will be like
hdmi->plugged_cb(&hdmi->audio->dev,
result == connector_status_connected);
I will update this in v2.
Thanks!

\
 
 \ /
  Last update: 2019-07-08 07:05    [W:0.081 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site