File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3333struct sdm845_snd_data {
3434 struct snd_soc_jack jack ;
3535 bool jack_setup ;
36+ bool slim_port_setup ;
3637 bool stream_prepared [AFE_PORT_MAX ];
3738 struct snd_soc_card * card ;
3839 uint32_t pri_mi2s_clk_count ;
@@ -224,6 +225,7 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd)
224225 struct snd_soc_dai * codec_dai = asoc_rtd_to_codec (rtd , 0 );
225226 struct snd_soc_dai * cpu_dai = asoc_rtd_to_cpu (rtd , 0 );
226227 struct sdm845_snd_data * pdata = snd_soc_card_get_drvdata (card );
228+ struct snd_soc_dai_link * link = rtd -> dai_link ;
227229 struct snd_jack * jack ;
228230 /*
229231 * Codec SLIMBUS configuration
@@ -276,6 +278,10 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd)
276278 }
277279 break ;
278280 case SLIMBUS_0_RX ...SLIMBUS_6_TX :
281+ /* setting up wcd multiple times for slim port is redundant */
282+ if (pdata -> slim_port_setup || !link -> no_pcm )
283+ return 0 ;
284+
279285 for_each_rtd_codec_dais (rtd , i , codec_dai ) {
280286 rval = snd_soc_dai_set_channel_map (codec_dai ,
281287 ARRAY_SIZE (tx_ch ),
@@ -295,8 +301,10 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd)
295301 dev_warn (card -> dev , "Failed to set jack: %d\n" , rval );
296302 return rval ;
297303 }
298-
299304 }
305+
306+ pdata -> slim_port_setup = true;
307+
300308 break ;
301309 default :
302310 break ;
You can’t perform that action at this time.
0 commit comments