Unverified Commit fae664eb authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: SOF: updates for 5.7" from Pierre-Louis Bossart...

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

4 unrelated improvements grouped in one bundle.

Jaska Uimonen (1):
  ASoC: SOF: ipc: check ipc return value before data copy

Keyon Jie (2):
  ASoC: SOF: pcm: skip DMA buffer pre-allocation
  ASoC: SOF: Intel: hda-loader: clear the IPC ack bit after FW_PURGE
    done

Tomasz Lauda (1):
  ASoC: SOF: add core id to sof_ipc_comp

 include/sound/sof/topology.h     |  3 ++-
 include/uapi/sound/sof/abi.h     |  2 +-
 sound/soc/sof/intel/hda-loader.c |  6 ++++++
 sound/soc/sof/ipc.c              | 12 +++++++-----
 sound/soc/sof/pcm.c              |  6 ++----
 5 files changed, 18 insertions(+), 11 deletions(-)

base-commit: 6941b0b5f919e9839e8c25efaeb53854efee14e5
--
2.20.1
parents a79ee2e0 1a2289fd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -53,9 +53,10 @@ struct sof_ipc_comp {
	uint32_t id;
	enum sof_comp_type type;
	uint32_t pipeline_id;
	uint32_t core;

	/* reserved for future use */
	uint32_t reserved[2];
	uint32_t reserved[1];
} __packed;

/*
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@

/* SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 12
#define SOF_ABI_MINOR 13
#define SOF_ABI_PATCH 0

/* SOF ABI version number. Format within 32bit word is MMmmmppp */
+6 −0
Original line number Diff line number Diff line
@@ -131,6 +131,12 @@ static int cl_dsp_init(struct snd_sof_dev *sdev, const void *fwdata,
		goto err;
	}

	/* set DONE bit to clear the reply IPC message */
	snd_sof_dsp_update_bits_forced(sdev, HDA_DSP_BAR,
				       chip->ipc_ack,
				       chip->ipc_ack_mask,
				       chip->ipc_ack_mask);

	/* step 5: power down corex */
	ret = hda_dsp_core_power_down(sdev,
				  chip->cores_mask & ~(HDA_DSP_CORE_MASK(0)));
+7 −5
Original line number Diff line number Diff line
@@ -214,15 +214,17 @@ static int tx_wait_done(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg,
		snd_sof_handle_fw_exception(ipc->sdev);
		ret = -ETIMEDOUT;
	} else {
		/* copy the data returned from DSP */
		ret = msg->reply_error;
		if (msg->reply_size)
			memcpy(reply_data, msg->reply_data, msg->reply_size);
		if (ret < 0)
		if (ret < 0) {
			dev_err(sdev->dev, "error: ipc error for 0x%x size %zu\n",
				hdr->cmd, msg->reply_size);
		else
		} else {
			ipc_log_header(sdev->dev, "ipc tx succeeded", hdr->cmd);
			if (msg->reply_size)
				/* copy the data returned from DSP */
				memcpy(reply_data, msg->reply_data,
				       msg->reply_size);
		}
	}

	return ret;
+2 −4
Original line number Diff line number Diff line
@@ -601,8 +601,7 @@ static int sof_pcm_new(struct snd_soc_component *component,

	snd_pcm_set_managed_buffer(pcm->streams[stream].substream,
				   SNDRV_DMA_TYPE_DEV_SG, sdev->dev,
				   le32_to_cpu(caps->buffer_size_min),
				   le32_to_cpu(caps->buffer_size_max));
				   0, le32_to_cpu(caps->buffer_size_max));
capture:
	stream = SNDRV_PCM_STREAM_CAPTURE;

@@ -624,8 +623,7 @@ capture:

	snd_pcm_set_managed_buffer(pcm->streams[stream].substream,
				   SNDRV_DMA_TYPE_DEV_SG, sdev->dev,
				   le32_to_cpu(caps->buffer_size_min),
				   le32_to_cpu(caps->buffer_size_max));
				   0, le32_to_cpu(caps->buffer_size_max));

	return 0;
}