At Mon, 01 Dec 2003 19:30:07 +0100, I wrote: > > At Mon, 01 Dec 2003 19:15:59 +0100, > Thomas Charbonnel wrote: > > > > Hi, > > > > I'm testing rc1, and I have problems with my laptop's internal intel8x0 > > soundcard : > > * Using OSS emulation, after between 19 and 20 seconds of playing the > > sound gets garbled for a few seconds and then comes back to normal. This > > happens each time I stop and start playback again. > > * Using alsa natively there is a performance problem : running jack with > > the card (-p 1024) I get 3 or 4 xruns per second (I used to run this > > card with -p 64 with previous alsa versions !). > > could you give the specific version which ran properly?
does the attached patch make difference (if you give use_civ=0 option) ? Takashi
Index: alsa-kernel/pci/intel8x0.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.102 diff -u -r1.102 intel8x0.c --- alsa-kernel/pci/intel8x0.c 20 Nov 2003 15:57:50 -0000 1.102 +++ alsa-kernel/pci/intel8x0.c 1 Dec 2003 18:48:41 -0000 @@ -75,6 +75,7 @@ #ifdef SUPPORT_MIDI static int mpu_port[SNDRV_CARDS]; /* disabled */ #endif +static int use_civ[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard."); @@ -98,6 +99,9 @@ MODULE_PARM_DESC(mpu_port, "MPU401 port # for Intel i8x0 driver."); MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog:list"); #endif +MODULE_PARM(use_civ, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +MODULE_PARM_DESC(use_civ, "Read CIV register for updating the stream position."); +MODULE_PARM_SYNTAX(use_civ, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); /* * Direct registers @@ -401,6 +405,7 @@ smp20bit: 1; int in_ac97_init: 1, in_sdin_init: 1; + int use_civ: 1; ac97_bus_t *ac97_bus; ac97_t *ac97[3]; @@ -728,9 +733,10 @@ static inline void snd_intel8x0_update(intel8x0_t *chip, ichdev_t *ichdev) { unsigned long port = ichdev->reg_offset; - int civ, i, step; + int civ, i, step = 1; int ack = 0; + if (chip->use_civ) { civ = igetbyte(chip, port + ICH_REG_OFF_CIV); if (civ == ichdev->civ) { // snd_printd("civ same %d\n", civ); @@ -745,6 +751,7 @@ // snd_printd("step = %d, %d -> %d\n", step, ichdev->civ, civ); ichdev->civ = civ; } + } ichdev->position += step * ichdev->fragsize1; ichdev->position %= ichdev->size; @@ -2546,6 +2553,8 @@ } else mpu_port[dev] = 0; + chip->use_civ = use_civ[dev]; + sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->addr, chip->irq);