Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Nov 1998 15:38:34 -0500
From:      Benjamin Lewis <bhlewis@gte.net>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   i386/8687: pcm driver does not recognize Axra Yamaha card (fix included)
Message-ID:  <199811142038.PAA01654@home.bhl>

next in thread | raw e-mail | index | archive | help

>Number:         8687
>Category:       i386
>Synopsis:       pcm driver does not recognize AXRA Yamaha sound card
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 14 12:40:01 PST 1998
>Last-Modified:
>Originator:     Benjamin Lewis
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	FreeBSD-current cvsup/buildworld performed Nov. 13, 1998

>Description:

	The pcm sound card driver does not recognize Vendor ID 0x0008a865
        as a Yamaha OPL3-SA3 sound card.

>How-To-Repeat:

	Boot the operating system, notice that pcm[01] does not get configured.

>Fix:
	
	The following patch to /usr/src/sys/i386/isa/snd/ad1848.c worked for
	me.  Since I have no idea what I'm doing, I also have no idea 
	whether this patch is correct.  However, it does seem to work:

	[from dmesg]

Probing for PnP devices:
CSN 1 Vendor ID: YMH0800 [0x0008a865] Serial 0xffffffff Comp ID: PNPb02f [0x2fb0
d041]
mss_attach <Yamaha YMF719 OPL3-SA3>1 at 0xe80 irq 10 dma 3:1 flags 0x11
setting up yamaha registers
set yamaha master volume to maxpcm1 (CS423x/Yamaha <Yamaha YMF719 OPL3-SA3> sn 0
xffffffff) at 0xe80-0xe87 irq 10 drq 3 flags 0x11 on isa

	However, sequencer1 does not seem to be functional:

	[from /dev/sndstat]

FreeBSD Audio Driver (981002) Nov 14 1998 09:49:00
Installed devices:
pcm1: <Yamaha YMF719 OPL3-SA3> at 0xe80 irq 10 dma 3:1
sequencer1: <???> at 0xe80 (not functional)

	I don't know if the sequencer problem originates with my patch,
	my sound card, or the pcm driver.

	I'll include the pnpinfo output so that more capable people can
	see what I'm dealing with

	[from pnpinfo]

Checking for Plug-n-Play devices...

Card assigned CSN #1
Vendor ID YMH0800 (0x0008a865), Serial Number 0xffffffff
PnP Version 1.0, Vendor Version 0
Device Description: OPL3-SA3 Sound Board

Logical Device ID: YMH0021 0x2100a865 #0
	Vendor register funcs 00
TAG Start DF
Good Configuration
    I/O Range 0x220 .. 0x220, alignment 0x10, len 0x10
	[16-bit addr]
    I/O Range 0x530 .. 0x530, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x388 .. 0x388, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x330 .. 0x330, alignment 0x2, len 0x2
	[16-bit addr]
    I/O Range 0x370 .. 0x370, alignment 0x2, len 0x2
	[16-bit addr]
    IRQ: 5 IRQ: High true edge sensitive
    DMA: channel(s) 0 
	8-bit, not a bus master, count by byte, , Type F
    DMA: channel(s) 1 
	8-bit, not a bus master, count by byte, , Type F
TAG Start DF
Acceptable Configuration
    I/O Range 0x240 .. 0x240, alignment 0x10, len 0x10
	[16-bit addr]
    I/O Range 0xe80 .. 0xe80, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x388 .. 0x388, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x300 .. 0x300, alignment 0x2, len 0x2
	[16-bit addr]
    I/O Range 0x100 .. 0xffe, alignment 0x2, len 0x2
	[16-bit addr]
    IRQ: 5 7 9 10 11 IRQ: High true edge sensitive
    DMA: channel(s) 0 1 3 
	8-bit, not a bus master, count by byte, , Type F
    DMA: channel(s) 0 1 3 
	8-bit, not a bus master, count by byte, , Type F
TAG Start DF
Sub-optimal Configuration
    I/O Range 0x220 .. 0x280, alignment 0x10, len 0x10
	[16-bit addr]
    I/O Range 0x530 .. 0xf48, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x388 .. 0x3f8, alignment 0x8, len 0x8
	[16-bit addr]
    I/O Range 0x300 .. 0x334, alignment 0x2, len 0x2
	[16-bit addr]
    I/O Range 0x100 .. 0xffe, alignment 0x2, len 0x2
	[16-bit addr]
    IRQ: 3 5 7 9 10 11 IRQ: High true edge sensitive
    DMA: channel(s) 0 1 3 
	8-bit, not a bus master, count by byte, , Type F
    DMA: channel(s) 0 1 3 
	8-bit, not a bus master, count by byte, , Type F
TAG End DF

Logical Device ID: YMH0022 0x2200a865 #1
	Vendor register funcs 00
Compatible Device ID: PNPb02f (2fb0d041)
TAG Start DF
Good Configuration
    I/O Range 0x201 .. 0x201, alignment 0x1, len 0x1
	[16-bit addr]
TAG Start DF
Acceptable Configuration
    I/O Range 0x202 .. 0x202, alignment 0x1, len 0x1
	[16-bit addr]
TAG Start DF
Acceptable Configuration
    I/O Range 0x203 .. 0x203, alignment 0x1, len 0x1
	[16-bit addr]
TAG Start DF
Acceptable Configuration
    I/O Range 0x204 .. 0x20f, alignment 0x1, len 0x1
	[16-bit addr]
TAG End DF
End Tag

Successfully got 42 resources, 2 logical fdevs
-- card select # 0x0001

CSN YMH0800 (0x0008a865), Serial Number 0xffffffff

Logical device #0
IO:  0x0240 0x0e80 0x0388 0x0300 0x0ff6 0x0000 0x0000 0x0000
IRQ 10 0
DMA 3 1
IO range check 0x00 activate 0x01

Logical device #1
IO:  0x0201 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
IRQ 0 0
DMA 0 0
IO range check 0x00 activate 0x01




	Here is the patch:

*** ad1848.c.old	Sat Nov 14 10:48:08 1998
--- ad1848.c	Sat Nov 14 14:58:19 1998
***************
*** 1416,1421 ****
--- 1416,1423 ----
  	s = "Yamaha SA3";
      else if (vend_id == 0x0000a865)
  	s = "Yamaha YMF719 OPL-SA3";
+     else if (vend_id == 0x0008a865)
+         s = "Yamaha YMF719 OPL3-SA3";
      else if (vend_id == 0x8140d315)
  	s = "SoundscapeVIVO";
      if (s) {
***************
*** 1470,1475 ****
--- 1472,1478 ----
  	case 0x2000a865:	/* Yamaha SA2 */
  	case 0x3000a865:	/* Yamaha SA3 */
  	case 0x0000a865:	/* Yamaha TMF719 SA3 */
+ 	case 0x0008a865:	/* Yamaha YMF719 OPL3-SA3 */
  	    dev->id_iobase = d.port[1];
  	    tmp_d.alt_base = d.port[0];
  	    tmp_d.conf_base = d.port[4];

-- 
Benjamin Lewis
bhlewis@gte.net         -or-       bhlewis@purdue.edu


>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811142038.PAA01654>