All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Tais M. Hansen" <tais.hansen@osd.dk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-user] Upgrade problems -addendum
Date: Wed, 22 Jan 2003 17:23:03 +0100	[thread overview]
Message-ID: <s5hlm1dyx08.wl@alsa2.suse.de> (raw)
In-Reply-To: <200301221647.05780.tais.hansen@osd.dk>

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

(moved to alsa-devel)

At Wed, 22 Jan 2003 16:47:00 +0100,
Tais M. Hansen <tais.hansen@osd.dk> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wednesday 22 January 2003 15:50, Takashi Iwai wrote:
> > > I'm getting a bunch of errors in syslog though. I imagine it's just debug
> > > output and nothing serious.
> > could you enable POINTER_DEBUG at the beginning of via82xx.c?
> > this will print more debug lines.
> > which application cause these messages?  every application?
> > do you notice any drop outs during playback?
> 
> I've enabled POINTER_DEBUG and logged ALSA & fail output from syslog. The 
> output is attached in two files. (gzipped)
> 
> ogg123:
> I heard a short pop in the sound with each log entry pair; fail & ALSA.
> 
> artsd:
> Log entries only occured when starting/resuming or suspending/killing artsd. 
> Tried playing for a while with noatun and I didn't notice any pops or other 
> anomalies.

could you test the following two patches?
with the first one, the driver will calculate the current pointer like
VIA686 does.  if this is ok, no messages will appear.

the second one is to force to increase the index.  you'll see debug
messages, anyway, if POINTER_DEBUG is defined.


Takashi

[-- Attachment #2: via-pointer-test.dif --]
[-- Type: application/octet-stream, Size: 620 bytes --]

Index: alsa-kernel/pci/via82xx.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.21
diff -u -r1.21 via82xx.c
--- alsa-kernel/pci/via82xx.c	22 Jan 2003 14:21:05 -0000	1.21
+++ alsa-kernel/pci/via82xx.c	22 Jan 2003 16:15:33 -0000
@@ -1037,7 +1037,8 @@
 	.hw_free =	snd_via82xx_hw_free,
 	.prepare =	snd_via8233_multi_prepare,
 	.trigger =	snd_via82xx_pcm_trigger,
-	.pointer =	snd_via8233_pcm_pointer,
+	// .pointer =	snd_via8233_pcm_pointer,
+	.pointer =	snd_via686_pcm_pointer,
 	.page =		snd_pcm_sgbuf_ops_page,
 };
 

[-- Attachment #3: via-pointer-test2.dif --]
[-- Type: application/octet-stream, Size: 1196 bytes --]

Index: alsa-kernel/pci/via82xx.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.21
diff -u -r1.21 via82xx.c
--- alsa-kernel/pci/via82xx.c	22 Jan 2003 14:21:05 -0000	1.21
+++ alsa-kernel/pci/via82xx.c	22 Jan 2003 16:20:04 -0000
@@ -589,8 +589,16 @@
 #endif
 		/* count register returns full size when end of buffer is reached */
 		if (size != count) {
+#if 0
 			snd_printd(KERN_ERR "invalid via82xx_cur_ptr, using last valid pointer\n");
 			res = viadev->lastpos;
+#else
+			idx++;
+			if (idx >= viadev->tbl_entries)
+				idx = 0;
+			size = viadev->idx_table[idx].size;
+			res = viadev->idx_table[idx].offset + size - count;
+#endif
 		} else {
 			res = viadev->idx_table[idx].offset + size;
 			if (res < viadev->lastpos && (res >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2)) {
@@ -648,7 +656,7 @@
 		return 0;
 	spin_lock(&chip->reg_lock);
 	count = inl(VIAREG(chip, OFFSET_CURR_COUNT) + viadev->reg_offset);
-	idx = count >> 24;
+	idx = (count >> 24) & viadev->tbl_entries;
 	count &= 0xffffff;
 	res = calc_linear_pos(viadev, idx, count);
 	spin_unlock(&chip->reg_lock);

       reply	other threads:[~2003-01-22 16:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200301221234.33054.tais.hansen@osd.dk>
     [not found] ` <200301221543.52285.tais.hansen@osd.dk>
     [not found]   ` <s5hznpt1bn2.wl@alsa2.suse.de>
     [not found]     ` <200301221647.05780.tais.hansen@osd.dk>
2003-01-22 16:23       ` Takashi Iwai [this message]
2003-01-23  0:35         ` [Alsa-user] Upgrade problems -addendum Tais M. Hansen
2003-01-23 10:03           ` Takashi Iwai
2003-01-23 11:15             ` Tais M. Hansen
2003-01-23 11:46               ` Takashi Iwai
2003-01-23 12:36                 ` Tais M. Hansen
2003-01-23 15:08                   ` Takashi Iwai
2003-01-23 17:50                     ` Tais M. Hansen
2003-01-23 18:07                       ` Takashi Iwai
2003-01-23 18:43                         ` Tais M. Hansen
2003-01-24  9:12                           ` Takashi Iwai
2003-01-24 12:41                             ` Tais M. Hansen
2003-01-24 13:30                               ` Takashi Iwai
2003-01-24 14:12                                 ` Tais M. Hansen
2003-01-24 15:45                                   ` Takashi Iwai
2003-01-24 16:40                                     ` Tais M. Hansen
2003-01-24 17:08                                       ` Takashi Iwai
2003-01-24 21:24                                         ` Tais M. Hansen
2003-01-27 10:42                                           ` Takashi Iwai
2003-01-27 14:42                                             ` Tais M. Hansen
2003-01-27 15:15                                               ` Takashi Iwai
2003-01-27 17:01                                                 ` Tais M. Hansen
2003-01-27 17:27                                                   ` Takashi Iwai
2003-01-28  0:43                                                     ` VIA823x testing Tais M. Hansen
2003-01-28  9:31                                                       ` Takashi Iwai
2003-01-28 13:25                                                         ` Tais M. Hansen
2003-01-28 16:21                                                           ` Takashi Iwai
2003-01-28 23:19                                                             ` Tais M. Hansen
2003-01-24 16:42                                     ` Re: [Alsa-user] Upgrade problems -addendum Tais M. Hansen

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=s5hlm1dyx08.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=tais.hansen@osd.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.