Date: Tue, 13 Jun 2006 09:45:47 GMT From: Johannes Weiner <hnazfoo@googlemail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/98898: [PATCH] sys/dev/sound/pci/fm801.c Message-ID: <200606130945.k5D9jlXW044986@www.freebsd.org> Resent-Message-ID: <200606130950.k5D9oCI1004085@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98898 >Category: kern >Synopsis: [PATCH] sys/dev/sound/pci/fm801.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 13 09:50:12 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Johannes Weiner >Release: RELENG_6 >Organization: >Environment: FreeBSD leiferikson.flosken.lan 6.1-STABLE FreeBSD 6.1-STABLE #0: Thu Jun 8 16:22:15 CEST 2006 root@leiferikson.flosken.lan:/usr/obj/usr/src/sys/DISCORD i386 >Description: Soundplayback was randomly broken. It always happened, when play_flip had the value 1 and therefore no new blocksize got set by fm801ch_setblocksize(). I don't know exactly what this play_flip is, but the blocksize has always to be set to the desired value. Otherwise speed and format get increased but the blocksize stays at bottom and is therefor wrong. Result was totally smashed sound. >How-To-Repeat: Play sound with Fortemedia FM801 XWave PCI soundcard. >Fix: --- sys/dev/sound/pci/fm801.c.orig Tue Jun 13 11:32:49 2006 +++ sys/dev/sound/pci/fm801.c Tue Jun 13 11:34:30 2006 @@ -32,8 +32,8 @@ SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/fm801.c,v 1.27.2.1 2006/01/10 01:01:24 ariff Exp $"); #define PCI_VENDOR_FORTEMEDIA 0x1319 -#define PCI_DEVICE_FORTEMEDIA1 0x08011319 -#define PCI_DEVICE_FORTEMEDIA2 0x08021319 /* ??? have no idea what's this... */ +#define PCI_DEVICE_FORTEMEDIA1 0x08011319 /* Audio controller */ +#define PCI_DEVICE_FORTEMEDIA2 0x08021319 /* Joystick controller */ #define FM_PCM_VOLUME 0x00 #define FM_FM_VOLUME 0x02 @@ -417,15 +417,13 @@ struct fm801_chinfo *ch = data; struct fm801_info *fm801 = ch->parent; - if(ch->dir == PCMDIR_PLAY) { - if(fm801->play_flip) return fm801->play_blksize; + /* Don't mind for play_flip; set the blocksize to the desired + * values in any case - otherwise sound playback breaks here. */ + if(ch->dir == PCMDIR_PLAY) fm801->play_blksize = blocksize; - } - if(ch->dir == PCMDIR_REC) { - if(fm801->rec_flip) return fm801->rec_blksize; + if(ch->dir == PCMDIR_REC) fm801->rec_blksize = blocksize; - } DPRINT("fm801ch_setblocksize %d (dir %d)\n",blocksize, ch->dir); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606130945.k5D9jlXW044986>