HDA sound driver mod for thinkpad x60s

Andrea Bittau a.bittau at cs.ucl.ac.uk
Tue Jun 6 21:06:51 UTC 2006


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


More information about the freebsd-mobile mailing list