浏览代码

Merge "asoc: codec: wsa884x: check for spkr status before enabling PA"

qctecmdr 1 年之前
父节点
当前提交
4fd35922ec
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      asoc/codecs/wsa884x/wsa884x.c

+ 4 - 2
asoc/codecs/wsa884x/wsa884x.c

@@ -227,8 +227,10 @@ static int wsa884x_handle_post_irq(void *data)
 	if (!wsa884x->pa_mute) {
 		do {
 			wsa884x->pa_mute = 0;
-			regmap_update_bits(wsa884x->regmap,
-				REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01));
+			if (test_bit(SPKR_STATUS, &wsa884x->status_mask))
+				regmap_update_bits(wsa884x->regmap,
+					REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01));
+
 			usleep_range(1000, 1100);
 
 			regmap_read(wsa884x->regmap, WSA884X_INTR_STATUS0, &sts1);