Skip to contentSkip to conversation

cmpci sound chip lockup

DISCUSSION virii 6 participants 7 messages May 16, 2001 – May 18, 2001

lore
Share & tools
lore

virii

author
#0 lore raw

The attatched file is the format for reporting bugs.

1) While playing mp3's on mpg123 it'll lock up for 3/4 seconds, and XMMS just stops all together

2) May 16 05:46:10 virii kernel: cmpci: dma timed out??

   May 16 06:05:43 virii kernel: cmpci: write: chip lockup? dmasz 65536 fragsz 1024 count 65536 hwptr 40576 swptr 40576 

3) cmpci.o soundcore.o happens when compiled into kernel or as modules

4) Linux version 2.2.19 (root@virii) (gcc version 2.95.3 20010315 (release)) #2 SMP Sat Apr 21 13:51:28 CDT 2001 note [this happend with all the 2.4.* as well.]

6) just while playing music with mpg123 or xmms, or any other mp3 player.

7) using Slackware-current

8) Gnu C                  2.95.3
   Gnu make               3.79.1
   binutils               2.10.1.0.4
   util-linux             2.11b
   modutils               2.4.6
   e2fsprogs              1.19
   reiserfsprogs          3.x.0j
   pcmcia-cs              3.1.25
   PPP                    2.4.1
   Linux C Library        2.2.2
   Dynamic linker (ldd)   2.2.2
   Procps                 2.0.7
   Net-tools              1.59
   Kbd                    1.04
   Sh-utils               2.0
   Modules Loaded         bsd_comp ppp slhc
9) processor       : 0
   vendor_id       : AuthenticAMD
   cpu family      : 5
   model           : 8
   model name      : AMD-K6(tm) 3D processor
   stepping        : 12
   cpu MHz         : 522.818
   cache size      : 64 KB
   fdiv_bug        : no
   hlt_bug         : no
   sep_bug         : no
   f00f_bug        : no
   coma_bug        : no
   fpu             : yes
   fpu_exception   : yes
   cpuid level     : 1
   wp              : yes
   flags           : fpu vme de pse tsc msr mce cx8 sep mtrr pge mmx 3dnow
   bogomips        : 1042.02
10) bsd_comp                4080   1
    ppp                    21680   2 [bsd_comp]
    slhc                    4496   1 [ppp]

11) Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: E-IDE Model: CD-ROM 50X Rev: 33
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IDE-CD Model: R/RW 4x4x24 Rev: 1.04
Type: CD-ROM ANSI SCSI revision: 02

12)

root@virii:~# lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 530 Host (rev 03)
00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)
00:01.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513 (rev b3)
00:01.1 Class ff00: Silicon Integrated Systems [SiS] ACPI
00:01.2 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 11)
00:02.0 PCI bridge: Silicon Integrated Systems [SiS] 5591/5592 AGP
00:0c.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
00:0c.1 Communication controller: C-Media Electronics Inc CM8738 (rev 10)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 6306 3D-AGP
(rev a3)
#1 lore raw
Quoted 1 line · virii

The attatched file is the format for reporting bugs.

Too bad my mailreader doesn't quote that thing .. oh well, lets just replace your bugreport with mine ;)

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

regards,

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

#2 lore raw
In reply to virii

Just a "me, too" here. I see this when using the in-kernel driver. I'm now using... 4.12, I think. At any rate, the error doesn't occur, or at least occurs to rarely as to escape notice, with this driver. Might I suggest the kernel's version be upgraded? The updated driver was posted here on lkml some time ago.

Quoted 30 lines · Rik van Riel
Quoted 1 line · virii

The attatched file is the format for reporting bugs.

Too bad my mailreader doesn't quote that thing .. oh well, lets just replace your bugreport with mine ;)

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

regards,

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 3 lines
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell
#3 lore raw
In reply to virii
Quoted 5 lines · Rik van Riel

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

Your xmms uses esd[1]?

Friends of mine report problems with esd and 2.4.x. Tested on SB-Live! and es1371.

Regards

Ingo Oeser

[1] E Sound Deamon - A sound mixing framework

Signature · 2 lines
To the systems programmer,
users and applications serve only to provide a test load.
#4 lore raw

I can also report that I'm having the same problem running kernel 2.4.[3-4{ac1-9}] with a C-Media using ESD. So the problem appears when I tried to run XMMS with ESD, the sound have an annoying "ss ss ss ..." while I play mp3's. The frecuency of the "ss ss ss ..." is symetrical (1/4 of a second I say).
The problem appears to have a direct asociation with esound cause it only happens with the use of XMMS over ESD. No problems reported during execution of mpg123 wich not use esound.

ronto:~# lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 630 Host (rev 21)
00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev
d0)
00:01.0 ISA bridge: Silicon Integrated Systems [SiS] 85C503/5513
00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900
10/100 Ethernet (rev 83)
00:01.2 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 07)
00:01.3 USB Controller: Silicon Integrated Systems [SiS] 7001 (rev 07)
00:02.0 PCI bridge: Silicon Integrated Systems [SiS] 5591/5592 AGP
00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev
10)
01:00.0 VGA compatible controller: Silicon Integrated Systems
[SiS]: Unknown device 6300 (rev 21)
Quoted 15 lines · Ingo Oeser

Date: Thu, 17 May 2001 13:58:08 +0200
From: Ingo Oeser <[email protected]>
To: Rik van Riel <[email protected]>
Cc: virii <[email protected]>, [email protected]
Subject: Re: cmpci sound chip lockup

Quoted 5 lines · Rik van Riel

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

Your xmms uses esd[1]?

Quoted 17 lines

Friends of mine report problems with esd and 2.4.x. Tested on SB-Live! and es1371.

Regards

Ingo Oeser

[1] E Sound Deamon - A sound mixing framework

Signature · 7 lines
To the systems programmer,
users and applications serve only to provide a test load.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 Fabian Arias Mu~oz                     |        Debian GNU/Linux 2.2r3 Potato
 Facultad de Cs. Economicas y           |            Corriendo en Kernel 2.4.4
 Administrativas.                       |                           dewback en
 Universidad de Concepcion   -  Chile   |                 #linuxhelp IRC.CHILE
#5 lore raw
In reply to Ingo Oeser
Quoted 8 lines · Ingo Oeser
Quoted 5 lines · Rik van Riel

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

Your xmms uses esd[1]?

Nope. I also get this with xmms directly to /dev/dsp.

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...

		http://www.surriel.com/

http://www.conectiva.com/ http://distro.conectiva.com/

#6 lore raw
In reply to Ingo Oeser

Em Fri, May 18, 2001 at 03:02:18PM -0300, Rik van Riel escreveu:

Quoted 11 lines · Ingo Oeser
Quoted 8 lines · Rik van Riel
Quoted 5 lines

I'm seeing a similar thing on 2.4.4-pre[23], but in a far less serious way. Using xmms the music stops after anything between a few seconds and a minute, I suspect a race condition somewhere.

Using mpg123 everything works fine...

Your xmms uses esd[1]?

Nope. I also get this with xmms directly to /dev/dsp.

Can you try this patch? some parts are just some cleanups, but there are two bugs fixed, this was just a quick look, maybe there are other bugs.

- Arnaldo

drivers/sound/cmpci.c +22 -14
@@ -70,6 +70,12 @@
  *                     (8738 only)
  *                     Fix bug cause x11amp cannot play.
  *
+ *    Fixes:
+ *    Arnaldo Carvalho de Melo <[email protected]>
+ *    18/05/2001 - .bss nitpicks, fix a bug in set_dac_channels where it
+ *    		   was calling prog_dmabuf with s->lock held, call missing
+ *    		   unlock_kernel in cm_midi_release
+ *
  */
 
 /*****************************************************************************/
@@ -335,9 +341,9 @@
 
 /* --------------------------------------------------------------------- */
 
-static struct cm_state *devs = NULL;
-static struct cm_state *devaudio = NULL;
-static unsigned long wavetable_mem = 0;
+static struct cm_state *devs;
+static struct cm_state *devaudio;
+static unsigned long wavetable_mem;
 
 /* --------------------------------------------------------------------- */
 
@@ -862,8 +868,10 @@
 		maskb(s->iobase + CODEC_CMI_MISC_CTRL + 2, ~0, 0xC0);
 		s->status |= DO_DUAL_DAC;
 		// prepare secondary buffer
+		spin_unlock_irqrestore(&s->lock, flags);
 		ret = prog_dmabuf(s, 1);
 		if (ret) return ret;
+		spin_lock_irqsave(&s->lock, flags);
 		// copy the hw state
 		fmtm &= ~((CM_CFMT_STEREO | CM_CFMT_16BIT) << CM_CFMT_DACSHIFT);
 		fmtm &= ~((CM_CFMT_STEREO | CM_CFMT_16BIT) << CM_CFMT_ADCSHIFT);
@@ -2578,6 +2586,7 @@
 			if (file->f_flags & O_NONBLOCK) {
 				remove_wait_queue(&s->midi.owait, &wait);
 				set_current_state(TASK_RUNNING);
+				unlock_kernel();
 				return -EBUSY;
 			}
 			tmo = (count * HZ) / 3100;
@@ -2710,10 +2719,8 @@
 		outb(5, s->iosynth+2);
 		outb(arg & 1, s->iosynth+3);
 		return 0;
-
-	default:
-		return -EINVAL;
 	}
+	return -EINVAL;
 }
 
 static int cm_dmfm_open(struct inode *inode, struct file *file)
@@ -2859,22 +2866,22 @@
 #ifdef CONFIG_SOUND_CMPCI_MIDI
 static	int	mpu_io = CONFIG_SOUND_CMPCI_MPUIO;
 #else
-static	int	mpu_io = 0;
+static	int	mpu_io;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_FM
 static	int	fm_io = CONFIG_SOUND_CMPCI_FMIO;
 #else
-static	int	fm_io = 0;
+static	int	fm_io;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_SPDIFINVERSE
 static	int	spdif_inverse = 1;
 #else
-static	int	spdif_inverse = 0;
+static	int	spdif_inverse;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_SPDIFLOOP
 static	int	spdif_loop = 1;
 #else
-static	int	spdif_loop = 0;
+static	int	spdif_loop;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_SPEAKERS
 static	int	speakers = CONFIG_SOUND_CMPCI_SPEAKERS;
@@ -2884,17 +2891,17 @@
 #ifdef CONFIG_SOUND_CMPCI_LINE_REAR
 static	int	use_line_as_rear = 1;
 #else
-static	int	use_line_as_rear = 0;
+static	int	use_line_as_rear;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_LINE_BASS
 static	int	use_line_as_bass = 1;
 #else
-static	int	use_line_as_bass = 0;
+static	int	use_line_as_bass;
 #endif
 #ifdef CONFIG_SOUND_CMPCI_JOYSTICK
 static	int	joystick = 1;
 #else
-static	int	joystick = 0;
+static	int	joystick;
 #endif
 MODULE_PARM(mpu_io, "i");
 MODULE_PARM(fm_io, "i");
@@ -2935,7 +2942,8 @@
 			return;
 		if (pcidev->irq == 0)
 			return;
-		if (!(s = kmalloc(sizeof(struct cm_state), GFP_KERNEL))) {
+		s = kmalloc(sizeof(*s), GFP_KERNEL);
+		if (!s) {
 			printk(KERN_WARNING "cm: out of memory\n");
 			return;
 		}