Browse Source

asoc: wsa884x: fix device tree parsing issue for sys gain

System gain is miscalculated due to incorrect parsing of
device tree property. Correct the parsing logic of the
system gain device tree property.

Change-Id: I8c9c5198a139a69c2d5d9520a071123261b0581f
Signed-off-by: Phani Kumar Uppalapati <[email protected]>
Phani Kumar Uppalapati 1 năm trước cách đây
mục cha
commit
7288435e01
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      asoc/codecs/wsa884x/wsa884x.c

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

@@ -2249,7 +2249,7 @@ static int wsa884x_swr_probe(struct swr_device *pdev)
 				goto err_mem;
 			}
 
-			sys_gain_length = sys_gain_size / (2 * sizeof(u32));
+			sys_gain_length = sys_gain_size / sizeof(u32);
 			ret = of_property_read_u32_array(
 				wsa884x->macro_dev->dev.of_node,
 				"qcom,wsa-system-gains", wsa884x->sys_gains,