Commit f9380830 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: add codec name prefix to ACPI machine description

The current SOF machine driver adds a name prefix for each codec,
mainly to differentiate ALSA controls for left and right amplifiers.

This is a good idea, but the machine driver duplicates some of the
information that already exists in ACPI descriptors, so add those
prefixes there. Follow-up patches will make use of the information
encoded in these tables and remove duplication.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200923080514.3242858-4-kai.vehmanen@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f1bf9a6b
...@@ -93,11 +93,13 @@ struct snd_soc_acpi_endpoint { ...@@ -93,11 +93,13 @@ struct snd_soc_acpi_endpoint {
* @adr: 64 bit ACPI _ADR value * @adr: 64 bit ACPI _ADR value
* @num_endpoints: number of endpoints for this device * @num_endpoints: number of endpoints for this device
* @endpoints: array of endpoints * @endpoints: array of endpoints
* @name_prefix: string used for codec controls
*/ */
struct snd_soc_acpi_adr_device { struct snd_soc_acpi_adr_device {
const u64 adr; const u64 adr;
const u8 num_endpoints; const u8 num_endpoints;
const struct snd_soc_acpi_endpoint *endpoints; const struct snd_soc_acpi_endpoint *endpoints;
const char *name_prefix;
}; };
/** /**
......
...@@ -98,6 +98,7 @@ static const struct snd_soc_acpi_adr_device rt700_1_adr[] = { ...@@ -98,6 +98,7 @@ static const struct snd_soc_acpi_adr_device rt700_1_adr[] = {
.adr = 0x000110025D070000, .adr = 0x000110025D070000,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt700"
} }
}; };
...@@ -115,6 +116,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { ...@@ -115,6 +116,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
.adr = 0x000020025D071100, .adr = 0x000020025D071100,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt711"
} }
}; };
...@@ -123,6 +125,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { ...@@ -123,6 +125,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -131,6 +134,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { ...@@ -131,6 +134,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -139,6 +143,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { ...@@ -139,6 +143,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
.adr = 0x000220025D130800, .adr = 0x000220025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1308-2"
} }
}; };
...@@ -147,6 +152,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { ...@@ -147,6 +152,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
.adr = 0x000320025D071500, .adr = 0x000320025D071500,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt715"
} }
}; };
...@@ -155,6 +161,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { ...@@ -155,6 +161,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
.adr = 0x000030025D071101, .adr = 0x000030025D071101,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt711"
} }
}; };
...@@ -163,6 +170,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { ...@@ -163,6 +170,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
.adr = 0x000131025D131601, /* unique ID is set for some reason */ .adr = 0x000131025D131601, /* unique ID is set for some reason */
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1316-1"
} }
}; };
...@@ -171,6 +179,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { ...@@ -171,6 +179,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
.adr = 0x000230025D131601, .adr = 0x000230025D131601,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1316-2"
} }
}; };
...@@ -179,6 +188,7 @@ static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { ...@@ -179,6 +188,7 @@ static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
.adr = 0x000330025D071401, .adr = 0x000330025D071401,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt714"
} }
}; };
......
...@@ -39,6 +39,7 @@ static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = { ...@@ -39,6 +39,7 @@ static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = {
.adr = 0x000220025D568200, .adr = 0x000220025D568200,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt5682"
} }
}; };
......
...@@ -59,6 +59,7 @@ static const struct snd_soc_acpi_adr_device rt700_0_adr[] = { ...@@ -59,6 +59,7 @@ static const struct snd_soc_acpi_adr_device rt700_0_adr[] = {
.adr = 0x000010025D070000, .adr = 0x000010025D070000,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt700"
} }
}; };
...@@ -76,6 +77,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { ...@@ -76,6 +77,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
.adr = 0x000020025D071100, .adr = 0x000020025D071100,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt711"
} }
}; };
...@@ -84,6 +86,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = { ...@@ -84,6 +86,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -92,6 +95,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { ...@@ -92,6 +95,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -100,6 +104,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { ...@@ -100,6 +104,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
.adr = 0x000220025D130800, .adr = 0x000220025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1308-2"
} }
}; };
...@@ -108,6 +113,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { ...@@ -108,6 +113,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
.adr = 0x000320025D071500, .adr = 0x000320025D071500,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt715"
} }
}; };
......
...@@ -40,6 +40,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { ...@@ -40,6 +40,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
.adr = 0x000020025D071100, .adr = 0x000020025D071100,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt711"
} }
}; };
...@@ -48,11 +49,13 @@ static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = { ...@@ -48,11 +49,13 @@ static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1308-1"
}, },
{ {
.adr = 0x000122025D130800, .adr = 0x000122025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1308-2"
} }
}; };
...@@ -61,6 +64,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { ...@@ -61,6 +64,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -69,6 +73,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { ...@@ -69,6 +73,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
.adr = 0x000120025D130800, .adr = 0x000120025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1308-1"
} }
}; };
...@@ -77,6 +82,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { ...@@ -77,6 +82,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
.adr = 0x000220025D130800, .adr = 0x000220025D130800,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1308-2"
} }
}; };
...@@ -85,6 +91,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { ...@@ -85,6 +91,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
.adr = 0x000320025D071500, .adr = 0x000320025D071500,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt715"
} }
}; };
...@@ -93,11 +100,13 @@ static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = { ...@@ -93,11 +100,13 @@ static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = {
.adr = 0x000123019F837300, .adr = 0x000123019F837300,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "Right"
}, },
{ {
.adr = 0x000127019F837300, .adr = 0x000127019F837300,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "Left"
} }
}; };
...@@ -106,6 +115,7 @@ static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = { ...@@ -106,6 +115,7 @@ static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {
.adr = 0x000021025D568200, .adr = 0x000021025D568200,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt5682"
} }
}; };
...@@ -114,6 +124,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { ...@@ -114,6 +124,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
.adr = 0x000030025D071101, .adr = 0x000030025D071101,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt711"
} }
}; };
...@@ -122,6 +133,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { ...@@ -122,6 +133,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
.adr = 0x000131025D131601, /* unique ID is set for some reason */ .adr = 0x000131025D131601, /* unique ID is set for some reason */
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_l_endpoint, .endpoints = &spk_l_endpoint,
.name_prefix = "rt1316-1"
} }
}; };
...@@ -130,6 +142,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { ...@@ -130,6 +142,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {
.adr = 0x000230025D131601, .adr = 0x000230025D131601,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &spk_r_endpoint, .endpoints = &spk_r_endpoint,
.name_prefix = "rt1316-2"
} }
}; };
...@@ -138,6 +151,7 @@ static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { ...@@ -138,6 +151,7 @@ static const struct snd_soc_acpi_adr_device rt714_3_adr[] = {
.adr = 0x000330025D071401, .adr = 0x000330025D071401,
.num_endpoints = 1, .num_endpoints = 1,
.endpoints = &single_endpoint, .endpoints = &single_endpoint,
.name_prefix = "rt714"
} }
}; };
......
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