示例#1
0
static void sst_media_close(struct snd_pcm_substream *substream,
		struct snd_soc_dai *dai)
{
	struct sst_runtime_stream *stream;
	int ret_val = 0, str_id;

	stream = substream->runtime->private_data;
	power_down_sst(stream);

	str_id = stream->stream_info.str_id;
	if (str_id)
		ret_val = stream->ops->close(sst->dev, str_id);
	module_put(sst->dev->driver->owner);
	kfree(stream);
}
static void sst_media_close(struct snd_pcm_substream *substream,
		struct snd_soc_dai *dai)
{
	struct sst_runtime_stream *stream;
	int ret_val = 0, str_id;
	struct sst_data *ctx = snd_soc_platform_get_drvdata(dai->platform);

	stream = substream->runtime->private_data;
	if (strstr(dai->name, "Power-cpu-dai"))
		ret_val = power_down_sst(stream);

	str_id = stream->stream_info.str_id;
	if (str_id)
		ret_val = stream->ops->close(str_id);
	sst_free_stream_in_use(ctx->pdata->pdev_strm_map, str_id);
	module_put(sst_dsp->dev->driver->owner);
	kfree(stream);
	pr_debug("%s: %d\n", __func__, ret_val);
}