Unverified Commit 6fede18b authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: SOF: simplify nocodec mode" from Ranjani Sridharan...

Merge series "ASoC: SOF: simplify nocodec mode" from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>:

This set of patches simplify the implementation
of nocodec mode in SOF.

Pierre-Louis Bossart (6):
  ASoC: SOF: add Kconfig option for probe workqueues
  ASoC: soc-acpi: add new fields for mach_params
  ASoC: SOF: change signature of set_mach_params() callback
  ASoC: SOF: Intel: update set_mach_params()
  ASoC: SOF: pcm: export snd_pcm_dai_link_fixup
  ASOC: SOF: simplify nocodec mode

 include/sound/soc-acpi.h  |  4 ++++
 include/sound/sof.h       |  3 ---
 sound/soc/sof/Kconfig     | 11 +++++++++++
 sound/soc/sof/intel/bdw.c |  8 ++++++--
 sound/soc/sof/intel/byt.c | 22 +++++++++++++---------
 sound/soc/sof/intel/hda.c |  8 ++++++--
 sound/soc/sof/intel/hda.h |  2 +-
 sound/soc/sof/nocodec.c   | 39 +++++++++++++++++++++------------------
 sound/soc/sof/ops.h       |  6 ++----
 sound/soc/sof/pcm.c       |  1 +
 sound/soc/sof/sof-audio.c | 34 +++++++++++++++-------------------
 sound/soc/sof/sof-priv.h  |  2 +-
 12 files changed, 81 insertions(+), 59 deletions(-)

--
2.25.1
parents 7459f8b7 4c1cc83f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
 * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver
 * @link_mask: links enabled on the board
 * @links: array of link _ADR descriptors, null terminated
 * @num_dai_drivers: number of elements in @dai_drivers
 * @dai_drivers: pointer to dai_drivers, used e.g. in nocodec mode
 */
struct snd_soc_acpi_mach_params {
	u32 acpi_ipc_irq_index;
@@ -72,6 +74,8 @@ struct snd_soc_acpi_mach_params {
	bool common_hdmi_codec_drv;
	u32 link_mask;
	const struct snd_soc_acpi_link_adr *links;
	u32 num_dai_drivers;
	struct snd_soc_dai_driver *dai_drivers;
};

/**
+0 −3
Original line number Diff line number Diff line
@@ -100,9 +100,6 @@ struct sof_dev_desc {
	const struct snd_sof_dsp_ops *ops;
};

int sof_nocodec_setup(struct device *dev, const struct snd_sof_dsp_ops *ops,
		      int (*pcm_dai_link_fixup)(struct snd_soc_pcm_runtime *rtd,
						struct snd_pcm_hw_params *params));
int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd);

#endif
+11 −0
Original line number Diff line number Diff line
@@ -68,6 +68,17 @@ config SND_SOC_SOF_DEVELOPER_SUPPORT

if SND_SOC_SOF_DEVELOPER_SUPPORT

config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE
	bool "SOF force probe workqueue"
	select SND_SOC_SOF_PROBE_WORK_QUEUE
	help
	  This option forces the use of a probe workqueue, which is only used
	  when HDaudio is enabled due to module dependencies. Forcing this
	  option is intended for debug only, but this should not add any
	  functional issues in nominal cases.
	  Say Y if you are involved in SOF development and need this option.
	  If not, select N.

config SND_SOC_SOF_NOCODEC
	tristate

+6 −2
Original line number Diff line number Diff line
@@ -559,12 +559,16 @@ static void bdw_machine_select(struct snd_sof_dev *sdev)
}

static void bdw_set_mach_params(const struct snd_soc_acpi_mach *mach,
				struct device *dev)
				struct snd_sof_dev *sdev)
{
	struct snd_sof_pdata *pdata = sdev->pdata;
	const struct sof_dev_desc *desc = pdata->desc;
	struct snd_soc_acpi_mach_params *mach_params;

	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(dev);
	mach_params->platform = dev_name(sdev->dev);
	mach_params->num_dai_drivers = desc->ops->num_drv;
	mach_params->dai_drivers = desc->ops->drv;
}

/* Broadwell DAIs */
+13 −9
Original line number Diff line number Diff line
@@ -427,15 +427,6 @@ static void byt_machine_select(struct snd_sof_dev *sdev)
	sof_pdata->machine = mach;
}

static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
				struct device *dev)
{
	struct snd_soc_acpi_mach_params *mach_params;

	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(dev);
}

/* Baytrail DAIs */
static struct snd_soc_dai_driver byt_dai[] = {
{
@@ -506,6 +497,19 @@ static struct snd_soc_dai_driver byt_dai[] = {
},
};

static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
				struct snd_sof_dev *sdev)
{
	struct snd_sof_pdata *pdata = sdev->pdata;
	const struct sof_dev_desc *desc = pdata->desc;
	struct snd_soc_acpi_mach_params *mach_params;

	mach_params = (struct snd_soc_acpi_mach_params *)&mach->mach_params;
	mach_params->platform = dev_name(sdev->dev);
	mach_params->num_dai_drivers = desc->ops->num_drv;
	mach_params->dai_drivers = desc->ops->drv;
}

/*
 * Probe and remove.
 */
Loading