linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: cmpci sound chip lockup
@ 2001-05-17  2:05 Dmitry Volkoff
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Volkoff @ 2001-05-17  2:05 UTC (permalink / raw)
  To: linux-kernel

Hello,

This is known issue. cmpci driver included in the kernel is way too old.
I'm using newer driver (revision 4.14) and it works just fine. It was 
announced on lkml long time ago. Last time I checked there was even newer
driver - 5.64. The one in the kernel has version 2.41. Is it possible to 
include the new driver? 

This is the homepage: http://members.home.net/puresoft/cmedia.html

-- 

    DV

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-18 18:02     ` Rik van Riel
@ 2001-05-18 18:08       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-05-18 18:08 UTC (permalink / raw)
  To: Rik van Riel; +Cc: Ingo Oeser, virii, linux-kernel

Em Fri, May 18, 2001 at 03:02:18PM -0300, Rik van Riel escreveu:
> On Thu, 17 May 2001, Ingo Oeser wrote:
> > On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> > > 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

--- linux-2.4.4-ac11/drivers/sound/cmpci.c	Fri May 18 00:04:23 2001
+++ linux-2.4.4-ac11.acme/drivers/sound/cmpci.c	Fri May 18 01:03:22 2001
@@ -70,6 +70,12 @@
  *                     (8738 only)
  *                     Fix bug cause x11amp cannot play.
  *
+ *    Fixes:
+ *    Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *    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;
 		}

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-17 11:58   ` Ingo Oeser
  2001-05-17 16:20     ` Fabian Arias
@ 2001-05-18 18:02     ` Rik van Riel
  2001-05-18 18:08       ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 8+ messages in thread
From: Rik van Riel @ 2001-05-18 18:02 UTC (permalink / raw)
  To: Ingo Oeser; +Cc: virii, linux-kernel

On Thu, 17 May 2001, Ingo Oeser wrote:
> On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> > 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/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-17 11:58   ` Ingo Oeser
@ 2001-05-17 16:20     ` Fabian Arias
  2001-05-18 18:02     ` Rik van Riel
  1 sibling, 0 replies; 8+ messages in thread
From: Fabian Arias @ 2001-05-17 16:20 UTC (permalink / raw)
  To: Ingo Oeser; +Cc: Rik van Riel, virii, linux-kernel


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)


On Thu, 17 May 2001, Ingo Oeser wrote:

> Date: Thu, 17 May 2001 13:58:08 +0200
> From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
> To: Rik van Riel <riel@conectiva.com.br>
> Cc: virii <virii@gcecisp.com>, linux-kernel@vger.kernel.org
> Subject: Re: cmpci sound chip lockup
> 
> On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> > 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
> -- 
> 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 majordomo@vger.kernel.org
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-16 23:02 ` Rik van Riel
  2001-05-17  1:48   ` Steven Walter
@ 2001-05-17 11:58   ` Ingo Oeser
  2001-05-17 16:20     ` Fabian Arias
  2001-05-18 18:02     ` Rik van Riel
  1 sibling, 2 replies; 8+ messages in thread
From: Ingo Oeser @ 2001-05-17 11:58 UTC (permalink / raw)
  To: Rik van Riel; +Cc: virii, linux-kernel

On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> 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
-- 
To the systems programmer,
users and applications serve only to provide a test load.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-16 23:02 ` Rik van Riel
@ 2001-05-17  1:48   ` Steven Walter
  2001-05-17 11:58   ` Ingo Oeser
  1 sibling, 0 replies; 8+ messages in thread
From: Steven Walter @ 2001-05-17  1:48 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel

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.

On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> On Wed, 16 May 2001, virii wrote:
> 
> > 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cmpci sound chip lockup
  2001-05-16 22:25 virii
@ 2001-05-16 23:02 ` Rik van Riel
  2001-05-17  1:48   ` Steven Walter
  2001-05-17 11:58   ` Ingo Oeser
  0 siblings, 2 replies; 8+ messages in thread
From: Rik van Riel @ 2001-05-16 23:02 UTC (permalink / raw)
  To: virii; +Cc: linux-kernel

On Wed, 16 May 2001, virii wrote:

> 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/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* cmpci sound chip lockup
@ 2001-05-16 22:25 virii
  2001-05-16 23:02 ` Rik van Riel
  0 siblings, 1 reply; 8+ messages in thread
From: virii @ 2001-05-16 22:25 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

The attatched file is the format for reporting bugs.

[-- Attachment #2: cmpci --]
[-- Type: text/plain, Size: 2848 bytes --]

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)




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-05-18 18:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17  2:05 cmpci sound chip lockup Dmitry Volkoff
  -- strict thread matches above, loose matches on Subject: below --
2001-05-16 22:25 virii
2001-05-16 23:02 ` Rik van Riel
2001-05-17  1:48   ` Steven Walter
2001-05-17 11:58   ` Ingo Oeser
2001-05-17 16:20     ` Fabian Arias
2001-05-18 18:02     ` Rik van Riel
2001-05-18 18:08       ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).