Skip to content

Commit af8c32b

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: Intel: hda-mlink: fix base_ptr computation
The base_ptr value needs to be derived from the remap_addr pointer, not the ml_addr. This base_ptr was used only in debug logs that were so far not contributed upstream so the issue was not detected. It needs to be fixed for SoundWire support on LunarLake. Fixes: 17c9b6e ("ASoC: SOF: Intel: hda-mlink: add structures to parse ALT links") Signed-off-by: Pierre-Louis Bossart <[email protected] Reviewed-by: Bard Liao <[email protected] Reviewed-by: Rander Wang <[email protected] Reviewed-by: Ranjani Sridharan <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
1 parent dcb88fc commit af8c32b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct hdac_ext2_link {
9696
*/
9797

9898
static int hdaml_lnk_enum(struct device *dev, struct hdac_ext2_link *h2link,
99-
void __iomem *ml_addr, int link_idx)
99+
void __iomem *remap_addr, void __iomem *ml_addr, int link_idx)
100100
{
101101
struct hdac_ext_link *hlink = &h2link->hext_link;
102102
u32 base_offset;
@@ -136,7 +136,7 @@ static int hdaml_lnk_enum(struct device *dev, struct hdac_ext2_link *h2link,
136136
h2link->elid = FIELD_GET(AZX_REG_ML_LEPTR_ID, h2link->leptr);
137137

138138
base_offset = FIELD_GET(AZX_REG_ML_LEPTR_PTR, h2link->leptr);
139-
h2link->base_ptr = hlink->ml_addr + base_offset;
139+
h2link->base_ptr = remap_addr + base_offset;
140140

141141
switch (h2link->elid) {
142142
case AZX_REG_ML_LEPTR_ID_SDW:
@@ -369,7 +369,7 @@ static int hda_ml_alloc_h2link(struct hdac_bus *bus, int index)
369369
hlink->bus = bus;
370370
hlink->ml_addr = bus->mlcap + AZX_ML_BASE + (AZX_ML_INTERVAL * index);
371371

372-
ret = hdaml_lnk_enum(bus->dev, h2link, hlink->ml_addr, index);
372+
ret = hdaml_lnk_enum(bus->dev, h2link, bus->remap_addr, hlink->ml_addr, index);
373373
if (ret < 0) {
374374
kfree(h2link);
375375
return ret;

0 commit comments

Comments
 (0)