From: Takashi Iwai <tiwai@suse.de>
To: Thomas Scheunemann <thomas.scheunemann@uni-duisburg-essen.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Backported sbxfi driver, possible fix
Date: Sat, 25 Oct 2008 18:05:17 +0200 [thread overview]
Message-ID: <s5hej24psn6.wl%tiwai@suse.de> (raw)
In-Reply-To: <20081025130652.GA27621@rzle423.uni-duisburg.de>
At Sat, 25 Oct 2008 15:06:52 +0200,
Thomas Scheunemann wrote:
>
> I think I found a bug in the driver, which at least for me was
> responsible for the crashes with pulseaudio.
>
> A little backstory:
>
> I have a Fedora 8 System with an SB X-Fi installed and of course
> no sound. I didn't want to replace the entire ALSA driver, so I
> just took the files sbxfi.c and emu20k1-regs.h from the unstable
> sources, wrote a small spec-file and am now at a point where I
> can just "rpm -i" the driver as a dkms package and just modprobe
> the driver.
>
> After that "speaker-test -D hw -c 2 -r 96000 -t sine" works just
> fine, but as soon as pulseaudio is started my System froze.
>
> The bug I think I found is in the get_xfi_order function. As long
> as pages actually is a power of two it works correctly. But if
> pages isn't a power of two it should round up, but it rounds down.
> As a result I believe this screws up sbxfi_alloc_tlb_pages.
>
> After a small modification to get_xfi_order:
Thanks for the patch.
Yeah, I found the very same problem in this morning, but I couldn't
update the repo and snapshot until now due to the server crash.
My solution is to use roundup_pow_of_two() instead of the own
funciton. This should work better in general.
Anyway, I updated the repo (and rebased, sorry), updated the snapshot,
too.
thanks,
Takashi
> --- /tmp/sbxfi.c 2008-10-25 14:51:55.000000000 +0200
> +++ sbxfi.c 2008-10-25 14:03:48.000000000 +0200
> @@ -851,11 +851,12 @@
> /* get the order of pages (power-of-two) */
> static int get_xfi_order(unsigned int pages)
> {
> - int order = -1;
> - do {
> + int order = 0;
> + pages--;
> + while(pages){
> pages >>= 1;
> order++;
> - } while (pages);
> + }
> return order;
> }
>
> the driver started working with pulseaudio, it doesn't crash, and I
> even get sound though it still is a bit distorted.
>
next prev parent reply other threads:[~2008-10-25 16:05 UTC|newest]
Thread overview: 156+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 18:02 Backported sbxfi driver (UNTESTED!) Takashi Iwai
2008-10-09 18:12 ` Brendan Pike
2008-10-09 18:25 ` Ted T. Logian
2008-10-09 18:25 ` William Pitcock
2008-10-09 18:49 ` Ted T. Logian
2008-10-09 19:50 ` James Courtier-Dutton
2008-10-10 6:02 ` Takashi Iwai
2008-10-09 20:03 ` Ted T. Logian
2008-10-09 20:17 ` Ted T. Logian
2008-10-10 6:01 ` Takashi Iwai
2008-10-10 6:26 ` Ted T. Logian
2008-10-10 6:46 ` Takashi Iwai
2008-10-10 18:17 ` William Pitcock
2008-10-11 16:01 ` Takashi Iwai
2008-10-11 17:36 ` William Pitcock
2008-10-11 17:39 ` William Pitcock
2008-10-11 17:41 ` Takashi Iwai
2008-10-11 17:43 ` Takashi Iwai
2008-10-11 18:04 ` William Pitcock
2008-10-12 19:34 ` Takashi Iwai
[not found] ` <e4b753d00810121816i133141d5te6a4d638044f3875@mail.gmail.com>
2008-10-13 2:08 ` Takashi Iwai
2008-10-13 9:51 ` Takashi Iwai
[not found] ` <6d00fe310810100939h6cd61e0cg7817c7f54f6261f6@mail.gmail.com>
2008-10-10 16:41 ` Fwd: " The Source
2008-10-11 15:47 ` Takashi Iwai
2008-10-11 16:03 ` Ted T. Logian
2008-10-11 17:32 ` Takashi Iwai
2008-10-12 8:41 ` Vedran Miletić
2008-10-12 8:48 ` James Courtier-Dutton
2008-10-12 9:43 ` The Source
2008-10-12 8:44 ` James Courtier-Dutton
2008-10-13 9:52 ` Takashi Iwai
2008-10-11 16:28 ` The Source
2008-10-11 17:34 ` Takashi Iwai
2009-06-10 8:39 ` problems with fedora 11 and pulseaudio and svn x-fi driver Ted T. Logan
2009-06-10 8:52 ` Ted T. Logan
2009-06-10 9:29 ` Takashi Iwai
2009-06-10 16:23 ` Ted T. Logan
2009-06-10 16:48 ` Ted T. Logan
2009-06-11 14:48 ` Ted T. Logan
2009-06-12 16:46 ` "ticks" with latest " Ted T. Logan
2008-10-16 12:03 ` Backported sbxfi driver (UNTESTED!) Jan Wolf
2008-10-16 12:33 ` Takashi Iwai
2008-10-16 12:56 ` Xarteras
2008-10-16 13:36 ` The Source
2008-10-16 13:48 ` Takashi Iwai
2008-10-16 14:15 ` The Source
2008-10-16 14:18 ` Takashi Iwai
2008-10-16 14:41 ` The Source
2008-10-16 14:42 ` Takashi Iwai
2008-10-16 14:51 ` The Source
2008-10-16 15:00 ` The Source
2008-10-16 15:04 ` Takashi Iwai
[not found] ` <48F75892.8000209@gmail.com>
2008-10-16 15:15 ` Takashi Iwai
2008-10-16 17:53 ` Bjoern Olausson
2008-10-16 18:02 ` The Source
2008-10-16 18:18 ` The Source
2008-10-17 6:17 ` Takashi Iwai
2008-10-17 6:26 ` The Source
2008-10-17 6:39 ` Takashi Iwai
2008-10-17 7:16 ` The Source
2008-10-17 8:17 ` The Source
2008-10-17 9:00 ` Xarteras
2008-10-17 9:17 ` The Source
2008-10-17 9:25 ` Takashi Iwai
2008-10-17 9:23 ` Takashi Iwai
2008-10-17 9:50 ` Xarteras
2008-10-17 10:00 ` Tony Vroon
2008-10-17 10:35 ` Xarteras
2008-10-17 15:33 ` Bjoern Olausson
2008-10-17 7:57 ` The Source
2008-10-17 9:35 ` Takashi Iwai
2008-10-17 9:58 ` The Source
2008-10-17 9:59 ` Takashi Iwai
2008-10-17 10:01 ` The Source
2008-10-17 10:04 ` Takashi Iwai
[not found] ` <48F86606.9070108@gmail.com>
2008-10-17 10:27 ` Takashi Iwai
2008-10-17 20:48 ` William Pitcock
2008-10-18 10:06 ` Xarteras
2008-10-18 15:06 ` Takashi Iwai
2008-10-18 17:10 ` William Pitcock
2008-10-18 17:17 ` William Pitcock
2008-10-19 7:59 ` Takashi Iwai
2008-10-19 18:07 ` Bjoern Olausson
2008-10-19 19:47 ` William Pitcock
2008-10-16 21:29 ` Xarteras
2008-10-17 18:16 ` James Courtier-Dutton
2008-10-22 15:24 ` Bjoern Olausson
2008-10-22 15:26 ` Takashi Iwai
2008-10-22 16:07 ` Bjoern Olausson
2008-10-22 16:24 ` Bjoern Olausson
2008-10-22 19:25 ` The Source
2008-10-23 5:40 ` Takashi Iwai
2008-10-23 11:46 ` Bjoern Olausson
2008-10-23 11:53 ` Jason Harvey
2008-10-23 13:56 ` Takashi Iwai
2008-10-23 12:45 ` Jason Harvey
2008-10-23 13:07 ` Bjoern Olausson
2008-10-23 13:21 ` Jason Harvey
2008-10-23 15:54 ` Takashi Iwai
2008-10-23 14:23 ` Jason Harvey
2008-10-23 17:07 ` Takashi Iwai
2008-10-23 17:15 ` Takashi Iwai
2008-10-23 15:37 ` Jason Harvey
2008-10-23 15:40 ` Bjoern Olausson
2008-10-23 17:44 ` Takashi Iwai
2008-10-23 17:49 ` Takashi Iwai
2008-10-23 16:23 ` Jason Harvey
2008-10-23 19:14 ` Takashi Iwai
2008-10-23 17:32 ` Jason Harvey
2008-10-23 21:30 ` Takashi Iwai
2008-10-23 20:17 ` Jason Harvey
2008-10-24 8:40 ` Takashi Iwai
2008-10-24 7:56 ` Jason Harvey
2008-10-24 10:21 ` Takashi Iwai
2008-10-24 8:50 ` Jason Harvey
2008-10-25 13:06 ` Backported sbxfi driver, possible fix Thomas Scheunemann
2008-10-25 16:05 ` Takashi Iwai [this message]
2008-10-25 19:42 ` Thomas Scheunemann
2008-10-25 19:59 ` Takashi Iwai
2008-10-25 20:40 ` Jason Harvey
2008-10-25 21:57 ` Bjoern Olausson
2008-10-26 6:32 ` The Source
2008-10-26 8:23 ` Takashi Iwai
2008-10-26 9:11 ` The Source
2008-10-26 9:17 ` The Source
2008-10-26 6:45 ` The Source
2008-10-26 6:56 ` The Source
2008-10-26 7:22 ` The Source
2008-10-26 8:21 ` Takashi Iwai
2008-10-27 5:15 ` Alexander E. Patrakov
2008-10-27 5:32 ` The Source
2008-10-27 6:28 ` Takashi Iwai
2008-10-27 6:34 ` The Source
2008-10-27 6:39 ` Takashi Iwai
2008-10-28 0:10 ` Bjoern Olausson
2008-10-28 7:14 ` Takashi Iwai
2008-10-28 13:48 ` Bjoern Olausson
2008-10-28 14:12 ` Takashi Iwai
2008-10-30 10:46 ` Bjoern Olausson
2008-10-30 11:05 ` Bjoern Olausson
2008-10-30 11:07 ` Takashi Iwai
2008-10-30 12:25 ` Bjoern Olausson
2008-10-28 6:59 ` Takashi Iwai
2008-10-27 6:36 ` Takashi Iwai
2008-10-27 20:08 ` James Courtier-Dutton
2008-10-28 4:44 ` Alexander E. Patrakov
2008-10-28 9:31 ` Takashi Iwai
2008-10-28 10:53 ` Vedran Miletić
2008-10-29 8:38 ` Pavel Hofman
2008-10-26 8:16 ` Takashi Iwai
2008-10-26 8:45 ` Backported sbxfi driver. Pulse works! Jason Harvey
2008-10-23 17:26 ` Backported sbxfi driver (UNTESTED!) Takashi Iwai
2008-10-23 15:31 ` Jason Harvey
2008-10-23 17:41 ` Takashi Iwai
2008-10-23 14:48 ` Jason Harvey
2008-10-23 13:54 ` Takashi Iwai
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=s5hej24psn6.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=thomas.scheunemann@uni-duisburg-essen.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 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.