* [PATCH 1/4] intel_sst: fix comment typo
@ 2011-09-06 7:21 Lu Guanqun
2011-09-06 7:21 ` [PATCH 2/4] ASoC: sst_platform: trivial coding style fix Lu Guanqun
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Lu Guanqun @ 2011-09-06 7:21 UTC (permalink / raw)
To: ALSA; +Cc: Koul Vinod, Mark Brown
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
drivers/staging/intel_sst/intel_sst_dsp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c b/drivers/staging/intel_sst/intel_sst_dsp.c
index a89e1ad..426d2b9 100644
--- a/drivers/staging/intel_sst/intel_sst_dsp.c
+++ b/drivers/staging/intel_sst/intel_sst_dsp.c
@@ -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)
{
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] ASoC: sst_platform: trivial coding style fix
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
@ 2011-09-06 7:21 ` Lu Guanqun
2011-09-06 7:21 ` [PATCH 3/4] ASoC: sst_platform: using builtin function Lu Guanqun
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Lu Guanqun @ 2011-09-06 7:21 UTC (permalink / raw)
To: ALSA; +Cc: Koul Vinod, Mark Brown
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/mid-x86/sst_platform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index 3e78260..d99f253 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -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);
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] ASoC: sst_platform: using builtin function
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
2011-09-06 7:21 ` [PATCH 2/4] ASoC: sst_platform: trivial coding style fix Lu Guanqun
@ 2011-09-06 7:21 ` Lu Guanqun
2011-09-06 7:21 ` [PATCH 4/4] ASoC: sst_platform: fix memory leak Lu Guanqun
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Lu Guanqun @ 2011-09-06 7:21 UTC (permalink / raw)
To: ALSA; +Cc: Koul Vinod, Mark Brown
Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by
myself.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/mid-x86/sst_platform.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index d99f253..af666ae 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -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;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] ASoC: sst_platform: fix memory leak
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
2011-09-06 7:21 ` [PATCH 2/4] ASoC: sst_platform: trivial coding style fix Lu Guanqun
2011-09-06 7:21 ` [PATCH 3/4] ASoC: sst_platform: using builtin function Lu Guanqun
@ 2011-09-06 7:21 ` Lu Guanqun
2011-09-07 0:39 ` [PATCH 1/4] intel_sst: fix comment typo Koul, Vinod
2011-09-08 22:43 ` Mark Brown
4 siblings, 0 replies; 8+ messages in thread
From: Lu Guanqun @ 2011-09-06 7:21 UTC (permalink / raw)
To: ALSA; +Cc: Koul Vinod, Mark Brown
snd_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.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/mid-x86/sst_platform.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index af666ae..9925d20 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -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)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] intel_sst: fix comment typo
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
` (2 preceding siblings ...)
2011-09-06 7:21 ` [PATCH 4/4] ASoC: sst_platform: fix memory leak Lu Guanqun
@ 2011-09-07 0:39 ` Koul, Vinod
2011-09-07 0:52 ` Lu Guanqun
2011-09-08 22:43 ` Mark Brown
4 siblings, 1 reply; 8+ messages in thread
From: Koul, Vinod @ 2011-09-07 0:39 UTC (permalink / raw)
To: Lu, Guanqun, ALSA; +Cc: Mark Brown, lrg@ti.com
>
> Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> ---
> drivers/staging/intel_sst/intel_sst_dsp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c
> b/drivers/staging/intel_sst/intel_sst_dsp.c
> index a89e1ad..426d2b9 100644
> --- a/drivers/staging/intel_sst/intel_sst_dsp.c
> +++ b/drivers/staging/intel_sst/intel_sst_dsp.c
> @@ -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 <Vinod.koul@linux.intel.com>
You should be CCing Liam as well on asoc patches
--
~Vinod
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] intel_sst: fix comment typo
2011-09-07 0:39 ` [PATCH 1/4] intel_sst: fix comment typo Koul, Vinod
@ 2011-09-07 0:52 ` Lu Guanqun
2011-09-08 21:17 ` Girdwood, Liam
0 siblings, 1 reply; 8+ messages in thread
From: Lu Guanqun @ 2011-09-07 0:52 UTC (permalink / raw)
To: Koul, Vinod; +Cc: ALSA, Mark Brown, lrg@ti.com
On Wed, Sep 07, 2011 at 08:39:06AM +0800, Koul, Vinod wrote:
> >
> > Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
> > Cc: Vinod Koul <vinod.koul@intel.com>
> > ---
> > drivers/staging/intel_sst/intel_sst_dsp.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c
> > b/drivers/staging/intel_sst/intel_sst_dsp.c
> > index a89e1ad..426d2b9 100644
> > --- a/drivers/staging/intel_sst/intel_sst_dsp.c
> > +++ b/drivers/staging/intel_sst/intel_sst_dsp.c
> > @@ -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 <Vinod.koul@linux.intel.com>
Thanks.
>
> You should be CCing Liam as well on asoc patches
I forgot to add Liam, will remember to add for later patches.
>
> --
> ~Vinod
>
--
guanqun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] intel_sst: fix comment typo
2011-09-07 0:52 ` Lu Guanqun
@ 2011-09-08 21:17 ` Girdwood, Liam
0 siblings, 0 replies; 8+ messages in thread
From: Girdwood, Liam @ 2011-09-08 21:17 UTC (permalink / raw)
To: Lu Guanqun; +Cc: Koul, Vinod, ALSA, Mark Brown
On 7 September 2011 01:52, Lu Guanqun <guanqun.lu@intel.com> wrote:
> On Wed, Sep 07, 2011 at 08:39:06AM +0800, Koul, Vinod wrote:
> > >
> > > Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
> > > Cc: Vinod Koul <vinod.koul@intel.com>
> > > ---
> > > drivers/staging/intel_sst/intel_sst_dsp.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c
> > > b/drivers/staging/intel_sst/intel_sst_dsp.c
> > > index a89e1ad..426d2b9 100644
> > > --- a/drivers/staging/intel_sst/intel_sst_dsp.c
> > > +++ b/drivers/staging/intel_sst/intel_sst_dsp.c
> > > @@ -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 <Vinod.koul@linux.intel.com>
>
> Thanks.
>
> >
> > You should be CCing Liam as well on asoc patches
>
> I forgot to add Liam, will remember to add for later patches.
>
> >
> > --
> > ~Vinod
> >
>
> --
> guanqun
>
Fine by me.
Acked-by Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] intel_sst: fix comment typo
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
` (3 preceding siblings ...)
2011-09-07 0:39 ` [PATCH 1/4] intel_sst: fix comment typo Koul, Vinod
@ 2011-09-08 22:43 ` Mark Brown
4 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2011-09-08 22:43 UTC (permalink / raw)
To: Lu Guanqun, gregkh; +Cc: Koul Vinod, ALSA
On Tue, Sep 06, 2011 at 03:21:29PM +0800, Lu Guanqun wrote:
> Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> ---
> 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:
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
I've applied the other three patches, thanks.
>
> diff --git a/drivers/staging/intel_sst/intel_sst_dsp.c b/drivers/staging/intel_sst/intel_sst_dsp.c
> index a89e1ad..426d2b9 100644
> --- a/drivers/staging/intel_sst/intel_sst_dsp.c
> +++ b/drivers/staging/intel_sst/intel_sst_dsp.c
> @@ -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)
> {
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-08 22:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
2011-09-06 7:21 ` [PATCH 2/4] ASoC: sst_platform: trivial coding style fix Lu Guanqun
2011-09-06 7:21 ` [PATCH 3/4] ASoC: sst_platform: using builtin function Lu Guanqun
2011-09-06 7:21 ` [PATCH 4/4] ASoC: sst_platform: fix memory leak Lu Guanqun
2011-09-07 0:39 ` [PATCH 1/4] intel_sst: fix comment typo Koul, Vinod
2011-09-07 0:52 ` Lu Guanqun
2011-09-08 21:17 ` Girdwood, Liam
2011-09-08 22:43 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.