Merge series "ASoC: Intel: machine drivers update for 5.8" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This patchset
a) adds support for the Intel ElkhartLake platforms
b)aligns the HDaudio mic detection with the snd-hda-intel driver
c) correct DMIC missing configurations
d) fixes initialization/compilation problems for SoundWire platforms
d) completes the removal of codec_dais missing in Morimoto-san's series.
Bard Liao (1):
ASoC: intel: sof_sdw: init all aggregated codecs
Hui Wang (1):
ASoC: intel/skl/hda - set autosuspend timeout for hda codecs
Keyon Jie (1):
ASoC: Intel: sof-da7219-max98373: add DMIC widget and route
Libin Yang (3):
ALSA: hda: Add ElkhartLake HDMI codec vid
ASoC: SOF: Intel: add PCI ID for ElkhartLake
ASoC: Intel: boards: support Elkhart Lake with rt5660
Pierre-Louis Bossart (6):
ASoC: Intel: sof_sdw_hdmi: fix compilation issue in fallback mode
ASoC: Intel: sof_sdw_hdmi: remove codec_dai use
ASoC: Intel: sof_sdw_rt1308: remove codec dai use
ASoC: Intel: sof_sdw_rt5682: remove codec_dai use
ASoC: Intel: sof_sdw_rt700: remove codec_dai use
ASoC: Intel: sof_sdw_rt711: remove codec_dai use
Yong Zhi (1):
ASoC: Intel: sof_da7219_max98373: Add BE dailink for dmic16k
sound/pci/hda/patch_hdmi.c | 1 +
sound/soc/intel/boards/Kconfig | 15 +
sound/soc/intel/boards/Makefile | 2 +
sound/soc/intel/boards/ehl_rt5660.c | 323 ++++++++++++++++++
sound/soc/intel/boards/skl_hda_dsp_generic.c | 29 +-
sound/soc/intel/boards/sof_da7219_max98373.c | 21 ++
sound/soc/intel/boards/sof_sdw.c | 41 ++-
sound/soc/intel/boards/sof_sdw_hdmi.c | 4 +-
sound/soc/intel/boards/sof_sdw_rt1308.c | 2 +-
sound/soc/intel/boards/sof_sdw_rt5682.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt700.c | 3 +-
sound/soc/intel/boards/sof_sdw_rt711.c | 3 +-
.../intel/common/soc-acpi-intel-ehl-match.c | 7 +
sound/soc/sof/sof-pci-dev.c | 2 +
14 files changed, 434 insertions(+), 22 deletions(-)
create mode 100644 sound/soc/intel/boards/ehl_rt5660.c
base-commit: dd8e871d4e
--
2.20.1
This commit is contained in:
commit
df3e71c42f
|
@ -4156,6 +4156,7 @@ HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_glk_hdmi),
|
|||
HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862812, "Tigerlake HDMI", patch_i915_tgl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
|
||||
HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),
|
||||
|
|
|
@ -524,6 +524,21 @@ config SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH
|
|||
|
||||
endif ## SND_SOC_SOF_JASPERLAKE
|
||||
|
||||
if SND_SOC_SOF_ELKHARTLAKE
|
||||
|
||||
config SND_SOC_INTEL_EHL_RT5660_MACH
|
||||
tristate "EHL with RT5660 in I2S mode"
|
||||
depends on I2C && ACPI
|
||||
depends on MFD_INTEL_LPSS || COMPILE_TEST
|
||||
depends on SND_HDA_CODEC_HDMI
|
||||
select SND_SOC_RT5660
|
||||
select SND_SOC_DMIC
|
||||
help
|
||||
This adds support for ASoC machine driver for Elkhart Lake
|
||||
platform with RT5660 I2S audio codec.
|
||||
|
||||
endif ## SND_SOC_SOF_ELKHARTLAKE
|
||||
|
||||
if SND_SOC_SOF_INTEL_SOUNDWIRE
|
||||
|
||||
config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
|
||||
|
|
|
@ -31,6 +31,7 @@ snd-soc-skl_hda_dsp-objs := skl_hda_dsp_generic.o skl_hda_dsp_common.o hda_dsp_c
|
|||
snd-skl_nau88l25_max98357a-objs := skl_nau88l25_max98357a.o
|
||||
snd-soc-skl_nau88l25_ssm4567-objs := skl_nau88l25_ssm4567.o
|
||||
snd-soc-sof_da7219_max98373-objs := sof_da7219_max98373.o hda_dsp_common.o
|
||||
snd-soc-ehl-rt5660-objs := ehl_rt5660.o hda_dsp_common.o
|
||||
snd-soc-sof-sdw-objs += sof_sdw.o \
|
||||
sof_sdw_rt711.o sof_sdw_rt700.o \
|
||||
sof_sdw_rt1308.o sof_sdw_rt715.o \
|
||||
|
@ -68,4 +69,5 @@ obj-$(CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH) += snd-skl_nau88l25_max9
|
|||
obj-$(CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH) += snd-soc-skl_nau88l25_ssm4567.o
|
||||
obj-$(CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH) += snd-soc-skl_hda_dsp.o
|
||||
obj-$(CONFIG_SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH) += snd-soc-sof_da7219_max98373.o
|
||||
obj-$(CONFIG_SND_SOC_INTEL_EHL_RT5660_MACH) += snd-soc-ehl-rt5660.o
|
||||
obj-$(CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH) += snd-soc-sof-sdw.o
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (c) 2020 Intel Corporation
|
||||
|
||||
/*
|
||||
* ehl_rt5660 - ASOC Machine driver for Elkhart Lake platforms
|
||||
* with rt5660 codec
|
||||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <sound/core.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <sound/jack.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/module.h>
|
||||
#include <sound/pcm.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/soc.h>
|
||||
#include <sound/soc-acpi.h>
|
||||
|
||||
#include "hda_dsp_common.h"
|
||||
#include "../../codecs/rt5660.h"
|
||||
|
||||
#define DUAL_CHANNEL 2
|
||||
#define HDMI_LINK_START 3
|
||||
#define HDMI_LINE_END 6
|
||||
#define NAME_SIZE 32
|
||||
#define IDISP_CODEC_MASK 0x4
|
||||
|
||||
struct sof_card_private {
|
||||
struct list_head hdmi_pcm_list;
|
||||
bool idisp_codec;
|
||||
};
|
||||
|
||||
static const struct snd_kcontrol_new rt5660_controls[] = {
|
||||
SOC_DAPM_PIN_SWITCH("Speaker"),
|
||||
/* There are two MICBIAS in rt5660, each for one MIC */
|
||||
SOC_DAPM_PIN_SWITCH("Headset Mic"),
|
||||
SOC_DAPM_PIN_SWITCH("Headset Mic2"),
|
||||
SOC_DAPM_PIN_SWITCH("Line Out"),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_widget rt5660_widgets[] = {
|
||||
SND_SOC_DAPM_SPK("Speaker", NULL),
|
||||
SND_SOC_DAPM_MIC("Headset Mic", NULL),
|
||||
SND_SOC_DAPM_MIC("Headset Mic2", NULL),
|
||||
SND_SOC_DAPM_MIC("SoC DMIC", NULL),
|
||||
SND_SOC_DAPM_LINE("Line Out", NULL),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route rt5660_map[] = {
|
||||
{"Speaker", NULL, "SPO"},
|
||||
|
||||
{"Headset Mic", NULL, "MICBIAS1"},
|
||||
{"Headset Mic2", NULL, "MICBIAS2"},
|
||||
|
||||
{"IN1P", NULL, "Headset Mic"},
|
||||
{"IN2P", NULL, "Headset Mic2"},
|
||||
|
||||
{"Line Out", NULL, "LOUTL"},
|
||||
{"Line Out", NULL, "LOUTR"},
|
||||
|
||||
{"DMic", NULL, "SoC DMIC"},
|
||||
};
|
||||
|
||||
struct sof_hdmi_pcm {
|
||||
struct list_head head;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int device;
|
||||
};
|
||||
|
||||
static int hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct sof_hdmi_pcm *pcm;
|
||||
|
||||
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
|
||||
if (!pcm)
|
||||
return -ENOMEM;
|
||||
|
||||
/* dai_link id is 1:1 mapped to the PCM device */
|
||||
pcm->device = rtd->dai_link->id;
|
||||
pcm->codec_dai = dai;
|
||||
|
||||
list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int card_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
struct sof_hdmi_pcm *pcm;
|
||||
|
||||
if (list_empty(&ctx->hdmi_pcm_list))
|
||||
return -ENOENT;
|
||||
|
||||
if (!ctx->idisp_codec)
|
||||
return 0;
|
||||
|
||||
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, head);
|
||||
|
||||
return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
|
||||
}
|
||||
|
||||
static int rt5660_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
int ret;
|
||||
|
||||
ret = snd_soc_dai_set_sysclk(codec_dai,
|
||||
RT5660_SCLK_S_PLL1,
|
||||
params_rate(params) * 512,
|
||||
SND_SOC_CLOCK_IN);
|
||||
if (ret < 0) {
|
||||
dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = snd_soc_dai_set_pll(codec_dai, 0,
|
||||
RT5660_PLL1_S_BCLK,
|
||||
params_rate(params) * 50,
|
||||
params_rate(params) * 512);
|
||||
if (ret < 0)
|
||||
dev_err(codec_dai->dev, "can't set codec pll: %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct snd_soc_ops rt5660_ops = {
|
||||
.hw_params = rt5660_hw_params,
|
||||
};
|
||||
|
||||
SND_SOC_DAILINK_DEF(ssp0_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(rt5660_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5660:00", "rt5660-aif1")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(platform,
|
||||
DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(dmic_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin")));
|
||||
SND_SOC_DAILINK_DEF(dmic_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
|
||||
SND_SOC_DAILINK_DEF(dmic16k,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("DMIC16k Pin")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(idisp1_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin")));
|
||||
SND_SOC_DAILINK_DEF(idisp1_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(idisp2_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin")));
|
||||
SND_SOC_DAILINK_DEF(idisp2_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(idisp3_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin")));
|
||||
SND_SOC_DAILINK_DEF(idisp3_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(idisp4_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("iDisp4 Pin")));
|
||||
SND_SOC_DAILINK_DEF(idisp4_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi4")));
|
||||
|
||||
static struct snd_soc_dai_link ehl_rt5660_dailink[] = {
|
||||
/* back ends */
|
||||
{
|
||||
.name = "SSP0-Codec",
|
||||
.id = 0,
|
||||
.no_pcm = 1,
|
||||
.dpcm_playback = 1,
|
||||
.dpcm_capture = 1,
|
||||
.ops = &rt5660_ops,
|
||||
.nonatomic = true,
|
||||
SND_SOC_DAILINK_REG(ssp0_pin, rt5660_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "dmic48k",
|
||||
.id = 1,
|
||||
.ignore_suspend = 1,
|
||||
.dpcm_capture = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "dmic16k",
|
||||
.id = 2,
|
||||
.ignore_suspend = 1,
|
||||
.dpcm_capture = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "iDisp1",
|
||||
.id = 5,
|
||||
.init = hdmi_init,
|
||||
.dpcm_playback = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "iDisp2",
|
||||
.id = 6,
|
||||
.init = hdmi_init,
|
||||
.dpcm_playback = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "iDisp3",
|
||||
.id = 7,
|
||||
.init = hdmi_init,
|
||||
.dpcm_playback = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "iDisp4",
|
||||
.id = 8,
|
||||
.init = hdmi_init,
|
||||
.dpcm_playback = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(idisp4_pin, idisp4_codec, platform),
|
||||
},
|
||||
};
|
||||
|
||||
/* SoC card */
|
||||
static struct snd_soc_card snd_soc_card_ehl_rt5660 = {
|
||||
.name = "ehl-rt5660",
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = ehl_rt5660_dailink,
|
||||
.num_links = ARRAY_SIZE(ehl_rt5660_dailink),
|
||||
.dapm_widgets = rt5660_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(rt5660_widgets),
|
||||
.dapm_routes = rt5660_map,
|
||||
.num_dapm_routes = ARRAY_SIZE(rt5660_map),
|
||||
.controls = rt5660_controls,
|
||||
.num_controls = ARRAY_SIZE(rt5660_controls),
|
||||
.fully_routed = true,
|
||||
.late_probe = card_late_probe,
|
||||
};
|
||||
|
||||
/* If hdmi codec is not supported, switch to use dummy codec */
|
||||
static void hdmi_link_init(struct snd_soc_card *card,
|
||||
struct sof_card_private *ctx,
|
||||
struct snd_soc_acpi_mach *mach)
|
||||
{
|
||||
struct snd_soc_dai_link *link;
|
||||
int i;
|
||||
|
||||
if (mach->mach_params.common_hdmi_codec_drv &&
|
||||
(mach->mach_params.codec_mask & IDISP_CODEC_MASK)) {
|
||||
ctx->idisp_codec = true;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* if HDMI is not enabled in kernel config, or
|
||||
* hdmi codec is not supported
|
||||
*/
|
||||
for (i = HDMI_LINK_START; i <= HDMI_LINE_END; i++) {
|
||||
link = &card->dai_link[i];
|
||||
link->codecs[0].name = "snd-soc-dummy";
|
||||
link->codecs[0].dai_name = "snd-soc-dummy-dai";
|
||||
}
|
||||
}
|
||||
|
||||
static int snd_ehl_rt5660_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
struct snd_soc_card *card = &snd_soc_card_ehl_rt5660;
|
||||
struct sof_card_private *ctx;
|
||||
int ret;
|
||||
|
||||
card->dev = &pdev->dev;
|
||||
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
|
||||
snd_soc_card_set_drvdata(card, ctx);
|
||||
|
||||
mach = pdev->dev.platform_data;
|
||||
ret = snd_soc_fixup_dai_links_platform_name(card,
|
||||
mach->mach_params.platform);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
hdmi_link_init(card, ctx, mach);
|
||||
|
||||
return devm_snd_soc_register_card(&pdev->dev, card);
|
||||
}
|
||||
|
||||
static const struct platform_device_id ehl_board_ids[] = {
|
||||
{ .name = "ehl_rt5660" },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct platform_driver snd_ehl_rt5660_driver = {
|
||||
.driver = {
|
||||
.name = "ehl_rt5660",
|
||||
.pm = &snd_soc_pm_ops,
|
||||
},
|
||||
.probe = snd_ehl_rt5660_probe,
|
||||
.id_table = ehl_board_ids,
|
||||
};
|
||||
|
||||
module_platform_driver(snd_ehl_rt5660_driver);
|
||||
|
||||
MODULE_DESCRIPTION("ASoC Intel(R) Elkhartlake + rt5660 Machine driver");
|
||||
MODULE_AUTHOR("libin.yang@intel.com");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("platform:ehl_rt5660");
|
|
@ -113,6 +113,8 @@ static char hda_soc_components[30];
|
|||
#define IDISP_ROUTE_COUNT (IDISP_DAI_COUNT * 2)
|
||||
#define IDISP_CODEC_MASK 0x4
|
||||
|
||||
#define HDA_CODEC_AUTOSUSPEND_DELAY_MS 1000
|
||||
|
||||
static int skl_hda_fill_card_info(struct snd_soc_acpi_mach_params *mach_params)
|
||||
{
|
||||
struct snd_soc_card *card = &hda_soc_card;
|
||||
|
@ -168,6 +170,27 @@ static int skl_hda_fill_card_info(struct snd_soc_acpi_mach_params *mach_params)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd =
|
||||
list_first_entry(&card->rtd_list,
|
||||
struct snd_soc_pcm_runtime, list);
|
||||
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
||||
struct hdac_hda_priv *hda_pvt;
|
||||
|
||||
if (!codec_dai)
|
||||
return;
|
||||
|
||||
/*
|
||||
* all codecs are on the same bus, so it's sufficient
|
||||
* to lookup the first runtime and its codec, and set
|
||||
* power save defaults for all codecs on the bus
|
||||
*/
|
||||
hda_pvt = snd_soc_component_get_drvdata(codec_dai->component);
|
||||
snd_hda_set_power_save(hda_pvt->codec.bus,
|
||||
HDA_CODEC_AUTOSUSPEND_DELAY_MS);
|
||||
}
|
||||
|
||||
static int skl_hda_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
|
@ -206,7 +229,11 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
|
|||
hda_soc_card.components = hda_soc_components;
|
||||
}
|
||||
|
||||
return devm_snd_soc_register_card(&pdev->dev, &hda_soc_card);
|
||||
ret = devm_snd_soc_register_card(&pdev->dev, &hda_soc_card);
|
||||
if (!ret)
|
||||
skl_set_hda_codec_autosuspend_delay(&hda_soc_card);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct platform_driver skl_hda_audio = {
|
||||
|
|
|
@ -86,6 +86,8 @@ static const struct snd_soc_dapm_widget widgets[] = {
|
|||
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
|
||||
platform_clock_control, SND_SOC_DAPM_POST_PMD |
|
||||
SND_SOC_DAPM_PRE_PMU),
|
||||
|
||||
SND_SOC_DAPM_MIC("SoC DMIC", NULL),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route audio_map[] = {
|
||||
|
@ -99,6 +101,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
|
|||
|
||||
{ "Left Spk", NULL, "Left BE_OUT" },
|
||||
{ "Right Spk", NULL, "Right BE_OUT" },
|
||||
|
||||
/* digital mics */
|
||||
{"DMic", NULL, "SoC DMIC"},
|
||||
};
|
||||
|
||||
/* For MAX98360A amp */
|
||||
|
@ -111,6 +116,8 @@ static const struct snd_soc_dapm_widget max98360a_widgets[] = {
|
|||
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
|
||||
platform_clock_control, SND_SOC_DAPM_POST_PMD |
|
||||
SND_SOC_DAPM_PRE_PMU),
|
||||
|
||||
SND_SOC_DAPM_MIC("SoC DMIC", NULL),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route max98360a_map[] = {
|
||||
|
@ -123,6 +130,9 @@ static const struct snd_soc_dapm_route max98360a_map[] = {
|
|||
{ "Headset Mic", NULL, "Platform Clock" },
|
||||
|
||||
{"Spk", NULL, "Speaker"},
|
||||
|
||||
/* digital mics */
|
||||
{"DMic", NULL, "SoC DMIC"},
|
||||
};
|
||||
|
||||
static struct snd_soc_jack headset;
|
||||
|
@ -265,6 +275,9 @@ SND_SOC_DAILINK_DEF(dmic_pin,
|
|||
SND_SOC_DAILINK_DEF(dmic_codec,
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(dmic16k_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("DMIC16k Pin")));
|
||||
|
||||
SND_SOC_DAILINK_DEF(idisp1_pin,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin")));
|
||||
SND_SOC_DAILINK_DEF(idisp1_codec,
|
||||
|
@ -337,6 +350,14 @@ static struct snd_soc_dai_link dais[] = {
|
|||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform),
|
||||
},
|
||||
{
|
||||
.name = "dmic16k",
|
||||
.id = 6,
|
||||
.ignore_suspend = 1,
|
||||
.dpcm_capture = 1,
|
||||
.no_pcm = 1,
|
||||
SND_SOC_DAILINK_REG(dmic16k_pin, dmic_codec, platform),
|
||||
}
|
||||
};
|
||||
|
||||
static struct snd_soc_card card_da7219_m98373 = {
|
||||
|
|
|
@ -411,10 +411,16 @@ static int create_codec_dai_name(struct device *dev,
|
|||
|
||||
static int set_codec_init_func(const struct snd_soc_acpi_link_adr *link,
|
||||
struct snd_soc_dai_link *dai_links,
|
||||
bool playback)
|
||||
bool playback, int group_id)
|
||||
{
|
||||
int i;
|
||||
|
||||
do {
|
||||
/*
|
||||
* Initialize the codec. If codec is part of an aggregated
|
||||
* group (group_id>0), initialize all codecs belonging to
|
||||
* same group.
|
||||
*/
|
||||
for (i = 0; i < link->num_adr; i++) {
|
||||
unsigned int part_id;
|
||||
int codec_index;
|
||||
|
@ -424,12 +430,17 @@ static int set_codec_init_func(const struct snd_soc_acpi_link_adr *link,
|
|||
|
||||
if (codec_index < 0)
|
||||
return codec_index;
|
||||
|
||||
/* The group_id is > 0 iff the codec is aggregated */
|
||||
if (link->adr_d[i].endpoints->group_id != group_id)
|
||||
continue;
|
||||
if (codec_info_list[codec_index].init)
|
||||
codec_info_list[codec_index].init(link, dai_links,
|
||||
codec_info_list[codec_index].init(link,
|
||||
dai_links,
|
||||
&codec_info_list[codec_index],
|
||||
playback);
|
||||
}
|
||||
link++;
|
||||
} while (link->mask && group_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -623,7 +634,7 @@ static int create_sdw_dailink(struct device *dev, int *be_index,
|
|||
NULL, &sdw_ops);
|
||||
|
||||
ret = set_codec_init_func(link, dai_links + (*be_index)++,
|
||||
playback);
|
||||
playback, group_id);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to init codec %d", codec_index);
|
||||
return ret;
|
||||
|
|
|
@ -28,7 +28,7 @@ struct hdmi_pcm {
|
|||
int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_dai *dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct hdmi_pcm *pcm;
|
||||
|
||||
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
|
||||
|
@ -90,7 +90,7 @@ int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
|
|||
return hdac_hdmi_jack_port_init(component, &card->dapm);
|
||||
}
|
||||
#else
|
||||
int hdmi_card_late_probe(struct snd_soc_card *card)
|
||||
int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream,
|
|||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
int clk_id, clk_freq, pll_out;
|
||||
int err;
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ static int rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd)
|
|||
{
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_component *component = rtd->codec_dai->component;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
struct snd_soc_jack *jack;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ static int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd)
|
|||
{
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_component *component = rtd->codec_dai->component;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
struct snd_soc_jack *jack;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ static int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd)
|
|||
{
|
||||
struct snd_soc_card *card = rtd->card;
|
||||
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_component *component = rtd->codec_dai->component;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_component *component = codec_dai->component;
|
||||
struct snd_soc_jack *jack;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -8,8 +8,15 @@
|
|||
|
||||
#include <sound/soc-acpi.h>
|
||||
#include <sound/soc-acpi-intel-match.h>
|
||||
#include "../skylake/skl.h"
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[] = {
|
||||
{
|
||||
.id = "INTC1027",
|
||||
.drv_name = "ehl_rt5660",
|
||||
.sof_fw_filename = "sof-ehl.ri",
|
||||
.sof_tplg_filename = "sof-ehl-rt5660.tplg",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ehl_machines);
|
||||
|
|
|
@ -435,6 +435,8 @@ static const struct pci_device_id sof_pci_ids[] = {
|
|||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE)
|
||||
{ PCI_DEVICE(0x8086, 0x4b55),
|
||||
.driver_data = (unsigned long)&ehl_desc},
|
||||
{ PCI_DEVICE(0x8086, 0x4b58),
|
||||
.driver_data = (unsigned long)&ehl_desc},
|
||||
#endif
|
||||
{ 0, }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue