Unverified Commit a1462fb8 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Intel: boards: updates for 6.15

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

1. Add multi-function SDW mockup codec match.
2. Add couple of new codec configurations for ADL, LNL, and PTL boards.
parents b92bc4d6 7172d9ae
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -214,6 +214,15 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device rt1316_2_group2_adr[] = {
	{
		.adr = 0x000232025D131601ull,
		.num_endpoints = 1,
		.endpoints = &spk_r_endpoint,
		.name_prefix = "rt1316-2"
	}
};

static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = {
	{
		.adr = 0x000130025D131601ull,
@@ -547,6 +556,20 @@ static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = {
	{}
};

static const struct snd_soc_acpi_link_adr adl_sdw_rt1316_link02[] = {
	{
		.mask = BIT(0),
		.num_adr = ARRAY_SIZE(rt1316_0_group2_adr),
		.adr_d = rt1316_0_group2_adr,
	},
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(rt1316_2_group2_adr),
		.adr_d = rt1316_2_group2_adr,
	},
	{}
};

static const struct snd_soc_acpi_codecs adl_max98357a_amp = {
	.num_codecs = 1,
	.codecs = {"MX98357A"}
@@ -749,6 +772,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-adl-sdw-max98373-rt5682.tplg",
	},
	{
		.link_mask = BIT(0) | BIT(2),
		.links = adl_sdw_rt1316_link02,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-adl-rt1316-l02.tplg",
	},
	{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines);
+137 −0
Original line number Diff line number Diff line
@@ -37,6 +37,13 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_1_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 1,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
	.num = 0,
	.aggregated = 1,
@@ -51,6 +58,27 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_4_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 4,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_5_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 5,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_6_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 6,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
	{
		.num = 0,
@@ -159,6 +187,33 @@ static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
	},
};

static const struct snd_soc_acpi_endpoint cs42l43_amp_spkagg_endpoints[] = {
	{ /* Jack Playback Endpoint */
		.num = 0,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* DMIC Capture Endpoint */
		.num = 1,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* Jack Capture Endpoint */
		.num = 2,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* Speaker Playback Endpoint */
		.num = 3,
		.aggregated = 1,
		.group_position = 0,
		.group_id = 1,
	},
};

