From: Takashi Iwai Subject: Re: [PATCH v6 03/15] ASoC: hdac_hdmi: Enable DP1.2 and all converters/pins Date: Mon, 15 Feb 2016 23:31:48 +0100 Message-ID: References: <1455243375-16067-1-git-send-email-subhransu.s.prusty@intel.com> <1455243375-16067-4-git-send-email-subhransu.s.prusty@intel.com> <20160215201049.GD18327@sirena.org.uk> 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 797CF265327 for ; Mon, 15 Feb 2016 23:31:49 +0100 (CET) In-Reply-To: <20160215201049.GD18327@sirena.org.uk> 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: Mark Brown Cc: patches.audio@intel.com, Vinod Koul , alsa-devel@alsa-project.org, "Subhransu S. Prusty" , lgirdwood@gmail.com List-Id: alsa-devel@alsa-project.org On Mon, 15 Feb 2016 21:10:49 +0100, Mark Brown wrote: > > On Fri, Feb 12, 2016 at 07:46:03AM +0530, Subhransu S. Prusty wrote: > > > +static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdac) > > +{ > > + unsigned int vendor_param; > > + > > + vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, > > + INTEL_GET_VENDOR_VERB, 0); > > + if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS) > > + return; > > + > > + vendor_param |= INTEL_EN_ALL_PIN_CVTS; > > + vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, > > + INTEL_SET_VENDOR_VERB, vendor_param); > > + if (vendor_param == -1) > > + return; > > +} > > So to enable the pins we do a read? That seems... innovative. :/ It's a weird nature of HD-audio verb handling. While *_write() just sends the verb asynchronously, *_read() sends the verb, does sync and read-back the return value. But both read and write may handle the same verb. Takashi