Skip to content

Commit e341872

Browse files
committed
ASoC: SOF: Intel: lnl: Enable offload for UAOL link
The handling of UAOL (USB Audio Offload Link) is similar to SSP and DMIC, it is handled by the DSP firmware. Set the offload enable for it similar to SSP and DMIC. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent b309a4a commit e341872

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

sound/soc/sof/intel/lnl.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <sound/hda-mlink.h>
2222

2323
/* this helps allows the DSP to setup DMIC/SSP */
24-
static int hdac_bus_offload_dmic_ssp(struct hdac_bus *bus, bool enable)
24+
static int hdac_bus_set_dsp_offload(struct hdac_bus *bus, bool enable)
2525
{
2626
int ret;
2727

@@ -35,7 +35,10 @@ static int hdac_bus_offload_dmic_ssp(struct hdac_bus *bus, bool enable)
3535
if (ret < 0)
3636
return ret;
3737

38-
return 0;
38+
ret = hdac_bus_eml_enable_offload(bus, true,
39+
AZX_REG_ML_LEPTR_ID_INTEL_UAOL, enable);
40+
41+
return ret;
3942
}
4043

4144
static int lnl_hda_dsp_probe(struct snd_sof_dev *sdev)
@@ -46,14 +49,14 @@ static int lnl_hda_dsp_probe(struct snd_sof_dev *sdev)
4649
if (ret < 0)
4750
return ret;
4851

49-
return hdac_bus_offload_dmic_ssp(sof_to_bus(sdev), true);
52+
return hdac_bus_set_dsp_offload(sof_to_bus(sdev), true);
5053
}
5154

5255
static void lnl_hda_dsp_remove(struct snd_sof_dev *sdev)
5356
{
5457
int ret;
5558

56-
ret = hdac_bus_offload_dmic_ssp(sof_to_bus(sdev), false);
59+
ret = hdac_bus_set_dsp_offload(sof_to_bus(sdev), false);
5760
if (ret < 0)
5861
dev_warn(sdev->dev,
5962
"Failed to disable offload for DMIC/SSP: %d\n", ret);
@@ -69,7 +72,7 @@ static int lnl_hda_dsp_resume(struct snd_sof_dev *sdev)
6972
if (ret < 0)
7073
return ret;
7174

72-
return hdac_bus_offload_dmic_ssp(sof_to_bus(sdev), true);
75+
return hdac_bus_set_dsp_offload(sof_to_bus(sdev), true);
7376
}
7477

7578
static int lnl_hda_dsp_runtime_resume(struct snd_sof_dev *sdev)
@@ -80,7 +83,7 @@ static int lnl_hda_dsp_runtime_resume(struct snd_sof_dev *sdev)
8083
if (ret < 0)
8184
return ret;
8285

83-
return hdac_bus_offload_dmic_ssp(sof_to_bus(sdev), true);
86+
return hdac_bus_set_dsp_offload(sof_to_bus(sdev), true);
8487
}
8588

8689
static int lnl_dsp_post_fw_run(struct snd_sof_dev *sdev)

0 commit comments

Comments
 (0)