From jimd@234-209.ip.ll.net  Mon May 19 05:59:44 2003
Return-Path: <jimd@234-209.ip.ll.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6012037B404
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 May 2003 05:59:41 -0700 (PDT)
Received: from 255-176.ip.ll.net (255-176.ip.ll.net [209.131.255.176])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6342C43F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 May 2003 05:59:40 -0700 (PDT)
	(envelope-from jimd@234-209.ip.ll.net)
Received: from 234-209.ip.ll.net (localhost [127.0.0.1])
	by freebsd2.localnet10 (8.12.9/8.12.7) with ESMTP id h4IChn12082736
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 May 2003 12:43:49 GMT
Received: (from jimd@localhost)
	by 234-209.ip.ll.net (8.12.9/8.12.7/Submit) id h4IChnX7082735;
	Sun, 18 May 2003 12:43:49 GMT
Message-Id: <200305181243.h4IChnX7082735@234-209.ip.ll.net>
Date: Sun, 18 May 2003 12:43:49 GMT
From: jimd_NOSPAM@siu.edu
Reply-To: jimd@siu.edu
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pcm0 reported twice: onboard AC97 and PCI sound card
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52428
>Category:       i386
>Synopsis:       pcm0 reported twice: onboard AC97 and PCI sound card
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 19 06:00:22 PDT 2003
>Closed-Date:    Wed Aug 13 13:06:23 PDT 2003
>Last-Modified:  Wed Aug 13 13:06:23 PDT 2003
>Originator:     jimd@siu.edu
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD 4.8-STABLE #0: Sat May 17 15:14:12 CDT 2003 localhost:/usr/src/sys/compile/XSYSTEM i386

Motherboard is MSI "655 MAX" (SiS 655/963).

-----------------------------------
System log after "kldload emu10k1":
-----------------------------------

May 18 11:56:09 freebsd2 /kernel: pcm0: <Creative EMU10K1> port 0xcc00-0xcc1f irq 5 at device 7.0 on pci0
May 18 11:56:09 freebsd2 /kernel: pcm0: <SigmaTel STAC9708/9711 ac97 codec>

--------------------------------
pciconf output:
--------------------------------

agp0@pci0:0:0:	class=0x060000 card=0x00000000 chip=0x06551039 rev=0x10 hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS655 Host-to-PCI Bridge'
    class    = bridge
    subclass = HOST-PCI
pcib1@pci0:1:0:	class=0x060400 card=0x00000000 chip=0x00021039 rev=0x00 hdr=0x01
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS 6201/02 PCI True-Color Graphics Accelerator'
    class    = bridge
    subclass = PCI-PCI
isab0@pci0:2:0:	class=0x060100 card=0x00000000 chip=0x00081039 rev=0x25 hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS85C503/5513 PCI to ISA Bridge (LPC Bridge)'
    class    = bridge
    subclass = PCI-ISA
atapci0@pci0:2:5:	class=0x010180 card=0x73001462 chip=0x55131039 rev=0x00 hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS5513 EIDE Controller (A,B step)'
    class    = mass storage
    subclass = ATA
none0@pci0:2:7:	class=0x040100 card=0x73001462 chip=0x70121039 rev=0xa0 hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS7012 PCI Audio Accelerator'
    class    = multimedia
    subclass = audio
ohci0@pci0:3:0:	class=0x0c0310 card=0x73001462 chip=0x70011039 rev=0x0f hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS5597/8 Universal Serial Bus Controller'
    class    = serial bus
    subclass = USB
ohci1@pci0:3:1:	class=0x0c0310 card=0x73001462 chip=0x70011039 rev=0x0f hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS5597/8 Universal Serial Bus Controller'
    class    = serial bus
    subclass = USB
none1@pci0:3:3:	class=0x0c0320 card=0x54701462 chip=0x70021039 rev=0x00 hdr=0x00
    vendor   = 'Silicon Integrated Systems (SiS)'
    device   = 'SiS7002 USB 2.0 Enhanced Host Controller'
    class    = serial bus
    subclass = USB
none2@pci0:7:0:	class=0x040100 card=0x80641102 chip=0x00021102 rev=0x07 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'EMU10K1 Audio Chipset (SB Live!)'
    class    = multimedia
    subclass = audio
none3@pci0:7:1:	class=0x098000 card=0x00201102 chip=0x70021102 rev=0x07 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'PCI Gameport Joystick'
    class    = input device
sis0@pci0:8:0:	class=0x020000 card=0xf3111385 chip=0x0020100b rev=0x00 hdr=0x00
    vendor   = 'National Semiconductor'
    device   = 'DP83815/16 MacPhyter 10/100 Mb/s Ethernet MAC & PHY'
    class    = network
    subclass = ethernet
ahc0@pci0:11:0:	class=0x010000 card=0x62a09005 chip=0x00809005 rev=0x02 hdr=0x00
    vendor   = 'Adaptec'
    device   = '29160/N/LP Ultra160 (AIC-7892A) SCSI Host Adapter'
    class    = mass storage
    subclass = SCSI
none4@pci0:15:0:	class=0x020000 card=0x730c1462 chip=0x440114e4 rev=0x01 hdr=0x00
    vendor   = 'Broadcom Corporation'
    device   = 'BCM440x 10/100 Integrated Ethernet Controller'
    class    = network
    subclass = ethernet
nvidia0@pci1:0:0:	class=0x030000 card=0x00000000 chip=0x025010de rev=0xa3 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'GeForce4 Ti 4600 [NV25.1]'
    class    = display
    subclass = VGA

	
>Description:
	A "kldload emu10k1" reports two sound cards associated with pcm0.
        Using the PCI sound card works, but the onboard AC97 device is not
	usable.

	
>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:

From: Martin.Kaeske@Stud.TU-Ilmenau.DE
To: freebsd-gnats-submit@FreeBSD.org, jimd@siu.edu
Cc:  
Subject: Re: i386/52428: pcm0 reported twice: onboard AC97%
Date: Mon, 19 May 2003 16:22:40 +0200 (CEST)

 Hello,
 It's normal that there are two lines containing "pcm0", one is the
 controller "EMU10K1" the other one is the AC97Codec "SigmaTel...".
 Both refer to your SB-Live. AFAICS snd_ich.ko is responsible for your
 onboard sound, maybe you want to "kldload snd_ich.ko" to see if this
 actually works.
 Nevertheless those two lines are not a bug, do "cat /dev/sndstat" to
 verify that there is only one soundcard connected to pcm0.
 
 Can we close this PR?
 
 HTH & HAND
 Martin
 

From: jimd@siu.edu
To: Martin.Kaeske@Stud.TU-Ilmenau.DE
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/52428: pcm0 reported twice: onboard AC97%
Date: Mon, 19 May 2003 11:44:16 -0500 (CDT)

 Thank you for the update.
 
 On a Dell GX240 FreeBSD-4.8-RELEASE system, I see two pcm devices:
 
 grep pcm /var/run/dmesg.boot
 pcm0: <CMedia CMI8738> port 0xdc00-0xdcff irq 11 at device 7.0 on pci2
 pcm1: <Intel 82801BA (ICH2)> port 0xcc40-0xcc7f,0xc800-0xc8ff irq 10 at device 31.5 on pci0
 pcm1: <Analog Devices AD1885 ac97 codec>
 pcm1: measured ac97 link rate at 55922 Hz
 
 
 cat /dev/sndstat
 FreeBSD Audio Driver (newpcm)
 Installed devices:
 pcm0: <CMedia CMI8738> at io 0xdc00 irq 11 (1p/1r/0v channels duplex)
 pcm1: <Intel 82801BA (ICH2)> at io 0xc800, 0xcc40 irq 10 bufsz 16384 (1p/1r/0v channels duplex)
 
 
 When I start Gnome2 "Volume Control" on said Dell GX240, I see two
 Cards, and the controls do indeed affect the two different sound devices
 seperately.
 
 In my situation as reported, I see only one pcm device, and only one
 "Volume Control" card. I had assumed that this was because of a lack of
 some support for the onboard AC97.
 
 In the Dell-GX240 kernel, I added:
 #PCI sound card support
 device          pcm             # for PnP cards
 #options        PNPBIOS         # enable PnP BIOS searching
 
 
 If I remember correctly, you are correct that cat /dev/sndstat currently
 only returns one device. I will try kldload-ing "snd_ich.ko" tonight and
 see what that does. Is there a MANual page or HANDBOOK entry for
 "snd_ich". I couldn't find one (I did read the MANual page for "snd").
 Thank you.
 
 
 On 19 May, Martin.Kaeske@Stud.TU-Ilmenau.DE wrote:
 > Hello,
 > It's normal that there are two lines containing "pcm0", one is the
 > controller "EMU10K1" the other one is the AC97Codec "SigmaTel...".
 > Both refer to your SB-Live. AFAICS snd_ich.ko is responsible for your
 > onboard sound, maybe you want to "kldload snd_ich.ko" to see if this
 > actually works.
 > Nevertheless those two lines are not a bug, do "cat /dev/sndstat" to
 > verify that there is only one soundcard connected to pcm0.
 > 
 > Can we close this PR?
 

From: Martin Kaeske <Martin.Kaeske@Stud.TU-Ilmenau.DE>
To: jimd@siu.edu
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/52428: pcm0 reported twice: onboard AC97%
Date: Mon, 19 May 2003 19:17:38 +0200

 On Mon, May 19, 2003 at 11:44:16AM -0500, jimd@siu.edu wrote:
 [SNIP] 
 > In my situation as reported, I see only one pcm device, and only one
 > "Volume Control" card. I had assumed that this was because of a lack of
 > some support for the onboard AC97.
 
 Yes, you don't loaded the module for your onboard sound. (I guess :)
  
 > In the Dell-GX240 kernel, I added:
 > #PCI sound card support
 > device          pcm             # for PnP cards
 > #options        PNPBIOS         # enable PnP BIOS searching
 
 And that is the big difference. In the Dell-kernel you have "device pcm",
 that means all sound drivers are compiled into the kernel and during boot
 one after the other checks the system for a soundcard (snd_emu10k1 finds
 the SB-Live and snd_ich finds the onboard soundcard). If you don't have
 "device pcm" you have to manually load the drivers. As you said after
 "kldload emu10k1" the kernel responded with those infos about pcm0
 so you have to load the driver for the onboard card to get it recognized
 by the kernel. You can also load all available sound modules if you don't
 know which one is appropriate (the kernel does effectively the same).
  
 > see what that does. Is there a MANual page or HANDBOOK entry for
 > "snd_ich". I couldn't find one (I did read the MANual page for "snd").
  
 I'm afraid no. I found snd_ich by searching the kernel source.
 
 Btw. it is possible that snd_ich can't find your card either, that could
 mean that snd_ich isn't the right driver or that your onboard card is not
 supported by FreeBSD at all. For the reasons i mentioned above you can
 add "device pcm" to your kernel config to make sure wether your card is
 supported or not.
 
 Martin
 
 -- 
 The instructions said to use Windows 98 or better, so I installed FreeBSD.
 
 		-- Jim Levie in comp.unix.bsd.freebsd.misc --

From: jimd@siu.edu
To: Martin.Kaeske@Stud.TU-Ilmenau.DE
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/52428: pcm0 reported twice: onboard AC97%
Date: Mon, 19 May 2003 12:38:30 +0000 (CDT)

 Ah HA! "kldload snd_ich" works like a charm! Sorry for being such a pain. I
 have added 'snd_ich' in my /boot/loader.conf file. You may close out the PR -
 thank you!
 
 sysctl -A|grep pcm
 hw.snd.pcm0.buffersize: 4096
 hw.snd.pcm0.vchans: 0
 hw.snd.pcm1.buffersize: 16384
 hw.snd.pcm1.vchans: 0
 hw.snd.pcm1.ac97rate: 48000
 
 
 cat /dev/sndstat
 FreeBSD Audio Driver (newpcm)
 Installed devices:
 pcm0: <Creative EMU10K1> at io 0xcc00 irq 5 (4p/2r/0v channels duplex)
 pcm1: <SiS 7012> at io 0xd400, 0xd000 irq 5 bufsz 16384 (1p/1r/0v channels duplex)
 
 P.S. I forgot about "device pcm" including ALL of the sound drivers in the
 kernel. It is, perhaps, TOO easy to equate "device pcm" and "snd_pcm.ko" as
 effectively being "one and the same", but that is obviously not the case.
 Thanks again.
 
 
 
 On 19 May, Martin Kaeske wrote:
 > On Mon, May 19, 2003 at 11:44:16AM -0500, jimd@siu.edu wrote:
 > [SNIP] 
 >> In my situation as reported, I see only one pcm device, and only one
 >> "Volume Control" card. I had assumed that this was because of a lack of
 >> some support for the onboard AC97.
 > 
 > Yes, you don't loaded the module for your onboard sound. (I guess :)
 >  
 >> In the Dell-GX240 kernel, I added:
 >> #PCI sound card support
 >> device          pcm             # for PnP cards
 >> #options        PNPBIOS         # enable PnP BIOS searching
 > 
 > And that is the big difference. In the Dell-kernel you have "device pcm",
 > that means all sound drivers are compiled into the kernel and during boot
 > one after the other checks the system for a soundcard (snd_emu10k1 finds
 > the SB-Live and snd_ich finds the onboard soundcard). If you don't have
 > "device pcm" you have to manually load the drivers. As you said after
 > "kldload emu10k1" the kernel responded with those infos about pcm0
 > so you have to load the driver for the onboard card to get it recognized
 > by the kernel. You can also load all available sound modules if you don't
 > know which one is appropriate (the kernel does effectively the same).
 >  
 >> see what that does. Is there a MANual page or HANDBOOK entry for
 >> "snd_ich". I couldn't find one (I did read the MANual page for "snd").
 >  
 > I'm afraid no. I found snd_ich by searching the kernel source.
 > 
 > Btw. it is possible that snd_ich can't find your card either, that could
 > mean that snd_ich isn't the right driver or that your onboard card is not
 > supported by FreeBSD at all. For the reasons i mentioned above you can
 > add "device pcm" to your kernel config to make sure wether your card is
 > supported or not.
 > 
 > Martin
 > 
 
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Wed Aug 13 13:05:15 PDT 2003 
State-Changed-Why:  
Submitter reports that this problem has been solved by kldload'ing the 
appropriate module. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52428 
>Unformatted:
