Hi Rob,

Rob Lytle writes:

> I need to look up the data sheet for my codec.

There are no datasheets for these Sigmatel HDA codecs found in
VAIOs.  Yours seems to be very similar to mine, so I had us use
the same code.  It's possible that the hardware volume control
behaves differently, so you could try this diff if you like.  It
will give you both outputs.volume (the hardware control) and
outputs.master to experiment with.

>  0 to 255 seems like not much resolution for volume.

It has 127 volume steps and we hit them all.  You can see this
in your debug dmesg:

azalia_codec_init: There are 23 widgets in the audio function.
<...>
        outamp: mute=1 size=2 steps=127 offset=127

Index: azalia_codec.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.49
diff -u -p -r1.49 azalia_codec.c
--- azalia_codec.c      26 Jun 2008 05:42:17 -0000      1.49
+++ azalia_codec.c      30 Jun 2008 00:33:12 -0000
@@ -2734,7 +2734,9 @@ static const mixer_item_t stac7661_mixer
        {{0, {AudioNspeaker".mute"}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
            0, 0, ENUM_OFFON}, 0x05, MI_TARGET_OUTAMP},
        {{0, {AudioNspeaker}, AUDIO_MIXER_VALUE, AZ_CLASS_OUTPUT,
-           0, 0, .un.v={{""}, 2, MIXER_DELTA(127)}}, 0x05, MI_TARGET_OUTAMP}
+           0, 0, .un.v={{""}, 2, MIXER_DELTA(127)}}, 0x05, MI_TARGET_OUTAMP},
+       {{0, {AudioNvolume}, AUDIO_MIXER_VALUE, AZ_CLASS_OUTPUT,
+           0, 0, .un.v={{""}, 1, MIXER_DELTA(127)}}, 0x17, MI_TARGET_VOLUME}
 };
 
 int

Reply via email to