Bug 56087

Summary: CMI8330 SoundPro messed up with XFree update
Product: [Retired] Red Hat Linux Reporter: Roberto Hernandez <robher>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: alan
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-05-20 23:15:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Requested lspci -vv
none
XFree86 log file
none
X config file
none
Steps to try to configure ISA card none

Description Roberto Hernandez 2001-11-12 18:22:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012

Description of problem:
I have a motherboard with an onboard SiS 6326 AGP 8Mb video card and a
CMI8330 SoundPro ISA soundcard also onboard (I know, pretty crummy, but
it's what I have for now).

I have RedHat 7.1 installed. Somehow I had managed to get everything
working together. The only catch was that I needed the "NoAccel" option for
my SiS 6326 to work correctly which meant some SLOW graphics.

Recently I upgraded to XFree86 4.1.0 (from the RH7.2 RPMs) with all the
necessary dependencies as well. That includes the RH7.2 upgrade to kernel
2.4.9-13 (necessary for the kernel-drm=4.1.0). It turned out well for the
video card as I no longer need the "NoAccel" option and the performance
improvent is quite good.

So here's my problem, now my CMI8330 SoundPro is acting up. It used to work
fine before the upgrade. Now I get all sorts of noise every time the video
card has to do something. It's especially noticeable when I scroll in text
editors. The noise is so annoying that I can't listen to music while I do
anything else.

This is what I have in my modules.conf:

--------------------------
alias sound-slot-0 sb
alias synth0 opl3

post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null
2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null
2>&1 || :

post-install sb modprobe -k ad1848; modprobe -k opl3

options sb isapnp=1 io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
options ad1848 io=0x530 irq=11 dma=0 soundpro=1
options opl3 io=0x388
options mpu401 io=0x330 irq=9
options sound dmabuf=1
--------------------------

I've tried turning on the "NoAccel" option (thinking the problem might be
related to XAA), but there was no change. It's also interesting that this
happens with MP3's or WAV's but not with CD audio.

What am I overlooking?

TIA,

Roberto



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Have a motherboard with onboard SiS 6326 and CMI8330 SoundPro
2.Upgrade to XFree 4.1.0
3.Listen to a WAV file and scroll text in an X window
	

Actual Results:  Noisy sound

Expected Results:  Good sound (as good as it used to be before the upgrade)

Additional info:

Comment 1 Mike A. Harris 2001-11-13 06:19:51 UTC
XFree86 has absolutely nothing at all to do with sound.  It is not
at all possible for XFree86 to cause sound problems.  If anything,
it would be the kernel driver for the sound card that is the problem.

I have the exact same sound hardware as you've listed, and it works
fine with my current kernel.  I have not yet updated the kernel on
that machine to the latest erratum, but when I do, I will update
the report with my results.

Reassigning to kernel.

Comment 2 Alan Cox 2001-11-13 09:24:59 UTC
Ok first thing to try:

Configure the machine not to boot into X11
Boot the machine from cold with the extra option vga=0x0311
Now see if text scrolling while playing music causes any problems (the line
above is using graphical modes for the console). If that is fine start X11
and repeat the check, then exit X11 and repeat the check.

Let me know what it does before X11, during X11, after X11

Alan


Comment 3 Roberto Hernandez 2001-11-13 14:04:53 UTC
OK, you'll have to forgive my newbie mistakes here. I tried doing what Alan
said.  What I did was change the default runlevel to 3 in /etc/inittab so I
wouldn't boot directly into X. Next I added the line "vga=0x0311" to my
/etc/lilo.conf. So  next time I boot, I get this message that tells me I
selected an invalid vga mode. The options I had were 80x25, 80x43, 80x30 and so
forth. Apparently changing the vga line in lilo.conf isn't the way to go. I
looked at rdev but the options are the same. How do I set the vga mode to 0x0311?

BTW, I noticed something I had passed up. If you look at my modules.conf in the
first message you'll notice the order of loaded modules is sb -> ad1848 -> opl3.
Well it turns out that ad1848 isn't loading. I hadn't noticed because I received
no error message. When I try loading it manually this is what I get:

[root@ether tito]# modprobe -k ad1848 io=0x530 irq=11 dma=0 soundpro=1
/lib/modules/2.4.9-13/kernel/drivers/sound/ad1848.o: init_module: No such
deviceHint: insmod errors can be caused by incorrect module parameters,
including invalid IO or IRQ parameters
/lib/modules/2.4.9-13/kernel/drivers/sound/ad1848.o: insmod ad1848 failed

