[alsa-devel] [PATCHv2 1/1] Fix a Oops bug in omap soc driver.
There will be a Oops or frequent underrun messages when playing music with omap soc driver, this is because a data region is incorretly sized, other data region will be overwriten when writing to this data region.
Signed-off-by: Stanley.Miao stanley.miao@windriver.com --- sound/soc/omap/omap-pcm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index ce580a9..2adfbce 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) if (ret < 0) goto out;
- prtd = kzalloc(sizeof(prtd), GFP_KERNEL); + prtd = kzalloc(sizeof(struct omap_runtime_data), GFP_KERNEL); if (prtd == NULL) { ret = -ENOMEM; goto out;
On Fri, 19 Dec 2008 22:08:22 +0800 "ext Stanley.Miao" stanley.miao@windriver.com wrote:
There will be a Oops or frequent underrun messages when playing music with omap soc driver, this is because a data region is incorretly sized, other data region will be overwriten when writing to this data region.
Signed-off-by: Stanley.Miao stanley.miao@windriver.com
sound/soc/omap/omap-pcm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index ce580a9..2adfbce 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) if (ret < 0) goto out;
- prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
- prtd = kzalloc(sizeof(struct omap_runtime_data), GFP_KERNEL);
Oh my... Can you change this as
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
like suggested by the CodingStyle and then you can have my ack.
Acked-by: Jarkko Nikula jarkko.nikula@nokia.com
At Fri, 19 Dec 2008 16:35:01 +0200, Jarkko Nikula wrote:
To: "ext Stanley.Miao" stanley.miao@windriver.com Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org Subject: Re: [alsa-devel] [PATCHv2 1/1] Fix a Oops bug in omap soc driver. From: Jarkko Nikula jarkko.nikula@nokia.com Delivered-To: alsa-devel@alsa-project.org Date: Fri, 19 Dec 2008 16:35:01 +0200 Message-Id: 20081219163501.0e235884.jarkko.nikula@nokia.com In-Reply-To: 4edcd8463d981e4babef82167aa58131539c367f.1229601269.git.stanley.miao@windriver.com Organization: Nokia-M/Helsinki Mime-Version: 1.0 List-Unsubscribe: http://mailman.alsa-project.org/mailman/listinfo/alsa-devel, mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe List-Archive: http://mailman.alsa-project.org/pipermail/alsa-devel List-Post: mailto:alsa-devel@alsa-project.org List-Help: mailto:alsa-devel-request@alsa-project.org?subject=help List-Subscribe: http://mailman.alsa-project.org/mailman/listinfo/alsa-devel, mailto:alsa-devel-request@alsa-project.org?subject=subscribe Content-Transfer-Encoding: 7bit
On Fri, 19 Dec 2008 22:08:22 +0800 "ext Stanley.Miao" stanley.miao@windriver.com wrote:
There will be a Oops or frequent underrun messages when playing music with omap soc driver, this is because a data region is incorretly sized, other data region will be overwriten when writing to this data region.
Signed-off-by: Stanley.Miao stanley.miao@windriver.com
sound/soc/omap/omap-pcm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index ce580a9..2adfbce 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) if (ret < 0) goto out;
- prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
- prtd = kzalloc(sizeof(struct omap_runtime_data), GFP_KERNEL);
Oh my... Can you change this as
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
like suggested by the CodingStyle and then you can have my ack.
Acked-by: Jarkko Nikula jarkko.nikula@nokia.com
Thanks, merged now. I'm going to push the fixes to the upstream soon.
Takashi
The following changes since commit 70043058a6968917c00c8d4cff5bfc0e095831ec: Takashi Iwai (1): Merge branch 'fix/asoc' into topic/asoc
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 for-tiwai
Troy Kisky (8): ALSA: ASoC: DaVinci: davinvi-evm, make requests explicit ALSA: ASoC: DaVinci: davinci-i2s add comments to explain polarity ALSA: ASoC: DaVinci: davinci-i2s clean up ALSA: ASoC: DaVinci: davinci-i2s clean up ALSA: ASoC: DaVinci: document I2S limitations ALSA: ASoC: tlv320aic3x add dsp_a ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai ALSA: ASoc: DaVinci: davinci-evm use dsp_b mode
sound/soc/codecs/tlv320aic3x.c | 4 + sound/soc/codecs/tlv320aic3x.h | 2 + sound/soc/davinci/davinci-evm.c | 8 +- sound/soc/davinci/davinci-i2s.c | 158 ++++++++++++++++++++++++-------------- 4 files changed, 110 insertions(+), 62 deletions(-)
Dear all, I am new to ALSA programming. Suppose if i have to add some hardware specific feature in the ALSA sound driver and expose to the application via the ALSA library, how can do that?
Please reply if you have some inputs. Anything is welcome. Thanks in advance.
Regards, Subhranil
Hi,
On Sat, Dec 20, 2008 at 9:11 AM, SUBHRANIL CHOUDHURY subhra85@gmail.com wrote:
Dear all, I am new to ALSA programming. Suppose if i have to add some hardware specific feature in the ALSA sound driver and expose to the application via the ALSA library, how can do that?
The generic interface to do that would be hwdep... in userspace, you would have to modify libasound2 (alsa-lib) to correctly use the hwdep interface, as documented here: http://www.alsa-project.org/alsa-doc/alsa-lib/group___hw_dep.html
Please reply if you have some inputs.
Please look through the documentation for 5 minutes first before posting to the ML... the updated documentation for 1.0.18 is maintained at http://www.alsa-project.org/alsa-doc/alsa-lib/index.html
Thanks,
Sean
Anything is welcome. Thanks in advance.
Regards, Subhranil _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Sat, 20 Dec 2008 13:51:32 +0000, Mark Brown wrote:
The following changes since commit 70043058a6968917c00c8d4cff5bfc0e095831ec: Takashi Iwai (1): Merge branch 'fix/asoc' into topic/asoc
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 for-tiwai
Thanks, pulled now.
BTW, I'll be off from Dec. 23 for a week. Since it's not sure whether I'll have an internet access there, please let me know until the next Monday if you have urgent updates for 2.6.29.
Takashi
Troy Kisky (8): ALSA: ASoC: DaVinci: davinvi-evm, make requests explicit ALSA: ASoC: DaVinci: davinci-i2s add comments to explain polarity ALSA: ASoC: DaVinci: davinci-i2s clean up ALSA: ASoC: DaVinci: davinci-i2s clean up ALSA: ASoC: DaVinci: document I2S limitations ALSA: ASoC: tlv320aic3x add dsp_a ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai ALSA: ASoc: DaVinci: davinci-evm use dsp_b mode
sound/soc/codecs/tlv320aic3x.c | 4 + sound/soc/codecs/tlv320aic3x.h | 2 + sound/soc/davinci/davinci-evm.c | 8 +- sound/soc/davinci/davinci-i2s.c | 158 ++++++++++++++++++++++++-------------- 4 files changed, 110 insertions(+), 62 deletions(-)
participants (6)
-
Jarkko Nikula
-
Mark Brown
-
Sean McNamara
-
Stanley.Miao
-
SUBHRANIL CHOUDHURY
-
Takashi Iwai