Update of /cvsroot/alsa/alsa-driver/drivers/vx
In directory sc8-pr-cvs1:/tmp/cvs-serv2317/drivers/vx

Modified Files:
        vx_mixer.c 
Log Message:
fixed the levels of AKM codecs for VX222.
the attenuation is converted from linear to the dBs for the codec.



Index: vx_mixer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/drivers/vx/vx_mixer.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vx_mixer.c  25 Feb 2003 15:09:25 -0000      1.4
+++ vx_mixer.c  12 Mar 2003 18:17:42 -0000      1.5
@@ -109,13 +109,14 @@
  */
 static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int 
right)
 {
+       left  = chip->hw->output_level_max - left;
+       right = chip->hw->output_level_max - right;
+
        if (chip->ops->akm_write) {
                chip->ops->akm_write(chip, XX_CODEC_LEVEL_LEFT_REGISTER, left);
                chip->ops->akm_write(chip, XX_CODEC_LEVEL_RIGHT_REGISTER, right);
        } else {
                /* convert to attenuation level: 0 = 0dB (max), 0xe3 = -113.5 dB (min) 
*/
-               left = VX_ANALOG_OUT_LEVEL_MAX - left;
-               right = VX_ANALOG_OUT_LEVEL_MAX - right;
                vx_set_codec_reg(chip, codec, XX_CODEC_LEVEL_LEFT_REGISTER, left);
                vx_set_codec_reg(chip, codec, XX_CODEC_LEVEL_RIGHT_REGISTER, right);
        }



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to