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

Merge series "ASoC: SOF: multi-cpu dais, IPC and Intel improvements for 5.7"...

Merge series "ASoC: SOF: multi-cpu dais, IPC and Intel improvements for 5.7" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Corrections for compatibility with the multi-cpu dai check for
min-channels, IPC simplifications, and removal of unnecessary
boot-related code for Intel platforms.

Amery Song (2):
  ASoC: SOF: Intel: hda: remove unnecessary ROM IPC filter function
  ASoC: SOF: Intel: remove unnecessary waitq before loading firmware

Bard Liao (2):
  ASoC: SOF: Intel: hda-dai: add stream capability
  ASoC: SOF: topology: connect dai widget to all cpu-dais

Karol Trzcinski (2):
  ASoC: SOF: Make sof_ipc_ext_data enum more rigid
  ASoC: SOF: Remove SOF_IPC_EXT_DMA_BUFFER

 include/sound/sof/info.h         | 22 +-------
 sound/soc/sof/intel/cnl.c        |  5 --
 sound/soc/sof/intel/hda-dai.c    | 96 ++++++++++++++++++++++++++++++++
 sound/soc/sof/intel/hda-ipc.c    | 20 +------
 sound/soc/sof/intel/hda-loader.c |  3 -
 sound/soc/sof/intel/hda.c        |  3 -
 sound/soc/sof/intel/hda.h        |  1 -
 sound/soc/sof/loader.c           |  6 --
 sound/soc/sof/sof-priv.h         |  5 --
 sound/soc/sof/topology.c         |  8 ++-
 10 files changed, 108 insertions(+), 61 deletions(-)

base-commit: 101247a3
--
2.20.1
parents ccab2c7d c59aca98
Loading
Loading
Loading
Loading
+3 −19
Original line number Diff line number Diff line
@@ -28,9 +28,9 @@

/* extended data types that can be appended onto end of sof_ipc_fw_ready */
enum sof_ipc_ext_data {
	SOF_IPC_EXT_DMA_BUFFER = 0,
	SOF_IPC_EXT_WINDOW,
	SOF_IPC_EXT_CC_INFO,
	SOF_IPC_EXT_UNUSED		= 0,
	SOF_IPC_EXT_WINDOW		= 1,
	SOF_IPC_EXT_CC_INFO		= 2,
};

/* FW version - SOF_IPC_GLB_VERSION */
@@ -83,22 +83,6 @@ struct sof_ipc_ext_data_hdr {
	uint32_t type;		/**< SOF_IPC_EXT_ */
} __packed;

struct sof_ipc_dma_buffer_elem {
	struct sof_ipc_hdr hdr;
	uint32_t type;		/**< SOF_IPC_REGION_ */
	uint32_t id;		/**< platform specific - used to map to host memory */
	struct sof_ipc_host_buffer buffer;
} __packed;

/* extended data DMA buffers for IPC, trace and debug */
struct sof_ipc_dma_buffer_data {
	struct sof_ipc_ext_data_hdr ext_hdr;
	uint32_t num_buffers;

	/* host files in buffer[n].buffer */
	struct sof_ipc_dma_buffer_elem buffer[];
}  __packed;

struct sof_ipc_window_elem {
	struct sof_ipc_hdr hdr;
	uint32_t type;		/**< SOF_IPC_REGION_ */
+0 −5
Original line number Diff line number Diff line
@@ -65,11 +65,6 @@ static irqreturn_t cnl_ipc_irq_thread(int irq, void *context)
		hda_dsp_ipc_get_reply(sdev);
		snd_sof_ipc_reply(sdev, msg);

		if (sdev->code_loading)	{
			sdev->code_loading = 0;
			wake_up(&sdev->waitq);
		}

		cnl_ipc_dsp_done(sdev);

		spin_unlock_irq(&sdev->ipc_lock);
+96 −0
Original line number Diff line number Diff line
@@ -422,56 +422,152 @@ static struct snd_soc_cdai_ops sof_probe_compr_ops = {
struct snd_soc_dai_driver skl_dai[] = {
{
	.name = "SSP0 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "SSP1 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "SSP2 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "SSP3 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "SSP4 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "SSP5 Pin",
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "DMIC01 Pin",
	.capture = {
		.channels_min = 1,
		.channels_max = 4,
	},
},
{
	.name = "DMIC16k Pin",
	.capture = {
		.channels_min = 1,
		.channels_max = 4,
	},
},
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
{
	.name = "iDisp1 Pin",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "iDisp2 Pin",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "iDisp3 Pin",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "iDisp4 Pin",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
	},
},
{
	.name = "Analog CPU DAI",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 16,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 16,
	},
},
{
	.name = "Digital CPU DAI",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 16,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 16,
	},
},
{
	.name = "Alt Analog CPU DAI",
	.ops = &hda_link_dai_ops,
	.playback = {
		.channels_min = 1,
		.channels_max = 16,
	},
	.capture = {
		.channels_min = 1,
		.channels_max = 16,
	},
},
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_PROBES)
{
+3 −17
Original line number Diff line number Diff line
@@ -125,12 +125,6 @@ out:

}

static bool hda_dsp_ipc_is_sof(uint32_t msg)
{
	return (msg & (HDA_DSP_IPC_PURGE_FW | 0xf << 9)) != msg ||
		(msg & HDA_DSP_IPC_PURGE_FW) != HDA_DSP_IPC_PURGE_FW;
}

/* IPC handler thread */
irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
{
@@ -176,17 +170,9 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
		 */
		spin_lock_irq(&sdev->ipc_lock);

		/* handle immediate reply from DSP core - ignore ROM messages */
		if (hda_dsp_ipc_is_sof(msg)) {
		/* handle immediate reply from DSP core */
		hda_dsp_ipc_get_reply(sdev);
		snd_sof_ipc_reply(sdev, msg);
		}

		/* wake up sleeper if we are loading code */
		if (sdev->code_loading)	{
			sdev->code_loading = 0;
			wake_up(&sdev->waitq);
		}

		/* set the done bit */
		hda_dsp_ipc_dsp_done(sdev);
+0 −3
Original line number Diff line number Diff line
@@ -179,9 +179,6 @@ static int cl_trigger(struct snd_sof_dev *sdev,
	/* code loader is special case that reuses stream ops */
	switch (cmd) {
	case SNDRV_PCM_TRIGGER_START:
		wait_event_timeout(sdev->waitq, !sdev->code_loading,
				   HDA_DSP_CL_TRIGGER_TIMEOUT);

		snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
					1 << hstream->index,
					1 << hstream->index);
Loading