From: Jaechul Lee Date: Thu, 18 Apr 2019 06:02:37 +0000 (+0900) Subject: ASoC: ac108: Adds default 4channels mic volume X-Git-Tag: submit/tizen/20220208.074352~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34eb51fd2cb313cce18908bbf8b68a7f1871104d;p=platform%2Fkernel%2Flinux-rpi.git ASoC: ac108: Adds default 4channels mic volume It needs to be set default volume to max value. Change-Id: Icdcf255e3a57bb5dffb225116723a3d9a4cf11fe Signed-off-by: Jaechul Lee --- diff --git a/sound/soc/codecs/ac108.c b/sound/soc/codecs/ac108.c index aa4a212..6be9e73 100644 --- a/sound/soc/codecs/ac108.c +++ b/sound/soc/codecs/ac108.c @@ -1454,6 +1454,26 @@ static int ac108_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i ret = regmap_write(ac10x->i2cmap[index], CHIP_RST, CHIP_RST_VAL); msleep(1); + if (regmap_write(ac10x->i2cmap[index], ADC1_DVOL_CTRL, 0xff)) { + dev_err(&i2c->dev, "fail to write adc1 volume register\n"); + return -ENODEV; + } + + if (regmap_write(ac10x->i2cmap[index], ADC2_DVOL_CTRL, 0xff)) { + dev_err(&i2c->dev, "fail to write adc2 volume register\n"); + return -ENODEV; + } + + if (regmap_write(ac10x->i2cmap[index], ADC3_DVOL_CTRL, 0xff)) { + dev_err(&i2c->dev, "fail to write adc3 volume register\n"); + return -ENODEV; + } + + if (regmap_write(ac10x->i2cmap[index], ADC4_DVOL_CTRL, 0xff)) { + dev_err(&i2c->dev, "fail to write adc4 volume register\n"); + return -ENODEV; + } + /* sync regcache for FLAT type */ ac10x_fill_regcache(&i2c->dev, ac10x->i2cmap[index]);