File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ static int soc_rtd_hw_params(struct snd_soc_pcm_runtime *rtd,
64
64
return 0 ;
65
65
}
66
66
67
+ static void soc_rtd_hw_free (struct snd_soc_pcm_runtime * rtd ,
68
+ struct snd_pcm_substream * substream )
69
+ {
70
+ if (rtd -> dai_link -> ops &&
71
+ rtd -> dai_link -> ops -> hw_free )
72
+ rtd -> dai_link -> ops -> hw_free (substream );
73
+ }
74
+
67
75
/**
68
76
* snd_soc_runtime_activate() - Increment active count for PCM runtime components
69
77
* @rtd: ASoC PCM runtime that is activated
@@ -935,8 +943,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
935
943
codec_dai -> rate = 0 ;
936
944
}
937
945
938
- if (rtd -> dai_link -> ops -> hw_free )
939
- rtd -> dai_link -> ops -> hw_free (substream );
946
+ soc_rtd_hw_free (rtd , substream );
940
947
941
948
mutex_unlock (& rtd -> card -> pcm_mutex );
942
949
return ret ;
@@ -979,8 +986,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
979
986
}
980
987
981
988
/* free any machine hw params */
982
- if (rtd -> dai_link -> ops -> hw_free )
983
- rtd -> dai_link -> ops -> hw_free (substream );
989
+ soc_rtd_hw_free (rtd , substream );
984
990
985
991
/* free any component resources */
986
992
soc_pcm_components_hw_free (substream , NULL );
You can’t perform that action at this time.
0 commit comments