Date: Wed, 7 Jun 2006 08:39:18 +0100 From: Andrea Bittau <a.bittau@cs.ucl.ac.uk> To: Wesley Morgan <morganw@chemikals.org> Cc: freebsd-mobile@freebsd.org Subject: Re: HDA sound driver mod for thinkpad x60s Message-ID: <20060607073918.GB9245@shorty.sorbonet.org> In-Reply-To: <20060606231025.R50560@volatile.chemikals.org> References: <20060606124030.GA32057@shorty.sorbonet.org> <4485CEF8.10201@centtech.com> <20060606192229.GA4465@shorty.sorbonet.org> <4485DA6D.9020304@centtech.com> <4485E199.7000604@centtech.com> <20060606205918.GA6765@shorty.sorbonet.org> <20060606231025.R50560@volatile.chemikals.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 06, 2006 at 11:15:55PM -0400, Wesley Morgan wrote: > pcm0: node 2 type 0 cap d0401 > pcm0: Cap d0401 sf 0 st 0 > pcm0: node 5 type 0 cap 40211 > pcm0: Cap 40211 sf e01e0 st 5 You have two audio outputs [even IBM does]. Node ID 5 looks most promising because it states its stream format and type. Thus, in the vanilla driver, you should change: sorbo_conf_output(sc, 0, 3); to sorbo_conf_output(sc, 0, 5); > pcm0: node 9 type 4 cap 400301 > pcm0: nid 9 entries 2 list a05 cur 0 ctr 0 cap 10 s 0 Node ID 9 is a PIN which is connected to node id 5 [your audio output]. This looks really promising. In the driver, you should change: sorbo_set_amp(sc, 0, 5, to sorbo_set_amp(sc, 0, 9, [two places, initial conf, and mixer.] > pcm0: node 11 type 3 cap 300105 > pcm0: node 13 type 4 cap 400181 > pcm0: nid 13 entries 1 list b cur 0 ctr 0 cap 3f s 7fffffff > pcm0: node 14 type 4 cap 400181 > pcm0: nid 14 entries 1 list b cur 0 ctr 0 cap 3f s 7fffffff > pcm0: node 15 type 4 cap 400181 > pcm0: nid 15 entries 1 list b cur 0 ctr 0 cap 37 s 7fffffff > pcm0: node 16 type 4 cap 400181 > pcm0: nid 16 entries 1 list b cur 0 ctr 0 cap 1737 s 7fffffff > pcm0: node 17 type 4 cap 400104 > pcm0: nid 17 entries 1 list 13 cur 0 ctr 0 cap 10 s 0 > pcm0: node 19 type 2 cap 200100 Most of your other PINs, of which one of them could be the correct one, are connected to node id 0xb [11]. This is the big difference with IBM. In IBM's case, they are connected to audio output directly [by default]. In your case, most of your pins seem to be connected to node 11, an audio selector. [One of them is connected to node 19, a mixer, but lets hope that is not the pin we are after.] A selector will get a bunch of inputs and spit one out. Useful debug information would be "what is node id 11 connected to". Somewhere in the code, perhaps before attach2(), add this: static void sorbo_print_conn(struct hdac_softc *sc, int cad, int nid) { int rc; uint32_t l, p; rc = hdac_command_sendone_internal(sc, HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_CONN_LIST_LENGTH), cad); if (rc) { l = hdac_command_sendone_internal(sc, HDA_CMD_GET_CONN_LIST_ENTRY(cad, nid, 0), cad); p = hdac_command_sendone_internal(sc, HDA_CMD_GET_CONN_SELECT_CONTROL(cad, nid), cad); printf("nid %d list %x current %x\n", nid, l, p); } } then in attach2, add: sorbo_print_conn(sc, 0, 11); This will tell you what the selector is connected to. Hopefully it's current selection is 5. Next, selectors may have amplifiers. Adding [in attach2] a sorbo_set_amp(sc, 0, 11, 40); // 40 is the gain. 63 is max shouldn't harm. Also, amplify all pins... so do something like: sorbo_set_amp(sc, 0, 9, 40); sorbo_set_amp(sc, 0, 13, 40); ... [all type 4] sorbo_set_amp(sc, 0, 17, 40); Anyway, this driver mod was really meant for x60s only... as it's badly written [a weekend hack]. Perhaps we should meet up on irc or something if you really want to get it working. I wish someone on an x60 could try it to at least "prove" that it works [or doesn't =P].
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060607073918.GB9245>