From owner-freebsd-mobile@FreeBSD.ORG Tue Jun 6 21:06:46 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 0FA2916C749 for ; Tue, 6 Jun 2006 20:59:24 +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 8418D43D49 for ; Tue, 6 Jun 2006 20:59:23 +0000 (GMT) (envelope-from a.bittau@cs.ucl.ac.uk) Received: by darkircop.org (Postfix, from userid 0) id 65D9E861571; Tue, 6 Jun 2006 21:59:18 +0100 (BST) Date: Tue, 6 Jun 2006 21:59:18 +0100 From: Andrea Bittau To: Eric Anderson Message-ID: <20060606205918.GA6765@shorty.sorbonet.org> References: <20060606124030.GA32057@shorty.sorbonet.org> <4485CEF8.10201@centtech.com> <20060606192229.GA4465@shorty.sorbonet.org> <4485DA6D.9020304@centtech.com> <4485E199.7000604@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4485E199.7000604@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 21:06:51 -0000 On Tue, Jun 06, 2006 at 03:12:09PM -0500, Eric Anderson wrote: > How can I figure out the node id? > Jun 6 14:43:51 neutrino kernel: pcm0: node 2 type 0 cap d0401 > Jun 6 14:43:51 neutrino kernel: pcm0: node 5 type 0 cap 40211 > Jun 6 14:43:51 neutrino kernel: pcm0: node 8 type 4 cap 430681 > Jun 6 14:43:51 neutrino kernel: pcm0: node 9 type 4 cap 400301 > Jun 6 14:43:51 neutrino kernel: pcm0: node 13 type 4 cap 400181 > Jun 6 14:43:51 neutrino kernel: pcm0: node 14 type 4 cap 400181 > Jun 6 14:43:51 neutrino kernel: pcm0: node 15 type 4 cap 400181 > Jun 6 14:43:51 neutrino kernel: pcm0: node 16 type 4 cap 400181 > Jun 6 14:43:51 neutrino kernel: pcm0: node 17 type 4 cap 400104 > Jun 6 14:43:51 neutrino kernel: pcm0: node 18 type 4 cap 400001 OK so type 0 is audio output, so node id 2 and 5 are audio output. Therefore, in the driver, the: sorbo_conf_output(sc, 0, 3); should be replaced with 0, 2 or 0, 5. The "pins", are type 4 and you need to amplify them. So you need to modify: sorbo_set_amp(sc, 0, 5, 40); with: sorbo_set_amp(sc, 0, 8, 40); // set node id 8 gain 40 sorbo_set_amp(sc, 0, 9, 40); // set node id 9 gain 40 ... sorbo_set_amp(sc, 0, 18, 40); // node id 18. There is one aditional piece of debug info which might be handy. You need to make sure that the "pins" are connected to the audio output device. Make enum() get called as described in the previous mails, then in sorbo_print_widget(), get rid of 0 && in the type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX. That is, sorbo_conf_pin() should be called for each pin. This will cause an additional printf which will tell you which audio output each pin is connected to [list %x cur %d]. Ideally you want pins to be connected either to 2 or 5 in your case. Also, make sure the hardware volume is up, if there are any buttons on the laptop. =D