So I decided to look at /proc/isapnp. For some reason the card appears as active
although the module isn't loaded. ?????????? I can't seem to figure out why the
module would not load with the exact same parameters as before the kernel
upgrade. The only thing I can think of that's changed since then is that kudzu
now detects my Lucent Winmodem, but I am using the exact same drivers as before.
I don't believe kudzu adds any modules for it as they don't come with the kernel.

[root@ether tito]# cat /proc/isapnp
Card 1 'CMI0001:CMI8330. Audio Adapter' PnP version 1.0
  Logical device 0 '@@@0001:Unknown'
    Device is active
    Active port 0x530,0x388
    Active DMA ,0
    Resources 0
      Priority preferred
      Port 0x530-0x530, align 0x0, size 0x8, 16-bit address decoding
      Port 0x388-0x388, align 0x0, size 0x8, 16-bit address decoding
      IRQ 11 High-Edge
      DMA 0 8-bit byte-count compatible
      Alternate resources 0:1
        Priority acceptable
        Port 0x530-0x530, align 0x0, size 0x8, 16-bit address decoding
        Port 0x388-0x388, align 0x0, size 0x8, 16-bit address decoding
        IRQ 5,7,2/9,10,11,12 High-Edge
        DMA 0,1,3 8-bit byte-count compatible
      Alternate resources 0:2
        Priority acceptable
        Port 0xe80-0xf40, align 0xbf, size 0x8, 16-bit address decoding
        Port 0x388-0x3f8, align 0xf, size 0x8, 16-bit address decoding
        IRQ 5,7,2/9,10,11,12 High-Edge
        DMA 0,1,3 8-bit byte-count compatible
  Logical device 1 '@H@0001:Unknown'
    Device is not active
    Active port 0x330
    Active IRQ 9 [0x2]
    Active DMA 0,0
    Resources 0
      Priority preferred
      Port 0x330-0x330, align 0x0, size 0x2, 16-bit address decoding
      IRQ 2/9 High-Edge
      Alternate resources 0:1
        Priority acceptable
        Port 0x300-0x330, align 0xf, size 0x2, 16-bit address decoding
        IRQ 5,7,2/9,10,11,12 High-Edge
  Logical device 2 '@P@0001:Unknown'
    Device is not active
    Active port 0x200
    Active DMA 0,0
    Resources 0
      Priority preferred
      Port 0x200-0x200, align 0x0, size 0x8, 16-bit address decoding
      Alternate resources 0:1
        Priority acceptable
        Port 0x200-0xfe0, align 0xf, size 0x8, 16-bit address decoding
  Logical device 3 '@X@0001:Unknown'
    Device is active
    Active port 0x220
    Active IRQ 5 [0x2]
    Active DMA 1,5
    Resources 0
      Priority preferred
      Port 0x220-0x220, align 0x0, size 0x10, 16-bit address decoding
      IRQ 5,7,10 High-Edge
      DMA 1,3 8-bit byte-count compatible
      DMA 5 16-bit word-count compatible
      Alternate resources 0:1
        Priority acceptable
        Port 0x220-0x240, align 0x1f, size 0x10, 16-bit address decoding
        IRQ 5,7,10 High-Edge
        DMA 1,3 8-bit byte-count compatible
        DMA 5,7 16-bit word-count compatible
      Alternate resources 0:2
        Priority acceptable
        Port 0x220-0x280, align 0x1f, size 0x10, 16-bit address decoding
        IRQ 5,7,10 High-Edge
        DMA 1,3 8-bit byte-count compatible
        DMA 5,7 16-bit word-count compatible

[root@ether tito]# cat /proc/interrupts
           CPU0
  0:     108825          XT-PIC  timer
  1:       3723          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  4:      23308          XT-PIC  serial
  5:          2          XT-PIC  soundblaster
  8:          1          XT-PIC  rtc
 10:     397983          XT-PIC  usb-uhci, ltserial
 12:          0          XT-PIC  eth0
 14:      10015          XT-PIC  ide0
 15:      15312          XT-PIC  ide1
NMI:          0
ERR:          0
[root@ether tito]# cat /proc/dma
 1: SoundBlaster8
 4: cascade
 5: SoundBlaster16
[root@ether tito]# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
0213-0213 : isapnp read
0220-022f : soundblaster
02f8-02ff : serial(auto)
0376-0376 : ide1
0378-037a : parport0
037b-037f : parport0
0388-038b : Yamaha OPL3
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0a79-0a79 : isapnp write
0cf8-0cff : PCI conf1
5f00-5f1f : Intel Corporation 82371AB PIIX4 ACPI
6100-613f : Intel Corporation 82371AB PIIX4 ACPI
c000-cfff : PCI Bus #01
  cc80-ccff : Silicon Integrated Systems [SiS] 86C326
da00-daff : Lucent Microelectronics 56k WinModem
  da00-daff : ltserial
dc00-dcff : Realtek Semiconductor Co., Ltd. RTL-8139
  dc00-dcff : 8139too
df00-df1f : Intel Corporation 82371AB PIIX4 USB
  df00-df1f : usb-uhci
dfa0-dfa7 : Lucent Microelectronics 56k WinModem
ffa0-ffaf : Intel Corporation 82371AB PIIX4 IDE
  ffa0-ffa7 : ide0
  ffa8-ffaf : ide1

Comment 4 Roberto Hernandez 2001-11-14 06:59:02 UTC
Still haven't figured out how to set vga=0x0311. Now there's something new going
on. I tried messing with /proc/isapnp according to the instructions in
/usr/src/linux/Documentation/isapnp.txt to try to change the IRQs and DMAs. The
deal is that the sound card used to be card 0, now somehow it became card 1!!!!

Comment 5 Alan Cox 2001-11-14 11:15:54 UTC
Ok for the vga one it might be it doesnt handle hex (I thought it did) - if
so vga=769 ought to work for 640x480 frame buffer 8bit deep.

I'm not sure what the soundcard decided to do. You can see the options the
kernel set after you ran sndconfig in /etc/modules.conf. In addition "dmesg"
prints the kernel message log which may well contain more info about why your
ad1848 load failed


Comment 6 Roberto Hernandez 2001-11-14 21:26:51 UTC
The vga=769 didn't work. I also tried vga=785, since I noticed that 769 is
actually 0x301. The message I got with both was that the video mode was invalid.
After running the "scan" option it gave me, these were the reported available modes:

0F00    80x25
0F01    80x50
0F02    80x43
0F03    80x28
0F05    80x30
0F06    80x34
0F07    80x60
0100    40x25

I believe I had read somewhere that the SiS video cards are not 100% VESA
compatible, which might have something to do with other video modes not being
available. If it helps at all, when in text mode there are no problems with the
sound.

Also, I tried disabling the sound card and booting so kudzu removed the
configuration for isapnp and reloaded it. Then I enabled it again and had kudzu
autodetect everything. I was able to load both the sb and ad1848 modules. These
were the lines added to modules.conf by sndconfig:

alias sound-slot-0 sb
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1
|| :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :
alias sound-slot-2 ad1848
post-install sound-slot-2 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1
|| :
pre-remove sound-slot-2 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

When I added a couple of lines to modules.conf I got the same result as before
(ad1848 won't load). If I rmmod all the sound modules from command line and
modprobe ad1848 and sb (in that order) they both load, but the irq's, dma's and
io's are all switched. The performance doesn't change either :-( These were the
lines I added to modules.conf:

options sound dmabuf=1  #read that ISA cards need this (modules under 16Mb RAM)
options sb isapnp=1 io=0x220 irq=5 dma=1 dma16=5
options ad1848 soundpro=1 io=0x530 irq=11 dma=0
options mpu401 io=0x330 irq=9
options opl3 io=0x388

These are the sections of dmesg relevant to sound detection:

PCI: PCI BIOS revision 2.10 entry at 0xfdba1, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router PIIX [8086/7110] at 00:07.0
Limiting direct PCI/PCI transfers.
isapnp: Scanning for PnP cards...
isapnp: Calling quirk for 01:03
isapnp: CMI8330 quirk - fixing interrupts and dma
isapnp: Card 'CMI8330. Audio Adapter'
isapnp: 1 Plug & Play card detected total

...

Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996
sb: CMI8330. Audio Adapter detected
sb: ISAPnP reports 'CMI8330. Audio Adapter' at i/o 0x220, irq 5, dma 1, 5
SB 4.13 detected OK (220)
sb: 1 Soundblaster PnP card(s) found.

Hope some of this is helpful.

Comment 7 Roberto Hernandez 2001-11-18 19:47:55 UTC
I just tried compiling kernel 2.4.13 to see if anything changed, but still no
change. Any more ideas?

Comment 8 Roberto Hernandez 2001-11-22 13:49:42 UTC
OK, I've been trying everything I could think of, and everything seems to
indicate that the kernel isn't the problem.
I tried downloading the kernel sources for kernel 2.4.2 and compiling that,
since the sound used to work fine before my XFree and kernel upgrades to 4.1.0
and 2.4.9-13. Still no change as far as the sound, although both modules load
(sb and ad1848).
Next I tried installing the old kernel 2.4.2-2 RPM from RH7.1 (ignoring the
kernel-drm dependency). XFree 4.1.0 still loads after this change, but the sound
is still messed up.
I tried changing from KDE to Gnome to see if that had anything to do with the
sound (a shot in the dark), but no change. I also tried switching the aRTS sound
server on and off, but no change.
So, to sum it up, after trying the kernel that I had installed when everything
worked fine the sound was still messed up. That leads me to think that the
problem is in the XFree driver for my SiS6326 video card. After searching the
web, I read something about the CMI8330 SoundPro having some problems under
XFree when a SiS6326 is present. Apparently some change from version 4.0.3 to
4.1.0 of XFree triggers the problem.I'm pretty much out of resources. Any new ideas?
TIA

Comment 9 Mike A. Harris 2001-11-23 05:23:59 UTC
What is the URL that you found that mentions problems with
CMI8330 and SiS6326?  I'm going to hunt around on google,
but it is best if you can supply the information.

Can you please attach your X server logs using the file attachment
link below (not cut and paste).  Also attach your X config file.

Also attach: lspci -vv > lspci.txt


Comment 10 Roberto Hernandez 2001-11-23 14:23:36 UTC
URL: http://www.linuxparatodos.com/linux/como-cmi8330.html

The site is in Spanish. Basically the authors explain how to configure ISAPNP
and /etc/modules.conf. What caught my attention is that Cristian Othon mentions
that it's common for the CMI8330 to have problems when scrolling text if it is
used with the SiS 6326.

Comment 11 Roberto Hernandez 2001-11-23 14:25:04 UTC
Created attachment 38424 [details]
Requested lspci -vv

Comment 12 Roberto Hernandez 2001-11-23 14:26:39 UTC
Created attachment 38425 [details]
XFree86 log file

Comment 13 Roberto Hernandez 2001-11-23 14:28:41 UTC
Created attachment 38426 [details]
X config file

Comment 14 Roberto Hernandez 2001-11-23 14:33:14 UTC
Forgot to mention that the URL posted above suggests using the cs4232 module
instead of ad1848. I tried that but it didn't load.
The problem between SiS6326 and CMI8330 is also mentioned in:

http://www.linuxparatodos.com/linux/como-sis6326.html

Comment 15 Mike A. Harris 2001-11-23 15:55:58 UTC
The video card is using these addresses:
	[21] -1	0x0000cc80 - 0x0000ccff (0x80) IX[B](B)
	[22] 0	0x000003b0 - 0x000003bb (0xc) IS[B]
	[23] 0	0x000003c0 - 0x000003df (0x20) IS[B]

And it appears your sound card is using:
        options opl3 io=0x388

and in the isapnp file:

[root@ether tito]# cat /proc/isapnp
Card 1 'CMI0001:CMI8330. Audio Adapter' PnP version 1.0
  Logical device 0 '@@@0001:Unknown'
    Device is active
    Active port 0x530,0x388
    Active DMA ,0
    Resources 0
      Priority preferred
      Port 0x530-0x530, align 0x0, size 0x8, 16-bit address decoding
      Port 0x388-0x388, align 0x0, size 0x8, 16-bit address decoding


Reconfigure your ISA sound card to use alternate resource
ranges that don't conflict.
This appears as a resource conflict where 2 pieces of hardware are
using the same I/O port ranges.


Comment 16 Roberto Hernandez 2001-11-23 21:13:39 UTC
Hey, it's great that you found the problem. 

Hopefully I'll have this working here soon. However, though I've tried to
reconfigure the ISA sound card I haven't had much success. Maybe it's because I
don't fully see the problem yet.

From what I understood, the problem has to do with an I/O conflict between opl3
and the video card. But if the I/O range for opl3 is 0x388-0x38f, why is there a
conflict? The video card I/O range doesn't start until 0x000003b0 - 0x000003bb.

Anyway, I'm not sure how to change the ISA card settings. I have been trying
with ISAPNP. With that I was able to move opl3 to 0x3e8 but the sound hasn't
changed. Besides, modprobe seems to ignore whatever changes I make with ISAPNP
for the ad1848 module. I am attatching a file with all the changes I tried.

If instead of ISAPNP I try using:

 cat > /proc/isapnp <<EOF
 card 1 CMI0001
 dev 0
 irq 0 11
 EOF

The message I get is "isapnp: card 'CMI0001' order 1 not found"

What am I missing?

TIA

Comment 17 Roberto Hernandez 2001-11-23 21:16:34 UTC
Created attachment 38483 [details]
Steps to try to configure ISA card

Comment 18 Mike A. Harris 2001-11-24 15:23:22 UTC
Sorry, bugzilla is a resource for reporting and tracking bugs.  We
do not offer technical support in bugzilla.  Please try one of our
support mailing lists if you require technical assistance configuring
your sound card.  Someone is likely to be able to help you there.

https://listman.redhat.com/mailman/listinfo/
Hope this helps.

Comment 19 Roberto Hernandez 2001-11-26 13:34:49 UTC
OK, sorry about the technical support part. This is the first, and hopefully
last ;-) time I've used this system. Thanks for the mailing list reference.

There's just one more thing I'd like to ask. Could you clarify exactly where the
IO ranges conflict? I still don't see where they overlap. That way I'll know
exactly what it is I need to reconfigure.

Thanks again.

Comment 20 Alan Cox 2001-12-09 01:13:44 UTC
I see no resource conflict Mike

Comment 21 Alan Cox 2001-12-09 01:14:55 UTC
BTW - try it if you have a SiS setup. It looks like the 4.1 XFree may be setting
options that are holding stuff off the ISA (or PCI ?) bus for a long time. 

Seems to be a real bug


Comment 22 Mike A. Harris 2002-02-11 03:41:20 UTC
The rawhide XFree86 4.2.0 has many SiS fixes/changes.  Could you please
try it out and report back if the problem is still present?  There is
a new driver maintainer who is actively working on SiS support now, and
if this problem still exists and is in fact a driver issue as Alan
believes, perhaps we can try to pinpoint the problem.

I've got SiS docs for this chip somewhere I believe, and I've got a
sound card with this audio chip as well, however it is a PCI card.
I don't have the SiS 6326 however, but I may be able to obtain one.

Let me know how you fare with Rawhide.

Thanks.

Comment 23 Roberto Hernandez 2002-02-11 14:18:41 UTC
OK, I've downloaded all the XFree 4.2.0 rpm's from rawhide. I've managed to fix
most of the dependencies, but there's a couple I'd like to ask about.

1. kernel-drm = 4.2.0 is needed by XFree86-4.2.0-6.30 - Do I have to upgrade to
the rawhide 2.4.17 kernel or is there a workaround so I can use my current
2.4.9-21? (I also have 2.4.16 and 2.4.17 compiled from the kernel.org sources).

2. perl(strict)   is needed by XFree86-tools-4.2.0-6.30 - Again, do I need all
the perl rpm's from rawhide or can I fix this with my current RH7.1 rpm's.

3. libgcc_s.so.1   is needed by XFree86-libs-4.2.0-6.30
   libstdc++.so.4   is needed by XFree86-libs-4.2.0-6.30
   libgcc_s.so.1(GCC_3.0)   is needed by XFree86-libs-4.2.0-6.30
   libgcc_s.so.1   is needed by XFree86-tools-4.2.0-6.30
   libstdc++.so.4   is needed by XFree86-tools-4.2.0-6.30
If I'm reading this correctly, I'll need GCC3.0. Although my knowledge of the
subject is null, I've read some articles that strongly discourage the use of
higher versions of GCC. Also, if I upgrade, won't that break a lot of
dependencies with currently installed packages? Is there any way around this?

Comment 24 Mike A. Harris 2002-03-07 21:04:48 UTC
Deferring issue for future release.

Comment 25 Roberto Hernandez 2002-05-15 15:01:18 UTC
This bug persists after installing RedHat 7.3 with XFree4.2.0.

I think it should be reopened.

Comment 26 Mike A. Harris 2002-05-20 23:15:03 UTC
I suggest contacting the SiS driver maintainer directly if you seek a speedy
resolution.  I do not have the hardware with which to debug this issue, so
any fix is likely to only come to us from trickling in from upstream.  If
the upstream maintainer isn't aware of the problem, it is unlikely to ever
get fixed.

I suggest reporting this to xfree86, and also xpert

Comment 27 Mike A. Harris 2002-11-01 06:51:35 UTC
I'm closing this issue as WONTFIX because I simply do not have the
hardware required to even troubleshoot this.  I suggest as above,
that if this issue is still important, that it be reported directly
to the driver maintainer.