NetBSD Problem Report #29245

From rhialto@azenomei.knuffel.net  Sat Feb  5 14:04:48 2005
Return-Path: <rhialto@azenomei.knuffel.net>
Received: from azenomei.knuffel.net (azenomei.xs4all.nl [213.84.74.36])
	by narn.netbsd.org (Postfix) with ESMTP id 8831F63B845
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  5 Feb 2005 14:04:47 +0000 (UTC)
Message-Id: <200502051404.j15E4gWN007270@azenomei.knuffel.net>
Date: Sat, 5 Feb 2005 15:04:42 +0100 (CET)
From: Rhialto <rhialto@azenomei.knuffel.net>
Reply-To: rhialto@azenomei.knuffel.net
To: gnats-bugs@netbsd.org
Subject: Fix to make audio work on Alpha PWS
X-Send-Pr-Version: 3.95

>Number:         29245
>Category:       kern
>Synopsis:       Fix to make audio work on Alpha PWS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 05 14:05:01 +0000 2005
>Last-Modified:  Mon Feb 07 01:26:00 +0000 2005
>Originator:     Rhialto
>Release:        NetBSD 2.0
>Organization:

>Environment:
System: NetBSD azenomei.falu.nl 2.0 NetBSD 2.0 (AZENOMEI2.0) #1: Tue Jan 11 00:02:19 CET 2005 rhialto@azenomei.falu.nl:/usr/src/sys/arch/alpha/compile/AZENOMEI2.0 alpha
Architecture: alpha
Machine: alpha
>Description:
	Audio never worked on Alpha PWS (Miata) machines.
	Then around 10 januari I found a patch that made it work.
	I tried to find the originator to confirm it to hir but I must
	have lost the original message; I can't find it anymore.
	There is no sign of a similar patch in gnats that I can find,
	hence this pr to keep the information.

	This patches the audio so that it works via the ess device;
	the audio is afaik also supposed to work as a soundblaster but
	that never worked for me either.
>How-To-Repeat:
	Try to use sound. Hear silence and see strange messages in syslog.
>Fix:

Like I said, not my patch, I can't give credit to whom it is due.
This patch is for the 2.0 branch, I notice that in -current there are
some changes in essreg.h but it doesn't incorporate this difference.

(in fact it seems that ESS_USE_AUDIO1(model) is after the patch now true
for all supported ess models??)

--- essreg.h.orig	2001-09-29 21:08:49.000000000 +0200
+++ essreg.h	2005-01-10 23:21:15.000000000 +0100
@@ -175,7 +175,7 @@

 #define ESS_DRQ2_VALID(chan) ((chan) == 0 || (chan) == 1 || (chan) == 3 || (chan) == 5)

-#define ESS_USE_AUDIO1(model) (((model) == ESS_1788) || ((model) == ESS_1868) || ((model) == ESS_1878) || ((model) == ESS_1869) || ((model) == ESS_1879))
+#define ESS_USE_AUDIO1(model) (((model) == ESS_1788) || ((model) == ESS_1868) || ((model) == ESS_1878) || ((model) == ESS_1869) || ((model) == ESS_1879) || ((model) == ESS_1888))

 /*
  * Macros to manipulate gain values
--- ess.c.orig	2003-05-10 01:51:28.000000000 +0200
+++ ess.c	2005-01-10 23:21:15.000000000 +0100
@@ -249,7 +249,7 @@
 	NULL,
 	NULL,
 	NULL,
-	ess_audio2_halt,
+	ess_audio1_halt,
 	ess_audio1_halt,
 	ess_speaker_ctl,
 	ess_getdev,
@@ -262,7 +262,7 @@
 	ess_round_buffersize,
 	ess_mappage,
 	ess_1888_get_props,
-	ess_audio2_trigger_output,
+	ess_audio1_trigger_output,
 	ess_audio1_trigger_input,
 	NULL,
 };

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            --  rhialto/at/falu.nl
\X/ Hi! I'm a signature virus! Copy me to your .signature to help me spread!

>Audit-Trail:
From: "Charles M. Hannum" <abuse@spamalicious.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/29245: Fix to make audio work on Alpha PWS
Date: Sat, 5 Feb 2005 18:57:22 +0000

 On Saturday 05 February 2005 14:05, Rhialto wrote:
 >  Audio never worked on Alpha PWS (Miata) machines.
 >  Then around 10 januari I found a patch that made it work.
 >  I tried to find the originator to confirm it to hir but I must
 >  have lost the original message; I can't find it anymore.
 >  There is no sign of a similar patch in gnats that I can find,
 >  hence this pr to keep the information.

 This patch is definitely not correct in general.  It will break full-duplex 
 mode on chips that support it.

 Is the problem here that the ESS chip is only getting assigned one DRQ or one 
 IRQ?

From: Rhialto <rhialto@azenomei.knuffel.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: kern/29245: Fix to make audio work on Alpha PWS
Date: Mon, 7 Feb 2005 02:25:25 +0100

 On Sat 05 Feb 2005 at 18:58:01 +0000, Charles M. Hannum wrote:
 >  This patch is definitely not correct in general.  It will break full-duplex 
 >  mode on chips that support it.

 As I can see the patch, it only changes behaviour for the ESS_1888
 model. And looking at it function pointer table (struct audio_hw_if
 ess_1888_hw_if), it had a weird mix of "audio1" and "audio2" stuff in
 the first place. So, without knowing specifics about the hardware, the
 patch made sense to me.

 >  Is the problem here that the ESS chip is only getting assigned one
 >  DRQ or one IRQ?

 That looks to be the case, judging by the boot messages:

 ess0 at isa0 port 0x220-0x22f irq 5 drq 1
 ess0: ESS Technology ES1888 [version 0x688b]
 ess0: audio1 interrupting at irq 5
 audio0 at ess0: half duplex, mmap, independent
 opl0 at ess0: model OPL3
 midi0 at opl0: ESS Yamaha OPL3

 I also have this in my config file. I suppose I also copied from my
 original source.

 #ess*	at	isa? port 0x220 irq 5 drq 1 drq2 5   # ESS 18XX
 ess*	at	isa? port 0x220 irq 5 drq 1 # ESS 18XX

 What you are saying is perhaps that I should try the commented out
 version with the original sources? I just did, and now I get these boot
 messages:

 ess0 at isa0 port 0x220-0x22f irq 5 drq 1,5
 ess0: ESS Technology ES1888 [version 0x688b]
 ess0: audio1 interrupting at irq 5
 ess0: audio2 polled
 audio0 at ess0: full duplex, mmap, independent
 opl0 at ess0: model OPL3
 midi0 at opl0: ESS Yamaha OPL3

 but, unfortutately, no sound anymore. Well, perhaps just a small "click"
 when I start mpg123.

 -Olaf.
 -- 
 ___ Olaf 'Rhialto' Seibert                            --  rhialto/at/falu.nl
 \X/ Hi! I'm a signature virus! Copy me to your .signature to help me spread!

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.