From: Troy Kisky <troy.kisky@boundarydevices.com>
To: avm@ti.com
Cc: davinci-linux-open-source@linux.davincidsp.com,
Arun Mani <a0270733@dal.design.ti.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] To avoid the divide by zero error during the first execution, initialize the data type.
Date: Wed, 09 Sep 2009 13:47:06 -0700 [thread overview]
Message-ID: <4AA8144A.10105@boundarydevices.com> (raw)
In-Reply-To: <1252527563-15074-1-git-send-email-avm@ti.com>
avm@ti.com wrote:
> From: Arun Mani <a0270733@gtcx26221.gt.design.ti.com>
>
> Signed-off-by: Arun Mani <a0270733@gtcx26221.gt.design.ti.com>
> ---
> sound/soc/davinci/davinci-i2s.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
> index b1ea52f..61b1763 100644
> --- a/sound/soc/davinci/davinci-i2s.c
> +++ b/sound/soc/davinci/davinci-i2s.c
> @@ -104,10 +104,12 @@ enum {
>
> static struct davinci_pcm_dma_params davinci_i2s_pcm_out = {
> .name = "I2S PCM Stereo out",
> + .data_type = 2, //Initialize the data type for playback to avoid divide by zero
You should have ".acnt = 2" also for consistency.
> };
>
> static struct davinci_pcm_dma_params davinci_i2s_pcm_in = {
> .name = "I2S PCM Stereo in",
> + .data_type = 2, //Initialize the data type for playback to avoid divide by zero
> };
>
> struct davinci_mcbsp_dev {
And if the 1st stream is an 8-bit audio stream, will it initialize it incorrectly ???
Of course, we have formats = SNDRV_PCM_FMTBIT_S16_LE, currently so it's not an issue yet...
I don't see how data_type is not being set in davinci_i2s_hw_params
before being used in davinci_pcm_prepare.
Can prepare be called before hw_params ?
There is a "return -EINVAL" in davinci_i2s_hw_params with a
"printk(KERN_WARNING "davinci-i2s: unsupported PCM format\n")" before it.
Do you see this message in your log ?
Thanks
Troy
next parent reply other threads:[~2009-09-09 20:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1252527563-15074-1-git-send-email-avm@ti.com>
2009-09-09 20:47 ` Troy Kisky [this message]
[not found] ` <4AA8144A.10105-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2009-09-09 21:07 ` [PATCH] To avoid the divide by zero error during the first execution, initialize the data type Mani, Arun
2009-09-10 0:39 ` Troy Kisky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AA8144A.10105@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=a0270733@dal.design.ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=avm@ti.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox