public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@aknet.ru>
To: Takashi Iwai <tiwai@suse.de>
Cc: Roberto Oppedisano <roberto.oppedisano@infracom.it>,
	LKML <linux-kernel@vger.kernel.org>,
	alsa-devel@alsa-project.org
Subject: [patch] snd-pcsp: silent misleading warning
Date: Sat, 17 May 2008 19:50:42 +0400	[thread overview]
Message-ID: <482EFED2.1020504@aknet.ru> (raw)
In-Reply-To: <482EC93E.7080702@infracom.it>

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

Hello.

Roberto Oppedisano wrote:
> I noticed that when I run
> aplay -D plughw:2,0 /usr/share/sounds/KDE_Logout.wav
>  I get a flood of:
> [  417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645)
It turns out that the buffer size you
get, is not evenly devided by period size.
18645 % 4661 = 1.
That (wrongly) triggers the warning.
This may very well be an alsa bug, or
may not, but the code in the driver is
handling that properly, so there is no
need for such a verbose warning.

The attached patch shuts down the warning.
Takashi, could you please apply?

[-- Attachment #2: pcsp_fixwarn.diff --]
[-- Type: text/x-patch, Size: 1124 bytes --]

# HG changeset patch
# User Stas Sergeev <stsp@users.sourceforge.net>
# Date 1211038849 -14400
# Node ID 2278b9a6058f5b45081f8227902df585474a81a6
# Parent  49d310de8ac42e5c495cf39440f4fde307b39c75
It appears that alsa allows a sound buffer with size not
evenly devided by the period size. This triggers a warning in
snd-pcsp and floods the log. As a quick fix, the warning should
be disabled.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>

diff -r 49d310de8ac4 -r 2278b9a6058f drivers/pcsp/pcsp_lib.c
--- a/drivers/pcsp/pcsp_lib.c	Sat May 17 02:04:12 2008 +0400
+++ b/drivers/pcsp/pcsp_lib.c	Sat May 17 19:40:49 2008 +0400
@@ -119,9 +119,11 @@ enum hrtimer_restart pcsp_do_timer(struc
 	chip->playback_ptr += PCSP_INDEX_INC() * fmt_size;
 	periods_elapsed = chip->playback_ptr - chip->period_ptr;
 	if (periods_elapsed < 0) {
-		printk(KERN_WARNING "PCSP: playback_ptr inconsistent "
+#if PCSP_DEBUG
+		printk(KERN_INFO "PCSP: buffer_bytes mod period_bytes != 0 ? "
 			"(%zi %zi %zi)\n",
 			chip->playback_ptr, period_bytes, buffer_bytes);
+#endif
 		periods_elapsed += buffer_bytes;
 	}
 	periods_elapsed /= period_bytes;

  reply	other threads:[~2008-05-17 15:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-11 18:15 2.6.26-rc1 regression: e5e1d3cb20034a3cbcfff1f0bae12201aa2ce17e breaks artsd Roberto Oppedisano
2008-05-11 18:56 ` Stas Sergeev
2008-05-11 20:28   ` Roberto Oppedisano
2008-05-11 20:56     ` Stas Sergeev
2008-05-12  7:24       ` Roberto Oppedisano
2008-05-12 18:22         ` Stas Sergeev
2008-05-13 14:00           ` Roberto Oppedisano
2008-05-13 15:41             ` Roberto Oppedisano
2008-05-13 16:50               ` Non-working snd-pcsp Takashi Iwai
2008-05-14  5:35                 ` Roberto Oppedisano
2008-05-14 10:03                   ` Takashi Iwai
2008-05-15 20:17                     ` Roberto Oppedisano
2008-05-15 20:38                       ` Stas Sergeev
2008-05-16 13:15                         ` Jan Engelhardt
2008-05-16 13:40                           ` Takashi Iwai
2008-05-16 15:18                             ` Jan Engelhardt
2008-05-16 15:23                               ` Takashi Iwai
2008-05-16 15:24                               ` Rene Herman
2008-05-19 18:10                               ` Stas Sergeev
2008-05-17 12:02                         ` Non-working snd-pcsp - solved Roberto Oppedisano
2008-05-17 15:50                           ` Stas Sergeev [this message]
2008-05-18  7:44                             ` [patch] snd-pcsp: silent misleading warning Takashi Iwai
2008-05-18 17:32                               ` Stas Sergeev
2008-05-18 16:28                                 ` Takashi Iwai
2008-05-18 16:49                                   ` Stas Sergeev
2008-05-14 19:59               ` Non-working snd-pcsp Stas Sergeev

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=482EFED2.1020504@aknet.ru \
    --to=stsp@aknet.ru \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roberto.oppedisano@infracom.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