File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1515#include <uapi/linux/input-event-codes.h>
1616#include "common.h"
1717#include "qdsp6/q6afe.h"
18+ #include "sdw.h"
1819#include "../codecs/rt5663.h"
1920
2021#define DRIVER_NAME "sdm845"
@@ -416,7 +417,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
416417 pr_err ("%s: invalid dai id 0x%x\n" , __func__ , cpu_dai -> id );
417418 break ;
418419 }
419- return 0 ;
420+ return qcom_snd_sdw_startup ( substream ) ;
420421}
421422
422423static void sdm845_snd_shutdown (struct snd_pcm_substream * substream )
@@ -425,6 +426,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
425426 struct snd_soc_card * card = rtd -> card ;
426427 struct sdm845_snd_data * data = snd_soc_card_get_drvdata (card );
427428 struct snd_soc_dai * cpu_dai = snd_soc_rtd_to_cpu (rtd , 0 );
429+ struct sdw_stream_runtime * sruntime = data -> sruntime [cpu_dai -> id ];
428430
429431 switch (cpu_dai -> id ) {
430432 case PRIMARY_MI2S_RX :
@@ -463,6 +465,9 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
463465 pr_err ("%s: invalid dai id 0x%x\n" , __func__ , cpu_dai -> id );
464466 break ;
465467 }
468+
469+ data -> sruntime [cpu_dai -> id ] = NULL ;
470+ sdw_release_stream (sruntime );
466471}
467472
468473static int sdm845_snd_prepare (struct snd_pcm_substream * substream )
You can’t perform that action at this time.
0 commit comments