diff options
author | Mark Brown <broonie@kernel.org> | 2020-03-02 14:31:46 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-02 14:31:46 +0000 |
commit | fae664ebc79144fd9ac0bc9c2d3a36356aa48c29 (patch) | |
tree | 50122833f0391395e29541f82b0c5717c0e53050 /sound/soc | |
parent | a79ee2e095c0a60c32d5b1fce39d58e0fc4d9ec5 (diff) | |
parent | 1a2289fdf678b780b2d68f408523c09b7074982e (diff) | |
download | linux-stable-fae664ebc79144fd9ac0bc9c2d3a36356aa48c29.tar.gz linux-stable-fae664ebc79144fd9ac0bc9c2d3a36356aa48c29.tar.bz2 linux-stable-fae664ebc79144fd9ac0bc9c2d3a36356aa48c29.zip |
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
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sof/intel/hda-loader.c | 6 | ||||
-rw-r--r-- | sound/soc/sof/ipc.c | 12 | ||||
-rw-r--r-- | sound/soc/sof/pcm.c | 6 |
3 files changed, 15 insertions, 9 deletions
diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c index 8852184a2569..03b05d7f66da 100644 --- a/sound/soc/sof/intel/hda-loader.c +++ b/sound/soc/sof/intel/hda-loader.c @@ -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))); diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 22d296f95761..cc5762706c9c 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -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; diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index b239bbff4b5c..f4769e19965a 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -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; } |