Commit 227178d2 authored by Mark Brown's avatar Mark Brown

ASoC: Intel: machine driver updates for 5.18

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Two cleanups to remove an unused filename and typos, and one addition
of an ACPI matching table for a Dell SoundWire SKU without local
microphones.

The main change is the addition of a common 'sof-ssp-amp' machine
driver for devices with amplifiers only (no headset codec) and
different connections using I2S links (Bluetooth offload, HDMI
receiver). It's likely that the amplifier will be swapped out by OEMs,
this machine driver provides a relatively generic solution to avoid
copy-paste of similar solutions.
parents d5dd781b c4dcd710
......@@ -142,7 +142,6 @@ struct snd_soc_acpi_link_adr {
* audio codecs whose presence if checked with ACPI
* @pdata: intended for platform data or machine specific-ops. This structure
* is not constant since this field may be updated at run-time
* @sof_fw_filename: Sound Open Firmware file name, if enabled
* @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
*/
/* Descriptor for SST ASoC machine driver */
......@@ -158,7 +157,6 @@ struct snd_soc_acpi_mach {
const void *quirk_data;
void *pdata;
struct snd_soc_acpi_mach_params mach_params;
const char *sof_fw_filename;
const char *sof_tplg_filename;
};
......
......@@ -32,6 +32,12 @@ config SND_SOC_INTEL_HDA_DSP_COMMON
config SND_SOC_INTEL_SOF_MAXIM_COMMON
tristate
config SND_SOC_INTEL_SOF_REALTEK_COMMON
tristate
config SND_SOC_INTEL_SOF_CIRRUS_COMMON
tristate
if SND_SOC_INTEL_CATPT
config SND_SOC_INTEL_HASWELL_MACH
......@@ -477,6 +483,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH
select SND_SOC_HDAC_HDMI
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_MAXIM_COMMON
select SND_SOC_INTEL_SOF_REALTEK_COMMON
help
This adds support for ASoC machine driver for SOF platforms
with rt5682 codec.
......@@ -599,6 +606,23 @@ config SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH
endif ## SND_SOC_SOF_JASPERLAKE
config SND_SOC_INTEL_SOF_SSP_AMP_MACH
tristate "SOF with amplifiers in I2S Mode"
depends on I2C && ACPI && GPIOLIB
depends on MFD_INTEL_LPSS || COMPILE_TEST
select SND_SOC_RT1308
select SND_SOC_CS35L41_I2C
select SND_SOC_DMIC
select SND_SOC_HDAC_HDMI
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_REALTEK_COMMON
select SND_SOC_INTEL_SOF_CIRRUS_COMMON
help
This adds support for ASoC machine driver for SOF platforms
with RT1308/CS35L41 I2S audio codec.
Say Y if you have such a device.
If unsure select "N".
if SND_SOC_SOF_ELKHARTLAKE
config SND_SOC_INTEL_EHL_RT5660_MACH
......
......@@ -19,10 +19,10 @@ snd-soc-sst-byt-cht-cx2072x-objs := bytcht_cx2072x.o
snd-soc-sst-byt-cht-da7213-objs := bytcht_da7213.o
snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o
snd-soc-sof_rt5682-objs := sof_rt5682.o sof_realtek_common.o
snd-soc-sof_rt5682-objs := sof_rt5682.o
snd-soc-sof_cs42l42-objs := sof_cs42l42.o
snd-soc-sof_es8336-objs := sof_es8336.o
snd-soc-sof_nau8825-objs := sof_nau8825.o sof_realtek_common.o
snd-soc-sof_nau8825-objs := sof_nau8825.o
snd-soc-cml_rt1011_rt5682-objs := cml_rt1011_rt5682.o
snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o
snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
......@@ -35,6 +35,7 @@ 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
snd-soc-ehl-rt5660-objs := ehl_rt5660.o
snd-soc-sof-ssp-amp-objs := sof_ssp_amp.o
snd-soc-sof-sdw-objs += sof_sdw.o \
sof_sdw_max98373.o \
sof_sdw_rt1308.o sof_sdw_rt1316.o \
......@@ -79,6 +80,7 @@ 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
obj-$(CONFIG_SND_SOC_INTEL_SOF_SSP_AMP_MACH) += snd-soc-sof-ssp-amp.o
# common modules
snd-soc-intel-hda-dsp-common-objs := hda_dsp_common.o
......@@ -86,3 +88,9 @@ obj-$(CONFIG_SND_SOC_INTEL_HDA_DSP_COMMON) += snd-soc-intel-hda-dsp-common.o
snd-soc-intel-sof-maxim-common-objs += sof_maxim_common.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_MAXIM_COMMON) += snd-soc-intel-sof-maxim-common.o
snd-soc-intel-sof-realtek-common-objs += sof_realtek_common.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_REALTEK_COMMON) += snd-soc-intel-sof-realtek-common.o
snd-soc-intel-sof-cirrus-common-objs += sof_cirrus_common.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_CIRRUS_COMMON) += snd-soc-intel-sof-cirrus-common.o
......@@ -299,7 +299,7 @@ static int bdw_rt5650_probe(struct platform_device *pdev)
if (!bdw_rt5650)
return -ENOMEM;
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5650_card,
mach->mach_params.platform);
......
......@@ -426,7 +426,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev)
if (!bdw_rt5677)
return -ENOMEM;
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&bdw_rt5677_card,
mach->mach_params.platform);
......
......@@ -292,7 +292,7 @@ static int broadwell_audio_probe(struct platform_device *pdev)
broadwell_rt286.dev = &pdev->dev;
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286,
mach->mach_params.platform);
......
......@@ -825,7 +825,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
}
}
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform;
......
......@@ -628,7 +628,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
snd_soc_card_set_drvdata(card, ctx);
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform;
......
......@@ -257,7 +257,7 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev)
byt_cht_cx2072x_dais[dai_index].codecs->name = codec_name;
}
/* override plaform name, if required */
/* override platform name, if required */
ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_cx2072x_card,
mach->mach_params.platform);
if (ret)
......
......@@ -260,7 +260,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
dailink[dai_index].codecs->name = codec_name;
}
/* override plaform name, if required */
/* override platform name, if required */
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(card, platform_name);
......
......@@ -497,7 +497,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
return -ENXIO;
}
/* override plaform name, if required */
/* override platform name, if required */
byt_cht_es8316_card.dev = dev;
platform_name = mach->mach_params.platform;
......
......@@ -1764,7 +1764,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
byt_rt5640_card.long_name = byt_rt5640_long_name;
#endif
/* override plaform name, if required */
/* override platform name, if required */
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5640_card,
......
......@@ -1088,7 +1088,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
byt_rt5651_card.long_name = byt_rt5651_long_name;
#endif
/* override plaform name, if required */
/* override platform name, if required */
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5651_card,
......
......@@ -296,7 +296,7 @@ static int cht_max98090_headset_init(struct snd_soc_component *component)
int ret;
/*
* TI supports 4 butons headset detection
* TI supports 4 buttons headset detection
* KEY_MEDIA
* KEY_VOICECOMMAND
* KEY_VOLUMEUP
......@@ -558,7 +558,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
dev_dbg(dev, "Unable to add GPIO mapping table\n");
}
/* override plaform name, if required */
/* override platform name, if required */
snd_soc_card_cht.dev = &pdev->dev;
mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform;
......
......@@ -100,7 +100,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
struct snd_soc_component *component = codec_dai->component;
int ret, jack_type;
/* NAU88L24 supports 4 butons headset detection
/* NAU88L24 supports 4 buttons headset detection
* KEY_PLAYPAUSE
* KEY_VOICECOMMAND
* KEY_VOLUMEUP
......@@ -257,7 +257,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
return -ENOMEM;
snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
/* override plaform name, if required */
/* override platform name, if required */
snd_soc_card_cht.dev = &pdev->dev;
mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform;
......
......@@ -653,7 +653,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
(cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2))
cht_dailink[dai_index].cpus->dai_name = "ssp0-port";
/* override plaform name, if required */
/* override platform name, if required */
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(card,
......
......@@ -483,7 +483,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
drv->use_ssp0 = true;
}
/* override plaform name, if required */
/* override platform name, if required */
snd_soc_card_cht.dev = &pdev->dev;
platform_name = mach->mach_params.platform;
......
......@@ -638,7 +638,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
snd_soc_card_set_drvdata(card, ctx);
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
platform_name = mach->mach_params.platform;
......
......@@ -175,7 +175,7 @@ static int haswell_audio_probe(struct platform_device *pdev)
haswell_rt5640.dev = &pdev->dev;
/* override plaform name, if required */
/* override platform name, if required */
mach = pdev->dev.platform_data;
ret = snd_soc_fixup_dai_links_platform_name(&haswell_rt5640,
mach->mach_params.platform);
......
// SPDX-License-Identifier: GPL-2.0-only
/*
* This file defines data structures and functions used in Machine
* Driver for Intel platforms with Cirrus Logic Codecs.
*
* Copyright 2022 Intel Corporation.
*/
#include <linux/module.h>
#include <sound/sof.h>
#include "../../codecs/cs35l41.h"
#include "sof_cirrus_common.h"
/*
* Cirrus Logic CS35L41/CS35L53
*/
static const struct snd_kcontrol_new cs35l41_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("WL Spk"),
SOC_DAPM_PIN_SWITCH("WR Spk"),
SOC_DAPM_PIN_SWITCH("TL Spk"),
SOC_DAPM_PIN_SWITCH("TR Spk"),
};
static const struct snd_soc_dapm_widget cs35l41_dapm_widgets[] = {
SND_SOC_DAPM_SPK("WL Spk", NULL),
SND_SOC_DAPM_SPK("WR Spk", NULL),
SND_SOC_DAPM_SPK("TL Spk", NULL),
SND_SOC_DAPM_SPK("TR Spk", NULL),
};
static const struct snd_soc_dapm_route cs35l41_dapm_routes[] = {
/* speaker */
{"WL Spk", NULL, "WL SPK"},
{"WR Spk", NULL, "WR SPK"},
{"TL Spk", NULL, "TL SPK"},
{"TR Spk", NULL, "TR SPK"},
};
static struct snd_soc_dai_link_component cs35l41_components[] = {
{
.name = CS35L41_DEV0_NAME,
.dai_name = CS35L41_CODEC_DAI,
},
{
.name = CS35L41_DEV1_NAME,
.dai_name = CS35L41_CODEC_DAI,
},
{
.name = CS35L41_DEV2_NAME,
.dai_name = CS35L41_CODEC_DAI,
},
{
.name = CS35L41_DEV3_NAME,
.dai_name = CS35L41_CODEC_DAI,
},
};
static struct snd_soc_codec_conf cs35l41_codec_conf[] = {
{
.dlc = COMP_CODEC_CONF(CS35L41_DEV0_NAME),
.name_prefix = "WL",
},
{
.dlc = COMP_CODEC_CONF(CS35L41_DEV1_NAME),
.name_prefix = "WR",
},
{
.dlc = COMP_CODEC_CONF(CS35L41_DEV2_NAME),
.name_prefix = "TL",
},
{
.dlc = COMP_CODEC_CONF(CS35L41_DEV3_NAME),
.name_prefix = "TR",
},
};
static int cs35l41_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, cs35l41_dapm_widgets,
ARRAY_SIZE(cs35l41_dapm_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add dapm controls, ret %d\n", ret);
return ret;
}
ret = snd_soc_add_card_controls(card, cs35l41_kcontrols,
ARRAY_SIZE(cs35l41_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add card controls, ret %d\n", ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, cs35l41_dapm_routes,
ARRAY_SIZE(cs35l41_dapm_routes));
if (ret)
dev_err(rtd->dev, "fail to add dapm routes, ret %d\n", ret);
return ret;
}
static int cs35l41_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai;
int clk_freq, i, ret;
clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */
if (clk_freq <= 0) {
dev_err(rtd->dev, "fail to get bclk freq, ret %d\n", clk_freq);
return -EINVAL;
}
for_each_rtd_codec_dais(rtd, i, codec_dai) {
/* call dai driver's set_sysclk() callback */
ret = snd_soc_dai_set_sysclk(codec_dai, CS35L41_CLKID_SCLK,
clk_freq, SND_SOC_CLOCK_IN);
if (ret < 0) {
dev_err(codec_dai->dev, "fail to set sysclk, ret %d\n",
ret);
return ret;
}
/* call component driver's set_sysclk() callback */
ret = snd_soc_component_set_sysclk(codec_dai->component,
CS35L41_CLKID_SCLK, 0,
clk_freq, SND_SOC_CLOCK_IN);
if (ret < 0) {
dev_err(codec_dai->dev, "fail to set component sysclk, ret %d\n",
ret);
return ret;
}
}
return 0;
}
static const struct snd_soc_ops cs35l41_ops = {
.hw_params = cs35l41_hw_params,
};
void cs35l41_set_dai_link(struct snd_soc_dai_link *link)
{
link->codecs = cs35l41_components;
link->num_codecs = ARRAY_SIZE(cs35l41_components);
link->init = cs35l41_init;
link->ops = &cs35l41_ops;
}
EXPORT_SYMBOL_NS(cs35l41_set_dai_link, SND_SOC_INTEL_SOF_CIRRUS_COMMON);
void cs35l41_set_codec_conf(struct snd_soc_card *card)
{
card->codec_conf = cs35l41_codec_conf;
card->num_configs = ARRAY_SIZE(cs35l41_codec_conf);
}
EXPORT_SYMBOL_NS(cs35l41_set_codec_conf, SND_SOC_INTEL_SOF_CIRRUS_COMMON);
MODULE_DESCRIPTION("ASoC Intel SOF Cirrus Logic helpers");
MODULE_LICENSE("GPL");
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* This file defines data structures used in Machine Driver for Intel
* platforms with Cirrus Logic Codecs.
*
* Copyright 2022 Intel Corporation.
*/
#ifndef __SOF_CIRRUS_COMMON_H
#define __SOF_CIRRUS_COMMON_H
#include <sound/soc.h>
/*
* Cirrus Logic CS35L41/CS35L53
*/
#define CS35L41_CODEC_DAI "cs35l41-pcm"
#define CS35L41_DEV0_NAME "i2c-CSC3541:00"
#define CS35L41_DEV1_NAME "i2c-CSC3541:01"
#define CS35L41_DEV2_NAME "i2c-CSC3541:02"
#define CS35L41_DEV3_NAME "i2c-CSC3541:03"
void cs35l41_set_dai_link(struct snd_soc_dai_link *link);
void cs35l41_set_codec_conf(struct snd_soc_card *card);
#endif /* __SOF_CIRRUS_COMMON_H */
......@@ -10,9 +10,11 @@
#include <sound/soc-acpi.h>
#include <sound/soc-dai.h>
#include <sound/soc-dapm.h>
#include <sound/sof.h>
#include <uapi/sound/asound.h>
#include "../../codecs/rt1011.h"
#include "../../codecs/rt1015.h"
#include "../../codecs/rt1308.h"
#include "sof_realtek_common.h"
/*
......@@ -132,12 +134,14 @@ void sof_rt1011_dai_link(struct snd_soc_dai_link *link)
link->init = rt1011_init;
link->ops = &rt1011_ops;
}
EXPORT_SYMBOL_NS(sof_rt1011_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1011_codec_conf(struct snd_soc_card *card)
{
card->codec_conf = rt1011_codec_confs;
card->num_configs = ARRAY_SIZE(rt1011_codec_confs);
}
EXPORT_SYMBOL_NS(sof_rt1011_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
/*
* rt1015: i2c mode driver for ALC1015 and ALC1015Q
......@@ -233,6 +237,7 @@ void sof_rt1015p_dai_link(struct snd_soc_dai_link *link)
link->init = rt1015p_init;
link->ops = &rt1015p_ops;
}
EXPORT_SYMBOL_NS(sof_rt1015p_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1015p_codec_conf(struct snd_soc_card *card)
{
......@@ -242,6 +247,7 @@ void sof_rt1015p_codec_conf(struct snd_soc_card *card)
card->codec_conf = rt1015p_codec_confs;
card->num_configs = ARRAY_SIZE(rt1015p_codec_confs);
}
EXPORT_SYMBOL_NS(sof_rt1015p_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
/*
* RT1015 audio amplifier
......@@ -343,6 +349,7 @@ void sof_rt1015_codec_conf(struct snd_soc_card *card)
card->codec_conf = rt1015_amp_conf;
card->num_configs = ARRAY_SIZE(rt1015_amp_conf);
}
EXPORT_SYMBOL_NS(sof_rt1015_codec_conf, SND_SOC_INTEL_SOF_REALTEK_COMMON);
void sof_rt1015_dai_link(struct snd_soc_dai_link *link, unsigned int fs)
{
......@@ -354,3 +361,103 @@ void sof_rt1015_dai_link(struct snd_soc_dai_link *link, unsigned int fs)
if (fs == 100)
rt1015_ops.hw_params = rt1015_hw_params_pll_and_tdm;
}
EXPORT_SYMBOL_NS(sof_rt1015_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
/*
* RT1308 audio amplifier
*/
static const struct snd_kcontrol_new rt1308_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("Speakers"),
};
static const struct snd_soc_dapm_widget rt1308_dapm_widgets[] = {
SND_SOC_DAPM_SPK("Speakers", NULL),
};
static const struct snd_soc_dapm_route rt1308_dapm_routes[] = {
/* speaker */
{"Speakers", NULL, "SPOL"},
{"Speakers", NULL, "SPOR"},
};
static struct snd_soc_dai_link_component rt1308_components[] = {
{
.name = RT1308_DEV0_NAME,
.dai_name = RT1308_CODEC_DAI,
}
};
static int rt1308_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, rt1308_dapm_widgets,
ARRAY_SIZE(rt1308_dapm_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add dapm controls, ret %d\n", ret);
return ret;
}
ret = snd_soc_add_card_controls(card, rt1308_kcontrols,
ARRAY_SIZE(rt1308_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add card controls, ret %d\n", ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, rt1308_dapm_routes,
ARRAY_SIZE(rt1308_dapm_routes));
if (ret)
dev_err(rtd->dev, "fail to add dapm routes, ret %d\n", ret);
return ret;
}
static int rt1308_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_card *card = rtd->card;
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
int clk_id, clk_freq, pll_out;
int ret;
clk_id = RT1308_PLL_S_MCLK;
/* get the tplg configured mclk. */
clk_freq = sof_dai_get_mclk(rtd);
pll_out = params_rate(params) * 512;
/* Set rt1308 pll */
ret = snd_soc_dai_set_pll(codec_dai, 0, clk_id, clk_freq, pll_out);
if (ret < 0) {
dev_err(card->dev, "Failed to set RT1308 PLL: %d\n", ret);
return ret;
}
/* Set rt1308 sysclk */
ret = snd_soc_dai_set_sysclk(codec_dai, RT1308_FS_SYS_S_PLL, pll_out,
SND_SOC_CLOCK_IN);
if (ret < 0)
dev_err(card->dev, "Failed to set RT1308 SYSCLK: %d\n", ret);
return ret;
}
static const struct snd_soc_ops rt1308_ops = {
.hw_params = rt1308_hw_params,
};
void sof_rt1308_dai_link(struct snd_soc_dai_link *link)
{
link->codecs = rt1308_components;
link->num_codecs = ARRAY_SIZE(rt1308_components);
link->init = rt1308_init;
link->ops = &rt1308_ops;
}
EXPORT_SYMBOL_NS(sof_rt1308_dai_link, SND_SOC_INTEL_SOF_REALTEK_COMMON);
MODULE_DESCRIPTION("ASoC Intel SOF Realtek helpers");
MODULE_LICENSE("GPL");
......@@ -35,4 +35,8 @@ void sof_rt1015p_codec_conf(struct snd_soc_card *card);
void sof_rt1015_dai_link(struct snd_soc_dai_link *link, unsigned int fs);
void sof_rt1015_codec_conf(struct snd_soc_card *card);
#define RT1308_CODEC_DAI "rt1308-aif"
#define RT1308_DEV0_NAME "i2c-10EC1308:00"
void sof_rt1308_dai_link(struct snd_soc_dai_link *link);
#endif /* __SOF_REALTEK_COMMON_H */
......@@ -1081,3 +1081,4 @@ MODULE_AUTHOR("Mac Chiang <mac.chiang@intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_MAXIM_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);
This diff is collapsed.
......@@ -260,6 +260,25 @@ static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01_rt71
{}
};
static const struct snd_soc_acpi_link_adr adl_sdw_rt711_link2_rt1316_link01[] = {
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt711_sdca_2_adr),
.adr_d = rt711_sdca_2_adr,
},
{
.mask = BIT(0),
.num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
.adr_d = rt1316_0_group2_adr,
},
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(rt1316_1_group2_adr),
.adr_d = rt1316_1_group2_adr,
},
{}
};
static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link12_rt714_link0[] = {
{
.mask = BIT(1),
......@@ -390,7 +409,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_mx98373_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98373_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-max98373-rt5682.tplg",
},
{
......@@ -398,7 +416,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_mx98357_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98357a_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg",
},
{
......@@ -406,7 +423,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_mx98360_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98360a_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg",
},
{
......@@ -414,7 +430,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_rt1019p_nau8825",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_rt1019p_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg",
},
{
......@@ -422,7 +437,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_max98373_nau8825",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98373_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-max98373-nau8825.tplg",
},
{
......@@ -430,13 +444,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_mx98360a_nau8825",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98360a_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg",
},
{
.id = "10508825",
.drv_name = "sof_nau8825",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-nau8825.tplg",
},
{
......@@ -444,15 +456,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.drv_name = "adl_max98390_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98390_amp,
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-max98390-rt5682.tplg",
},
{
.comp_ids = &adl_rt5682_rt5682s_hp,
.drv_name = "adl_rt5682",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-rt5682.tplg",
},
/* place amp-only boards in the end of table */
{
.id = "CSC3541",
.drv_name = "adl_cs35l41",
.sof_tplg_filename = "sof-adl-cs35l41.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines);
......@@ -481,21 +497,24 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
.link_mask = 0xF, /* 4 active links required */
.links = adl_sdw_rt711_link2_rt1316_link01_rt714_link3,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg",
},
{
.link_mask = 0x7, /* rt1316 on link0 and link1 & rt711 on link2*/
.links = adl_sdw_rt711_link2_rt1316_link01,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt711-l2-rt1316-l01.tplg",
},
{
.link_mask = 0xC, /* rt1316 on link2 & rt714 on link3 */
.links = adl_sdw_rt1316_link2_rt714_link3,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
},
{
.link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
.links = adl_sdw_rt1316_link12_rt714_link0,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
},
{
......@@ -514,7 +533,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
.link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */
.links = adl_chromebook_base,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-adl.ri",
.sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg",
},
{},
......
......@@ -51,7 +51,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
.id = "INT343A",
.drv_name = "bxt_alc298s_i2s",
.fw_filename = "intel/dsp_fw_bxtn.bin",
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-rt298.tplg",
},
{
......@@ -60,32 +59,27 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
.fw_filename = "intel/dsp_fw_bxtn.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &bxt_codecs,
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-da7219.tplg",
},
{
.id = "104C5122",
.drv_name = "sof_pcm512x",
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-pcm512x.tplg",
},
{
.id = "1AEC8804",
.drv_name = "sof-wm8804",
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-wm8804.tplg",
},
{
.id = "INT34C3",
.drv_name = "bxt_tdf8532",
.machine_quirk = apl_quirk,
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-tdf8532.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-es8336.tplg",
},
{},
......
......@@ -91,7 +91,6 @@ static struct snd_soc_acpi_mach byt_rt5672 = {
.drv_name = "cht-bsw-rt5672",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5670.tplg",
};
......@@ -100,7 +99,6 @@ static struct snd_soc_acpi_mach byt_pov_p1006w = {
.drv_name = "bytcr_rt5651",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_rt5651",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5651.tplg",
};
......@@ -147,7 +145,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_rt5640",
.machine_quirk = byt_quirk,
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5640.tplg",
},
{
......@@ -155,7 +152,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "bytcr_rt5651",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_rt5651",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5651.tplg",
},
{
......@@ -163,7 +159,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "bytcr_wm5102",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_wm5102",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-wm5102.tplg",
},
{
......@@ -171,7 +166,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "bytcht_da7213",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcht_da7213",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-da7213.tplg",
},
{
......@@ -179,13 +173,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "bytcht_es8316",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcht_es8316",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-es8316.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5682.tplg",
},
/* some Baytrail platforms rely on RT5645, use CHT machine driver */
......@@ -194,7 +186,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "cht-bsw-rt5645",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5645.tplg",
},
/* use CHT driver to Baytrail Chromebooks */
......@@ -203,7 +194,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "cht-bsw-max98090",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-max98090.tplg",
},
{
......@@ -211,7 +201,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.drv_name = "bytcht_cx2072x",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcht_cx2072x",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-cx2072x.tplg",
},
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
......
......@@ -35,7 +35,6 @@ static struct snd_soc_acpi_mach cht_surface_mach = {
.drv_name = "cht-bsw-rt5645",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5645.tplg",
};
......@@ -79,7 +78,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "cht-bsw-rt5672",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5670.tplg",
},
{
......@@ -87,7 +85,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "cht-bsw-rt5645",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5645.tplg",
},
{
......@@ -95,7 +92,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "cht-bsw-max98090",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-max98090.tplg",
},
{
......@@ -103,7 +99,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "cht-bsw-nau8824",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "cht-bsw",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-nau8824.tplg",
},
{
......@@ -111,7 +106,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "bytcht_da7213",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcht_da7213",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-da7213.tplg",
},
{
......@@ -119,7 +113,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "bytcht_es8316",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcht_es8316",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-es8316.tplg",
},
/* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
......@@ -129,13 +122,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcr_rt5640",
.machine_quirk = cht_quirk,
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5640.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5682.tplg",
},
/* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
......@@ -144,7 +135,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "bytcr_rt5651",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcr_rt5651",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5651.tplg",
},
{
......@@ -152,13 +142,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "bytcht_cx2072x",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcht_cx2072x",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-cx2072x.tplg",
},
{
.id = "104C5122",
.drv_name = "sof_pcm512x",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-src-50khz-pcm512x.tplg",
},
......
......@@ -40,7 +40,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
.drv_name = "cml_rt1011_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1011_spk_codecs,
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt1011-rt5682.tplg",
},
{
......@@ -48,7 +47,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
.drv_name = "cml_rt1015_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1015_spk_codecs,
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt1011-rt5682.tplg",
},
{
......@@ -56,13 +54,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
.drv_name = "sof_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98357a_spk_codecs,
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt5682.tplg",
},
{
......@@ -70,7 +66,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
.drv_name = "cml_da7219_mx98357a",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98357a_spk_codecs,
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-da7219-max98357a.tplg",
},
{
......@@ -78,13 +73,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
.drv_name = "cml_da7219_mx98357a",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98390_spk_codecs,
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-da7219-max98390.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-es8336.tplg",
},
{},
......@@ -283,14 +276,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[] = {
.link_mask = 0xF, /* 4 active links required */
.links = cml_3_in_1_default,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg",
},
{
.link_mask = 0xF, /* 4 active links required */
.links = cml_3_in_1_sdca,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt711-rt1316-rt714.tplg",
},
{
......@@ -302,14 +293,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[] = {
.link_mask = 0xF,
.links = cml_3_in_1_mono_amp,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg",
},
{
.link_mask = 0x2, /* RT700 connected on Link1 */
.links = cml_rvp,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cml.ri",
.sof_tplg_filename = "sof-cml-rt700.tplg",
},
{}
......
......@@ -21,7 +21,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
.drv_name = "cnl_rt274",
.fw_filename = "intel/dsp_fw_cnl.bin",
.pdata = &cnl_pdata,
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cnl-rt274.tplg",
},
{},
......@@ -58,21 +57,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = {
.link_mask = BIT(2),
.links = up_extreme_rt5682_2,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cnl-rt5682-sdw2.tplg"
},
{
.link_mask = GENMASK(3, 0),
.links = sdw_mockup_headset_2amps_mic,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg",
},
{
.link_mask = BIT(0) | BIT(1) | BIT(3),
.links = sdw_mockup_headset_1amp_mic,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg",
},
{}
......
......@@ -14,7 +14,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[] = {
{
.id = "10EC5660",
.drv_name = "ehl_rt5660",
.sof_fw_filename = "sof-ehl.ri",
.sof_tplg_filename = "sof-ehl-rt5660.tplg",
},
{},
......
......@@ -19,7 +19,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.id = "INT343A",
.drv_name = "glk_alc298s_i2s",
.fw_filename = "intel/dsp_fw_glk.bin",
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-alc298.tplg",
},
{
......@@ -28,7 +27,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.fw_filename = "intel/dsp_fw_glk.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-da7219.tplg",
},
{
......@@ -37,7 +35,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.fw_filename = "intel/dsp_fw_glk.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-rt5682.tplg",
},
{
......@@ -45,7 +42,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.drv_name = "glk_rt5682_max98357a",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-rt5682.tplg",
},
{
......@@ -54,13 +50,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.fw_filename = "intel/dsp_fw_glk.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-cs42l42.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-es8336.tplg",
},
{},
......
......@@ -21,8 +21,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_hda_machines[] = {
/* .fw_filename is dynamically set in skylake driver */
/* .sof_fw_filename is dynamically set in sof/intel driver */
.sof_tplg_filename = "sof-hda-generic.tplg",
/*
......
......@@ -14,7 +14,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[] = {
.id = "INT33CA",
.drv_name = "haswell-audio",
.fw_filename = "intel/IntcSST1.bin",
.sof_fw_filename = "sof-hsw.ri",
.sof_tplg_filename = "sof-hsw.tplg",
},
{}
......@@ -26,28 +25,24 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[] = {
.id = "INT343A",
.drv_name = "broadwell-audio",
.fw_filename = "intel/IntcSST2.bin",
.sof_fw_filename = "sof-bdw.ri",
.sof_tplg_filename = "sof-bdw-rt286.tplg",
},
{
.id = "10EC5650",
.drv_name = "bdw-rt5650",
.fw_filename = "intel/IntcSST2.bin",
.sof_fw_filename = "sof-bdw.ri",
.sof_tplg_filename = "sof-bdw-rt5650.tplg",
},
{
.id = "RT5677CE",
.drv_name = "bdw-rt5677",
.fw_filename = "intel/IntcSST2.bin",
.sof_fw_filename = "sof-bdw.ri",
.sof_tplg_filename = "sof-bdw-rt5677.tplg",
},
{
.id = "INT33CA",
.drv_name = "haswell-audio",
.fw_filename = "intel/IntcSST2.bin",
.sof_fw_filename = "sof-bdw.ri",
.sof_tplg_filename = "sof-bdw-rt5640.tplg",
},
{}
......
......@@ -20,13 +20,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
.drv_name = "icl_rt274",
.fw_filename = "intel/dsp_fw_icl.bin",
.pdata = &icl_pdata,
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt274.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt5682.tplg",
},
{},
......@@ -165,21 +163,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
.link_mask = 0xF, /* 4 active links required */
.links = icl_3_in_1_default,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
},
{
.link_mask = 0xB, /* 3 active links required */
.links = icl_3_in_1_mono_amp,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
},
{
.link_mask = 0x1, /* rt700 connected on link0 */
.links = icl_rvp,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt700.tplg",
},
{},
......
......@@ -43,7 +43,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.id = "DLGS7219",
.drv_name = "sof_da7219_mx98373",
.sof_fw_filename = "sof-jsl.ri",
.sof_tplg_filename = "sof-jsl-da7219.tplg",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &jsl_7219_98373_codecs,
......@@ -51,13 +50,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.id = "DLGS7219",
.drv_name = "sof_da7219_mx98360a",
.sof_fw_filename = "sof-jsl.ri",
.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
},
{
.comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1015",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1015_spk,
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
......@@ -65,7 +62,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1015p",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1015p_spk,
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
......@@ -73,7 +69,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_mx98360",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &mx98360a_spk,
.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
......@@ -81,7 +76,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.id = "10134242",
.drv_name = "jsl_cs4242_mx98360a",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &mx98360a_spk,
.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
......@@ -89,7 +83,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-jsl.ri",
.sof_tplg_filename = "sof-jsl-es8336.tplg",
},
{},
......
......@@ -363,13 +363,17 @@ static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = {
.codecs = {"10EC5682", "RTL5682"},
};
static const struct snd_soc_acpi_codecs tgl_lt6911_hdmi = {
.num_codecs = 1,
.codecs = {"INTC10B0"}
};
struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
{
.comp_ids = &tgl_rt5682_rt5682s_hp,
.drv_name = "tgl_mx98357_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_codecs,
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg",
},
{
......@@ -377,7 +381,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
.drv_name = "tgl_mx98373_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_max98373_amp,
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg",
},
{
......@@ -385,15 +388,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
.drv_name = "tgl_rt1011_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_rt1011_amp,
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-rt1011-rt5682.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-es8336.tplg",
},
{
.id = "10EC1308",
.drv_name = "tgl_rt1308_hdmi_ssp",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_lt6911_hdmi,
.sof_tplg_filename = "sof-tgl-rt1308-ssp2-hdmi-ssp15.tplg"
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
......@@ -405,21 +413,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
.link_mask = GENMASK(3, 0),
.links = sdw_mockup_headset_2amps_mic,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-rt711-rt1308-rt715.tplg",
},
{
.link_mask = BIT(0) | BIT(1) | BIT(3),
.links = sdw_mockup_headset_1amp_mic,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-rt711-rt1308-mono-rt715.tplg",
},
{
.link_mask = BIT(0) | BIT(1) | BIT(2),
.links = sdw_mockup_mic_headset_1amp,
.drv_name = "sof_sdw",
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
},
{
......
......@@ -1313,10 +1313,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
mach->mach_params.links = mach->links;
mach->mach_params.link_mask = mach->link_mask;
mach->mach_params.platform = dev_name(sdev->dev);
if (mach->sof_fw_filename)
pdata->fw_filename = mach->sof_fw_filename;
else
pdata->fw_filename = pdata->desc->default_fw_filename;
pdata->fw_filename = pdata->desc->default_fw_filename;
pdata->tplg_filename = mach->sof_tplg_filename;
/*
......
......@@ -25,7 +25,6 @@ static struct snd_soc_acpi_mach sof_tng_machines[] = {
{
.id = "INT343A",
.drv_name = "edison",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt.tplg",
},
{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment