From patchwork Wed Sep 25 11:24:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 11160495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03D2B1709 for ; Wed, 25 Sep 2019 11:29:45 +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 8C48E21D7E for ; Wed, 25 Sep 2019 11:29:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ejiqxu5q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C48E21D7E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 D5B5E16EB; Wed, 25 Sep 2019 13:28:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5B5E16EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1569410982; bh=2PRprPoNK2lEaW0r6R38EmUrhP3Hwh5nEGTFTiopd0g=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ejiqxu5qHMtNOQiI+jnmRbtgoyn5gJm40CUvvJZj+HCJBWcWr5I44toD/HYI+CWMf /d4f/fluBLwo5wQWkod0KLkrJNMIgNgAAChFIhIhKXv+VwNlgrngiDaJ4yx7jNq/K8 I+62Z+aKHDyGfFnPuE8jMLoDjHOIXI3YWzEpSRYA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8EF82F80642; Wed, 25 Sep 2019 13:24:45 +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 5F917F80642; Wed, 25 Sep 2019 13:24:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 81F17F8063D for ; Wed, 25 Sep 2019 13:24:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 81F17F8063D X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 04:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,547,1559545200"; d="scan'208";a="218955937" Received: from zeliteleevi.tm.intel.com ([10.237.55.130]) by fmsmga002.fm.intel.com with ESMTP; 25 Sep 2019 04:24:37 -0700 From: Kai Vehmanen To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Wed, 25 Sep 2019 14:24:08 +0300 Message-Id: <20190925112409.1762-9-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190925112409.1762-1-kai.vehmanen@linux.intel.com> References: <20190925112409.1762-1-kai.vehmanen@linux.intel.com> Cc: libin.yang@intel.com, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com Subject: [alsa-devel] [PATCH v5 8/9] ASoC: intel: sof_rt5682: common hdmi codec support 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" Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_rt5682.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index a437567b8cee..e0e0ca962560 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -21,6 +21,7 @@ #include "../../codecs/rt5682.h" #include "../../codecs/hdac_hdmi.h" #include "../common/soc-intel-quirks.h" +#include "hda_dsp_common.h" #define NAME_SIZE 32 @@ -53,6 +54,7 @@ struct sof_card_private { struct clk *mclk; struct snd_soc_jack sof_headset; struct list_head hdmi_pcm_list; + bool common_hdmi_codec_drv; }; static int sof_rt5682_quirk_cb(const struct dmi_system_id *id) @@ -274,6 +276,13 @@ static int sof_card_late_probe(struct snd_soc_card *card) if (is_legacy_cpu) return 0; + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, + head); + component = pcm->codec_dai->component; + + if (ctx->common_hdmi_codec_drv) + return hda_dsp_hdmi_build_controls(card, component); + list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { component = pcm->codec_dai->component; snprintf(jack_name, sizeof(jack_name), @@ -615,6 +624,8 @@ static int sof_audio_probe(struct platform_device *pdev) if (ret) return ret; + ctx->common_hdmi_codec_drv = mach->mach_params.common_hdmi_codec_drv; + snd_soc_card_set_drvdata(&sof_audio_card_rt5682, ctx); return devm_snd_soc_register_card(&pdev->dev,