From fc46ecf34782c0d3ec8224ce6003a2631f8a93f1 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Fri, 15 Sep 2023 15:56:08 +0800 Subject: ASoC: intel: sof_sdw: Move sdw_pin_index into private struct Whilst it should not cause any issues as only a single instance of the machine will be instantiated, it is still slightly better practice to keep working data in the private data structure, rather than a global variable. Move sdw_pin_index into the mc_private structure. Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230915075611.1619548-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/boards/sof_sdw_common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/soc/intel/boards/sof_sdw_common.h') diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 2f4fe6bc3d5d..270aded488e1 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -24,6 +24,8 @@ #define SDW_MAX_CPU_DAIS 16 #define SDW_INTEL_BIDIR_PDI_BASE 2 +#define SDW_MAX_LINKS 4 + /* 8 combinations with 4 links + unused group 0 */ #define SDW_MAX_GROUPS 9 @@ -97,6 +99,8 @@ struct mc_private { struct snd_soc_jack sdw_headset; struct device *headset_codec_dev; /* only one headset per card */ struct device *amp_dev1, *amp_dev2; + /* To store SDW Pin index for each SoundWire link */ + unsigned int sdw_pin_index[SDW_MAX_LINKS]; }; extern unsigned long sof_sdw_quirk; -- cgit v1.2.3