Skip to contentSkip to conversation

ASoC: sdw_utils: add vendor_id to asoc_sdw_codec_info

PATCH In review Niranjan H Y 3 participants 3 messages Mar 24

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: sdw_utils: add vendor_id to asoc_sdw_codec_info

struct asoc_sdw_codec_info has part_id which is not
sufficient to uniquely identify devices. This change adds the vendor_id field and updates the codec_info list with the corresponding vendor id as per the Manufacturer's id in https://mid.mipi.org/

---
v2:
- Make this as independent patch by removing from the TI's tac5xx2-sdw codec driver patch series.
- Add missing vendor IDs for Cirrus machines after rebase

---
 include/sound/soc_sdw_utils.h       |  1 +
 sound/soc/sdw_utils/soc_sdw_utils.c | 48 ++++++++++++++++++++++++++---
 sound/soc/sof/intel/hda.c           |  7 +++--
 3 files changed, 49 insertions(+), 7 deletions(-)
include/sound/soc_sdw_utils.h +1 -0
index 98531e500cbb3..48f516ba682f7 100644
@@ -71,6 +71,7 @@ struct asoc_sdw_aux_info {
 };
 
 struct asoc_sdw_codec_info {
+	const int vendor_id;
 	const int part_id;
 	const int version_id;
 	const char *name_prefix;
sound/soc/sdw_utils/soc_sdw_utils.c +43 -5

290 lines not on this page · raw message

sound/soc/sof/intel/hda.c +5 -2
index c0cc7d3ce5262..9ec33147d9af3 100644
@@ -1179,6 +1179,9 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
 		struct snd_soc_acpi_endpoint *endpoints;
 		int amp_group_id = 1;
 
+		if (sdw_device->id.mfg_id != codec_info_list[i].vendor_id)
+			continue;
+
 		if (sdw_device->id.part_id != codec_info_list[i].part_id)
 			continue;
 
@@ -1193,8 +1196,8 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
 		 * dereference
 		 */
 		if (!name_prefix) {
-			dev_err(dev, "codec_info_list name_prefix of part id %#x is missing\n",
-				codec_info_list[i].part_id);
+			dev_err(dev, "codec_info_list name_prefix of part id %#x-%#x is missing\n",
+				codec_info_list[i].vendor_id, codec_info_list[i].part_id);
 			return NULL;
 		}
 		for (j = 0; j < codec_info_list[i].dai_num; j++) {
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Niranjan H Y

struct asoc_sdw_codec_info has part_id which is not
sufficient to uniquely identify devices. This change adds the vendor_id field and updates the codec_info list with the corresponding vendor id as per the Manufacturer's id in https://mid.mipi.org/

---

Thanks,
Charles

maintainer
#2 lore raw
In reply to Niranjan H Y
Quoted 1 line · Niranjan H Y

ASoC: sdw_utils: add vendor_id to asoc_sdw_codec_info

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.1

Thanks!

[1/1] ASoC: sdw_utils: add vendor_id to asoc_sdw_codec_info

      https://git.kernel.org/broonie/sound/c/d12dc8c558b9

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark