All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, tiwai@suse.de
Cc: libin.yang@intel.com, pierre-louis.bossart@linux.intel.com,
	kai.vehmanen@linux.intel.com
Subject: [alsa-devel] [PATCH v6 6/9] ASoC: Intel: bxt-da7219-max98357a: common hdmi codec support
Date: Fri, 11 Oct 2019 14:27:42 +0300	[thread overview]
Message-ID: <20191011112745.25800-7-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20191011112745.25800-1-kai.vehmanen@linux.intel.com>

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 <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index ac1dea5f9d11..5873abb46441 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -21,6 +21,7 @@
 #include "../../codecs/da7219.h"
 #include "../../codecs/da7219-aad.h"
 #include "../common/soc-intel-quirks.h"
+#include "hda_dsp_common.h"
 
 #define BXT_DIALOG_CODEC_DAI	"da7219-hifi"
 #define BXT_MAXIM_CODEC_DAI	"HiFi"
@@ -38,6 +39,7 @@ struct bxt_hdmi_pcm {
 
 struct bxt_card_private {
 	struct list_head hdmi_pcm_list;
+	bool common_hdmi_codec_drv;
 };
 
 enum {
@@ -615,6 +617,13 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
 		snd_soc_dapm_add_routes(&card->dapm, broxton_map,
 					ARRAY_SIZE(broxton_map));
 
+	pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_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),
@@ -720,6 +729,8 @@ static int broxton_audio_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	ctx->common_hdmi_codec_drv = mach->mach_params.common_hdmi_codec_drv;
+
 	return devm_snd_soc_register_card(&pdev->dev, &broxton_audio_card);
 }
 
-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-10-11 11:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 11:27 [alsa-devel] [PATCH v6 0/9] adapt SOF to use snd-hda-codec-hdmi Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 1/9] ALSA: hda/hdmi - implement mst_no_extra_pcms flag Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 2/9] ASoC: hdac_hda: add support for HDMI/DP as a HDA codec Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 3/9] ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi Kai Vehmanen
2019-10-17  8:06   ` Takashi Iwai
2019-10-22 11:15     ` Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 4/9] ASoC: Intel: skl-hda-dsp-generic: fix include guard name Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 5/9] ASoC: SOF: Intel: add support for snd-hda-codec-hdmi Kai Vehmanen
2019-10-11 14:00   ` Pierre-Louis Bossart
2019-10-11 14:10     ` Kai Vehmanen
2019-10-17  7:58       ` Takashi Iwai
2019-10-17 13:20         ` Pierre-Louis Bossart
2019-10-22 11:19           ` Kai Vehmanen
2019-10-22 13:17             ` Pierre-Louis Bossart
2019-10-11 11:27 ` Kai Vehmanen [this message]
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 7/9] ASoC: Intel: glk_rt5682_max98357a: common hdmi codec support Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 8/9] ASoC: intel: sof_rt5682: " Kai Vehmanen
2019-10-11 11:27 ` [alsa-devel] [PATCH v6 9/9] ASoC: Intel: bxt_rt298: " Kai Vehmanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191011112745.25800-7-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.