From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v3 08/15] ASoC: hdac_hdmi: Create widget/route based on nodes enumerated Date: Mon, 07 Dec 2015 17:14:41 +0100 Message-ID: References: <1449523078-4311-1-git-send-email-subhransu.s.prusty@intel.com> <1449523469-4395-1-git-send-email-subhransu.s.prusty@intel.com> <1449523469-4395-8-git-send-email-subhransu.s.prusty@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id ECAA426070C for ; Mon, 7 Dec 2015 17:14:42 +0100 (CET) In-Reply-To: <1449523469-4395-8-git-send-email-subhransu.s.prusty@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Subhransu S. Prusty" Cc: patches.audio@intel.com, Vinod Koul , alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com List-Id: alsa-devel@alsa-project.org On Mon, 07 Dec 2015 22:24:22 +0100, Subhransu S. Prusty wrote: > > Instead of direct mapping between converter and pin, Muxes are > added between them to support any converter connection to any pin. > > As the possible mux inputs can only be identified during runtime, > all possible routes are created to connect all converters to all > pin muxes. The user should enable appropriate mux inputs to enable > correct port. > > In the process to support the above changes widget/route fill APIs > are updated to take all required parameters. > > Signed-off-by: Subhransu S. Prusty > Signed-off-by: Vinod Koul > --- > sound/soc/codecs/hdac_hdmi.c | 224 ++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 202 insertions(+), 22 deletions(-) > > diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c > index 01d063e..467143cc 100644 > --- a/sound/soc/codecs/hdac_hdmi.c > +++ b/sound/soc/codecs/hdac_hdmi.c > @@ -463,46 +463,224 @@ static int hdac_hdmi_query_pin_connlist(struct hdac_ext_device *hdac, > return pin->num_mux_nids; > } > > -static void hdac_hdmi_fill_widget_info(struct snd_soc_dapm_widget *w, > - enum snd_soc_dapm_type id, > - const char *wname, const char *stream) > +static void hdac_hdmi_fill_widget_info(struct device *dev, > + struct snd_soc_dapm_widget *w, > + enum snd_soc_dapm_type id, void *priv, > + const char *wname, const char *stream, > + struct snd_kcontrol_new *wc, int numkc) > { > w->id = id; > - w->name = wname; > + w->name = devm_kstrdup(dev, wname, GFP_KERNEL); Missing NULL check. Not only here but in handful places in this patch. Takashi