From owner-freebsd-mobile@FreeBSD.ORG Tue Jun 6 20:19:35 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 5167116CB20 for ; Tue, 6 Jun 2006 20:12:07 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 870D543D5C for ; Tue, 6 Jun 2006 20:12:06 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k56KC1AD065927; Tue, 6 Jun 2006 15:12:02 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4485E199.7000604@centtech.com> Date: Tue, 06 Jun 2006 15:12:09 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.2 (X11/20060506) MIME-Version: 1.0 To: Andrea Bittau References: <20060606124030.GA32057@shorty.sorbonet.org> <4485CEF8.10201@centtech.com> <20060606192229.GA4465@shorty.sorbonet.org> <4485DA6D.9020304@centtech.com> In-Reply-To: <4485DA6D.9020304@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1515/Tue Jun 6 08:38:42 2006 on mh2.centtech.com X-Virus-Status: Clean 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 20:19:45 -0000 Eric Anderson wrote: > Andrea Bittau wrote: >> 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? > > No, the cat command doesn't complain, and the ctrl-c stops after a > little bit, no errors. One thing to note: I have /dev/dsp0.0 and /dev/dspW0.0 and no /dev/dsp. I can't recall which is normal.. > Some more information about my system can be found here: > http://www.googlebit.com/freebsd/200606061340/ > > Although earlier when playing around and trying kldunload the module, I > saw this rather hilarious message: > > Jun 6 13:53:15 neutrino kernel: pcm0: unregister: mixer busy > Jun 6 13:53:15 neutrino kernel: Fucked up register 16 > > P.S. - you can probably safely remove the calc.core file from the > archive (along with a few other extra items). :) > > >> 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. Did - nothing different really. >> 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. How can I figure out the node id? With more stuff uncommented in the code, I get: Jun 6 14:43:51 neutrino kernel: pcm0: