Commit 22247e40 authored by Mark Brown's avatar Mark Brown

ASoC: Intel: boards: updates for 6.10 - part1

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

This series from Brent Lu adds common helpers and board configurations
to reduce the number of quirks.
parents 6c26dac5 61cafaea
......@@ -624,6 +624,7 @@ config SND_SOC_INTEL_SOF_DA7219_MACH
select SND_SOC_MAX98357A
select SND_SOC_MAX98373_I2C
select SND_SOC_DMIC
select SND_SOC_INTEL_SOF_BOARD_HELPERS
select SND_SOC_INTEL_SOF_MAXIM_COMMON
select SND_SOC_INTEL_SOF_SSP_COMMON
help
......
......@@ -74,6 +74,11 @@ static int dmic_init(struct snd_soc_pcm_runtime *rtd)
* DAI Link Helpers
*/
enum sof_dmic_be_type {
SOF_DMIC_01,
SOF_DMIC_16K,
};
/* DEFAULT_LINK_ORDER: the order used in sof_rt5682 */
#define DEFAULT_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_CODEC, \
SOF_LINK_DMIC01, \
......@@ -97,13 +102,13 @@ static struct snd_soc_dai_link_component platform_component[] = {
}
};
int sof_intel_board_set_codec_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_ssp_codec codec_type, int ssp_codec)
static int set_ssp_codec_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, enum sof_ssp_codec codec_type,
int ssp_codec)
{
struct snd_soc_dai_link_component *cpus;
dev_dbg(dev, "link %d: codec %s, ssp %d\n", be_id,
dev_dbg(dev, "link %d: ssp codec %s, ssp %d\n", be_id,
sof_ssp_get_codec_name(codec_type), ssp_codec);
/* link name */
......@@ -144,11 +149,9 @@ int sof_intel_board_set_codec_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_codec_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
int sof_intel_board_set_dmic_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_dmic_be_type be_type)
static int set_dmic_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, enum sof_dmic_be_type be_type)
{
struct snd_soc_dai_link_component *cpus;
......@@ -196,16 +199,14 @@ int sof_intel_board_set_dmic_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_dmic_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
int sof_intel_board_set_intel_hdmi_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int hdmi_id, bool idisp_codec)
static int set_idisp_hdmi_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, int hdmi_id, bool idisp_codec)
{
struct snd_soc_dai_link_component *cpus, *codecs;
dev_dbg(dev, "link %d: intel hdmi, hdmi id %d, idisp codec %d\n",
be_id, hdmi_id, idisp_codec);
dev_dbg(dev, "link %d: idisp hdmi %d, idisp codec %d\n", be_id, hdmi_id,
idisp_codec);
/* link name */
link->name = devm_kasprintf(dev, GFP_KERNEL, "iDisp%d", hdmi_id);
......@@ -256,11 +257,9 @@ int sof_intel_board_set_intel_hdmi_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_intel_hdmi_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
int sof_intel_board_set_ssp_amp_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_ssp_codec amp_type, int ssp_amp)
static int set_ssp_amp_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, enum sof_ssp_codec amp_type, int ssp_amp)
{
struct snd_soc_dai_link_component *cpus;
......@@ -298,11 +297,9 @@ int sof_intel_board_set_ssp_amp_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_ssp_amp_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
int sof_intel_board_set_bt_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int ssp_bt)
static int set_bt_offload_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, int ssp_bt)
{
struct snd_soc_dai_link_component *cpus;
......@@ -341,11 +338,9 @@ int sof_intel_board_set_bt_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_bt_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
int sof_intel_board_set_hdmi_in_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int ssp_hdmi)
static int set_hdmi_in_link(struct device *dev, struct snd_soc_dai_link *link,
int be_id, int ssp_hdmi)
{
struct snd_soc_dai_link_component *cpus;
......@@ -383,7 +378,6 @@ int sof_intel_board_set_hdmi_in_link(struct device *dev,
return 0;
}
EXPORT_SYMBOL_NS(sof_intel_board_set_hdmi_in_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
static int calculate_num_links(struct sof_card_private *ctx)
{
......@@ -427,6 +421,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
int ret;
int ssp_hdmi_in = 0;
unsigned long link_order, link;
unsigned long link_ids, be_id;
num_links = calculate_num_links(ctx);
......@@ -440,22 +435,34 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
else
link_order = DEFAULT_LINK_ORDER;
dev_dbg(dev, "create dai links, link_order 0x%lx\n", link_order);
if (ctx->link_id_overwrite)
link_ids = ctx->link_id_overwrite;
else
link_ids = 0;
dev_dbg(dev, "create dai links, link_order 0x%lx, id_overwrite 0x%lx\n",
link_order, link_ids);
while (link_order) {
link = link_order & SOF_LINK_ORDER_MASK;
link_order >>= SOF_LINK_ORDER_SHIFT;
if (ctx->link_id_overwrite) {
be_id = link_ids & SOF_LINK_IDS_MASK;
link_ids >>= SOF_LINK_IDS_SHIFT;
} else {
/* use array index as link id */
be_id = idx;
}
switch (link) {
case SOF_LINK_CODEC:
/* headphone codec */
if (ctx->codec_type == CODEC_NONE)
continue;
ret = sof_intel_board_set_codec_link(dev, &links[idx],
idx,
ctx->codec_type,
ctx->ssp_codec);
ret = set_ssp_codec_link(dev, &links[idx], be_id,
ctx->codec_type, ctx->ssp_codec);
if (ret) {
dev_err(dev, "fail to set codec link, ret %d\n",
ret);
......@@ -471,8 +478,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
continue;
/* at least we have dmic01 */
ret = sof_intel_board_set_dmic_link(dev, &links[idx],
idx, SOF_DMIC_01);
ret = set_dmic_link(dev, &links[idx], be_id, SOF_DMIC_01);
if (ret) {
dev_err(dev, "fail to set dmic01 link, ret %d\n",
ret);
......@@ -487,8 +493,8 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
continue;
/* set up 2 BE links at most */
ret = sof_intel_board_set_dmic_link(dev, &links[idx],
idx, SOF_DMIC_16K);
ret = set_dmic_link(dev, &links[idx], be_id,
SOF_DMIC_16K);
if (ret) {
dev_err(dev, "fail to set dmic16k link, ret %d\n",
ret);
......@@ -500,9 +506,8 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
case SOF_LINK_IDISP_HDMI:
/* idisp HDMI */
for (i = 1; i <= ctx->hdmi_num; i++) {
ret = sof_intel_board_set_intel_hdmi_link(dev,
&links[idx],
idx, i,
ret = set_idisp_hdmi_link(dev, &links[idx],
be_id, i,
ctx->hdmi.idisp_codec);
if (ret) {
dev_err(dev, "fail to set hdmi link, ret %d\n",
......@@ -511,6 +516,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
}
idx++;
be_id++;
}
break;
case SOF_LINK_AMP:
......@@ -518,10 +524,8 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
if (ctx->amp_type == CODEC_NONE)
continue;
ret = sof_intel_board_set_ssp_amp_link(dev, &links[idx],
idx,
ctx->amp_type,
ctx->ssp_amp);
ret = set_ssp_amp_link(dev, &links[idx], be_id,
ctx->amp_type, ctx->ssp_amp);
if (ret) {
dev_err(dev, "fail to set amp link, ret %d\n",
ret);
......@@ -536,7 +540,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
if (!ctx->bt_offload_present)
continue;
ret = sof_intel_board_set_bt_link(dev, &links[idx], idx,
ret = set_bt_offload_link(dev, &links[idx], be_id,
ctx->ssp_bt);
if (ret) {
dev_err(dev, "fail to set bt link, ret %d\n",
......@@ -549,9 +553,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
case SOF_LINK_HDMI_IN:
/* HDMI-In */
for_each_set_bit(ssp_hdmi_in, &ctx->ssp_mask_hdmi_in, 32) {
ret = sof_intel_board_set_hdmi_in_link(dev,
&links[idx],
idx,
ret = set_hdmi_in_link(dev, &links[idx], be_id,
ssp_hdmi_in);
if (ret) {
dev_err(dev, "fail to set hdmi-in link, ret %d\n",
......@@ -560,6 +562,7 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
}
idx++;
be_id++;
}
break;
case SOF_LINK_NONE:
......@@ -584,6 +587,49 @@ int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
}
EXPORT_SYMBOL_NS(sof_intel_board_set_dai_link, SND_SOC_INTEL_SOF_BOARD_HELPERS);
struct sof_card_private *
sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk)
{
struct sof_card_private *ctx;
dev_dbg(dev, "create ctx, board_quirk 0x%lx\n", board_quirk);
ctx = devm_kzalloc(dev, sizeof(struct sof_card_private), GFP_KERNEL);
if (!ctx)
return NULL;
ctx->codec_type = sof_ssp_detect_codec_type(dev);
ctx->amp_type = sof_ssp_detect_amp_type(dev);
ctx->dmic_be_num = 2;
ctx->hdmi_num = (board_quirk & SOF_NUM_IDISP_HDMI_MASK) >>
SOF_NUM_IDISP_HDMI_SHIFT;
/* default number of HDMI DAI's */
if (!ctx->hdmi_num)
ctx->hdmi_num = 3;
/* port number/mask of peripherals attached to ssp interface */
if (ctx->codec_type != CODEC_NONE)
ctx->ssp_codec = (board_quirk & SOF_SSP_PORT_CODEC_MASK) >>
SOF_SSP_PORT_CODEC_SHIFT;
if (ctx->amp_type != CODEC_NONE)
ctx->ssp_amp = (board_quirk & SOF_SSP_PORT_AMP_MASK) >>
SOF_SSP_PORT_AMP_SHIFT;
if (board_quirk & SOF_BT_OFFLOAD_PRESENT) {
ctx->bt_offload_present = true;
ctx->ssp_bt = (board_quirk & SOF_SSP_PORT_BT_OFFLOAD_MASK) >>
SOF_SSP_PORT_BT_OFFLOAD_SHIFT;
}
ctx->ssp_mask_hdmi_in = (board_quirk & SOF_SSP_MASK_HDMI_CAPTURE_MASK) >>
SOF_SSP_MASK_HDMI_CAPTURE_SHIFT;
return ctx;
}
EXPORT_SYMBOL_NS(sof_intel_board_get_ctx, SND_SOC_INTEL_SOF_BOARD_HELPERS);
struct snd_soc_dai *get_codec_dai_by_name(struct snd_soc_pcm_runtime *rtd,
const char * const dai_name[], int num_dais)
{
......
......@@ -10,6 +10,44 @@
#include "sof_hdmi_common.h"
#include "sof_ssp_common.h"
/*
* Common board quirks: from bit 8 to 31, LSB 8 bits reserved for machine
* drivers
*/
/* SSP port number for headphone codec: 3 bits */
#define SOF_SSP_PORT_CODEC_SHIFT 8
#define SOF_SSP_PORT_CODEC_MASK (GENMASK(10, 8))
#define SOF_SSP_PORT_CODEC(quirk) \
(((quirk) << SOF_SSP_PORT_CODEC_SHIFT) & SOF_SSP_PORT_CODEC_MASK)
/* SSP port number for speaker amplifier: 3 bits */
#define SOF_SSP_PORT_AMP_SHIFT 11
#define SOF_SSP_PORT_AMP_MASK (GENMASK(13, 11))
#define SOF_SSP_PORT_AMP(quirk) \
(((quirk) << SOF_SSP_PORT_AMP_SHIFT) & SOF_SSP_PORT_AMP_MASK)
/* SSP port number for BT audio offload: 3 bits */
#define SOF_SSP_PORT_BT_OFFLOAD_SHIFT 14
#define SOF_SSP_PORT_BT_OFFLOAD_MASK (GENMASK(16, 14))
#define SOF_SSP_PORT_BT_OFFLOAD(quirk) \
(((quirk) << SOF_SSP_PORT_BT_OFFLOAD_SHIFT) & SOF_SSP_PORT_BT_OFFLOAD_MASK)
/* SSP port mask for HDMI capture: 6 bits */
#define SOF_SSP_MASK_HDMI_CAPTURE_SHIFT 17
#define SOF_SSP_MASK_HDMI_CAPTURE_MASK (GENMASK(22, 17))
#define SOF_SSP_MASK_HDMI_CAPTURE(quirk) \
(((quirk) << SOF_SSP_MASK_HDMI_CAPTURE_SHIFT) & SOF_SSP_MASK_HDMI_CAPTURE_MASK)
/* Number of idisp HDMI BE link: 3 bits */
#define SOF_NUM_IDISP_HDMI_SHIFT 23
#define SOF_NUM_IDISP_HDMI_MASK (GENMASK(25, 23))
#define SOF_NUM_IDISP_HDMI(quirk) \
(((quirk) << SOF_NUM_IDISP_HDMI_SHIFT) & SOF_NUM_IDISP_HDMI_MASK)
/* Board uses BT audio offload */
#define SOF_BT_OFFLOAD_PRESENT BIT(26)
enum {
SOF_LINK_NONE = 0,
SOF_LINK_CODEC,
......@@ -33,6 +71,31 @@ enum {
(((k6) & SOF_LINK_ORDER_MASK) << (SOF_LINK_ORDER_SHIFT * 5)) | \
(((k7) & SOF_LINK_ORDER_MASK) << (SOF_LINK_ORDER_SHIFT * 6)))
#define SOF_LINK_IDS_MASK (0xF)
#define SOF_LINK_IDS_SHIFT (4)
#define SOF_LINK_IDS(k1, k2, k3, k4, k5, k6, k7) \
((((k1) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 0)) | \
(((k2) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 1)) | \
(((k3) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 2)) | \
(((k4) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 3)) | \
(((k5) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 4)) | \
(((k6) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 5)) | \
(((k7) & SOF_LINK_IDS_MASK) << (SOF_LINK_IDS_SHIFT * 6)))
/*
* sof_da7219_private: private data for da7219 machine driver
*
* @is_jsl_board: true for JSL boards
* @mclk_en: true for mclk pin is connected
* @pll_bypass: true for PLL bypass mode
*/
struct sof_da7219_private {
bool is_jsl_board;
bool mclk_en;
bool pll_bypass;
};
/*
* sof_rt5682_private: private data for rt5682 machine driver
*
......@@ -61,6 +124,8 @@ struct sof_rt5682_private {
* @codec_link: pointer to headset codec dai link
* @amp_link: pointer to speaker amplifier dai link
* @link_order_overwrite: custom DAI link order
* @link_id_overwrite: custom DAI link ID
* @da7219: private data for da7219 machine driver
* @rt5682: private data for rt5682 machine driver
*/
struct sof_card_private {
......@@ -84,39 +149,23 @@ struct sof_card_private {
struct snd_soc_dai_link *amp_link;
unsigned long link_order_overwrite;
/*
* A variable stores id for all BE DAI links, use SOF_LINK_IDS macro to
* build the value; use DAI link array index as id if zero.
*/
unsigned long link_id_overwrite;
union {
struct sof_da7219_private da7219;
struct sof_rt5682_private rt5682;
};
};
enum sof_dmic_be_type {
SOF_DMIC_01,
SOF_DMIC_16K,
};
int sof_intel_board_card_late_probe(struct snd_soc_card *card);
int sof_intel_board_set_dai_link(struct device *dev, struct snd_soc_card *card,
struct sof_card_private *ctx);
int sof_intel_board_set_codec_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_ssp_codec codec_type, int ssp_codec);
int sof_intel_board_set_dmic_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_dmic_be_type be_type);
int sof_intel_board_set_intel_hdmi_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int hdmi_id, bool idisp_codec);
int sof_intel_board_set_ssp_amp_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
enum sof_ssp_codec amp_type, int ssp_amp);
int sof_intel_board_set_bt_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int ssp_bt);
int sof_intel_board_set_hdmi_in_link(struct device *dev,
struct snd_soc_dai_link *link, int be_id,
int ssp_hdmi);
struct sof_card_private *
sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk);
struct snd_soc_dai *get_codec_dai_by_name(struct snd_soc_pcm_runtime *rtd,
const char * const dai_name[], int num_dais);
......
......@@ -22,23 +22,6 @@
#include "../common/soc-intel-quirks.h"
#include "sof_board_helpers.h"
#include "sof_maxim_common.h"
#include "sof_ssp_common.h"
#define SOF_CS42L42_SSP_CODEC(quirk) ((quirk) & GENMASK(2, 0))
#define SOF_CS42L42_SSP_CODEC_MASK (GENMASK(2, 0))
#define SOF_CS42L42_SSP_AMP_SHIFT 4
#define SOF_CS42L42_SSP_AMP_MASK (GENMASK(6, 4))
#define SOF_CS42L42_SSP_AMP(quirk) \
(((quirk) << SOF_CS42L42_SSP_AMP_SHIFT) & SOF_CS42L42_SSP_AMP_MASK)
#define SOF_CS42L42_NUM_HDMIDEV_SHIFT 7
#define SOF_CS42L42_NUM_HDMIDEV_MASK (GENMASK(9, 7))
#define SOF_CS42L42_NUM_HDMIDEV(quirk) \
(((quirk) << SOF_CS42L42_NUM_HDMIDEV_SHIFT) & SOF_CS42L42_NUM_HDMIDEV_MASK)
#define SOF_BT_OFFLOAD_PRESENT BIT(25)
#define SOF_CS42L42_SSP_BT_SHIFT 26
#define SOF_CS42L42_SSP_BT_MASK (GENMASK(28, 26))
#define SOF_CS42L42_SSP_BT(quirk) \
(((quirk) << SOF_CS42L42_SSP_BT_SHIFT) & SOF_CS42L42_SSP_BT_MASK)
static struct snd_soc_jack_pin jack_pins[] = {
{
......@@ -52,7 +35,7 @@ static struct snd_soc_jack_pin jack_pins[] = {
};
/* Default: SSP2 */
static unsigned long sof_cs42l42_quirk = SOF_CS42L42_SSP_CODEC(2);
static unsigned long sof_cs42l42_quirk = SOF_SSP_PORT_CODEC(2);
static int sof_cs42l42_init(struct snd_soc_pcm_runtime *rtd)
{
......@@ -229,48 +212,26 @@ static int sof_audio_probe(struct platform_device *pdev)
struct sof_card_private *ctx;
int ret;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
if (pdev->id_entry && pdev->id_entry->driver_data)
sof_cs42l42_quirk = (unsigned long)pdev->id_entry->driver_data;
ctx->codec_type = sof_ssp_detect_codec_type(&pdev->dev);
ctx->amp_type = sof_ssp_detect_amp_type(&pdev->dev);
dev_dbg(&pdev->dev, "sof_cs42l42_quirk = %lx\n", sof_cs42l42_quirk);
/* initialize ctx with board quirk */
ctx = sof_intel_board_get_ctx(&pdev->dev, sof_cs42l42_quirk);
if (!ctx)
return -ENOMEM;
if (soc_intel_is_glk()) {
ctx->dmic_be_num = 1;
ctx->hdmi_num = 3;
/* overwrite the DAI link order for GLK boards */
ctx->link_order_overwrite = GLK_LINK_ORDER;
} else {
ctx->dmic_be_num = 2;
ctx->hdmi_num = (sof_cs42l42_quirk & SOF_CS42L42_NUM_HDMIDEV_MASK) >>
SOF_CS42L42_NUM_HDMIDEV_SHIFT;
/* default number of HDMI DAI's */
if (!ctx->hdmi_num)
ctx->hdmi_num = 3;
}
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
dev_dbg(&pdev->dev, "sof_cs42l42_quirk = %lx\n", sof_cs42l42_quirk);
/* port number of peripherals attached to ssp interface */
ctx->ssp_bt = (sof_cs42l42_quirk & SOF_CS42L42_SSP_BT_MASK) >>
SOF_CS42L42_SSP_BT_SHIFT;
ctx->ssp_amp = (sof_cs42l42_quirk & SOF_CS42L42_SSP_AMP_MASK) >>
SOF_CS42L42_SSP_AMP_SHIFT;
ctx->ssp_codec = sof_cs42l42_quirk & SOF_CS42L42_SSP_CODEC_MASK;
if (sof_cs42l42_quirk & SOF_BT_OFFLOAD_PRESENT)
ctx->bt_offload_present = true;
/* update dai_link */
ret = sof_card_dai_links_create(&pdev->dev, &sof_audio_card_cs42l42, ctx);
if (ret)
......@@ -293,21 +254,21 @@ static int sof_audio_probe(struct platform_device *pdev)
static const struct platform_device_id board_ids[] = {
{
.name = "glk_cs4242_mx98357a",
.driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(2) |
SOF_CS42L42_SSP_AMP(1)),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(2) |
SOF_SSP_PORT_AMP(1)),
},
{
.name = "jsl_cs4242_mx98360a",
.driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(0) |
SOF_CS42L42_SSP_AMP(1)),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1)),
},
{
.name = "adl_mx98360a_cs4242",
.driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(0) |
SOF_CS42L42_SSP_AMP(1) |
SOF_CS42L42_NUM_HDMIDEV(4) |
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1) |
SOF_NUM_IDISP_HDMI(4) |
SOF_BT_OFFLOAD_PRESENT |
SOF_CS42L42_SSP_BT(2)),
SOF_SSP_PORT_BT_OFFLOAD(2)),
},
{ }
};
......@@ -329,4 +290,3 @@ MODULE_AUTHOR("Brent Lu <brent.lu@intel.com>");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_MAXIM_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_SSP_COMMON);
This diff is collapsed.
......@@ -24,27 +24,8 @@
#include "sof_realtek_common.h"
#include "sof_maxim_common.h"
#include "sof_nuvoton_common.h"
#include "sof_ssp_common.h"
#define SOF_NAU8825_SSP_CODEC(quirk) ((quirk) & GENMASK(2, 0))
#define SOF_NAU8825_SSP_CODEC_MASK (GENMASK(2, 0))
#define SOF_NAU8825_SSP_AMP_SHIFT 4
#define SOF_NAU8825_SSP_AMP_MASK (GENMASK(6, 4))
#define SOF_NAU8825_SSP_AMP(quirk) \
(((quirk) << SOF_NAU8825_SSP_AMP_SHIFT) & SOF_NAU8825_SSP_AMP_MASK)
#define SOF_NAU8825_NUM_HDMIDEV_SHIFT 7
#define SOF_NAU8825_NUM_HDMIDEV_MASK (GENMASK(9, 7))
#define SOF_NAU8825_NUM_HDMIDEV(quirk) \
(((quirk) << SOF_NAU8825_NUM_HDMIDEV_SHIFT) & SOF_NAU8825_NUM_HDMIDEV_MASK)
/* BT audio offload: reserve 3 bits for future */
#define SOF_BT_OFFLOAD_SSP_SHIFT 10
#define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(12, 10))
#define SOF_BT_OFFLOAD_SSP(quirk) \
(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(13)
static unsigned long sof_nau8825_quirk = SOF_NAU8825_SSP_CODEC(0);
static unsigned long sof_nau8825_quirk = SOF_SSP_PORT_CODEC(0);
static struct snd_soc_jack_pin jack_pins[] = {
{
......@@ -264,41 +245,19 @@ static int sof_audio_probe(struct platform_device *pdev)
struct sof_card_private *ctx;
int ret;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
if (pdev->id_entry && pdev->id_entry->driver_data)
sof_nau8825_quirk = (unsigned long)pdev->id_entry->driver_data;
ctx->codec_type = sof_ssp_detect_codec_type(&pdev->dev);
ctx->amp_type = sof_ssp_detect_amp_type(&pdev->dev);
dev_dbg(&pdev->dev, "sof_nau8825_quirk = %lx\n", sof_nau8825_quirk);
/* default number of DMIC DAI's */
ctx->dmic_be_num = 2;
ctx->hdmi_num = (sof_nau8825_quirk & SOF_NAU8825_NUM_HDMIDEV_MASK) >>
SOF_NAU8825_NUM_HDMIDEV_SHIFT;
/* default number of HDMI DAI's */
if (!ctx->hdmi_num)
ctx->hdmi_num = 3;
/* initialize ctx with board quirk */
ctx = sof_intel_board_get_ctx(&pdev->dev, sof_nau8825_quirk);
if (!ctx)
return -ENOMEM;
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
/* port number of peripherals attached to ssp interface */
ctx->ssp_bt = (sof_nau8825_quirk & SOF_BT_OFFLOAD_SSP_MASK) >>
SOF_BT_OFFLOAD_SSP_SHIFT;
ctx->ssp_amp = (sof_nau8825_quirk & SOF_NAU8825_SSP_AMP_MASK) >>
SOF_NAU8825_SSP_AMP_SHIFT;
ctx->ssp_codec = sof_nau8825_quirk & SOF_NAU8825_SSP_CODEC_MASK;
if (sof_nau8825_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)
ctx->bt_offload_present = true;
/* update dai_link */
ret = sof_card_dai_links_create(&pdev->dev, &sof_audio_card_nau8825, ctx);
if (ret)
......@@ -312,10 +271,10 @@ static int sof_audio_probe(struct platform_device *pdev)
case CODEC_RT1015P:
sof_rt1015p_codec_conf(&sof_audio_card_nau8825);
break;
case CODEC_NONE:
case CODEC_MAX98360A:
case CODEC_NAU8318:
case CODEC_RT1019P:
case CODEC_NONE:
/* no codec conf required */
break;
default:
......@@ -338,35 +297,27 @@ static int sof_audio_probe(struct platform_device *pdev)
}
static const struct platform_device_id board_ids[] = {
{
.name = "sof_nau8825",
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
SOF_NAU8825_NUM_HDMIDEV(4) |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
},
{
.name = "adl_rt1019p_8825",
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
SOF_NAU8825_SSP_AMP(2) |
SOF_NAU8825_NUM_HDMIDEV(4)),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(2) |
SOF_NUM_IDISP_HDMI(4)),
},
{
.name = "adl_nau8825_def",
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
SOF_NAU8825_SSP_AMP(1) |
SOF_NAU8825_NUM_HDMIDEV(4) |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1) |
SOF_NUM_IDISP_HDMI(4) |
SOF_SSP_PORT_BT_OFFLOAD(2) |
SOF_BT_OFFLOAD_PRESENT),
},
{
.name = "rpl_nau8825_def",
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
SOF_NAU8825_SSP_AMP(1) |
SOF_NAU8825_NUM_HDMIDEV(4) |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) |
SOF_SSP_PORT_AMP(1) |
SOF_NUM_IDISP_HDMI(4) |
SOF_SSP_PORT_BT_OFFLOAD(2) |
SOF_BT_OFFLOAD_PRESENT),
},
{ }
};
......@@ -392,4 +343,3 @@ MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_MAXIM_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_NUVOTON_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_SSP_COMMON);
This diff is collapsed.
......@@ -20,34 +20,12 @@
#include "sof_board_helpers.h"
#include "sof_realtek_common.h"
#include "sof_cirrus_common.h"
#include "sof_ssp_common.h"
/* SSP port ID for speaker amplifier */
#define SOF_AMPLIFIER_SSP(quirk) ((quirk) & GENMASK(3, 0))
#define SOF_AMPLIFIER_SSP_MASK (GENMASK(3, 0))
/* HDMI capture*/
#define SOF_HDMI_CAPTURE_SSP_MASK_SHIFT 4
#define SOF_HDMI_CAPTURE_SSP_MASK_MASK (GENMASK(9, 4))
#define SOF_HDMI_CAPTURE_SSP_MASK(quirk) \
(((quirk) << SOF_HDMI_CAPTURE_SSP_MASK_SHIFT) & SOF_HDMI_CAPTURE_SSP_MASK_MASK)
/* HDMI playback */
#define SOF_HDMI_PLAYBACK_PRESENT BIT(13)
#define SOF_NO_OF_HDMI_PLAYBACK_SHIFT 14
#define SOF_NO_OF_HDMI_PLAYBACK_MASK (GENMASK(16, 14))
#define SOF_NO_OF_HDMI_PLAYBACK(quirk) \
(((quirk) << SOF_NO_OF_HDMI_PLAYBACK_SHIFT) & SOF_NO_OF_HDMI_PLAYBACK_MASK)
/* BT audio offload */
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(17)
#define SOF_BT_OFFLOAD_SSP_SHIFT 18
#define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(20, 18))
#define SOF_BT_OFFLOAD_SSP(quirk) \
(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
/* Driver-specific board quirks: from bit 0 to 7 */
#define SOF_HDMI_PLAYBACK_PRESENT BIT(0)
/* Default: SSP2 */
static unsigned long sof_ssp_amp_quirk = SOF_AMPLIFIER_SSP(2);
static unsigned long sof_ssp_amp_quirk = SOF_SSP_PORT_AMP(2);
static const struct dmi_system_id chromebook_platforms[] = {
{
......@@ -75,197 +53,107 @@ static struct snd_soc_card sof_ssp_amp_card = {
#define HDMI_IN_BE_ID 0
#define SPK_BE_ID 2
#define DMIC01_BE_ID 3
#define DMIC16K_BE_ID 4
#define INTEL_HDMI_BE_ID 5
static struct snd_soc_dai_link *
sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
int ssp_amp, int dmic_be_num, int hdmi_num,
bool idisp_codec)
/* extra BE links to support no-hdmi-in boards */
#define DMIC16K_BE_ID 4
#define BT_OFFLOAD_BE_ID 8
#define SSP_AMP_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_HDMI_IN, \
SOF_LINK_AMP, \
SOF_LINK_DMIC01, \
SOF_LINK_DMIC16K, \
SOF_LINK_IDISP_HDMI, \
SOF_LINK_BT_OFFLOAD, \
SOF_LINK_NONE)
#define SSP_AMP_LINK_IDS SOF_LINK_ORDER(HDMI_IN_BE_ID, \
SPK_BE_ID, \
DMIC01_BE_ID, \
DMIC16K_BE_ID, \
INTEL_HDMI_BE_ID, \
BT_OFFLOAD_BE_ID, \
0)
static int
sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
struct sof_card_private *ctx)
{
struct snd_soc_dai_link *links;
int i;
int id = 0;
int ret;
bool fixed_be = false;
int be_id;
unsigned long ssp_mask_hdmi_in;
links = devm_kcalloc(dev, sof_ssp_amp_card.num_links,
sizeof(struct snd_soc_dai_link), GFP_KERNEL);
if (!links)
return NULL;
/* HDMI-In SSP */
ssp_mask_hdmi_in = (sof_ssp_amp_quirk & SOF_HDMI_CAPTURE_SSP_MASK_MASK) >>
SOF_HDMI_CAPTURE_SSP_MASK_SHIFT;
if (ssp_mask_hdmi_in) {
int port = 0;
/* the topology supports HDMI-IN uses fixed BE ID for DAI links */
fixed_be = true;
be_id = HDMI_IN_BE_ID;
for_each_set_bit(port, &ssp_mask_hdmi_in, 32) {
ret = sof_intel_board_set_hdmi_in_link(dev, &links[id],
be_id, port);
ret = sof_intel_board_set_dai_link(dev, card, ctx);
if (ret)
return NULL;
return ret;
id++;
be_id++;
}
}
if (ctx->amp_type == CODEC_NONE)
return 0;
/* codec SSP */
if (amp_type != CODEC_NONE) {
be_id = fixed_be ? SPK_BE_ID : id;
ret = sof_intel_board_set_ssp_amp_link(dev, &links[id], be_id,
amp_type, ssp_amp);
if (ret)
return NULL;
if (!ctx->amp_link) {
dev_err(dev, "amp link not available");
return -EINVAL;
}
/* codec-specific fields */
switch (amp_type) {
/* codec-specific fields for speaker amplifier */
switch (ctx->amp_type) {
case CODEC_CS35L41:
cs35l41_set_dai_link(&links[id]);
cs35l41_set_dai_link(ctx->amp_link);
break;
case CODEC_RT1308:
sof_rt1308_dai_link(&links[id]);
sof_rt1308_dai_link(ctx->amp_link);
break;
default:
dev_err(dev, "invalid amp type %d\n", amp_type);
return NULL;
}
id++;
}
/* dmic */
if (dmic_be_num > 0) {
/* at least we have dmic01 */
be_id = fixed_be ? DMIC01_BE_ID : id;
ret = sof_intel_board_set_dmic_link(dev, &links[id], be_id,
SOF_DMIC_01);
if (ret)
return NULL;
id++;
}
if (dmic_be_num > 1) {
/* set up 2 BE links at most */
be_id = fixed_be ? DMIC16K_BE_ID : id;
ret = sof_intel_board_set_dmic_link(dev, &links[id], be_id,
SOF_DMIC_16K);
if (ret)
return NULL;
id++;
}
/* HDMI playback */
for (i = 1; i <= hdmi_num; i++) {
be_id = fixed_be ? (INTEL_HDMI_BE_ID + i - 1) : id;
ret = sof_intel_board_set_intel_hdmi_link(dev, &links[id], be_id,
i, idisp_codec);
if (ret)
return NULL;
id++;
}
/* BT audio offload */
if (sof_ssp_amp_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) {
int port = (sof_ssp_amp_quirk & SOF_BT_OFFLOAD_SSP_MASK) >>
SOF_BT_OFFLOAD_SSP_SHIFT;
ret = sof_intel_board_set_bt_link(dev, &links[id], id, port);
if (ret)
return NULL;
id++;
dev_err(dev, "invalid amp type %d\n", ctx->amp_type);
return -EINVAL;
}
return links;
return 0;
}
static int sof_ssp_amp_probe(struct platform_device *pdev)
{
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
struct snd_soc_dai_link *dai_links;
struct sof_card_private *ctx;
int ret;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
if (pdev->id_entry && pdev->id_entry->driver_data)
sof_ssp_amp_quirk = (unsigned long)pdev->id_entry->driver_data;
ctx->amp_type = sof_ssp_detect_amp_type(&pdev->dev);
if (dmi_check_system(chromebook_platforms) || mach->mach_params.dmic_num > 0)
ctx->dmic_be_num = 2;
else
ctx->dmic_be_num = 0;
/* port number/mask of peripherals attached to ssp interface */
ctx->ssp_mask_hdmi_in = (sof_ssp_amp_quirk & SOF_HDMI_CAPTURE_SSP_MASK_MASK) >>
SOF_HDMI_CAPTURE_SSP_MASK_SHIFT;
ctx->ssp_bt = (sof_ssp_amp_quirk & SOF_BT_OFFLOAD_SSP_MASK) >>
SOF_BT_OFFLOAD_SSP_SHIFT;
ctx->ssp_amp = sof_ssp_amp_quirk & SOF_AMPLIFIER_SSP_MASK;
dev_dbg(&pdev->dev, "sof_ssp_amp_quirk = %lx\n", sof_ssp_amp_quirk);
/* set number of dai links */
sof_ssp_amp_card.num_links = ctx->dmic_be_num;
if (ctx->amp_type != CODEC_NONE)
sof_ssp_amp_card.num_links++;
/* initialize ctx with board quirk */
ctx = sof_intel_board_get_ctx(&pdev->dev, sof_ssp_amp_quirk);
if (!ctx)
return -ENOMEM;
if (ctx->ssp_mask_hdmi_in)
sof_ssp_amp_card.num_links += hweight32(ctx->ssp_mask_hdmi_in);
if (!dmi_check_system(chromebook_platforms) &&
(mach->mach_params.dmic_num == 0))
ctx->dmic_be_num = 0;
if (sof_ssp_amp_quirk & SOF_HDMI_PLAYBACK_PRESENT) {
ctx->hdmi_num = (sof_ssp_amp_quirk & SOF_NO_OF_HDMI_PLAYBACK_MASK) >>
SOF_NO_OF_HDMI_PLAYBACK_SHIFT;
/* default number of HDMI DAI's */
if (!ctx->hdmi_num)
ctx->hdmi_num = 3;
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
ctx->hdmi.idisp_codec = true;
sof_ssp_amp_card.num_links += ctx->hdmi_num;
} else {
ctx->hdmi_num = 0;
}
if (sof_ssp_amp_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) {
ctx->bt_offload_present = true;
sof_ssp_amp_card.num_links++;
}
ctx->link_order_overwrite = SSP_AMP_LINK_ORDER;
dai_links = sof_card_dai_links_create(&pdev->dev, ctx->amp_type,
ctx->ssp_amp, ctx->dmic_be_num,
ctx->hdmi_num,
ctx->hdmi.idisp_codec);
if (!dai_links)
return -ENOMEM;
if (ctx->ssp_mask_hdmi_in) {
/* the topology supports HDMI-IN uses fixed BE ID for DAI links */
ctx->link_id_overwrite = SSP_AMP_LINK_IDS;
}
sof_ssp_amp_card.dai_link = dai_links;
/* update dai_link */
ret = sof_card_dai_links_create(&pdev->dev, &sof_ssp_amp_card, ctx);
if (ret)
return ret;
/* update codec_conf */
switch (ctx->amp_type) {
case CODEC_CS35L41:
cs35l41_set_codec_conf(&sof_ssp_amp_card);
break;
case CODEC_NONE:
case CODEC_RT1308:
case CODEC_NONE:
/* no codec conf required */
break;
default:
......@@ -292,37 +180,34 @@ static const struct platform_device_id board_ids[] = {
},
{
.name = "tgl_rt1308_hdmi_ssp",
.driver_data = (kernel_ulong_t)(SOF_AMPLIFIER_SSP(2) |
SOF_HDMI_CAPTURE_SSP_MASK(0x22)),
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_AMP(2) |
SOF_SSP_MASK_HDMI_CAPTURE(0x22)),
/* SSP 1 and SSP 5 are used for HDMI IN */
},
{
.name = "adl_cs35l41",
.driver_data = (kernel_ulong_t)(SOF_AMPLIFIER_SSP(1) |
SOF_NO_OF_HDMI_PLAYBACK(4) |
.driver_data = (kernel_ulong_t)(SOF_SSP_PORT_AMP(1) |
SOF_NUM_IDISP_HDMI(4) |
SOF_HDMI_PLAYBACK_PRESENT |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
SOF_SSP_PORT_BT_OFFLOAD(2) |
SOF_BT_OFFLOAD_PRESENT),
},
{
.name = "adl_lt6911_hdmi_ssp",
.driver_data = (kernel_ulong_t)(SOF_HDMI_CAPTURE_SSP_MASK(0x5) |
.driver_data = (kernel_ulong_t)(SOF_SSP_MASK_HDMI_CAPTURE(0x5) |
/* SSP 0 and SSP 2 are used for HDMI IN */
SOF_NO_OF_HDMI_PLAYBACK(3) |
SOF_HDMI_PLAYBACK_PRESENT),
},
{
.name = "rpl_lt6911_hdmi_ssp",
.driver_data = (kernel_ulong_t)(SOF_HDMI_CAPTURE_SSP_MASK(0x5) |
.driver_data = (kernel_ulong_t)(SOF_SSP_MASK_HDMI_CAPTURE(0x5) |
/* SSP 0 and SSP 2 are used for HDMI IN */
SOF_NO_OF_HDMI_PLAYBACK(3) |
SOF_HDMI_PLAYBACK_PRESENT),
},
{
.name = "mtl_lt6911_hdmi_ssp",
.driver_data = (kernel_ulong_t)(SOF_HDMI_CAPTURE_SSP_MASK(0x5) |
.driver_data = (kernel_ulong_t)(SOF_SSP_MASK_HDMI_CAPTURE(0x5) |
/* SSP 0 and SSP 2 are used for HDMI IN */
SOF_NO_OF_HDMI_PLAYBACK(3) |
SOF_HDMI_PLAYBACK_PRESENT),
},
{ }
......@@ -346,4 +231,3 @@ MODULE_LICENSE("GPL");
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_REALTEK_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_CIRRUS_COMMON);
MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_SSP_COMMON);
......@@ -563,7 +563,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
},
{
.id = "10508825",
.drv_name = "sof_nau8825",
.drv_name = "adl_nau8825_def",
.sof_tplg_filename = "sof-adl-nau8825.tplg",
},
{
......@@ -616,7 +616,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
},
{
.id = "DLGS7219",
.drv_name = "adl_mx98360_da7219",
.drv_name = "adl_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98360a_amp,
.sof_tplg_filename = "sof-adl-max98360a-da7219.tplg",
......
......@@ -49,21 +49,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
},
{
.id = "10EC5682",
.drv_name = "cml_rt1015_rt5682",
.drv_name = "cml_rt5682_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1015_spk_codecs,
.sof_tplg_filename = "sof-cml-rt1011-rt5682.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.drv_name = "cml_rt5682_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &max98357a_spk_codecs,
.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
},
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.drv_name = "cml_rt5682_def",
.sof_tplg_filename = "sof-cml-rt5682.tplg",
},
{
......
......@@ -52,14 +52,14 @@ static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = {
struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
{
.id = "DLGS7219",
.drv_name = "jsl_mx98373_da7219",
.drv_name = "jsl_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &mx98373_spk,
.sof_tplg_filename = "sof-jsl-da7219.tplg",
},
{
.id = "DLGS7219",
.drv_name = "jsl_mx98360_da7219",
.drv_name = "jsl_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &mx98360a_spk,
.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
......
......@@ -455,6 +455,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = {
.drv_name = "rpl_lt6911_hdmi_ssp",
.sof_tplg_filename = "sof-rpl-nocodec-hdmi-ssp02.tplg"
},
{
.id = "DLGS7219",
.drv_name = "rpl_da7219_def",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rpl_max98360a_amp,
.sof_tplg_filename = "sof-rpl-max98360a-da7219.tplg",
},
{
.id = "10EC5650",
.drv_name = "rpl_rt5682_def",
.sof_tplg_filename = "sof-rpl-rt5650.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_rpl_machines);
......
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