static const struct snd_soc_acpi_adr_device cs35l56_2_l_adr[] = {
	{
		.adr = 0x00023001FA355601ull,
@@ -204,6 +259,48 @@ static const struct snd_soc_acpi_adr_device cs35l56_3_lr_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_1_3amp_adr[] = {
	{
		.adr = 0x00013001fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_1_endpoint,
		.name_prefix = "AMP1"
	},
	{
		.adr = 0x00013101fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_2_endpoint,
		.name_prefix = "AMP2"
	},
	{
		.adr = 0x00013201fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_3_endpoint,
		.name_prefix = "AMP3"
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_3_3amp_adr[] = {
	{
		.adr = 0x00033301fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_4_endpoint,
		.name_prefix = "AMP4"
	},
	{
		.adr = 0x00033401fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_5_endpoint,
		.name_prefix = "AMP5"
	},
	{
		.adr = 0x00033501fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_6_endpoint,
		.name_prefix = "AMP6"
	}
};

static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
	{
		.adr = 0x00003001FA424301ull,
@@ -213,6 +310,15 @@ static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device cs42l43_2_adr[] = {
	{
		.adr = 0x00023001fa424301ull,
		.num_endpoints = ARRAY_SIZE(cs42l43_amp_spkagg_endpoints),
		.endpoints = cs42l43_amp_spkagg_endpoints,
		.name_prefix = "cs42l43"
	}
};

static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
	{
		.adr = 0x000030025D071101ull,
@@ -408,6 +514,25 @@ static const struct snd_soc_acpi_link_adr lnl_cs42l43_l0_cs35l56_l23[] = {
	{}
};

static const struct snd_soc_acpi_link_adr lnl_cs42l43_l2_cs35l56x6_l13[] = {
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(cs42l43_2_adr),
		.adr_d = cs42l43_2_adr,
	},
	{
		.mask = BIT(1),
		.num_adr = ARRAY_SIZE(cs35l56_1_3amp_adr),
		.adr_d = cs35l56_1_3amp_adr,
	},
	{
		.mask = BIT(3),
		.num_adr = ARRAY_SIZE(cs35l56_3_3amp_adr),
		.adr_d = cs35l56_3_3amp_adr,
	},
	{}
};

static const struct snd_soc_acpi_link_adr lnl_rvp[] = {
	{
		.mask = BIT(0),
@@ -552,6 +677,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-lnl-rt715-rt711-rt1308-mono.tplg",
	},
	{
		.link_mask = BIT(0),
		.links = sdw_mockup_multi_func,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-lnl-rt722-l0.tplg", /* Reuse the existing tplg file */
	},
	{
		.link_mask = GENMASK(3, 0),
		.links = lnl_3_in_1_sdca,
@@ -564,6 +695,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-lnl-cs42l43-l0-cs35l56-l23.tplg",
	},
	{
		.link_mask = BIT(1) | BIT(2) | BIT(3),
		.links = lnl_cs42l43_l2_cs35l56x6_l13,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-lnl-cs42l43-l2-cs35l56x6-l13.tplg",
	},
	{
		.link_mask = BIT(0) | BIT(3),
		.links = lnl_cs42l43_l0_cs35l56_l3,
+234 −0
Original line number Diff line number Diff line
@@ -50,6 +50,48 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_1_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 1,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 2,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 3,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_4_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 4,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_5_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 5,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_6_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 6,
	.group_id = 1,
};

/*
 * Multi-function codecs with three endpoints created for
 * headset, amp and dmic functions.
@@ -116,6 +158,84 @@ static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints_endpoints[]
	},
};

static const struct snd_soc_acpi_endpoint cs42l43_amp_spkagg_endpoints[] = {
	{ /* Jack Playback Endpoint */
		.num = 0,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* DMIC Capture Endpoint */
		.num = 1,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* Jack Capture Endpoint */
		.num = 2,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	{ /* Speaker Playback Endpoint */
		.num = 3,
		.aggregated = 1,
		.group_position = 0,
		.group_id = 1,
	},
};

static const struct snd_soc_acpi_adr_device cs42l43_2_adr[] = {
	{
		.adr = 0x00023001fa424301ull,
		.num_endpoints = ARRAY_SIZE(cs42l43_amp_spkagg_endpoints),
		.endpoints = cs42l43_amp_spkagg_endpoints,
		.name_prefix = "cs42l43"
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_1_3amp_adr[] = {
	{
		.adr = 0x00013001fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_1_endpoint,
		.name_prefix = "AMP1"
	},
	{
		.adr = 0x00013101fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_2_endpoint,
		.name_prefix = "AMP2"
	},
	{
		.adr = 0x00013201fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_3_endpoint,
		.name_prefix = "AMP3"
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_3_3amp_adr[] = {
	{
		.adr = 0x00033301fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_4_endpoint,
		.name_prefix = "AMP4"
	},
	{
		.adr = 0x00033401fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_5_endpoint,
		.name_prefix = "AMP5"
	},
	{
		.adr = 0x00033501fa355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_6_endpoint,
		.name_prefix = "AMP6"
	}
};

static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
	{
		.adr = 0x000030025D071101ull,
@@ -134,6 +254,15 @@ static const struct snd_soc_acpi_adr_device rt712_vb_2_group1_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device rt712_vb_3_group1_adr[] = {
	{
		.adr = 0x000330025D071201ull,
		.num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints_endpoints),
		.endpoints = jack_amp_g1_dmic_endpoints_endpoints,
		.name_prefix = "rt712"
	}
};

static const struct snd_soc_acpi_adr_device rt713_vb_2_adr[] = {
	{
		.adr = 0x000230025d071301ull,
@@ -143,6 +272,15 @@ static const struct snd_soc_acpi_adr_device rt713_vb_2_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device rt713_vb_3_adr[] = {
	{
		.adr = 0x000330025D071301ull,
		.num_endpoints = ARRAY_SIZE(jack_dmic_endpoints),
		.endpoints = jack_dmic_endpoints,
		.name_prefix = "rt713"
	}
};

static const struct snd_soc_acpi_adr_device rt721_3_single_adr[] = {
	{
		.adr = 0x000330025d072101ull,
@@ -206,6 +344,24 @@ static const struct snd_soc_acpi_adr_device rt1320_1_group2_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device rt1320_2_group1_adr[] = {
	{
		.adr = 0x000230025D132001ull,
		.num_endpoints = 1,
		.endpoints = &spk_r_endpoint,
		.name_prefix = "rt1320-1"
	}
};

static const struct snd_soc_acpi_adr_device rt1320_2_group2_adr[] = {
	{
		.adr = 0x000230025D132001ull,
		.num_endpoints = 1,
		.endpoints = &spk_r_endpoint,
		.name_prefix = "rt1320-1"
	}
};

static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
	{
		.adr = 0x000330025D132001ull,
@@ -215,6 +371,25 @@ static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
	}
};

static const struct snd_soc_acpi_link_adr ptl_cs42l43_l2_cs35l56x6_l13[] = {
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(cs42l43_2_adr),
		.adr_d = cs42l43_2_adr,
	},
	{
		.mask = BIT(1),
		.num_adr = ARRAY_SIZE(cs35l56_1_3amp_adr),
		.adr_d = cs35l56_1_3amp_adr,
	},
	{
		.mask = BIT(3),
		.num_adr = ARRAY_SIZE(cs35l56_3_3amp_adr),
		.adr_d = cs35l56_3_3amp_adr,
	},
	{}
};

static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = {
	{
		.mask = BIT(0),
@@ -270,6 +445,25 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l2_rt1320_l13[] = {
	{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l3_rt1320_l12[] = {
	{
		.mask = BIT(3),
		.num_adr = ARRAY_SIZE(rt713_vb_3_adr),
		.adr_d = rt713_vb_3_adr,
	},
	{
		.mask = BIT(1),
		.num_adr = ARRAY_SIZE(rt1320_1_group2_adr),
		.adr_d = rt1320_1_group2_adr,
	},
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(rt1320_2_group2_adr),
		.adr_d = rt1320_2_group2_adr,
	},
	{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l2_rt1320_l1[] = {
	{
		.mask = BIT(2),
@@ -284,6 +478,20 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l2_rt1320_l1[] = {
	{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l3_rt1320_l2[] = {
	{
		.mask = BIT(3),
		.num_adr = ARRAY_SIZE(rt712_vb_3_group1_adr),
		.adr_d = rt712_vb_3_group1_adr,
	},
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(rt1320_2_group1_adr),
		.adr_d = rt1320_2_group1_adr,
	},
	{}
};

/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
	/* mockup tests need to be first */
@@ -305,6 +513,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-ptl-rt715-rt711-rt1308-mono.tplg",
	},
	{
		.link_mask = BIT(1) | BIT(2) | BIT(3),
		.links = ptl_cs42l43_l2_cs35l56x6_l13,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-ptl-cs42l43-l2-cs35l56x6-l13.tplg",
	},
	{
		.link_mask = BIT(0),
		.links = sdw_mockup_multi_func,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-ptl-rt722.tplg", /* Reuse the existing tplg file */
	},
	{
		.link_mask = BIT(0),
		.links = ptl_rvp,
@@ -342,6 +562,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
		.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
		.sof_tplg_filename = "sof-ptl-rt712-l2-rt1320-l1.tplg"
	},
	{
		.link_mask = BIT(2) | BIT(3),
		.links = ptl_sdw_rt712_vb_l3_rt1320_l2,
		.drv_name = "sof_sdw",
		.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
		.sof_tplg_filename = "sof-ptl-rt712-l3-rt1320-l2.tplg"
	},
	{
		.link_mask = BIT(1) | BIT(2) | BIT(3),
		.links = ptl_sdw_rt713_vb_l2_rt1320_l13,
@@ -349,6 +576,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
		.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
		.sof_tplg_filename = "sof-ptl-rt713-l2-rt1320-l13.tplg"
	},
	{
		.link_mask = BIT(1) | BIT(2) | BIT(3),
		.links = ptl_sdw_rt713_vb_l3_rt1320_l12,
		.drv_name = "sof_sdw",
		.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
		.sof_tplg_filename = "sof-ptl-rt713-l3-rt1320-l12.tplg"
	},
	{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_sdw_machines);
+42 −0
Original line number Diff line number Diff line
@@ -31,6 +31,30 @@ static const struct snd_soc_acpi_endpoint sdw_mockup_r_endpoint = {
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
	/* Jack Endpoint */
	{
		.num = 0,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
	/* Amp Endpoint, work as spk_l_endpoint */
	{
		.num = 1,
		.aggregated = 1,
		.group_position = 0,
		.group_id = 1,
	},
	/* DMIC Endpoint */
	{
		.num = 2,
		.aggregated = 0,
		.group_position = 0,
		.group_id = 0,
	},
};

static const struct snd_soc_acpi_adr_device sdw_mockup_headset_0_adr[] = {
	{
		.adr = 0x0000000105AA5500ull,
@@ -103,6 +127,15 @@ static const struct snd_soc_acpi_adr_device sdw_mockup_amp_2_group1_adr[] = {
	}
};

static const struct snd_soc_acpi_adr_device sdw_mockup_multi_function_adr[] = {
	{
		.adr = 0x0000000105AAAA01ull,
		.num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints),
		.endpoints = jack_amp_g1_dmic_endpoints,
		.name_prefix = "sdw_mockup_mmulti-function"
	}
};

const struct snd_soc_acpi_link_adr sdw_mockup_headset_1amp_mic[] = {
	{
		.mask = BIT(0),
@@ -164,3 +197,12 @@ const struct snd_soc_acpi_link_adr sdw_mockup_mic_headset_1amp[] = {
	},
	{}
};

const struct snd_soc_acpi_link_adr sdw_mockup_multi_func[] = {
	{
		.mask = BIT(0),
		.num_adr = ARRAY_SIZE(sdw_mockup_multi_function_adr),
		.adr_d = sdw_mockup_multi_function_adr,
	},
	{}
};
+1 −0
Original line number Diff line number Diff line
@@ -13,5 +13,6 @@
extern const struct snd_soc_acpi_link_adr sdw_mockup_headset_1amp_mic[];
extern const struct snd_soc_acpi_link_adr sdw_mockup_headset_2amps_mic[];
extern const struct snd_soc_acpi_link_adr sdw_mockup_mic_headset_1amp[];
extern const struct snd_soc_acpi_link_adr sdw_mockup_multi_func[];

#endif
Loading