ASoC: rt5670: Fix the speaker mono output issue
authorBard Liao <bardliao@realtek.com>
Tue, 17 Feb 2015 05:59:27 +0000 (13:59 +0800)
committerMark Brown <broonie@kernel.org>
Sat, 21 Feb 2015 09:30:38 +0000 (18:30 +0900)
We need to set left/right control for the speaker amp to get stereo
output on speaker.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5670.c

index 8a0833de1665bcd39594d27bbc323e4ea3d35ba0..d33f33ce865a2a47a243b621922b4ed8365be5e1 100644 (file)
@@ -2591,6 +2591,12 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
 
        regmap_write(rt5670->regmap, RT5670_RESET, 0);
 
+       regmap_read(rt5670->regmap, RT5670_VENDOR_ID, &val);
+       if (val >= 4)
+               regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0980);
+       else
+               regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0d00);
+
        ret = regmap_register_patch(rt5670->regmap, init_list,
                                    ARRAY_SIZE(init_list));
        if (ret != 0)