File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,16 @@ static int soc_rtd_prepare(struct snd_soc_pcm_runtime *rtd,
54
54
return 0 ;
55
55
}
56
56
57
+ static int soc_rtd_hw_params (struct snd_soc_pcm_runtime * rtd ,
58
+ struct snd_pcm_substream * substream ,
59
+ struct snd_pcm_hw_params * params )
60
+ {
61
+ if (rtd -> dai_link -> ops &&
62
+ rtd -> dai_link -> ops -> hw_params )
63
+ return rtd -> dai_link -> ops -> hw_params (substream , params );
64
+ return 0 ;
65
+ }
66
+
57
67
/**
58
68
* snd_soc_runtime_activate() - Increment active count for PCM runtime components
59
69
* @rtd: ASoC PCM runtime that is activated
@@ -826,13 +836,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
826
836
if (ret )
827
837
goto out ;
828
838
829
- if (rtd -> dai_link -> ops -> hw_params ) {
830
- ret = rtd -> dai_link -> ops -> hw_params (substream , params );
831
- if (ret < 0 ) {
832
- dev_err (rtd -> card -> dev , "ASoC: machine hw_params"
833
- " failed: %d\n" , ret );
834
- goto out ;
835
- }
839
+ ret = soc_rtd_hw_params (rtd , substream , params );
840
+ if (ret < 0 ) {
841
+ dev_err (rtd -> card -> dev ,
842
+ "ASoC: machine hw_params failed: %d\n" , ret );
843
+ goto out ;
836
844
}
837
845
838
846
for_each_rtd_codec_dai (rtd , i , codec_dai ) {
You can’t perform that action at this time.
0 commit comments