From patchwork Thu Apr 11 14:19:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C14917E0 for ; Thu, 11 Apr 2019 14:37:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BA4528D20 for ; Thu, 11 Apr 2019 14:37:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CAFF28C01; Thu, 11 Apr 2019 14:37:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 68C2E28CF4 for ; Thu, 11 Apr 2019 14:37:55 +0000 (UTC) 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 4A303871; Thu, 11 Apr 2019 16:37:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4A303871 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993473; bh=W/zQPt4FOKxKCQLWg/RYWPp8GvgDtLevCsRgNCfeJsQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BER291llrJtLVzh7fgpYRezqVo+nQ7wFkCUXQhDaFp09mn+IK7N02cFKF6FJjXp3k P9ye8n+DUohrv/NwSUly1Qhdk4zS6ZHoFkaEBCmkpx6v5EwE9yWxsYw5SgmI2skvcc 2qQRPKJT+fqGhypBcel/SUH20+nZsLIJTXG0PLSk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2053CF89616; Thu, 11 Apr 2019 16:36:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3097F8971A; Thu, 11 Apr 2019 16:36:08 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2E5D7F89625 for ; Thu, 11 Apr 2019 16:36:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2E5D7F89625 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506495" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:00 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:49 +0800 Message-Id: <1554992400-28777-2-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 01/12] ASoC: intel: boards: define some general functions for hdac_hdmi 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang Create hdac_hdmi_common.h and define some general functions related to hdac_hdmi codec. Signed-off-by: Libin Yang --- sound/soc/intel/boards/hdac_hdmi_common.h | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sound/soc/intel/boards/hdac_hdmi_common.h diff --git a/sound/soc/intel/boards/hdac_hdmi_common.h b/sound/soc/intel/boards/hdac_hdmi_common.h new file mode 100644 index 0000000..277493d --- /dev/null +++ b/sound/soc/intel/boards/hdac_hdmi_common.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright(c) 2019 Intel Corporation. + */ + +/* + * This file includes the general functions related to hdac_hdmi codec, + * which is used by the different boards + */ + +#ifndef __SOUND_SOC_HDAC_HDMI_COMMON +#define __SOUND_SOC_HDAC_HDMI_COMMON + +static int hdac_hdmi_add_device_link(struct device *consumer, + struct device *supplier, + struct device_link **link) +{ + /* + * Setup a device_link between machine device and HDMI codec device. + * The machine device is the consumer and the HDMI codec device is + * the supplier. With this setting, we can make sure that the audio + * domain in display power will be always turned on before operating + * on the HDMI audio codec registers. + */ + if (!(*link)) + *link = device_link_add(consumer, supplier, DL_FLAG_RPM_ACTIVE | + DL_FLAG_AUTOREMOVE_CONSUMER); + + if (!(*link)) + dev_warn(consumer, + "failed creating device_link for HDMI codec\n"); + + return 0; +} + +#endif /* __SOUND_SOC_HDAC_HDMI_COMMON */ From patchwork Thu Apr 11 14:19:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA45714DB for ; Thu, 11 Apr 2019 14:38:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCC2928D20 for ; Thu, 11 Apr 2019 14:38:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFD1728BFE; Thu, 11 Apr 2019 14:38:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EBFB928D3B for ; Thu, 11 Apr 2019 14:38:41 +0000 (UTC) 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 EAD6F91E; Thu, 11 Apr 2019 16:37:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EAD6F91E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993520; bh=Bl/rRZip6vpJ5RbBsggI8zjf6lU5EUFTJ/uCMZSkENY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UBcThZy2RLYm4I4Nxzt7TSfhkjrEw5sGsNsYGhEPSRKrBj9b2bw/qQnWT04wNyNzK +klCIF7rmVKx5IpcZSLmF1oFJ5gd4qiCPihSmsxDIjh0aYlBnQYnCRFqlTdUbciBlQ ud521kEBf08SQ895jjpwoWRKM5Dp3la7i14iT5Ro= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E65B2F8971D; Thu, 11 Apr 2019 16:36:14 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5527F8971A; Thu, 11 Apr 2019 16:36:09 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9AB39F808F6 for ; Thu, 11 Apr 2019 16:36:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9AB39F808F6 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506502" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:01 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:50 +0800 Message-Id: <1554992400-28777-3-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 02/12] ASoC: intel: skl_hda_dsp_generic: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between cAVS generic machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/skl_hda_dsp_common.c | 13 +++++++++++++ sound/soc/intel/boards/skl_hda_dsp_common.h | 1 + 2 files changed, 14 insertions(+) diff --git a/sound/soc/intel/boards/skl_hda_dsp_common.c b/sound/soc/intel/boards/skl_hda_dsp_common.c index 3fdbf23..2a66ac8 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_common.c +++ b/sound/soc/intel/boards/skl_hda_dsp_common.c @@ -14,9 +14,19 @@ #include "../../codecs/hdac_hdmi.h" #include "../skylake/skl.h" #include "skl_hda_dsp_common.h" +#include "hdac_hdmi_common.h" #define NAME_SIZE 32 +static int skl_hdmi_init(struct snd_soc_pcm_runtime *rtd) +{ + struct skl_hda_private *ctx = snd_soc_card_get_drvdata(rtd->card); + struct snd_soc_dai *dai = rtd->codec_dai; + + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); +} + int skl_hda_hdmi_add_pcm(struct snd_soc_card *card, int device) { struct skl_hda_private *ctx = snd_soc_card_get_drvdata(card); @@ -48,6 +58,7 @@ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = { .cpu_dai_name = "iDisp1 Pin", .codec_name = "ehdaudio0D2", .codec_dai_name = "intel-hdmi-hifi1", + .init = skl_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, }, @@ -57,6 +68,7 @@ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = { .cpu_dai_name = "iDisp2 Pin", .codec_name = "ehdaudio0D2", .codec_dai_name = "intel-hdmi-hifi2", + .init = skl_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, }, @@ -66,6 +78,7 @@ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = { .cpu_dai_name = "iDisp3 Pin", .codec_name = "ehdaudio0D2", .codec_dai_name = "intel-hdmi-hifi3", + .init = skl_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, }, diff --git a/sound/soc/intel/boards/skl_hda_dsp_common.h b/sound/soc/intel/boards/skl_hda_dsp_common.h index 87c50af..df5cc6b 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_common.h +++ b/sound/soc/intel/boards/skl_hda_dsp_common.h @@ -29,6 +29,7 @@ struct skl_hda_private { int pcm_count; int dai_index; const char *platform_name; + struct device_link *link; }; extern struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS]; From patchwork Thu Apr 11 14:19:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A80B17E0 for ; Thu, 11 Apr 2019 14:39:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D1BE28D08 for ; Thu, 11 Apr 2019 14:39:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FBA828D3A; Thu, 11 Apr 2019 14:39:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BFFF928D08 for ; Thu, 11 Apr 2019 14:39:32 +0000 (UTC) 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 9DAC788D; Thu, 11 Apr 2019 16:38:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9DAC788D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993570; bh=xpDwb7GEYro7MBTGMEjEj5oyJkKiUmiqPykGOGT/hQA=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sRiJqHxTUiUH8TK/KPjfgLXemkZH0mGXpsoe3U4ux55L5iUx4oCs10WnFPtsh/RHL p7wad5zb+ifgma9pkJeZOS8KQ9f3WWOe2LVQV8k12iVNCLOpezR+qg8vd0M+2Nn1Rl g9yRJ12d2GMszHAuGBr4MiyWOLGtVwCcBeraRuao= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1C091F8971B; Thu, 11 Apr 2019 16:36:20 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E838F8971B; Thu, 11 Apr 2019 16:36:11 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 109A2F89616 for ; Thu, 11 Apr 2019 16:36:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 109A2F89616 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506507" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:03 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:51 +0800 Message-Id: <1554992400-28777-4-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 03/12] ASoC: intel: bxt_da7219_max98357a: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between bxt_da7219_max98357a machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/bxt_da7219_max98357a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c index 5cadb7f..afcebec 100644 --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c @@ -29,6 +29,7 @@ #include "../../codecs/hdac_hdmi.h" #include "../../codecs/da7219.h" #include "../../codecs/da7219-aad.h" +#include "hdac_hdmi_common.h" #define BXT_DIALOG_CODEC_DAI "da7219-hifi" #define BXT_MAXIM_CODEC_DAI "HiFi" @@ -46,6 +47,7 @@ struct bxt_hdmi_pcm { struct bxt_card_private { struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -237,7 +239,8 @@ static int broxton_hdmi_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int broxton_da7219_fe_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 563A314DB for ; Thu, 11 Apr 2019 14:40:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46A9428CF7 for ; Thu, 11 Apr 2019 14:40:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 338582862A; Thu, 11 Apr 2019 14:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7EE0C28D54 for ; Thu, 11 Apr 2019 14:40:07 +0000 (UTC) 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 BFD1515EA; Thu, 11 Apr 2019 16:39:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFD1515EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993605; bh=1/pc6RZ8lCzZkWvaajAAXjPQmIhjcx2M/QcxBwB9nlM=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MNu2QGhzzy08XQDj1CfIIgVTlU8gwK/LYdgLc3A6/MzLLtB0x9YYX2ZOFY4g3HQmd 3DfAnp8mruRFRBbQIVTjhlUyDyi/1VzeRIu7Ge3q6lUPjeIyUMeF3G0TXk0z6dxIRV 9f6j/JItjrg10aa2mrmGy/3l4jkwxEp4a+7dG+4k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3AB69F89722; Thu, 11 Apr 2019 16:36:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 33602F89720; Thu, 11 Apr 2019 16:36:14 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9AD9DF89636 for ; Thu, 11 Apr 2019 16:36:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9AD9DF89636 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506514" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:04 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:52 +0800 Message-Id: <1554992400-28777-5-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 04/12] ASoC: intel: bxt_rt298: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between bxt_rt298 machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/bxt_rt298.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index e91057f..67794c0 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -26,6 +26,7 @@ #include #include "../../codecs/hdac_hdmi.h" #include "../../codecs/rt298.h" +#include "hdac_hdmi_common.h" /* Headset jack detection DAPM pins */ static struct snd_soc_jack broxton_headset; @@ -39,6 +40,7 @@ struct bxt_hdmi_pcm { struct bxt_rt286_private { struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -204,7 +206,8 @@ static int broxton_hdmi_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int broxton_ssp5_fixup(struct snd_soc_pcm_runtime *rtd, From patchwork Thu Apr 11 14:19:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C31B114DB for ; Thu, 11 Apr 2019 14:40:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA05928D75 for ; Thu, 11 Apr 2019 14:40:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E39728D70; Thu, 11 Apr 2019 14:40:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D97DA28D6B for ; Thu, 11 Apr 2019 14:40:35 +0000 (UTC) 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 E757515EE; Thu, 11 Apr 2019 16:39:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E757515EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993634; bh=Vs49Vx3+beMdC60go1e/CD3U4ygXHnJbYXfajA8xtUQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ol2LHk26JThMtzoUnCYyqU3ERHaAffWes/O/zdaax817taBXth2BXb5AHhx81fq70 1xG0PVldP6Tua0UZTAETGYBxkccPPGlpMB5TfqbwnLt98Rt/iY+LEqjKQIqwcegfJh UqAKB7JTgzt+wmO0eLoukIgckUDSdZmVmzFmsLoQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 41E79F89730; Thu, 11 Apr 2019 16:36:26 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F1CBF89724; Thu, 11 Apr 2019 16:36:15 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1E376F808F6 for ; Thu, 11 Apr 2019 16:36:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1E376F808F6 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506519" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:06 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:53 +0800 Message-Id: <1554992400-28777-6-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 05/12] ASoC: intel: glk_rt5682_max98357a: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between glk_rt5682_max98357a machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/glk_rt5682_max98357a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c index d17126f..2372dd3 100644 --- a/sound/soc/intel/boards/glk_rt5682_max98357a.c +++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c @@ -20,6 +20,7 @@ #include "../skylake/skl.h" #include "../../codecs/rt5682.h" #include "../../codecs/hdac_hdmi.h" +#include "hdac_hdmi_common.h" /* The platform clock outputs 19.2Mhz clock to codec as I2S MCLK */ #define GLK_PLAT_CLK_FREQ 19200000 @@ -42,6 +43,7 @@ struct glk_hdmi_pcm { struct glk_card_private { struct snd_soc_jack geminilake_headset; struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -218,7 +220,8 @@ static int geminilake_hdmi_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int geminilake_rt5682_fe_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E77B14DB for ; Thu, 11 Apr 2019 14:42:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F4DC28DC7 for ; Thu, 11 Apr 2019 14:42:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CA3228E03; Thu, 11 Apr 2019 14:42:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40C3928DC7 for ; Thu, 11 Apr 2019 14:42:08 +0000 (UTC) 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 15B6115F3; Thu, 11 Apr 2019 16:41:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 15B6115F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993726; bh=cSN1ZyUT/rPrc/f1EHOuYLQWOfMKgtkVLCY2A/evMiI=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cY+xm4niSVlCt6+6yZKnh+B4sGDPTIYoPDOKyza3N4k3SkUidMXDDWO93yp+1ehv/ Myr29LRCTZZ5qlnJNf+2OuLHUwqZC7mMrfkjTfpJdR97QDrRVkf/WIulWBHCM9xhc9 4+tSHi+AtBzTpMRiLg9oks9CWY4YyRN6GmbZzyTk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E6D6FF8973A; Thu, 11 Apr 2019 16:36:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6D4F6F8972C; Thu, 11 Apr 2019 16:36:19 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 00E32F8971B for ; Thu, 11 Apr 2019 16:36:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 00E32F8971B X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506523" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:08 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:54 +0800 Message-Id: <1554992400-28777-7-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 06/12] ASoC: intel: kbl_da7219_max98357a: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between kbl_da7219_max98357a machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/kbl_da7219_max98357a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_da7219_max98357a.c b/sound/soc/intel/boards/kbl_da7219_max98357a.c index 38f6ab7..86cca33 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98357a.c +++ b/sound/soc/intel/boards/kbl_da7219_max98357a.c @@ -21,6 +21,7 @@ #include "../../codecs/hdac_hdmi.h" #include "../skylake/skl.h" #include "../../codecs/da7219-aad.h" +#include "hdac_hdmi_common.h" #define KBL_DIALOG_CODEC_DAI "da7219-hifi" #define KBL_MAXIM_CODEC_DAI "HiFi" @@ -40,6 +41,7 @@ struct kbl_hdmi_pcm { struct kbl_codec_private { struct snd_soc_jack kabylake_headset; struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -216,7 +218,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B39617E0 for ; Thu, 11 Apr 2019 14:41:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DC5928D96 for ; Thu, 11 Apr 2019 14:41:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C34C28DB9; Thu, 11 Apr 2019 14:41:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C283128D96 for ; Thu, 11 Apr 2019 14:41:21 +0000 (UTC) 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 E94B087A; Thu, 11 Apr 2019 16:40:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E94B087A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993680; bh=iHqp9weQiTjbAXprQ5kXBpFs6ALO4Klt/RL1vFGscIg=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ruy4uvbrkB0nUt5O04qOmphXEbvpHa30AdgotUw81mhVE2+Hn23HM/T5/QbWzdTGr DW+fqbL6e0C1mvMKqbRrd3gKBrE8AqCIUXpzhH6wbTo8jSBSUjeZdpboGUDNy4HNqG cj8RN5fFolbqpY9vpSUHrbaABMAvGQDabz9btyV4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8A7DFF89735; Thu, 11 Apr 2019 16:36:28 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2D480F8972D; Thu, 11 Apr 2019 16:36:19 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 561DDF8971C for ; Thu, 11 Apr 2019 16:36:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 561DDF8971C X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506526" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:10 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:55 +0800 Message-Id: <1554992400-28777-8-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 07/12] ASoC: intel: kbl_da7219_max98927: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between kbl_da7219_max98927 machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/kbl_da7219_max98927.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c index f72a7bf..575c21e 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98927.c +++ b/sound/soc/intel/boards/kbl_da7219_max98927.c @@ -21,6 +21,7 @@ #include "../../codecs/hdac_hdmi.h" #include "../skylake/skl.h" #include "../../codecs/da7219-aad.h" +#include "hdac_hdmi_common.h" #define KBL_DIALOG_CODEC_DAI "da7219-hifi" #define MAX98927_CODEC_DAI "max98927-aif1" @@ -48,6 +49,7 @@ struct kbl_hdmi_pcm { struct kbl_codec_private { struct snd_soc_jack kabylake_headset; struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -339,7 +341,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D80917E0 for ; Thu, 11 Apr 2019 14:42:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5058928D7B for ; Thu, 11 Apr 2019 14:42:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44CFA28DED; Thu, 11 Apr 2019 14:42:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9032228DFC for ; Thu, 11 Apr 2019 14:42:42 +0000 (UTC) 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 992A91603; Thu, 11 Apr 2019 16:41:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 992A91603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993760; bh=CY1wWAuaZ5MTQOuQUC7D6jKOxQ1yvq3IaEcXV3oJNLA=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TieZ1dD3/CFNOXylUxxIIzCHdxz+K6vJAcnzt6SE5WGRUPwQCRoJbjzJPEIsDA+WJ v1VYHazG3rodL75SrmhHcVWB9dITK8cHeqYqrmAFn1lRMFEjebTWISdNOfGeTgbS2R uQeb+HUCY9K2fN9Qc6U0+NTjf1tnKBKLPV9efmEs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AFF51F8973D; Thu, 11 Apr 2019 16:36:31 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E05A6F8972D; Thu, 11 Apr 2019 16:36:19 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C3854F8971E for ; Thu, 11 Apr 2019 16:36:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3854F8971E X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506529" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:11 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:56 +0800 Message-Id: <1554992400-28777-9-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 08/12] ASoC: intel: kbl_rt5660: add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between kbl_rt5660 machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/kbl_rt5660.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_rt5660.c b/sound/soc/intel/boards/kbl_rt5660.c index 3255e00..e681984 100644 --- a/sound/soc/intel/boards/kbl_rt5660.c +++ b/sound/soc/intel/boards/kbl_rt5660.c @@ -23,6 +23,7 @@ #include "../../codecs/hdac_hdmi.h" #include "../../codecs/rt5660.h" +#include "hdac_hdmi_common.h" #define KBL_RT5660_CODEC_DAI "rt5660-aif1" #define DUAL_CHANNEL 2 @@ -41,6 +42,7 @@ struct kbl_hdmi_pcm { struct kbl_codec_private { struct gpio_desc *gpio_lo_mute; struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -222,7 +224,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AAFD14DB for ; Thu, 11 Apr 2019 14:43:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C63428D53 for ; Thu, 11 Apr 2019 14:43:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AC5928D9B; Thu, 11 Apr 2019 14:43:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C8C6D28DDD for ; Thu, 11 Apr 2019 14:43:19 +0000 (UTC) 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 C359415F5; Thu, 11 Apr 2019 16:42:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C359415F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993797; bh=kkTxpL2SZ39L0PGHSBFRM3yJPg0VzLqnd8oXRLli3/4=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=srPl/WTTdEIFiS7pzR/nVXyf1cu4S96vskr20ozUv572uWRqCNJYu47FyVLYe8HoE HELLETNPY6Q0uYqMd7a817o2Fev0dMxyo37veakVAuucOzHf/vEQ74rf7oAv5r5TiC mYlX5sCz779hclp14RbX2VdrKQfkgjIQjuPLLsyk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DE9C8F89744; Thu, 11 Apr 2019 16:36:32 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 747D9F8972D; Thu, 11 Apr 2019 16:36:20 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0B73FF89720 for ; Thu, 11 Apr 2019 16:36:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B73FF89720 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506535" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:12 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:57 +0800 Message-Id: <1554992400-28777-10-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 09/12] ASoC: intel: kbl_rt5663_max98927 add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between kbl_rt5663_max98927 machine device (consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/kbl_rt5663_max98927.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c index d714752..48b9e08 100644 --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c @@ -31,6 +31,7 @@ #include #include #include +#include "hdac_hdmi_common.h" #define KBL_REALTEK_CODEC_DAI "rt5663-aif" #define KBL_MAXIM_CODEC_DAI "max98927-aif1" @@ -53,6 +54,7 @@ struct kbl_rt5663_private { struct list_head hdmi_pcm_list; struct clk *mclk; struct clk *sclk; + struct device_link *link; }; enum { @@ -336,7 +338,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE44B17E0 for ; Thu, 11 Apr 2019 14:43:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1097289AD for ; Thu, 11 Apr 2019 14:43:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4ABB28D78; Thu, 11 Apr 2019 14:43:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2CA9B28DB5 for ; Thu, 11 Apr 2019 14:43:56 +0000 (UTC) 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 3087F15FB; Thu, 11 Apr 2019 16:43:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3087F15FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993834; bh=Q2J0vK/yvPuM9DsMuGVmeJYT1gnRyC+NnANeXWjUno0=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fyCm8t2HOOy62oBjtTFmAu5GKvDQJY6dkBPZARA8k2Ri9UGnRFvMITLeMWpnJrZQJ /Und0ge1RzyGSh70ul6y1dCsG/B0wgn3G+xCcsYIfkrpETsPxB3SjvwEUW7UfCevXy NYrsbzHdpg2EC5a1sG/R7TeCP3ExdtCPHPsIU5f0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 90050F89749; Thu, 11 Apr 2019 16:36:34 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B8556F8972E; Thu, 11 Apr 2019 16:36:22 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 12107F89722 for ; Thu, 11 Apr 2019 16:36:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12107F89722 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506542" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:13 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:58 +0800 Message-Id: <1554992400-28777-11-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 10/12] ASoC: intel: kbl_rt5663_rt5514_max98927 add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between kbl_rt5663_rt5514_max98927 machine device(consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index 879f142..c435767 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -30,6 +30,7 @@ #include "../../codecs/rt5514.h" #include "../../codecs/rt5663.h" #include "../../codecs/hdac_hdmi.h" +#include "hdac_hdmi_common.h" #define KBL_REALTEK_CODEC_DAI "rt5663-aif" #define KBL_REALTEK_DMIC_CODEC_DAI "rt5514-aif1" @@ -58,6 +59,7 @@ struct kbl_codec_private { struct snd_soc_jack kabylake_headset; struct list_head hdmi_pcm_list; struct snd_soc_jack kabylake_hdmi[2]; + struct device_link *link; }; enum { @@ -224,7 +226,8 @@ static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:19:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F4331669 for ; Thu, 11 Apr 2019 14:45:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F83D28BFE for ; Thu, 11 Apr 2019 14:45:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5344228D53; Thu, 11 Apr 2019 14:45:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BE3A28BFE for ; Thu, 11 Apr 2019 14:45:18 +0000 (UTC) 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 C3CFB885; Thu, 11 Apr 2019 16:44:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C3CFB885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993916; bh=LYYg1elZiF6GfQZANi+mCb/fLSUHIR0MC2fu9HZd4Xg=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aMm/+XJ8AGC9MfFz2HbFsD0rmQXOyG4xnPEjelwVrJYVk3RIUicT2WFf5pw902Pzd nvk/QIdxuTLUwKKzLSvvW5eXWbVY7sB29OqtBr9X9moJQ8T+t8rOxdh6RznffY7YLA isRK8re0hmV07ehMQ+5zYFU5d7Mw1GXQRev43yYg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8BC2FF89753; Thu, 11 Apr 2019 16:36:37 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id DFC13F8972A; Thu, 11 Apr 2019 16:36:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7D187F89727 for ; Thu, 11 Apr 2019 16:36:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D187F89727 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506549" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:15 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:19:59 +0800 Message-Id: <1554992400-28777-12-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 11/12] ASoC: intel: skl_nau88l25_max98357a add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between skl_nau88l25_max98357a machine device(consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c index 0922106..8685a5b 100644 --- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c +++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c @@ -24,6 +24,7 @@ #include #include "../../codecs/nau8825.h" #include "../../codecs/hdac_hdmi.h" +#include "hdac_hdmi_common.h" #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi" #define SKL_MAXIM_CODEC_DAI "HiFi" @@ -42,6 +43,7 @@ struct skl_hdmi_pcm { struct skl_nau8825_private { struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { @@ -202,7 +204,8 @@ static int skylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) @@ -220,7 +223,8 @@ static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) @@ -238,7 +242,8 @@ static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd) From patchwork Thu Apr 11 14:20:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 10896179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7256617E0 for ; Thu, 11 Apr 2019 14:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 622B6286DA for ; Thu, 11 Apr 2019 14:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5514528B7E; Thu, 11 Apr 2019 14:44:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 946FB286DA for ; Thu, 11 Apr 2019 14:44:40 +0000 (UTC) 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 AF90B1607; Thu, 11 Apr 2019 16:43:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AF90B1607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554993878; bh=ghZp/Hrw5BrpvJYXtJwamBs/XMTfOS6WOEEzH1EBJ+k=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ufAXefyhF0ft+zTIsNzDnhC71ZXdWXARuxjnujBMLGS8XIDZXu1uw6u/asbqs/KDG 9Hrxgsapb7AK90TmRKBvfdH9hVegD1xoKY6mB9CkYOk9oIBpOfThXSvJZs6agvi4/q TMYK4B4mmb12TYkdPnUFrvhi3kkmWOvMYuJbVQN8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 222DEF8974E; Thu, 11 Apr 2019 16:36:36 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id D499AF89732; Thu, 11 Apr 2019 16:36:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B4673F8972A for ; Thu, 11 Apr 2019 16:36:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4673F8972A X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:36:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="130506554" Received: from younglee-svr.sh.intel.com ([10.239.159.31]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 07:36:16 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Date: Thu, 11 Apr 2019 22:20:00 +0800 Message-Id: <1554992400-28777-13-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554992400-28777-1-git-send-email-libin.yang@intel.com> References: <1554992400-28777-1-git-send-email-libin.yang@intel.com> Cc: libin.yang@intel.com Subject: [alsa-devel] [PATCH v3 12/12] ASoC: intel: skl_nau88l25_ssm4567 add device_link to HDMI audio 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang In resume from S3, HDAC HDMI codec driver dapm event callback may be operated before HDMI codec driver turns on the display audio power domain because of the contest between display driver and hdmi codec driver. This patch adds the device_link between skl_nau88l25_ssm4567 machine device(consumer) and hdmi codec device (supplier) to make sure the sequence is always correct. Signed-off-by: Libin Yang --- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c index 8433c52..9958e6a 100644 --- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c +++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c @@ -28,6 +28,7 @@ #include #include "../../codecs/nau8825.h" #include "../../codecs/hdac_hdmi.h" +#include "hdac_hdmi_common.h" #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi" #define SKL_SSM_CODEC_DAI "ssm4567-hifi" @@ -46,6 +47,7 @@ struct skl_hdmi_pcm { struct skl_nau88125_private { struct list_head hdmi_pcm_list; + struct device_link *link; }; enum { SKL_DPCM_AUDIO_PB = 0, @@ -232,7 +234,8 @@ static int skylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) @@ -250,7 +253,8 @@ static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } @@ -269,7 +273,8 @@ static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); - return 0; + /* Setup a device_link between machine device and HDMI codec device. */ + return hdac_hdmi_add_device_link(rtd->card->dev, dai->dev, &ctx->link); } static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)