ASoC: SOF: Intel: hda-mlink: add structures to parse ALT links
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 4 Apr 2023 10:41:15 +0000 (13:41 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 6 Apr 2023 15:45:39 +0000 (16:45 +0100)
commit17c9b6ec35c0d6228db4f94590702a0cb03cd96a
treebfbd099389d9a5ea50246f289ef581cfa9fb5ca2
parent18227585d8374ce16d3a2792deb125794710de43
ASoC: SOF: Intel: hda-mlink: add structures to parse ALT links

Extend hdac_ext_link to store information needed for ALT
links. Follow-up patches will include more functional patches for
power-up and down.

Note that this patch suggests the use of an 'eml_lock' to serialize
access to shared registers. SoundWire-specific sequence require the
lock to be taken at a higher level, as a result the helpers added in
follow-up patches will provide 'unlocked' versions when needed.

Also note that the low-level sequences with the 'hdaml_' prefix are
taken directly from the hardware specifications - naming conventions
included. The code will be split in two, with locking and linked-list
management handled separately to avoid mixing required hardware setup
and Linux-based resource management.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230404104127.5629-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/hda-mlink.h
sound/soc/sof/intel/hda-mlink.c
sound/soc/sof/intel/hda.c