From: Clemens Ladisch <clemens@ladisch.de>
To: Kelly Anderson <kelly@silka.with-linux.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: 2.6.38+ hard lockup in pcm_lib.c
Date: Thu, 31 Mar 2011 09:11:16 +0200 [thread overview]
Message-ID: <4D942914.3020404@ladisch.de> (raw)
In-Reply-To: <4D9314A1.7030106@silka.with-linux.com>
Kelly Anderson wrote:
> I had a consistent hard-lockup on one of my machines, an Amd X6, just
> after Kdm loaded the desktop (most certainly when it decides to start
> talking to the sound card). Everything was dead, even ssh access to the
> computer. I git bisected it until I found the commit that was causing
> it. After reverting the patch everything is fine.
>
> commit 59ff878ffb26bc0be812ca8295799164f413ae88
> Author: Clemens Ladisch
> Date: Thu Nov 18 09:43:52 2010 +0100
>
> ALSA: pcm: detect xruns in no-period-wakeup mode
This looks as if you get an infinite loop, probably because
hw_ptr_buffer_jiffies is zero.
Please try this patch:
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -425,6 +425,8 @@ static int snd_pcm_hw_params(struct snd_
runtime->no_period_wakeup =
(params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) &&
(params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP);
+ runtime->hw_ptr_buffer_jiffies =
+ max(1uL, (runtime->buffer_size * HZ) / runtime->rate);
bits = snd_pcm_format_physical_width(runtime->format);
runtime->sample_bits = bits;
@@ -866,8 +868,6 @@ static void snd_pcm_post_start(struct sn
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_trigger_tstamp(substream);
runtime->hw_ptr_jiffies = jiffies;
- runtime->hw_ptr_buffer_jiffies = (runtime->buffer_size * HZ) /
- runtime->rate;
runtime->status->state = state;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
runtime->silence_size > 0)
prev parent reply other threads:[~2011-03-31 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 11:31 2.6.38+ hard lockup in pcm_lib.c Kelly Anderson
2011-03-31 7:11 ` Clemens Ladisch [this message]
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=4D942914.3020404@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=kelly@silka.with-linux.com \
--cc=linux-kernel@vger.kernel.org \
/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