From owner-freebsd-multimedia@FreeBSD.ORG Mon Jul 11 09:03:21 2005 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6B8916A41C for ; Mon, 11 Jul 2005 09:03:21 +0000 (GMT) (envelope-from mus.bsd@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54AB043D46 for ; Mon, 11 Jul 2005 09:03:19 +0000 (GMT) (envelope-from mus.bsd@gmail.com) Received: by wproxy.gmail.com with SMTP id i14so854744wra for ; Mon, 11 Jul 2005 02:03:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WAZ9f9A4v3XEWEzVlUAHIyzY+FANbMWlsuYRbz2yx6hEm0JQYDg1zJHPni0QtFVD0KXKwauLmBYjzBqHyMRyOlILttE54m1zXcctQHnYziiZufwyBSw6+ovVi56vrxv6ab3i3MDHHQgY4I9TeajFtpKwFuyN7B8Kifxg3O0QFsI= Received: by 10.54.14.52 with SMTP id 52mr3611720wrn; Mon, 11 Jul 2005 02:03:18 -0700 (PDT) Received: by 10.54.129.5 with HTTP; Mon, 11 Jul 2005 02:03:18 -0700 (PDT) Message-ID: <8eb2b810507110203229b46b@mail.gmail.com> Date: Mon, 11 Jul 2005 17:03:18 +0800 From: Muzaffar Ariff To: yongari@rndsoft.co.kr In-Reply-To: <20050701014258.GE17058@rndsoft.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <8eb2b81050628200659d338ab@mail.gmail.com> <20050629043027.GB8832@rndsoft.co.kr> <42C2B94F.2010708@samsco.org> <20050701014258.GE17058@rndsoft.co.kr> Cc: freebsd-multimedia@freebsd.org Subject: Re: ESS Maestro3 no sound X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Muzaffar Ariff List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 09:03:21 -0000 After much searching on how to do the patching I think i got it right, but it still does not solve my problem. Here is what I did: 1. Tired to use the patch command and didn't work, because it can't find line 1023 in the original maestro3.c (on my machine). I knew about this but just gave it a try, hoping that I don't have to go the long way :-) 2. Went to locate my sound driver modules and found it in /usr/src/sys/modules/sound/driver/maestro3. Use to the make command to see what it does. *Q1: Is this the source code for the maestro3? 3. I then located and modified my maestro3.c file in /usr/src/sys/dev/sound/pci/maestro3.c (before that made a copy of the old one). Add and commenting out the stuff that you suggested. 4. went back to ~/sound/driver/maestro3 and recompiled it again. It compiled without a problem and I then loaded the module by using #kldload snd_driver. Look up /dev/sndstat and it showed the same thing as before: Installed devices: pcm0: at io 0xd800 irq 5 kld snd_maestro3 (4p/1r/0v channels duplex default) 5. Restarted my machine by having snd_maestro3_load=3D"YES" loaded into /boot/loader.conf 6. Tried using xmms and the same problem happened, the xmms plays the song but with no sound. Looked at /var/run/dmesg.boot to see what went wrong and it output the same problem: pci0: at device 7.3 (no driver attached) pcm0: port 0xd800-0xd8ff mem 0xf3ffe000-0xf3ffffff irq 5 at device 8.0 on pci0 pcm0: failed: rid 0x10 is ioport, requested 3 Q2: Now I might have compiled the code right but did I load the module correctly? (i seem to be at the same conclusion, so I'm guessing it didn't load). Q3: If this does not work do I need to tweek the source to make my card work? If so looking at the code I don't know where to begin :(=20 Hopeless and confuse Muzaffar Ariff On 7/1/05, Pyun YongHyeon wrote: > On Wed, Jun 29, 2005 at 09:07:59AM -0600, Scott Long wrote: >=20 > [...] >=20 > > It looks like yet more decay in the driver. When I wrote it, I was la= zy > > and didn't want to figure out which chip versions preferred IOPORT > > mapping and which ones preferred MEMIO, so I just had it try MEMIO fir= st > > (since that is a better choice) and then fail back to IOPORT. The > > resource manager seemed to tolerate this back then, but apparently it > > doesn't now. My guess is that the first call to bus_alloc_resource > > returns success but actually fails, and in the process it leaks the > > resource out of the resource manager. Then when you unload and load > > again, the resource is unavailable (since it was leaked) so the first > > call to fails, prompting it to go to the second call which succeeds > > fully. This would mean that there are now a number of bugs in the > > resource manager which need to be fixed. > > > > Based on what I've seen over the years, it might be safe to assume tha= t > > BAR0 on both the meastro3 and allegro1 is IOPORT and that BAR1 on the > > maestro3 is MEMIO. Thus, the easiest change might be to just remove > > the first bus_alloc_resource call and force the driver to always use > > IOPORT. I'd still like to use this as a test case for fixing the deep= er > > bugs in the resource manager, though. > > >=20 > Thanks for detailed explanation. :-) > Here is patch. Muzaffar, does the patch change your situation? >=20 > Btw, I encountered dreasful message "play interrupt timeout, channel dead= " > again. Unloading the driver and then reloading the driver fixed it. > Since I see "pci_link2: Unable to choose an IRQ" during driver load > I can't sure it's fault of maestro3(4) driver. >=20 > -- > Regards, > Pyun YongHyeon > http://www.kr.freebsd.org/~yongari | yongari@freebsd.org >=20 >=20 >=20 --=20 Muzaffar Ariff mus.bsd@gmail.com