From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F02FFA372A for ; Thu, 17 Oct 2019 08:00:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BAAF12089C for ; Thu, 17 Oct 2019 08:00:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RDDbblGR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAAF12089C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C90BE1666; Thu, 17 Oct 2019 09:59:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C90BE1666 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1571299245; bh=9LHMmG/s6wNE7wJhN6Wob0jqZYnpDOOAwfwPDXpF+Ew=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RDDbblGRyidd3shIslamueaJCiiYVFPZSfRnPD68kU7sPeNNAs2VrkWE7wbIWwofH 0G8vlGA2dldtbb4zpRLlKwE5e6Crn2ZKAmMOqYwcAilfyi7liXvJvpjQi9Ze6uyF8A JGoGUxvY/FcWovcOTt1+Au24Ue3ebmx47LiuXuxw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 40414F804AA; Thu, 17 Oct 2019 09:59:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 58101F804AB; Thu, 17 Oct 2019 09:59:54 +0200 (CEST) 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 1CB88F802A0 for ; Thu, 17 Oct 2019 09:59:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1CB88F802A0 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A5E1EAE40; Thu, 17 Oct 2019 07:59:51 +0000 (UTC) Date: Thu, 17 Oct 2019 09:59:51 +0200 Message-ID: From: Takashi Iwai To: Kai Vehmanen In-Reply-To: References: <20190925112409.1762-1-kai.vehmanen@linux.intel.com> <20190925112409.1762-3-kai.vehmanen@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: libin.yang@intel.com, alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com Subject: Re: [alsa-devel] [PATCH v5 2/9] ASoC: hdac_hda: add support for HDMI/DP as a HDA codec X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 25 Sep 2019 13:38:50 +0200, Kai Vehmanen wrote: > > Hello, > > Takashi, please check whether this is ok. I'll highlight the changed > section below: > > On Wed, 25 Sep 2019, Kai Vehmanen wrote: > > > static int hdac_hda_codec_probe(struct snd_soc_component *component) > > { > > struct hdac_hda_priv *hda_pvt = > > @@ -322,6 +392,15 @@ static int hdac_hda_codec_probe(struct snd_soc_component *component) > > > > snd_hdac_ext_bus_link_get(hdev->bus, hlink); > > > > + /* > > + * Ensure any HDA display is powered at codec probe. > > + * After snd_hda_codec_device_new(), display power is > > + * managed by runtime PM. > > + */ > > + if (hda_pvt->need_display_power) > > + snd_hdac_display_power(hdev->bus, HDA_CODEC_IDX_CONTROLLER, > > + true); > > + > > This is the new bit (and matching logic in patch 5).The bug required a > very specific timing sequence to trigger, but a clear bug nevertheless. I > tried to fix it in spirit of your refactoring patch of to this area > 029d92c289bd, "ALSA: hda: Refactor display power management". I.e. just > like snd_hda_intel's controller code, display power is enabled before > probe and later managed by codec using common code. > > Additional SOF specific twist is that I need to pass the > "need_display_power" info from SOF code (where the initial codec probe is > done and we detect a HDMI HDA codec)), to soc/codecs/hdac_hda.c where the > actual driver probe is run for the codec. In snd_hda_intel this is all in > one place, so somewhat more straighforward, but logic is the same. This change looks OK to me. The recent display power management is no longer refcounted, so it's fine to toggle power on at the early stage like this patch does. thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel