Skip to content

Commit 425026a

Browse files
Jaechul-Leegregkh
authored andcommitted
ASoC: samsung: Fix invalid argument when devm_gpiod_get is called
commit 975b6a9 upstream. devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as GPIOD_ASIS and gpio direction isn't set properly. Muted stream comes up when I try recording some sounds on TM2. mic-bias gpiod state can't be changed because the gpiod is created with the invalid parameter. The gpio should be set GPIOD_OUT_HIGH. Fixes: 1bfbc26 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board") Signed-off-by: Jaechul Lee <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 00ac982 commit 425026a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/samsung/tm2_wm5110.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,7 @@ static int tm2_probe(struct platform_device *pdev)
436436
snd_soc_card_set_drvdata(card, priv);
437437
card->dev = dev;
438438

439-
priv->gpio_mic_bias = devm_gpiod_get(dev, "mic-bias",
440-
GPIOF_OUT_INIT_LOW);
439+
priv->gpio_mic_bias = devm_gpiod_get(dev, "mic-bias", GPIOD_OUT_HIGH);
441440
if (IS_ERR(priv->gpio_mic_bias)) {
442441
dev_err(dev, "Failed to get mic bias gpio\n");
443442
return PTR_ERR(priv->gpio_mic_bias);

0 commit comments

Comments
 (0)