ASoC: ac108: Adds default 4channels mic volume
authorJaechul Lee <jcsing.lee@samsung.com>
Thu, 18 Apr 2019 06:02:37 +0000 (15:02 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 3 Aug 2023 09:35:23 +0000 (18:35 +0900)
It needs to be set default volume to max value.

Change-Id: Ibee68a2885925ec8a3c1ce12c6fa0f7ff8c98dfb
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
sound/soc/codecs/ac108.c

index aa4a212..6be9e73 100644 (file)
@@ -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]);