Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4080577 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

parents f179f3f8 f0c8e1d9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -104,12 +104,11 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_init_all);
 */
void snd_hdac_stream_free_all(struct hdac_ext_bus *ebus)
{
	struct hdac_stream *s;
	struct hdac_stream *s, *_s;
	struct hdac_ext_stream *stream;
	struct hdac_bus *bus = ebus_to_hbus(ebus);

	while (!list_empty(&bus->stream_list)) {
		s = list_first_entry(&bus->stream_list, struct hdac_stream, list);
	list_for_each_entry_safe(s, _s, &bus->stream_list, list) {
		stream = stream_to_hdac_ext_stream(s);
		snd_hdac_ext_stream_decouple(ebus, stream, false);
		list_del(&s->list);
+0 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@ config SND_SOC_INTEL_SKYLAKE
	tristate
	select SND_HDA_EXT_CORE
	select SND_SOC_TOPOLOGY
	select SND_HDA_I915
	select SND_SOC_INTEL_SST

config SND_SOC_INTEL_SKL_RT286_MACH
+1 −1
Original line number Diff line number Diff line
@@ -1345,7 +1345,7 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
		return 0;

	/* wait for pause to complete before we reset the stream */
	while (stream->running && tries--)
	while (stream->running && --tries)
		msleep(1);
	if (!tries) {
		dev_err(hsw->dev, "error: reset stream %d still running\n",
+5 −0
Original line number Diff line number Diff line
@@ -336,6 +336,11 @@ void skl_dsp_free(struct sst_dsp *dsp)
	skl_ipc_int_disable(dsp);

	free_irq(dsp->irq, dsp);
	dsp->cl_dev.ops.cl_cleanup_controller(dsp);
	skl_cldma_int_disable(dsp);
	skl_ipc_op_int_disable(dsp);
	skl_ipc_int_disable(dsp);

	skl_dsp_disable_core(dsp);
}
EXPORT_SYMBOL_GPL(skl_dsp_free);
+28 −14
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx,
{
	int multiplier = 1;
	struct skl_module_fmt *in_fmt, *out_fmt;
	int in_rate, out_rate;


	/* Since fixups is applied to pin 0 only, ibs, obs needs
@@ -249,13 +250,22 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx,

	if (mcfg->m_type == SKL_MODULE_TYPE_SRCINT)
		multiplier = 5;
	mcfg->ibs = (in_fmt->s_freq / 1000) *
				(mcfg->in_fmt->channels) *

	if (in_fmt->s_freq % 1000)
		in_rate = (in_fmt->s_freq / 1000) + 1;
	else
		in_rate = (in_fmt->s_freq / 1000);

	mcfg->ibs = in_rate * (mcfg->in_fmt->channels) *
			(mcfg->in_fmt->bit_depth >> 3) *
			multiplier;

	mcfg->obs = (mcfg->out_fmt->s_freq / 1000) *
				(mcfg->out_fmt->channels) *
	if (mcfg->out_fmt->s_freq % 1000)
		out_rate = (mcfg->out_fmt->s_freq / 1000) + 1;
	else
		out_rate = (mcfg->out_fmt->s_freq / 1000);

	mcfg->obs = out_rate * (mcfg->out_fmt->channels) *
			(mcfg->out_fmt->bit_depth >> 3) *
			multiplier;
}
@@ -485,11 +495,15 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
		if (!skl_is_pipe_mcps_avail(skl, mconfig))
			return -ENOMEM;

		skl_tplg_alloc_pipe_mcps(skl, mconfig);

		if (mconfig->is_loadable && ctx->dsp->fw_ops.load_mod) {
			ret = ctx->dsp->fw_ops.load_mod(ctx->dsp,
				mconfig->id.module_id, mconfig->guid);
			if (ret < 0)
				return ret;

			mconfig->m_state = SKL_MODULE_LOADED;
		}

		/* update blob if blob is null for be with default value */
@@ -509,7 +523,6 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
		ret = skl_tplg_set_module_params(w, ctx);
		if (ret < 0)
			return ret;
		skl_tplg_alloc_pipe_mcps(skl, mconfig);
	}

	return 0;
@@ -524,7 +537,8 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
	list_for_each_entry(w_module, &pipe->w_list, node) {
		mconfig  = w_module->w->priv;

		if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod)
		if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod &&
			mconfig->m_state > SKL_MODULE_UNINIT)
			return ctx->dsp->fw_ops.unload_mod(ctx->dsp,
						mconfig->id.module_id);
	}
@@ -558,6 +572,9 @@ static int skl_tplg_mixer_dapm_pre_pmu_event(struct snd_soc_dapm_widget *w,
	if (!skl_is_pipe_mem_avail(skl, mconfig))
		return -ENOMEM;

	skl_tplg_alloc_pipe_mem(skl, mconfig);
	skl_tplg_alloc_pipe_mcps(skl, mconfig);

	/*
	 * Create a list of modules for pipe.
	 * This list contains modules from source to sink
@@ -601,9 +618,6 @@ static int skl_tplg_mixer_dapm_pre_pmu_event(struct snd_soc_dapm_widget *w,
		src_module = dst_module;
	}

	skl_tplg_alloc_pipe_mem(skl, mconfig);
	skl_tplg_alloc_pipe_mcps(skl, mconfig);

	return 0;
}

Loading