mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-11-05 08:07:50 +10:00
soundwire: intel: remove .free callback implementation
The interface is not needed for IPC3 solution but will be needed with an updated parameter list for ACE2.x+IPC4 combinations. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230515071042.2038-26-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
8bff8c49c8
commit
0127104507
@ -663,25 +663,6 @@ static int intel_params_stream(struct sdw_intel *sdw,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int intel_free_stream(struct sdw_intel *sdw,
|
|
||||||
int stream,
|
|
||||||
struct snd_soc_dai *dai,
|
|
||||||
int link_id)
|
|
||||||
{
|
|
||||||
struct sdw_intel_link_res *res = sdw->link_res;
|
|
||||||
struct sdw_intel_stream_free_data free_data;
|
|
||||||
|
|
||||||
free_data.stream = stream; /* direction */
|
|
||||||
free_data.dai = dai;
|
|
||||||
free_data.link_id = link_id;
|
|
||||||
|
|
||||||
if (res->ops && res->ops->free_stream && res->dev)
|
|
||||||
return res->ops->free_stream(res->dev,
|
|
||||||
&free_data);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DAI routines
|
* DAI routines
|
||||||
*/
|
*/
|
||||||
@ -817,7 +798,6 @@ static int
|
|||||||
intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
|
intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
|
||||||
struct sdw_cdns_dai_runtime *dai_runtime;
|
struct sdw_cdns_dai_runtime *dai_runtime;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -838,12 +818,6 @@ intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = intel_free_stream(sdw, substream->stream, dai, sdw->instance);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(dai->dev, "intel_free_stream: failed %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
dai_runtime->pdi = NULL;
|
dai_runtime->pdi = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -871,7 +845,6 @@ static void *intel_get_sdw_stream(struct snd_soc_dai *dai,
|
|||||||
static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
|
static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
|
||||||
struct sdw_cdns_dai_runtime *dai_runtime;
|
struct sdw_cdns_dai_runtime *dai_runtime;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -894,7 +867,6 @@ static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct sn
|
|||||||
|
|
||||||
dai_runtime->suspended = true;
|
dai_runtime->suspended = true;
|
||||||
|
|
||||||
ret = intel_free_stream(sdw, substream->stream, dai, sdw->instance);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
@ -940,9 +912,7 @@ static int intel_component_dais_suspend(struct snd_soc_component *component)
|
|||||||
*/
|
*/
|
||||||
for_each_component_dais(component, dai) {
|
for_each_component_dais(component, dai) {
|
||||||
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
|
||||||
struct sdw_intel *sdw = cdns_to_intel(cdns);
|
|
||||||
struct sdw_cdns_dai_runtime *dai_runtime;
|
struct sdw_cdns_dai_runtime *dai_runtime;
|
||||||
int ret;
|
|
||||||
|
|
||||||
dai_runtime = cdns->dai_runtime_array[dai->id];
|
dai_runtime = cdns->dai_runtime_array[dai->id];
|
||||||
|
|
||||||
@ -952,13 +922,8 @@ static int intel_component_dais_suspend(struct snd_soc_component *component)
|
|||||||
if (dai_runtime->suspended)
|
if (dai_runtime->suspended)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (dai_runtime->paused) {
|
if (dai_runtime->paused)
|
||||||
dai_runtime->suspended = true;
|
dai_runtime->suspended = true;
|
||||||
|
|
||||||
ret = intel_free_stream(sdw, dai_runtime->direction, dai, sdw->instance);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user