Skip to content

Commit dcb88fc

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: Intel: hda-mlink: add helper to get SoundWire hlink
Same functionality as for DMIC/SSP with different ID. Signed-off-by: Pierre-Louis Bossart <[email protected] Reviewed-by: Rander Wang <[email protected] Reviewed-by: Ranjani Sridharan <[email protected] Reviewed-by: Bard Liao <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
1 parent 7430dea commit dcb88fc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

include/sound/hda-mlink.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ int hda_bus_ml_suspend(struct hdac_bus *bus);
5151

5252
struct hdac_ext_link *hdac_bus_eml_ssp_get_hlink(struct hdac_bus *bus);
5353
struct hdac_ext_link *hdac_bus_eml_dmic_get_hlink(struct hdac_bus *bus);
54+
struct hdac_ext_link *hdac_bus_eml_sdw_get_hlink(struct hdac_bus *bus);
5455

5556
struct mutex *hdac_bus_eml_get_mutex(struct hdac_bus *bus, bool alt, int elid);
5657

@@ -155,6 +156,9 @@ hdac_bus_eml_ssp_get_hlink(struct hdac_bus *bus) { return NULL; }
155156
static inline struct hdac_ext_link *
156157
hdac_bus_eml_dmic_get_hlink(struct hdac_bus *bus) { return NULL; }
157158

159+
static inline struct hdac_ext_link *
160+
hdac_bus_eml_sdw_get_hlink(struct hdac_bus *bus) { return NULL; }
161+
158162
static inline struct mutex *
159163
hdac_bus_eml_get_mutex(struct hdac_bus *bus, bool alt, int elid) { return NULL; }
160164

sound/soc/sof/intel/hda-mlink.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,18 @@ struct hdac_ext_link *hdac_bus_eml_dmic_get_hlink(struct hdac_bus *bus)
850850
}
851851
EXPORT_SYMBOL_NS(hdac_bus_eml_dmic_get_hlink, SND_SOC_SOF_HDA_MLINK);
852852

853+
struct hdac_ext_link *hdac_bus_eml_sdw_get_hlink(struct hdac_bus *bus)
854+
{
855+
struct hdac_ext2_link *h2link;
856+
857+
h2link = find_ext2_link(bus, true, AZX_REG_ML_LEPTR_ID_SDW);
858+
if (!h2link)
859+
return NULL;
860+
861+
return &h2link->hext_link;
862+
}
863+
EXPORT_SYMBOL_NS(hdac_bus_eml_sdw_get_hlink, SND_SOC_SOF_HDA_MLINK);
864+
853865
int hdac_bus_eml_enable_offload(struct hdac_bus *bus, bool alt, int elid, bool enable)
854866
{
855867
struct hdac_ext2_link *h2link;

0 commit comments

Comments
 (0)