intel_sst: fix comment typo
PATCH 1/4 intel_sst: fix comment typo
--- drivers/staging/intel_sst/intel_sst_dsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/intel_sst/intel_sst_dsp.c +1 -1
@@ -104,7 +104,7 @@ static int sst_start_mrst(void)/** * sst_start_medfield - Start the SST DSP processor * -* This starts the DSP in MRST platfroms +* This starts the DSP in Medfield platfroms */ static int sst_start_medfield (void ) {
PATCH 2/4 ASoC: sst_platform: trivial coding style fix
--- sound/soc/mid-x86/sst_platform.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/mid-x86/sst_platform.c +1 -1
@@ -469,7 +469,7 @@ static struct platform_driver sst_platform_driver = {static int __init sst_soc_platform_init (void ) {pr_debug ("sst_soc_platform_init called\n" ); -return platform_driver_register (&sst_platform_driver); +return platform_driver_register (&sst_platform_driver); }module_init (sst_soc_platform_init);
PATCH 3/4 ASoC: sst_platform: using builtin function
In reply to Lu GuanqunUse the builtin snd_soc_set_runtime_hwparams() instead of assigning it by myself.
--- sound/soc/mid-x86/sst_platform.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
sound/soc/mid-x86/sst_platform.c +4 -3
@@ -226,13 +226,14 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream)static int sst_platform_open (struct snd_pcm_substream *substream) { -struct snd_pcm_runtime *runtime; +struct snd_pcm_runtime *runtime = substream->runtime;struct sst_runtime_stream *stream;int ret_val =0 ;pr_debug ("sst_platform_open called\n" ); - runtime = substream->runtime; - runtime->hw = sst_platform_pcm_hw; + +snd_soc_set_runtime_hwparams (substream, &sst_platform_pcm_hw); + stream =kzalloc (sizeof (*stream),GFP_KERNEL );if (!stream)return -ENOMEM ;
PATCH 4/4 ASoC: sst_platform: fix memory leak
In reply to Lu Guanqunsnd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is not opened successfully. However the corresponding close callback isn't able to be called later on to release these two allocated memories, thus resulting in memory leak.
This patch moves the check for hardware contraints earlier, thus resolving this issue.
--- sound/soc/mid-x86/sst_platform.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
sound/soc/mid-x86/sst_platform.c +6 -2
@@ -233,6 +233,10 @@ static int sst_platform_open(struct snd_pcm_substream *substream)pr_debug ("sst_platform_open called\n" );snd_soc_set_runtime_hwparams (substream, &sst_platform_pcm_hw); + ret_val =snd_pcm_hw_constraint_integer (runtime, +SNDRV_PCM_HW_PARAM_PERIODS ); +if (ret_val <0 ) +return ret_val; stream =kzalloc (sizeof (*stream),GFP_KERNEL );if (!stream)
@@ -260,8 +264,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream)return ret_val; } runtime->private_data = stream; -return snd_pcm_hw_constraint_integer (runtime, -SNDRV_PCM_HW_PARAM_PERIODS ); + +return 0 ; }static int sst_platform_close (struct snd_pcm_substream *substream)
Quoted 13 lines
Signed-off-by Lu Guanqun <[email protected]>Cc Vinod Koul <[email protected]>--- drivers/staging/intel_sst/intel_sst_dsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/staging/intel_sst/intel_sst_dsp.c +0
-0
drivers/staging/intel_sst/intel_sst_dsp.c static int sst_start_mrst(void) · line 110
Quoted 8 lines
drivers/staging/intel_sst/intel_sst_dsp.c +1
-1@@ -104,7 +104,7 @@ static int sst_start_mrst(void)/** * sst_start_medfield - Start the SST DSP processor * -* This starts the DSP in MRST platfroms +* This starts the DSP in Medfield platfroms */ static int sst_start_medfield (void ) {
All Acked-by: Vinod Koul <[email protected]>
You should be CCing Liam as well on asoc patches
--
~Vinod
Quoted 7 lines · Vinod
Quoted 7 lines
Signed-off-by Lu Guanqun <[email protected]>Cc Vinod Koul <[email protected]>--- drivers/staging/intel_sst/intel_sst_dsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines
Quoted 6 lines
drivers/staging/intel_sst/intel_sst_dsp.c +0
-0drivers/staging/intel_sst/intel_sst_dsp.c static int sst_start_mrst(void) · line 110
Quoted 8 lines
drivers/staging/intel_sst/intel_sst_dsp.c +1
-1@@ -104,7 +104,7 @@ static int sst_start_mrst(void)/** * sst_start_medfield - Start the SST DSP processor * -* This starts the DSP in MRST platfroms +* This starts the DSP in Medfield platfroms */ static int sst_start_medfield (void ) {All Acked-by: Vinod Koul <[email protected]>
Thanks.
Quoted 2 lines
You should be CCing Liam as well on asoc patches
I forgot to add Liam, will remember to add for later patches.
Quoted 4 lines
--
~Vinod
Signature · 1 line
guanqun
Quoted 32 lines · Lu Guanqun
Quoted 7 lines · Vinod
Quoted 7 lines
Signed-off-by Lu Guanqun <[email protected]>Cc Vinod Koul <[email protected]>--- drivers/staging/intel_sst/intel_sst_dsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Quoted 15 lines
Quoted 6 lines
drivers/staging/intel_sst/intel_sst_dsp.c +0
-0drivers/staging/intel_sst/intel_sst_dsp.c static int sst_start_mrst(void) · line 110
Quoted 8 lines
drivers/staging/intel_sst/intel_sst_dsp.c +1
-1@@ -104,7 +104,7 @@ static int sst_start_mrst(void)/** * sst_start_medfield - Start the SST DSP processor * -* This starts the DSP in MRST platfroms +* This starts the DSP in Medfield platfroms */ static int sst_start_medfield (void ) {All Acked-by: Vinod Koul <[email protected]>
Thanks.
Quoted 2 lines
You should be CCing Liam as well on asoc patches
I forgot to add Liam, will remember to add for later patches.
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
--
~Vinod--
guanqun
Fine by me.
Acked-by Liam Girdwood <[email protected]>
Quoted 5 lines · Lu Guanqun
Signed-off-by Lu Guanqun <[email protected]>Cc Vinod Koul <[email protected]>--- drivers/staging/intel_sst/intel_sst_dsp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
This is a staging driver - patches should go via Greg (who I've added here) to avoid collisions with other staging work. This has:
I've applied the other three patches, thanks.
Quoted 15 lines
drivers/staging/intel_sst/intel_sst_dsp.c +1
-1@@ -104,7 +104,7 @@ static int sst_start_mrst(void)/** * sst_start_medfield - Start the SST DSP processor * -* This starts the DSP in MRST platfroms +* This starts the DSP in Medfield platfroms */ static int sst_start_medfield (void ) {