asoc: remove dev_up check in micbias_control function

remove dev_up check in micbias_control function.

Change-Id: Ia008bf45aeb231e85e99034115d3d90415bc259c
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
This commit is contained in:
Yuhui Zhao
2024-02-29 16:44:46 +08:00
parent bf838c54f7
commit ddbe2ef0da

Vedi File

@@ -2072,12 +2072,6 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
micb_index = micb_num - 1;
switch (req) {
case MICB_PULLUP_ENABLE:
if (!wcd9378->dev_up) {
dev_dbg(component->dev, "%s: enable req %d wcd device down\n",
__func__, req);
ret = -ENODEV;
goto done;
}
wcd9378->pullup_ref[micb_index]++;
if ((wcd9378->pullup_ref[micb_index] == 1) &&
(wcd9378->micb_ref[micb_index] == 0)) {
@@ -2090,12 +2084,7 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
case MICB_PULLUP_DISABLE:
if (wcd9378->pullup_ref[micb_index] > 0)
wcd9378->pullup_ref[micb_index]--;
if (!wcd9378->dev_up) {
dev_dbg(component->dev, "%s: enable req %d wcd device down\n",
__func__, req);
ret = -ENODEV;
goto done;
}
if ((wcd9378->pullup_ref[micb_index] == 0) &&
(wcd9378->micb_ref[micb_index] == 0))
snd_soc_component_update_bits(component, micb_usage, micb_mask, 0x01);