Re: [PATCH v2 3/3] ALSA: hda: add support for Huawei WMI MicMute LED

From: Andy Shevchenko
Date: Mon Nov 05 2018 - 09:47:14 EST


On Sat, Nov 3, 2018 at 1:21 AM <ayman.bagabas@xxxxxxxxx> wrote:
> On Fri, 2018-11-02 at 20:12 +0200, Andy Shevchenko wrote:
> > On Fri, Nov 2, 2018 at 6:12 AM Ayman Bagabas <ayman.bagabas@xxxxxxxxx
> > > wrote:

Takashi explained me, that is the way sound driver are using the
external symbols, so, follow his suggestion.

> > > +static int (*huawei_wmi_micmute_led_set_func)(bool);
> >
> > Why is that?
>
> This is used with symbol_request and then in the update function to
> locate the function from the wmi device. But I guess you are right, we
> could use the function defined in the header file directly.

> > Takashi, is it a way how the rest sound drivers are written? B/c this
> > symbol_request(s) look to me a bit ugly.
> >
> > > +/* for alc_fixup_huawei_micmute_led */
> > > +#include "huawei_wmi_helper.c"
> >
> > Ditto.
> >
> > Include *.c?! Huh?
>
> Is that the wrong way? Should I define the functions directly into
> patch_realtek.c?


--
With Best Regards,
Andy Shevchenko