From ce28658806765dc3ce2a55e634514b26bd42f1fa Mon Sep 17 00:00:00 2001 From: Jaechul Lee Date: Thu, 18 Apr 2019 15:02:37 +0900 Subject: [PATCH] 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 --- sound/soc/codecs/ac108.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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]); -- 2.7.4