Commit 395f23e9 authored by Mark Brown's avatar Mark Brown

ASoC: Intel: updates for 6.10 - part6

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

Last batch of cleanups from Brent Lu, with Chromebooks now supported
with fewer modular machine drivers.
parents a226d08a 3d84e070
......@@ -301,26 +301,21 @@ config SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
tristate
select SND_SOC_DA7219
select SND_SOC_MAX98357A
select SND_SOC_MAX98390
select SND_SOC_DMIC
select SND_SOC_HDAC_HDMI
select SND_SOC_INTEL_HDA_DSP_COMMON
config SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
tristate
select SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
if SND_SOC_INTEL_APL
config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
tristate "Broxton with DA7219 and MAX98357A/MAX98390 in I2S Mode"
tristate "Broxton with DA7219 and MAX98357A in I2S Mode"
depends on I2C && ACPI
depends on MFD_INTEL_LPSS || COMPILE_TEST
depends on SND_HDA_CODEC_HDMI
select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
select SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
help
This adds support for ASoC machine driver for Broxton-P platforms
with DA7219 + MAX98357A/MAX98390 I2S audio codec.
with DA7219 + MAX98357A I2S audio codec.
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".
......@@ -433,30 +428,21 @@ if SND_SOC_SOF_GEMINILAKE
config SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH
tristate "GLK with DA7219 and MAX98357A in I2S Mode"
depends on I2C && ACPI
depends on MFD_INTEL_LPSS || COMPILE_TEST
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
imply SND_SOC_INTEL_SOF_DA7219_MACH
help
This adds support for ASoC machine driver for Geminilake platforms
with DA7219 + MAX98357A I2S audio codec.
with DA7219 + MAX98357A I2S audio codec. This option is deprecated
and please use SND_SOC_INTEL_SOF_DA7219_MACH instead.
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".
config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
tristate "GLK with RT5682 and MAX98357A in I2S Mode"
depends on I2C && ACPI
depends on MFD_INTEL_LPSS || COMPILE_TEST
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
select SND_SOC_RT5682_I2C
select SND_SOC_RT5682S
select SND_SOC_MAX98357A
select SND_SOC_DMIC
select SND_SOC_HDAC_HDMI
select SND_SOC_INTEL_HDA_DSP_COMMON
imply SND_SOC_INTEL_SOF_RT5682_MACH
help
This adds support for ASoC machine driver for Geminilake platforms
with RT5682 + MAX98357A I2S audio codec.
with RT5682 + MAX98357A I2S audio codec. This option is deprecated
and please use SND_SOC_INTEL_SOF_RT5682_MACH instead.
Say Y if you have such a device.
If unsure select "N".
......@@ -487,6 +473,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH
depends on ((SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC) &&\
(MFD_INTEL_LPSS || COMPILE_TEST)) ||\
(SND_SOC_SOF_BAYTRAIL && (X86_INTEL_LPSS || COMPILE_TEST))
select SND_SOC_MAX98357A
select SND_SOC_MAX98373_I2C
select SND_SOC_MAX98390
select SND_SOC_RT1011
......@@ -584,12 +571,11 @@ if (SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK)
config SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH
tristate "CML_LP with DA7219 and MAX98357A in I2S Mode"
depends on I2C && ACPI
depends on MFD_INTEL_LPSS || COMPILE_TEST
select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
imply SND_SOC_INTEL_SOF_DA7219_MACH
help
This adds support for ASoC machine driver for Cometlake platforms
with DA7219 + MAX98357A I2S audio codec.
with DA7219 + MAX98357A I2S audio codec. This option is deprecated
and please use SND_SOC_INTEL_SOF_DA7219_MACH instead.
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".
......@@ -614,6 +600,7 @@ config SND_SOC_INTEL_SOF_DA7219_MACH
select SND_SOC_DA7219
select SND_SOC_MAX98357A
select SND_SOC_MAX98373_I2C
select SND_SOC_MAX98390
select SND_SOC_DMIC
select SND_SOC_INTEL_SOF_BOARD_HELPERS
select SND_SOC_INTEL_SOF_MAXIM_COMMON
......
......@@ -7,7 +7,6 @@ snd-soc-sst-bxt-da7219_max98357a-objs := bxt_da7219_max98357a.o
snd-soc-sst-bxt-rt298-objs := bxt_rt298.o
snd-soc-sst-sof-pcm512x-objs := sof_pcm512x.o
snd-soc-sst-sof-wm8804-objs := sof_wm8804.o
snd-soc-sst-glk-rt5682_max98357a-objs := glk_rt5682_max98357a.o
snd-soc-sst-bytcr-rt5640-objs := bytcr_rt5640.o
snd-soc-sst-bytcr-rt5651-objs := bytcr_rt5651.o
snd-soc-sst-bytcr-wm5102-objs := bytcr_wm5102.o
......@@ -52,11 +51,10 @@ obj-$(CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH) += snd-soc-sof_es8336.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_NAU8825_MACH) += snd-soc-sof_nau8825.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_DA7219_MACH) += snd-soc-sof_da7219.o
obj-$(CONFIG_SND_SOC_INTEL_HASWELL_MACH) += snd-soc-hsw-rt5640.o
obj-$(CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON) += snd-soc-sst-bxt-da7219_max98357a.o
obj-$(CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH) += snd-soc-sst-bxt-da7219_max98357a.o
obj-$(CONFIG_SND_SOC_INTEL_BXT_RT298_MACH) += snd-soc-sst-bxt-rt298.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_PCM512x_MACH) += snd-soc-sst-sof-pcm512x.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_WM8804_MACH) += snd-soc-sst-sof-wm8804.o
obj-$(CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH) += snd-soc-sst-glk-rt5682_max98357a.o
obj-$(CONFIG_SND_SOC_INTEL_BROADWELL_MACH) += snd-soc-bdw-rt286.o
obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH) += snd-soc-sst-bdw-rt5650-mach.o
obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH) += snd-soc-sst-bdw-rt5677-mach.o
......
......@@ -24,14 +24,9 @@
#define BXT_DIALOG_CODEC_DAI "da7219-hifi"
#define BXT_MAXIM_CODEC_DAI "HiFi"
#define MAX98390_DEV0_NAME "i2c-MX98390:00"
#define MAX98390_DEV1_NAME "i2c-MX98390:01"
#define DUAL_CHANNEL 2
#define QUAD_CHANNEL 4
#define SPKAMP_MAX98357A 1
#define SPKAMP_MAX98390 2
static struct snd_soc_jack broxton_headset;
static struct snd_soc_jack broxton_hdmi[3];
......@@ -44,7 +39,6 @@ struct bxt_hdmi_pcm {
struct bxt_card_private {
struct list_head hdmi_pcm_list;
bool common_hdmi_codec_drv;
int spkamp;
};
enum {
......@@ -91,17 +85,9 @@ static const struct snd_kcontrol_new broxton_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone Jack"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
SOC_DAPM_PIN_SWITCH("Line Out"),
};
static const struct snd_kcontrol_new max98357a_controls[] = {
SOC_DAPM_PIN_SWITCH("Spk"),
};
static const struct snd_kcontrol_new max98390_controls[] = {
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget broxton_widgets[] = {
SND_SOC_DAPM_HP("Headphone Jack", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
......@@ -112,17 +98,9 @@ static const struct snd_soc_dapm_widget broxton_widgets[] = {
SND_SOC_DAPM_SPK("HDMI3", NULL),
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
platform_clock_control, SND_SOC_DAPM_POST_PMD|SND_SOC_DAPM_PRE_PMU),
};
static const struct snd_soc_dapm_widget max98357a_widgets[] = {
SND_SOC_DAPM_SPK("Spk", NULL),
};
static const struct snd_soc_dapm_widget max98390_widgets[] = {
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_soc_dapm_route audio_map[] = {
/* HP jack connectors - unknown if we have jack detection */
{"Headphone Jack", NULL, "HPL"},
......@@ -153,20 +131,10 @@ static const struct snd_soc_dapm_route audio_map[] = {
{ "Headphone Jack", NULL, "Platform Clock" },
{ "Headset Mic", NULL, "Platform Clock" },
{ "Line Out", NULL, "Platform Clock" },
};
static const struct snd_soc_dapm_route max98357a_routes[] = {
/* speaker */
{"Spk", NULL, "Speaker"},
};
static const struct snd_soc_dapm_route max98390_routes[] = {
/* Speaker */
{"Left Spk", NULL, "Left BE_OUT"},
{"Right Spk", NULL, "Right BE_OUT"},
};
static const struct snd_soc_dapm_route broxton_map[] = {
{"HiFi Playback", NULL, "ssp5 Tx"},
{"ssp5 Tx", NULL, "codec0_out"},
......@@ -177,17 +145,6 @@ static const struct snd_soc_dapm_route broxton_map[] = {
{"ssp1 Rx", NULL, "Capture"},
};
static const struct snd_soc_dapm_route gemini_map[] = {
{"HiFi Playback", NULL, "ssp1 Tx"},
{"ssp1 Tx", NULL, "codec0_out"},
{"Playback", NULL, "ssp2 Tx"},
{"ssp2 Tx", NULL, "codec1_out"},
{"codec0_in", NULL, "ssp2 Rx"},
{"ssp2 Rx", NULL, "Capture"},
};
static struct snd_soc_jack_pin jack_pins[] = {
{
.pin = "Headphone Jack",
......@@ -231,9 +188,6 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
int clk_freq;
/* Configure sysclk for codec */
if (soc_intel_is_cml())
clk_freq = 24000000;
else
clk_freq = 19200000;
ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK, clk_freq,
......@@ -453,10 +407,6 @@ SND_SOC_DAILINK_DEF(ssp5_pin,
SND_SOC_DAILINK_DEF(ssp5_codec,
DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00",
BXT_MAXIM_CODEC_DAI)));
SND_SOC_DAILINK_DEF(max98390_codec,
DAILINK_COMP_ARRAY(
/* Left */ COMP_CODEC(MAX98390_DEV0_NAME, "max98390-aif1"),
/* Right */ COMP_CODEC(MAX98390_DEV1_NAME, "max98390-aif1")));
SND_SOC_DAILINK_DEF(ssp1_pin,
DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin")));
......@@ -654,76 +604,15 @@ static struct snd_soc_dai_link broxton_dais[] = {
},
};
static struct snd_soc_codec_conf max98390_codec_confs[] = {
{
.dlc = COMP_CODEC_CONF(MAX98390_DEV0_NAME),
.name_prefix = "Left",
},
{
.dlc = COMP_CODEC_CONF(MAX98390_DEV1_NAME),
.name_prefix = "Right",
},
};
#define NAME_SIZE 32
static int bxt_card_late_probe(struct snd_soc_card *card)
{
struct bxt_card_private *ctx = snd_soc_card_get_drvdata(card);
struct bxt_hdmi_pcm *pcm;
struct snd_soc_component *component = NULL;
const struct snd_kcontrol_new *controls;
const struct snd_soc_dapm_widget *widgets;
const struct snd_soc_dapm_route *routes;
int num_controls, num_widgets, num_routes, err, i = 0;
int err, i = 0;
char jack_name[NAME_SIZE];
switch (ctx->spkamp) {
case SPKAMP_MAX98357A:
controls = max98357a_controls;
num_controls = ARRAY_SIZE(max98357a_controls);
widgets = max98357a_widgets;
num_widgets = ARRAY_SIZE(max98357a_widgets);
routes = max98357a_routes;
num_routes = ARRAY_SIZE(max98357a_routes);
break;
case SPKAMP_MAX98390:
controls = max98390_controls;
num_controls = ARRAY_SIZE(max98390_controls);
widgets = max98390_widgets;
num_widgets = ARRAY_SIZE(max98390_widgets);
routes = max98390_routes;
num_routes = ARRAY_SIZE(max98390_routes);
break;
default:
dev_err(card->dev, "Invalid speaker amplifier %d\n", ctx->spkamp);
return -EINVAL;
}
err = snd_soc_dapm_new_controls(&card->dapm, widgets, num_widgets);
if (err) {
dev_err(card->dev, "Fail to new widgets\n");
return err;
}
err = snd_soc_add_card_controls(card, controls, num_controls);
if (err) {
dev_err(card->dev, "Fail to add controls\n");
return err;
}
err = snd_soc_dapm_add_routes(&card->dapm, routes, num_routes);
if (err) {
dev_err(card->dev, "Fail to add routes\n");
return err;
}
if (soc_intel_is_glk())
snd_soc_dapm_add_routes(&card->dapm, gemini_map,
ARRAY_SIZE(gemini_map));
else
snd_soc_dapm_add_routes(&card->dapm, broxton_map,
ARRAY_SIZE(broxton_map));
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;
......@@ -785,70 +674,8 @@ static int broxton_audio_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
if (acpi_dev_present("MX98390", NULL, -1))
ctx->spkamp = SPKAMP_MAX98390;
else
ctx->spkamp = SPKAMP_MAX98357A;
broxton_audio_card.dev = &pdev->dev;
snd_soc_card_set_drvdata(&broxton_audio_card, ctx);
if (soc_intel_is_glk()) {
unsigned int i;
broxton_audio_card.name = "glkda7219max";
/* Fixup the SSP entries for geminilake */
for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
if (!broxton_dais[i].codecs->dai_name)
continue;
/* MAXIM_CODEC is connected to SSP1. */
if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_MAXIM_CODEC_DAI)) {
broxton_dais[i].name = "SSP1-Codec";
broxton_dais[i].cpus->dai_name = "SSP1 Pin";
}
/* DIALOG_CODE is connected to SSP2 */
else if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_DIALOG_CODEC_DAI)) {
broxton_dais[i].name = "SSP2-Codec";
broxton_dais[i].cpus->dai_name = "SSP2 Pin";
}
}
} else if (soc_intel_is_cml()) {
unsigned int i;
if (ctx->spkamp == SPKAMP_MAX98390) {
broxton_audio_card.name = "cml_max98390_da7219";
broxton_audio_card.codec_conf = max98390_codec_confs;
broxton_audio_card.num_configs = ARRAY_SIZE(max98390_codec_confs);
} else
broxton_audio_card.name = "cmlda7219max";
for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
if (!broxton_dais[i].codecs->dai_name)
continue;
/* MAXIM_CODEC is connected to SSP1. */
if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_MAXIM_CODEC_DAI)) {
broxton_dais[i].name = "SSP1-Codec";
broxton_dais[i].cpus->dai_name = "SSP1 Pin";
if (ctx->spkamp == SPKAMP_MAX98390) {
broxton_dais[i].codecs = max98390_codec;
broxton_dais[i].num_codecs = ARRAY_SIZE(max98390_codec);
broxton_dais[i].dpcm_capture = 1;
}
}
/* DIALOG_CODEC is connected to SSP0 */
else if (!strcmp(broxton_dais[i].codecs->dai_name,
BXT_DIALOG_CODEC_DAI)) {
broxton_dais[i].name = "SSP0-Codec";
broxton_dais[i].cpus->dai_name = "SSP0 Pin";
}
}
}
/* override platform name, if required */
mach = pdev->dev.platform_data;
......@@ -866,8 +693,6 @@ static int broxton_audio_probe(struct platform_device *pdev)
static const struct platform_device_id bxt_board_ids[] = {
{ .name = "bxt_da7219_mx98357a" },
{ .name = "glk_da7219_mx98357a" },
{ .name = "cml_da7219_mx98357a" },
{ }
};
MODULE_DEVICE_TABLE(platform, bxt_board_ids);
......
This diff is collapsed.
......@@ -101,10 +101,12 @@ struct sof_da7219_private {
*
* @mclk: mclk clock data
* @is_legacy_cpu: true for BYT/CHT boards
* @mclk_en: true for mclk pin is connected
*/
struct sof_rt5682_private {
struct clk *mclk;
bool is_legacy_cpu;
bool mclk_en;
};
/*
......
......@@ -19,8 +19,10 @@
#include "sof_maxim_common.h"
/* Driver-specific board quirks: from bit 0 to 7 */
#define SOF_DA7219_JSL_BOARD BIT(0)
#define SOF_DA7219_MCLK_EN BIT(1)
#define SOF_DA7219_GLK_BOARD BIT(0)
#define SOF_DA7219_CML_BOARD BIT(1)
#define SOF_DA7219_JSL_BOARD BIT(2)
#define SOF_DA7219_MCLK_EN BIT(3)
#define DIALOG_CODEC_DAI "da7219-hifi"
......@@ -266,6 +268,9 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
/* codec-specific fields for speaker amplifier */
switch (ctx->amp_type) {
case CODEC_MAX98357A:
max_98357a_dai_link(ctx->amp_link);
break;
case CODEC_MAX98360A:
max_98360a_dai_link(ctx->amp_link);
break;
......@@ -281,6 +286,9 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
return -EINVAL;
}
break;
case CODEC_MAX98390:
max_98390_dai_link(dev, ctx->amp_link);
break;
default:
dev_err(dev, "invalid amp type %d\n", ctx->amp_type);
return -EINVAL;
......@@ -289,6 +297,22 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
return 0;
}
#define GLK_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
SOF_LINK_CODEC, \
SOF_LINK_DMIC01, \
SOF_LINK_IDISP_HDMI, \
SOF_LINK_NONE, \
SOF_LINK_NONE, \
SOF_LINK_NONE)
#define CML_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
SOF_LINK_CODEC, \
SOF_LINK_DMIC01, \
SOF_LINK_IDISP_HDMI, \
SOF_LINK_DMIC16K, \
SOF_LINK_NONE, \
SOF_LINK_NONE)
#define JSL_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
SOF_LINK_CODEC, \
SOF_LINK_DMIC01, \
......@@ -301,6 +325,7 @@ static int audio_probe(struct platform_device *pdev)
{
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
struct sof_card_private *ctx;
char *card_name;
unsigned long board_quirk = 0;
int ret;
......@@ -317,7 +342,53 @@ static int audio_probe(struct platform_device *pdev)
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
if (board_quirk & SOF_DA7219_JSL_BOARD) {
if (board_quirk & SOF_DA7219_GLK_BOARD) {
/* dmic16k not support */
ctx->dmic_be_num = 1;
/* overwrite the DAI link order for GLK boards */
ctx->link_order_overwrite = GLK_LINK_ORDER;
/* backward-compatible with existing devices */
switch (ctx->amp_type) {
case CODEC_MAX98357A:
card_name = devm_kstrdup(&pdev->dev, "glkda7219max",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
card_da7219.name = card_name;
break;
default:
break;
}
} else if (board_quirk & SOF_DA7219_CML_BOARD) {
/* overwrite the DAI link order for CML boards */
ctx->link_order_overwrite = CML_LINK_ORDER;
/* backward-compatible with existing devices */
switch (ctx->amp_type) {
case CODEC_MAX98357A:
card_name = devm_kstrdup(&pdev->dev, "cmlda7219max",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
card_da7219.name = card_name;
break;
case CODEC_MAX98390:
card_name = devm_kstrdup(&pdev->dev,
"cml_max98390_da7219",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
card_da7219.name = card_name;
break;
default:
break;
}
} else if (board_quirk & SOF_DA7219_JSL_BOARD) {
ctx->da7219.is_jsl_board = true;
/* overwrite the DAI link order for JSL boards */
......@@ -326,13 +397,20 @@ static int audio_probe(struct platform_device *pdev)
/* backward-compatible with existing devices */
switch (ctx->amp_type) {
case CODEC_MAX98360A:
card_da7219.name = devm_kstrdup(&pdev->dev,
"da7219max98360a",
card_name = devm_kstrdup(&pdev->dev, "da7219max98360a",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
card_da7219.name = card_name;
break;
case CODEC_MAX98373:
card_da7219.name = devm_kstrdup(&pdev->dev, "da7219max",
card_name = devm_kstrdup(&pdev->dev, "da7219max",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
card_da7219.name = card_name;
break;
default:
break;
......@@ -352,6 +430,10 @@ static int audio_probe(struct platform_device *pdev)
case CODEC_MAX98373:
max_98373_set_codec_conf(&card_da7219);
break;
case CODEC_MAX98390:
max_98390_set_codec_conf(&pdev->dev, &card_da7219);
break;
case CODEC_MAX98357A:
case CODEC_MAX98360A:
case CODEC_NONE:
/* no codec conf required */
......@@ -374,6 +456,18 @@ static int audio_probe(struct platform_device *pdev)
}
static const struct platform_device_id board_ids[] = {
{
.name = "glk_da7219_def",
.driver_data = (kernel_ulong_t)(SOF_DA7219_GLK_BOARD |
SOF_SSP_PORT_CODEC(2) |
SOF_SSP_PORT_AMP(1)),
},
{
.name = "cml_da7219_def",
.driver_data = (kernel_ulong_t)(SOF_DA7219_CML_BOARD |
SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1)),
},
{
.name = "jsl_da7219_def",
.driver_data = (kernel_ulong_t)(SOF_DA7219_JSL_BOARD |
......
......@@ -10,8 +10,23 @@
#include <sound/soc-dai.h>
#include <sound/soc-dapm.h>
#include <uapi/sound/asound.h>
#include "../common/soc-intel-quirks.h"
#include "sof_maxim_common.h"
/*
* Common structures and functions
*/
static const struct snd_kcontrol_new maxim_2spk_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget maxim_2spk_widgets[] = {
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
/* helper function to get the number of specific codec */
static unsigned int get_num_codecs(const char *hid)
{
......@@ -135,12 +150,40 @@ EXPORT_SYMBOL_NS(max_98373_ops, SND_SOC_INTEL_SOF_MAXIM_COMMON);
int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_card *card = rtd->card;
unsigned int num_codecs = get_num_codecs(MAX_98373_ACPI_HID);
int ret;
switch (num_codecs) {
case 2:
ret = snd_soc_dapm_new_controls(&card->dapm, maxim_2spk_widgets,
ARRAY_SIZE(maxim_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add max98373 widgets, ret %d\n",
ret);
return ret;
}
ret = snd_soc_add_card_controls(card, maxim_2spk_kcontrols,
ARRAY_SIZE(maxim_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add max98373 kcontrols, ret %d\n",
ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, max_98373_dapm_routes,
ARRAY_SIZE(max_98373_dapm_routes));
if (ret)
dev_err(rtd->dev, "Speaker map addition failed: %d\n", ret);
if (ret) {
dev_err(rtd->dev, "fail to add max98373 routes, ret %d\n",
ret);
return ret;
}
break;
default:
dev_err(rtd->dev, "max98373: invalid num_codecs %d\n", num_codecs);
return -EINVAL;
}
return ret;
}
EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);
......@@ -177,6 +220,17 @@ static const struct snd_soc_dapm_route max_98390_tt_dapm_routes[] = {
{ "TR Spk", NULL, "Tweeter Right BE_OUT" },
};
static struct snd_soc_codec_conf max_98390_cml_codec_conf[] = {
{
.dlc = COMP_CODEC_CONF(MAX_98390_DEV0_NAME),
.name_prefix = "Left",
},
{
.dlc = COMP_CODEC_CONF(MAX_98390_DEV1_NAME),
.name_prefix = "Right",
},
};
static struct snd_soc_codec_conf max_98390_codec_conf[] = {
{
.dlc = COMP_CODEC_CONF(MAX_98390_DEV0_NAME),
......@@ -229,6 +283,7 @@ static int max_98390_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai_link *dai_link = rtd->dai_link;
struct snd_soc_dai *codec_dai;
int i, ret;
......@@ -238,14 +293,25 @@ static int max_98390_hw_params(struct snd_pcm_substream *substream,
return -ENODEV;
}
ret = snd_soc_dai_set_tdm_slot(codec_dai, max_98390_tdm_mask[i].tx,
max_98390_tdm_mask[i].rx, 4,
switch (dai_link->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_DSP_A:
case SND_SOC_DAIFMT_DSP_B:
/* 4-slot TDM */
ret = snd_soc_dai_set_tdm_slot(codec_dai,
max_98390_tdm_mask[i].tx,
max_98390_tdm_mask[i].rx,
4,
params_width(params));
if (ret < 0) {
dev_err(codec_dai->dev, "fail to set tdm slot, ret %d\n",
ret);
return ret;
}
break;
default:
dev_dbg(codec_dai->dev, "codec is in I2S mode\n");
break;
}
}
return 0;
}
......@@ -287,6 +353,22 @@ static int max_98390_init(struct snd_soc_pcm_runtime *rtd)
fallthrough;
case 2:
/* add regular speakers dapm route */
ret = snd_soc_dapm_new_controls(&card->dapm, maxim_2spk_widgets,
ARRAY_SIZE(maxim_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add max98390 woofer widgets, ret %d\n",
ret);
return ret;
}
ret = snd_soc_add_card_controls(card, maxim_2spk_kcontrols,
ARRAY_SIZE(maxim_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add max98390 woofer kcontrols, ret %d\n",
ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, max_98390_dapm_routes,
ARRAY_SIZE(max_98390_dapm_routes));
if (ret) {
......@@ -337,6 +419,10 @@ void max_98390_set_codec_conf(struct device *dev, struct snd_soc_card *card)
switch (num_codecs) {
case 2:
if (soc_intel_is_cml())
card->codec_conf = max_98390_cml_codec_conf;
fallthrough;
case 4:
card->num_configs = num_codecs;
break;
......
......@@ -140,15 +140,11 @@ static int sof_card_late_probe(struct snd_soc_card *card)
static const struct snd_kcontrol_new sof_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone Jack"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget sof_widgets[] = {
SND_SOC_DAPM_HP("Headphone Jack", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_soc_dapm_route sof_map[] = {
......
......@@ -21,6 +21,17 @@
/*
* Common structures and functions
*/
static const struct snd_kcontrol_new realtek_2spk_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget realtek_2spk_widgets[] = {
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_kcontrol_new realtek_4spk_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("WL Ext Spk"),
SOC_DAPM_PIN_SWITCH("WR Ext Spk"),
......@@ -181,6 +192,22 @@ static int rt1011_init(struct snd_soc_pcm_runtime *rtd)
switch (num_codecs) {
case 2:
if (!soc_intel_is_cml()) {
ret = snd_soc_dapm_new_controls(&card->dapm, realtek_2spk_widgets,
ARRAY_SIZE(realtek_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add rt1011 widgets, ret %d\n",
ret);
return ret;
}
ret = snd_soc_add_card_controls(card, realtek_2spk_kcontrols,
ARRAY_SIZE(realtek_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add rt1011 kcontrols, ret %d\n",
ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, speaker_map_lr,
ARRAY_SIZE(speaker_map_lr));
if (ret) {
......@@ -357,6 +384,20 @@ static int rt1015p_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, realtek_2spk_widgets,
ARRAY_SIZE(realtek_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add rt1015p widgets, ret %d\n", ret);
return ret;
}
ret = snd_soc_add_card_controls(card, realtek_2spk_kcontrols,
ARRAY_SIZE(realtek_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add rt1015p kcontrols, ret %d\n", ret);
return ret;
}
if (rt1015p_get_num_codecs() == 1)
ret = snd_soc_dapm_add_routes(&card->dapm, rt1015p_1dev_dapm_routes,
ARRAY_SIZE(rt1015p_1dev_dapm_routes));
......@@ -486,8 +527,42 @@ static struct snd_soc_dai_link_component rt1015_components[] = {
static int speaker_codec_init_lr(struct snd_soc_pcm_runtime *rtd)
{
return snd_soc_dapm_add_routes(&rtd->card->dapm, speaker_map_lr,
struct snd_soc_card *card = rtd->card;
unsigned int num_codecs = get_num_codecs(RT1015_ACPI_HID);
int ret;
switch (num_codecs) {
case 2:
ret = snd_soc_dapm_new_controls(&card->dapm, realtek_2spk_widgets,
ARRAY_SIZE(realtek_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add rt1015 widgets, ret %d\n",
ret);
return ret;
}
ret = snd_soc_add_card_controls(card, realtek_2spk_kcontrols,
ARRAY_SIZE(realtek_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add rt1015 kcontrols, ret %d\n",
ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&rtd->card->dapm, speaker_map_lr,
ARRAY_SIZE(speaker_map_lr));
if (ret) {
dev_err(rtd->dev, "fail to add rt1015 routes, ret %d\n",
ret);
return ret;
}
break;
default:
dev_err(rtd->dev, "rt1015: invalid num_codecs %d\n", num_codecs);
return -EINVAL;
}
return ret;
}
void sof_rt1015_codec_conf(struct snd_soc_card *card)
......@@ -624,6 +699,20 @@ static int rt1019p_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, realtek_2spk_widgets,
ARRAY_SIZE(realtek_2spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add rt1019p widgets, ret %d\n", ret);
return ret;
}
ret = snd_soc_add_card_controls(card, realtek_2spk_kcontrols,
ARRAY_SIZE(realtek_2spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add rt1019p kcontrols, ret %d\n", ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, rt1019p_dapm_routes,
ARRAY_SIZE(rt1019p_dapm_routes));
if (ret) {
......
......@@ -30,7 +30,6 @@
/* Driver-specific board quirks: from bit 0 to 7 */
#define SOF_RT5682_MCLK_EN BIT(0)
#define SOF_RT5682_MCLK_BYTCHT_EN BIT(1)
/* Default: MCLK on, MCLK 19.2M, SSP0 */
static unsigned long sof_rt5682_quirk = SOF_RT5682_MCLK_EN |
......@@ -77,15 +76,6 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = {
SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1)),
},
{
.callback = sof_rt5682_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"),
},
.driver_data = (void *)(SOF_RT5682_MCLK_EN |
SOF_SSP_PORT_CODEC(0)),
},
{
.callback = sof_rt5682_quirk_cb,
.matches = {
......@@ -165,7 +155,7 @@ static int sof_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
int extra_jack_data;
int ret, mclk_freq;
if (sof_rt5682_quirk & SOF_RT5682_MCLK_EN) {
if (ctx->rt5682.mclk_en) {
mclk_freq = sof_dai_get_mclk(rtd);
if (mclk_freq <= 0) {
dev_err(rtd->dev, "invalid mclk freq %d\n", mclk_freq);
......@@ -206,7 +196,7 @@ static int sof_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
}
}
if (sof_rt5682_quirk & SOF_RT5682_MCLK_BYTCHT_EN) {
if (ctx->rt5682.is_legacy_cpu) {
/*
* The firmware might enable the clock at
* boot (this information may or may not
......@@ -278,8 +268,8 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
int pll_id, pll_source, pll_in, pll_out, clk_id, ret;
if (sof_rt5682_quirk & SOF_RT5682_MCLK_EN) {
if (sof_rt5682_quirk & SOF_RT5682_MCLK_BYTCHT_EN) {
if (ctx->rt5682.mclk_en) {
if (ctx->rt5682.is_legacy_cpu) {
ret = clk_prepare_enable(ctx->rt5682.mclk);
if (ret < 0) {
dev_err(rtd->dev,
......@@ -327,9 +317,34 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}
pll_in = params_rate(params) * 50;
/* get the tplg configured bclk. */
pll_in = sof_dai_get_bclk(rtd);
if (pll_in <= 0) {
dev_err(rtd->dev, "invalid bclk freq %d\n", pll_in);
return -EINVAL;
}
}
pll_out = params_rate(params) * 512;
/* when MCLK is 512FS, no need to set PLL configuration additionally. */
if (pll_in == pll_out) {
switch (ctx->codec_type) {
case CODEC_RT5650:
clk_id = RT5645_SCLK_S_MCLK;
break;
case CODEC_RT5682:
clk_id = RT5682_SCLK_S_MCLK;
break;
case CODEC_RT5682S:
clk_id = RT5682S_SCLK_S_MCLK;
break;
default:
dev_err(rtd->dev, "invalid codec type %d\n",
ctx->codec_type);
return -EINVAL;
}
} else {
switch (ctx->codec_type) {
case CODEC_RT5650:
pll_id = 0; /* not used in codec driver */
......@@ -340,18 +355,23 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
clk_id = RT5682_SCLK_S_PLL1;
break;
case CODEC_RT5682S:
/* check plla_table and pllb_table in rt5682s.c */
switch (pll_in) {
case 3072000:
case 24576000:
/*
* For MCLK = 24.576MHz and sample rate = 96KHz case, use PLL1 We don't test
* pll_out or params_rate() here since rt5682s PLL2 doesn't support 24.576MHz
* input, so we have no choice but to use PLL1. Besides, we will not use PLL at
* all if pll_in == pll_out. ex, MCLK = 24.576Mhz and sample rate = 48KHz
*/
if (pll_in == 24576000) {
pll_id = RT5682S_PLL1;
clk_id = RT5682S_SCLK_S_PLL1;
} else {
break;
default:
pll_id = RT5682S_PLL2;
clk_id = RT5682S_SCLK_S_PLL2;
break;
}
break;
default:
......@@ -359,26 +379,6 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}
pll_out = params_rate(params) * 512;
/* when MCLK is 512FS, no need to set PLL configuration additionally. */
if (pll_in == pll_out) {
switch (ctx->codec_type) {
case CODEC_RT5650:
clk_id = RT5645_SCLK_S_MCLK;
break;
case CODEC_RT5682:
clk_id = RT5682_SCLK_S_MCLK;
break;
case CODEC_RT5682S:
clk_id = RT5682S_SCLK_S_MCLK;
break;
default:
dev_err(rtd->dev, "invalid codec type %d\n",
ctx->codec_type);
return -EINVAL;
}
} else {
/* Configure pll for codec */
ret = snd_soc_dai_set_pll(codec_dai, pll_id, pll_source, pll_in,
pll_out);
......@@ -431,16 +431,11 @@ static int sof_card_late_probe(struct snd_soc_card *card)
static const struct snd_kcontrol_new sof_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone Jack"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget sof_widgets[] = {
SND_SOC_DAPM_HP("Headphone Jack", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_soc_dapm_route sof_map[] = {
......@@ -452,6 +447,17 @@ static const struct snd_soc_dapm_route sof_map[] = {
{ "IN1P", NULL, "Headset Mic" },
};
static const struct snd_kcontrol_new rt5650_spk_kcontrols[] = {
SOC_DAPM_PIN_SWITCH("Left Spk"),
SOC_DAPM_PIN_SWITCH("Right Spk"),
};
static const struct snd_soc_dapm_widget rt5650_spk_widgets[] = {
SND_SOC_DAPM_SPK("Left Spk", NULL),
SND_SOC_DAPM_SPK("Right Spk", NULL),
};
static const struct snd_soc_dapm_route rt5650_spk_dapm_routes[] = {
/* speaker */
{ "Left Spk", NULL, "SPOL" },
......@@ -463,6 +469,22 @@ static int rt5650_spk_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, rt5650_spk_widgets,
ARRAY_SIZE(rt5650_spk_widgets));
if (ret) {
dev_err(rtd->dev, "fail to add rt5650 spk widgets, ret %d\n",
ret);
return ret;
}
ret = snd_soc_add_card_controls(card, rt5650_spk_kcontrols,
ARRAY_SIZE(rt5650_spk_kcontrols));
if (ret) {
dev_err(rtd->dev, "fail to add rt5650 spk kcontrols, ret %d\n",
ret);
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, rt5650_spk_dapm_routes,
ARRAY_SIZE(rt5650_spk_dapm_routes));
if (ret)
......@@ -613,12 +635,19 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
return 0;
}
#define GLK_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
SOF_LINK_CODEC, \
SOF_LINK_DMIC01, \
SOF_LINK_IDISP_HDMI, \
SOF_LINK_NONE, \
SOF_LINK_NONE, \
SOF_LINK_NONE)
static int sof_audio_probe(struct platform_device *pdev)
{
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
struct sof_card_private *ctx;
char *card_name;
bool is_legacy_cpu = false;
int ret;
if (pdev->id_entry && pdev->id_entry->driver_data)
......@@ -626,15 +655,6 @@ static int sof_audio_probe(struct platform_device *pdev)
dmi_check_system(sof_rt5682_quirk_table);
if (soc_intel_is_byt() || soc_intel_is_cht()) {
is_legacy_cpu = true;
/* default quirk for legacy cpu */
sof_rt5682_quirk = SOF_RT5682_MCLK_EN |
SOF_RT5682_MCLK_BYTCHT_EN |
SOF_SSP_PORT_CODEC(2);
}
dev_dbg(&pdev->dev, "sof_rt5682_quirk = %lx\n", sof_rt5682_quirk);
/* initialize ctx with board quirk */
......@@ -654,28 +674,55 @@ static int sof_audio_probe(struct platform_device *pdev)
ctx->amp_type = CODEC_RT5650;
}
if (ctx->amp_type == CODEC_RT1011 && soc_intel_is_cml()) {
/* backward-compatible with existing cml devices */
card_name = devm_kstrdup(&pdev->dev, "cml_rt1011_rt5682",
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
if (soc_intel_is_byt() || soc_intel_is_cht()) {
ctx->rt5682.is_legacy_cpu = true;
ctx->dmic_be_num = 0;
/* HDMI is not supported by SOF on Baytrail/CherryTrail */
ctx->hdmi_num = 0;
} else if (soc_intel_is_glk()) {
/* dmic16k not support */
ctx->dmic_be_num = 1;
/* overwrite the DAI link order for GLK boards */
ctx->link_order_overwrite = GLK_LINK_ORDER;
/* backward-compatible with existing devices */
switch (ctx->amp_type) {
case CODEC_MAX98357A:
card_name = devm_kstrdup(&pdev->dev, "glkrt5682max",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
sof_audio_card_rt5682.name = card_name;
break;
default:
break;
}
} else if (soc_intel_is_cml()) {
/* backward-compatible with existing devices */
switch (ctx->amp_type) {
case CODEC_RT1011:
card_name = devm_kstrdup(&pdev->dev, "cml_rt1011_rt5682",
GFP_KERNEL);
if (!card_name)
return -ENOMEM;
if (is_legacy_cpu) {
ctx->rt5682.is_legacy_cpu = true;
ctx->dmic_be_num = 0;
/* HDMI is not supported by SOF on Baytrail/CherryTrail */
ctx->hdmi_num = 0;
} else {
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
sof_audio_card_rt5682.name = card_name;
break;
default:
break;
}
}
if (sof_rt5682_quirk & SOF_RT5682_MCLK_EN) {
ctx->rt5682.mclk_en = true;
/* need to get main clock from pmc */
if (sof_rt5682_quirk & SOF_RT5682_MCLK_BYTCHT_EN) {
if (ctx->rt5682.is_legacy_cpu) {
ctx->rt5682.mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
if (IS_ERR(ctx->rt5682.mclk)) {
ret = PTR_ERR(ctx->rt5682.mclk);
......@@ -693,6 +740,7 @@ static int sof_audio_probe(struct platform_device *pdev)
return ret;
}
}
}
/* update dai_link */
ret = sof_card_dai_links_create(&pdev->dev, &sof_audio_card_rt5682, ctx);
......@@ -745,6 +793,19 @@ static int sof_audio_probe(struct platform_device *pdev)
static const struct platform_device_id board_ids[] = {
{
.name = "sof_rt5682",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_SSP_PORT_CODEC(2)),
},
{
.name = "glk_rt5682_def",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_SSP_PORT_CODEC(2) |
SOF_SSP_PORT_AMP(1)),
},
{
.name = "icl_rt5682_def",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_SSP_PORT_CODEC(0)),
},
{
.name = "cml_rt5682_def",
......
......@@ -68,14 +68,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
},
{
.id = "DLGS7219",
.drv_name = "cml_da7219_mx98357a",
.drv_name = "cml_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98357a_spk_codecs,
.sof_tplg_filename = "sof-cml-da7219-max98357a.tplg",
},
{
.id = "DLGS7219",
.drv_name = "cml_da7219_mx98357a",
.drv_name = "cml_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98390_spk_codecs,
.sof_tplg_filename = "sof-cml-da7219-max98390.tplg",
......
......@@ -33,7 +33,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
},
{
.id = "DLGS7219",
.drv_name = "glk_da7219_mx98357a",
.drv_name = "glk_da7219_def",
.fw_filename = "intel/dsp_fw_glk.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
......@@ -41,7 +41,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
},
{
.comp_ids = &glk_rt5682_rt5682s_hp,
.drv_name = "glk_rt5682_mx98357a",
.drv_name = "glk_rt5682_def",
.fw_filename = "intel/dsp_fw_glk.bin",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &glk_codecs,
......
......@@ -29,7 +29,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.drv_name = "icl_rt5682_def",
.sof_tplg_filename = "sof-icl-rt5682.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