فهرست منبع

Merge "asoc: codecs: Fix WSA PBR equation"

qctecmdr 3 سال پیش
والد
کامیت
abd86fc157
2فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 7 7
      asoc/codecs/wsa884x/internal.h
  2. 1 1
      asoc/codecs/wsa884x/wsa884x.c

+ 7 - 7
asoc/codecs/wsa884x/internal.h

@@ -259,21 +259,21 @@ static const int pbr_vth2_data[G_MAX_DB][CONFIG_MAX][WSA_MAX_OHMS] = {
 };
 
 static const int pbr_vth3_data[G_MAX_DB][CONFIG_MAX][WSA_MAX_OHMS] = {
-	{ {0, 0, 0, 0}, {0, 0, 1043, 0}, {0, 0, 1278, 0}, {0, 0, 1522, 0} }, /* G_21_DB   */
-	{ {0, 0, 0, 0}, {0, 933, 0, 0},  {0, 1082, 0, 0}, {0, 1294, 0, 0} }, /* G_19P5_DB */
-	{ {0, 0, 0, 0}, {753, 0, 0, 0},  {925, 0, 0, 0},  {1090, 0, 0, 0} }, /* G_18_DB   */
+	{ {0, 0, 0, 0}, {0, 0, 980, 0}, {0, 0, 1224, 0}, {0, 0, 1482, 0} }, /* G_21_DB   */
+	{ {0, 0, 0, 0}, {0, 878, 0, 0}, {0, 1051, 0, 0}, {0, 1278, 0, 0} }, /* G_19P5_DB */
+	{ {0, 0, 0, 0}, {722, 0, 0, 0}, {894, 0, 0, 0},  {1075, 0, 0, 0} }, /* G_18_DB   */
 };
 
 static const int pbr_vth4_data[G_MAX_DB][CONFIG_MAX][WSA_MAX_OHMS] = {
-	{ {0, 0, 0, 0}, {0, 0, 1098, 0}, {0, 0, 1341, 0}, {0, 0, 1561, 0} }, /* G_21_DB   */
-	{ {0, 0, 0, 0}, {0, 988, 0, 0},  {0, 1137, 0, 0}, {0, 1333, 0, 0} }, /* G_19P5_DB */
-	{ {0, 0, 0, 0}, {80, 0, 0, 0},   {973, 0, 0, 0},  {1129, 0, 0, 0} }, /* G_18_DB   */
+	{ {0, 0, 0, 0}, {0, 0, 1043, 0}, {0, 0, 1278, 0}, {0, 0, 1522, 0} }, /* G_21_DB   */
+	{ {0, 0, 0, 0}, {0, 933, 0, 0},  {0, 1082, 0, 0}, {0, 1294, 0, 0} }, /* G_19P5_DB */
+	{ {0, 0, 0, 0}, {753, 0, 0, 0},  {925, 0, 0, 0},  {1090, 0, 0, 0} }, /* G_18_DB   */
 };
 
 static const int pbr_vth5_data[G_MAX_DB][CONFIG_MAX][WSA_MAX_OHMS] = {
 	{ {0, 0, 0, 0}, {0, 0, 1098, 0}, {0, 0, 1341, 0}, {0, 0, 1561, 0} }, /* G_21_DB   */
 	{ {0, 0, 0, 0}, {0, 988, 0, 0},  {0, 1137, 0, 0}, {0, 1333, 0, 0} }, /* G_19P5_DB */
-	{ {0, 0, 0, 0}, {80, 0, 0, 0},   {973, 0, 0, 0},  {1129, 0, 0, 0} }, /* G_18_DB   */
+	{ {0, 0, 0, 0}, {800, 0, 0, 0},  {973, 0, 0, 0},  {1129, 0, 0, 0} }, /* G_18_DB   */
 };
 
 static const int pbr_vth6_data[G_MAX_DB][CONFIG_MAX][WSA_MAX_OHMS] = {

+ 1 - 1
asoc/codecs/wsa884x/wsa884x.c

@@ -85,7 +85,7 @@ enum {
 };
 
 #define WSA884X_VTH_TO_REG(vth) \
-	((vth) != 0 ? (((vth) - 150 / PBR_MAX_VOLTAGE) * PBR_MAX_CODE / 100) : 0)
+	((vth) != 0 ? (((vth) - 150) * PBR_MAX_CODE / (PBR_MAX_VOLTAGE * 100) + 1) : 0)
 
 struct wsa_reg_mask_val {
 	u16 reg;