Unverified Commit 4fc320da authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: SOF: cleanups" from Pierre-Louis Bossart...

Merge series "ASoC: SOF: cleanups" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Minor cleanups for error formats, missing cases, useless functions and
simplifications.

Curtis Malainey (2):
  ASoC: SOF: add missing pm debug
  ASoC: SOF: fix string format for errors

Fred Oh (1):
  ASoC: SOF: ext_manifest: use explicit number for elem_type

Guennadi Liakhovetski (2):
  ASoC: SOF: remove unused functions
  ASoC: SOF: HDA: (cosmetic) simplify hda_dsp_d0i3_work()

 include/sound/sof/ext_manifest.h   |  6 ++--
 sound/soc/sof/intel/hda-compress.c |  2 +-
 sound/soc/sof/intel/hda-dsp.c      | 18 +++++------
 sound/soc/sof/intel/hda-loader.c   |  6 ++--
 sound/soc/sof/intel/hda-pcm.c      |  2 +-
 sound/soc/sof/intel/hda-trace.c    |  4 +--
 sound/soc/sof/intel/hda.c          | 50 ------------------------------
 sound/soc/sof/intel/hda.h          |  1 -
 sound/soc/sof/ipc.c                |  2 ++
 9 files changed, 19 insertions(+), 72 deletions(-)

--
2.25.1
parents 02eb3906 cc11626d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -58,9 +58,9 @@ struct sof_ext_man_header {
/* Extended manifest elements types */
enum sof_ext_man_elem_type {
	SOF_EXT_MAN_ELEM_FW_VERSION		= 0,
	SOF_EXT_MAN_ELEM_WINDOW			= SOF_IPC_EXT_WINDOW,
	SOF_EXT_MAN_ELEM_CC_VERSION		= SOF_IPC_EXT_CC_INFO,
	SOF_EXT_MAN_ELEM_DBG_ABI		= SOF_IPC_EXT_USER_ABI_INFO,
	SOF_EXT_MAN_ELEM_WINDOW			= 1,
	SOF_EXT_MAN_ELEM_CC_VERSION		= 2,
	SOF_EXT_MAN_ELEM_DBG_ABI		= 4,
	SOF_EXT_MAN_ELEM_CONFIG_DATA		= 5, /**< ABI3.17 */
	SOF_EXT_MAN_ELEM_PLATFORM_CONFIG_DATA   = 6,
};
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ int hda_probe_compr_set_params(struct snd_sof_dev *sdev,

	ret = hda_dsp_stream_hw_params(sdev, stream, dmab, NULL);
	if (ret < 0) {
		dev_err(sdev->dev, "error: hdac prepare failed: %x\n", ret);
		dev_err(sdev->dev, "error: hdac prepare failed: %d\n", ret);
		return ret;
	}

+7 −11
Original line number Diff line number Diff line
@@ -732,7 +732,7 @@ int hda_dsp_resume(struct snd_sof_dev *sdev)
				ret = snd_hdac_ext_bus_link_power_up(hlink);
				if (ret < 0) {
					dev_dbg(sdev->dev,
						"error %x in %s: failed to power up links",
						"error %d in %s: failed to power up links",
						ret, __func__);
					return ret;
				}
@@ -934,19 +934,15 @@ void hda_dsp_d0i3_work(struct work_struct *work)
						      d0i3_work.work);
	struct hdac_bus *bus = &hdev->hbus.core;
	struct snd_sof_dev *sdev = dev_get_drvdata(bus->dev);
	struct sof_dsp_power_state target_state;
	struct sof_dsp_power_state target_state = {
		.state = SOF_DSP_PM_D0,
		.substate = SOF_HDA_DSP_PM_D0I3,
	};
	int ret;

	target_state.state = SOF_DSP_PM_D0;

	/* DSP can enter D0I3 iff only D0I3-compatible streams are active */
	if (snd_sof_dsp_only_d0i3_compatible_stream_active(sdev))
		target_state.substate = SOF_HDA_DSP_PM_D0I3;
	else
		target_state.substate = SOF_HDA_DSP_PM_D0I0;

	if (!snd_sof_dsp_only_d0i3_compatible_stream_active(sdev))
		/* remain in D0I0 */
	if (target_state.substate == SOF_HDA_DSP_PM_D0I0)
		return;

	/* This can fail but error cannot be propagated */
+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static struct hdac_ext_stream *cl_stream_prepare(struct snd_sof_dev *sdev, unsig
	/* allocate DMA buffer */
	ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, &pci->dev, size, dmab);
	if (ret < 0) {
		dev_err(sdev->dev, "error: memory alloc failed: %x\n", ret);
		dev_err(sdev->dev, "error: memory alloc failed: %d\n", ret);
		goto error;
	}

@@ -58,13 +58,13 @@ static struct hdac_ext_stream *cl_stream_prepare(struct snd_sof_dev *sdev, unsig
	if (direction == SNDRV_PCM_STREAM_CAPTURE) {
		ret = hda_dsp_iccmax_stream_hw_params(sdev, dsp_stream, dmab, NULL);
		if (ret < 0) {
			dev_err(sdev->dev, "error: iccmax stream prepare failed: %x\n", ret);
			dev_err(sdev->dev, "error: iccmax stream prepare failed: %d\n", ret);
			goto error;
		}
	} else {
		ret = hda_dsp_stream_hw_params(sdev, dsp_stream, dmab, NULL);
		if (ret < 0) {
			dev_err(sdev->dev, "error: hdac prepare failed: %x\n", ret);
			dev_err(sdev->dev, "error: hdac prepare failed: %d\n", ret);
			goto error;
		}
		hda_dsp_stream_spib_config(sdev, dsp_stream, HDA_DSP_SPIB_ENABLE, size);
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev,

	ret = hda_dsp_stream_hw_params(sdev, stream, dmab, params);
	if (ret < 0) {
		dev_err(sdev->dev, "error: hdac prepare failed: %x\n", ret);
		dev_err(sdev->dev, "error: hdac prepare failed: %d\n", ret);
		return ret;
	}

Loading