From: Takashi Iwai Subject: Re: [PATCH v2] ASoC: codec: hdac_hdmi: fix pin connections at cvt enable Date: Thu, 13 Jun 2019 12:21:45 +0200 Message-ID: References: <20190613101755.29740-1-kai.vehmanen@linux.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 mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D0029F8076F for ; Thu, 13 Jun 2019 12:21:46 +0200 (CEST) In-Reply-To: <20190613101755.29740-1-kai.vehmanen@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Kai Vehmanen Cc: libin.yang@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org, pierre-louis.bossart@linux.intel.com List-Id: alsa-devel@alsa-project.org On Thu, 13 Jun 2019 12:17:55 +0200, Kai Vehmanen wrote: > > +/** > + * Go through all converters and ensure connection is set to > + * the correct pin as set via kcontrols. > + */ Avoid using the double asterisks "/**" unless it's an entry for kernel-doc. > +static void hdac_hdmi_verify_connect_sel_all_pins(struct hdac_device *hdev) > +{ > + struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); > + struct hdac_hdmi_port *port; > + struct hdac_hdmi_cvt *cvt; > + int cvt_idx = 0; > + > + list_for_each_entry(cvt, &hdmi->cvt_list, head) { > + port = hdac_hdmi_get_port_from_cvt(hdev, hdmi, cvt); > + if (port && port->pin) { > + snd_hdac_codec_write(hdev, port->pin->nid, 0, > + AC_VERB_SET_CONNECT_SEL, cvt_idx); > + dev_dbg(&hdev->dev, "%s: %s set connect %d -> %d\n", > + __func__, cvt->name, port->pin->nid, cvt_idx); Please fix indentation and use tabs. > + } > + ++cvt_idx; > + } > +} > + > /* > * This tries to get a valid pin and set the HW constraints based on the > * ELD. Even if a valid pin is not found return success so that device open > @@ -806,6 +829,14 @@ static int hdac_hdmi_cvt_output_widget_event(struct snd_soc_dapm_widget *w, > AC_VERB_SET_CHANNEL_STREAMID, pcm->stream_tag); > snd_hdac_codec_write(hdev, cvt->nid, 0, > AC_VERB_SET_STREAM_FORMAT, pcm->format); > + > + /** > + * The connection indices are shared by all converters and > + * may interfere with each other. Ensure correct > + * routing for all converters at stream start. > + */ Avoid the double-asterisks. thanks, Takashi