aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_sdw_common.h
diff options
context:
space:
mode:
authorGravatar Charles Keepax <ckeepax@opensource.cirrus.com> 2023-09-15 15:56:08 +0800
committerGravatar Mark Brown <broonie@kernel.org> 2023-09-15 13:27:24 +0100
commitfc46ecf34782c0d3ec8224ce6003a2631f8a93f1 (patch)
treee3808f91231e4809abfc5794eae2c8d7f0b7209f /sound/soc/intel/boards/sof_sdw_common.h
parentASoC: SOF: ipc4-topology: Add deep buffer size to debug prints (diff)
downloadlinux-fc46ecf34782c0d3ec8224ce6003a2631f8a93f1.tar.gz
linux-fc46ecf34782c0d3ec8224ce6003a2631f8a93f1.tar.bz2
linux-fc46ecf34782c0d3ec8224ce6003a2631f8a93f1.zip
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 <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_sdw_common.h')
-rw-r--r--sound/soc/intel/boards/sof_sdw_common.h4
1 files changed, 4 insertions, 0 deletions
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;