2020-05-01 07:58:50 -07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
// Copyright (c) 2020 Intel Corporation
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sof_sdw_hdmi - Helpers to handle HDMI from generic machine driver
|
|
|
|
*/
|
|
|
|
|
2024-08-18 17:55:46 -07:00
|
|
|
#include <linux/acpi.h>
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/errno.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/list.h>
|
2024-08-18 17:55:46 -07:00
|
|
|
#include <linux/soundwire/sdw_intel.h>
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
#include <sound/soc.h>
|
|
|
|
#include <sound/soc-acpi.h>
|
|
|
|
#include <sound/jack.h>
|
|
|
|
#include "sof_sdw_common.h"
|
|
|
|
#include "hda_dsp_common.h"
|
|
|
|
|
|
|
|
int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
|
|
|
{
|
2024-08-01 02:14:29 -07:00
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(rtd->card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
2023-09-25 23:24:24 -07:00
|
|
|
struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
|
2024-08-01 02:14:29 -07:00
|
|
|
intel_ctx->hdmi.hdmi_comp = dai->component;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
|
|
|
|
{
|
2024-08-01 02:14:29 -07:00
|
|
|
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
|
|
|
|
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
|
2024-08-01 02:14:29 -07:00
|
|
|
if (!intel_ctx->hdmi.idisp_codec)
|
2020-07-17 14:13:34 -07:00
|
|
|
return 0;
|
|
|
|
|
2024-08-01 02:14:29 -07:00
|
|
|
if (!intel_ctx->hdmi.hdmi_comp)
|
2020-07-17 14:13:35 -07:00
|
|
|
return -EINVAL;
|
|
|
|
|
2024-08-01 02:14:29 -07:00
|
|
|
return hda_dsp_hdmi_build_controls(card, intel_ctx->hdmi.hdmi_comp);
|
ASoC: Intel: boards: add sof_sdw machine driver
This machine driver provides support for different configurations:
RT700, RT711, RT1308 (1x and 2x, I2S or SoundWire mode), and RT715
CometLake, Icelake, TigerLake.
PDM digital microphones
HDMI
To avoid introducing one driver per configuration, this common machine
driver relies on platform-specific information, tables and quirks to
dynamically create the relevant dailinks.
Unlike a lot of machine drivers, we use different DAI links for
SoundWire capture and playback since the Cadence PDIs can do capture
OR playback, not both simultaneously.
For each configuration, the card component string is updated so that UCM
can select the relevant parts.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200325220746.29601-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-25 15:07:44 -07:00
|
|
|
}
|