Skip to content

Commit 0127104

Browse files
plbossartvinodkoul
authored andcommitted
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>
1 parent 8bff8c4 commit 0127104

1 file changed

Lines changed: 1 addition & 36 deletions

File tree

drivers/soundwire/intel.c

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -663,25 +663,6 @@ static int intel_params_stream(struct sdw_intel *sdw,
663663
return -EIO;
664664
}
665665

666-
static int intel_free_stream(struct sdw_intel *sdw,
667-
int stream,
668-
struct snd_soc_dai *dai,
669-
int link_id)
670-
{
671-
struct sdw_intel_link_res *res = sdw->link_res;
672-
struct sdw_intel_stream_free_data free_data;
673-
674-
free_data.stream = stream; /* direction */
675-
free_data.dai = dai;
676-
free_data.link_id = link_id;
677-
678-
if (res->ops && res->ops->free_stream && res->dev)
679-
return res->ops->free_stream(res->dev,
680-
&free_data);
681-
682-
return 0;
683-
}
684-
685666
/*
686667
* DAI routines
687668
*/
@@ -817,7 +798,6 @@ static int
817798
intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
818799
{
819800
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
820-
struct sdw_intel *sdw = cdns_to_intel(cdns);
821801
struct sdw_cdns_dai_runtime *dai_runtime;
822802
int ret;
823803

@@ -838,12 +818,6 @@ intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
838818
return ret;
839819
}
840820

841-
ret = intel_free_stream(sdw, substream->stream, dai, sdw->instance);
842-
if (ret < 0) {
843-
dev_err(dai->dev, "intel_free_stream: failed %d\n", ret);
844-
return ret;
845-
}
846-
847821
dai_runtime->pdi = NULL;
848822

849823
return 0;
@@ -871,7 +845,6 @@ static void *intel_get_sdw_stream(struct snd_soc_dai *dai,
871845
static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
872846
{
873847
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
874-
struct sdw_intel *sdw = cdns_to_intel(cdns);
875848
struct sdw_cdns_dai_runtime *dai_runtime;
876849
int ret = 0;
877850

@@ -894,7 +867,6 @@ static int intel_trigger(struct snd_pcm_substream *substream, int cmd, struct sn
894867

895868
dai_runtime->suspended = true;
896869

897-
ret = intel_free_stream(sdw, substream->stream, dai, sdw->instance);
898870
break;
899871

900872
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
@@ -940,9 +912,7 @@ static int intel_component_dais_suspend(struct snd_soc_component *component)
940912
*/
941913
for_each_component_dais(component, dai) {
942914
struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
943-
struct sdw_intel *sdw = cdns_to_intel(cdns);
944915
struct sdw_cdns_dai_runtime *dai_runtime;
945-
int ret;
946916

947917
dai_runtime = cdns->dai_runtime_array[dai->id];
948918

@@ -952,13 +922,8 @@ static int intel_component_dais_suspend(struct snd_soc_component *component)
952922
if (dai_runtime->suspended)
953923
continue;
954924

955-
if (dai_runtime->paused) {
925+
if (dai_runtime->paused)
956926
dai_runtime->suspended = true;
957-
958-
ret = intel_free_stream(sdw, dai_runtime->direction, dai, sdw->instance);
959-
if (ret < 0)
960-
return ret;
961-
}
962927
}
963928

964929
return 0;

0 commit comments

Comments
 (0)