From owner-freebsd-mobile@FreeBSD.ORG Tue Jun 6 19:27:30 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE75016C1C0 for ; Tue, 6 Jun 2006 19:22:34 +0000 (UTC) (envelope-from a.bittau@cs.ucl.ac.uk) Received: from darkircop.org (tapir.cs.ucl.ac.uk [128.16.66.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6083943D45 for ; Tue, 6 Jun 2006 19:22:34 +0000 (GMT) (envelope-from a.bittau@cs.ucl.ac.uk) Received: by darkircop.org (Postfix, from userid 0) id 66EFE861571; Tue, 6 Jun 2006 20:22:29 +0100 (BST) Date: Tue, 6 Jun 2006 20:22:29 +0100 From: Andrea Bittau To: Eric Anderson Message-ID: <20060606192229.GA4465@shorty.sorbonet.org> References: <20060606124030.GA32057@shorty.sorbonet.org> <4485CEF8.10201@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4485CEF8.10201@centtech.com> User-Agent: Mutt/1.4.2.1i X-Echelon: Bush Bomb War KGB Cc: freebsd-mobile@freebsd.org Subject: Re: HDA sound driver mod for thinkpad x60s X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2006 19:27:39 -0000 On Tue, Jun 06, 2006 at 01:52:40PM -0500, Eric Anderson wrote: > I can't seem to play any audio tho.. I realize this isn't an IBM, but > was hoping it would work.. :) What does that mean? If you: cat /dev/urandom > /dev/dsp does it complain? dmesg? Also, if you ctrl C, does it stop after a bit, with no complatins? Anyway, assuming my code is "good enough" there might be two reasons why it's not working: 1) I lamely hardcoded the Output device node identifier. 2) I hardcoded the Pin node identifier for the volume control. To solve #1 try this in my code: in hdac_attach2() get rid of the if(0) before sorbo_enum(). That is, sorbo_enum() needs to be called. Then, in sorbo_print_widget() get rid of the 0 && in the type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT. That is, sorbo_conf_output() needs to be called if the type is audio output. [I'm not sure what happens if all output devices are configured though...]. Basically, this will cause all output devices to accept the music stream. Try it like that. Ideally you want only one output device to be configured, but I guess if you look at the dmesg output u can figure out which node identifiers are output devices and try them all, one at a time, until you find the correct one. You might notice that in IBM's case it's a 3, so I call sorbo_conf_output(sc, 0, 3); Actually, you probably wanna get rid of that call too if your output device is not node id 3. To solve #2 do this: Enable sorbo_enum() like above, and then in sorbo_print_widget() get rid of the if (0) before sorbo_set_amp(sc, codecid, nodeid, 40);. Basically, this will cause all nodes to be amplified. Try it like that. Once again, ideally you only want the correct node [TYPE_PIN] to be amplified. As a final test, you might want to put a printf in sorbo_in_intr() to see if you are getting any interrupts. good luck, and remember to sync before kldload =P