From ea18b1d9254307b35a0346acfe6718847289287a Mon Sep 17 00:00:00 2001 From: Joel Dahl Date: Sat, 19 May 2007 13:19:32 +0000 Subject: Fix randomly broken playback with Fortemedia FM801 XWave PCI soundcard. PR: kern/98898 Submitted by: Johannes Weiner Approved by: ariff --- sys/dev/sound/pci/fm801.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index d7e368f4918a..f064524965c2 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -32,8 +32,8 @@ SND_DECLARE_FILE("$FreeBSD$"); #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,16 @@ fm801ch_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) 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); -- cgit v1.3