From: Clemens Ladisch <clemens@ladisch.de>
To: Frederick V Heitkamp <heitkamp@ameritech.net>,
Giuliano Pochini <pochini@shiny.it>, Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Crash 2.6.32.x, Echo 3G, Alsa, SCSI
Date: Tue, 02 Feb 2010 16:30:27 +0100 [thread overview]
Message-ID: <4B684513.8090201@ladisch.de> (raw)
In-Reply-To: <73211.74714.qm@web180714.mail.sp1.yahoo.com>
Frederick V Heitkamp wrote:
> Repeatable Hard Crash.
> What else do I need to provide?
>
> [ 5484.995249] WriteControlReg: not written, no change
> [ 5485.069621] divide error: 0000 [#1] pcm_hw_params ok
> [ 5485.070159] Prepare rate=44100 format=2 channels=2
> [ 5485.070161] set_audio_format[14] = 5
> [ 5485.070166] Prepare rate=44100 format=2 channels=2
> [ 5485.070167] set_audio_format[14] = 5
> [ 5485.070003] PREEMPT SMP
> ...
> [ 5485.070003] EIP is at pcm_pointer+0x37/0x70 [snd_echo3g]
> ...
> [ 5485.965788] [<c10041c0>] ? do_divide_error+0x0/0x90
> [ 5485.980619] [<f87aa037>] ? pcm_pointer+0x37/0x70 [snd_echo3g]
> [ 5485.998047] [<c104764e>] ? run_timer_softirq+0x17e/0x2e0
> [ 5486.014175] [<f87ac9bf>] ? snd_echo_interrupt+0x11f/0x240 [snd_echo3g]
> [ 5486.033940] [<c107a5d5>] ? handle_IRQ_event+0x45/0x190
bytes_to_frames() divides by runtime->frame_bits which is not set until
after the hw_params callback has succeeded, but the corresponding
chip->substream[] entry is set in that callback, by init_engine(). It
should probably have been set in the prepare callback.
Frederick, please try the patch below.
Takashi, is there any reason why the runtime-> fields are initialized
after the hw_params callback?
Regards,
Clemens
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -403,12 +403,6 @@
if (err < 0)
goto _error;
- if (substream->ops->hw_params != NULL) {
- err = substream->ops->hw_params(substream, params);
- if (err < 0)
- goto _error;
- }
-
runtime->access = params_access(params);
runtime->format = params_format(params);
runtime->subformat = params_subformat(params);
@@ -446,6 +440,13 @@
runtime->boundary *= 2;
snd_pcm_timer_resolution_change(substream);
+
+ if (substream->ops->hw_params != NULL) {
+ err = substream->ops->hw_params(substream, params);
+ if (err < 0)
+ goto _error;
+ }
+
runtime->status->state = SNDRV_PCM_STATE_SETUP;
pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
next prev parent reply other threads:[~2010-02-02 15:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 14:21 Frederick V Heitkamp
2010-02-02 15:30 ` Clemens Ladisch [this message]
2010-02-02 16:02 ` [alsa-devel] " Giuliano Pochini
2010-02-02 22:09 ` Giuliano Pochini
2010-02-03 2:53 ` Frederick V Heitkamp
2010-05-31 19:05 ` F. Heitkamp
2010-05-31 20:59 ` Giuliano Pochini
2010-06-01 5:37 ` Takashi Iwai
2010-06-01 12:25 ` [Alsa-user] " F. Heitkamp
2010-06-02 22:08 ` Giuliano Pochini
2010-06-17 12:11 ` F. Heitkamp
2010-06-18 11:55 ` Giuliano Pochini
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=4B684513.8090201@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=heitkamp@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pochini@shiny.it \
--cc=tiwai@suse.de \
/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
Powered by JetHome