File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 28
28
29
29
#define DPCM_MAX_BE_USERS 8
30
30
31
+ static int soc_rtd_startup (struct snd_soc_pcm_runtime * rtd ,
32
+ struct snd_pcm_substream * substream )
33
+ {
34
+ if (rtd -> dai_link -> ops &&
35
+ rtd -> dai_link -> ops -> startup )
36
+ return rtd -> dai_link -> ops -> startup (substream );
37
+ return 0 ;
38
+ }
39
+
31
40
/**
32
41
* snd_soc_runtime_activate() - Increment active count for PCM runtime components
33
42
* @rtd: ASoC PCM runtime that is activated
@@ -522,13 +531,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
522
531
codec_dai -> rx_mask = 0 ;
523
532
}
524
533
525
- if (rtd -> dai_link -> ops -> startup ) {
526
- ret = rtd -> dai_link -> ops -> startup (substream );
527
- if (ret < 0 ) {
528
- pr_err ("ASoC: %s startup failed: %d\n" ,
529
- rtd -> dai_link -> name , ret );
530
- goto machine_err ;
531
- }
534
+ ret = soc_rtd_startup (rtd , substream );
535
+ if (ret < 0 ) {
536
+ pr_err ("ASoC: %s startup failed: %d\n" ,
537
+ rtd -> dai_link -> name , ret );
538
+ goto machine_err ;
532
539
}
533
540
534
541
/* Dynamic PCM DAI links compat checks use dynamic capabilities */
You can’t perform that action at this time.
0 commit comments