]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas256xsw-android/tas2562-stereo-android-driver.git/commitdiff
1. Fix IV sense incorrect for stereo. 2. Fix unbalanced irq.
authorwangws <wangws0709@thundersoft.com>
Wed, 21 Aug 2019 02:06:25 +0000 (10:06 +0800)
committerwangws <wangws0709@thundersoft.com>
Fri, 23 Aug 2019 02:25:55 +0000 (10:25 +0800)
tas2562-codec.c
tas2562-regmap.c

index e6455cab743248b0bdc001c6ba4407ec2f09bf67..356708f0508067533d0bf6b71f80434f45865b2b 100644 (file)
@@ -963,10 +963,17 @@ static int tas2562_load_init(struct tas2562_priv *p_tas2562)
                TAS2562_MISCCONFIGURATIONREG0, 0xcf);
        if (ret < 0)
                return ret;
-       ret = p_tas2562->write(p_tas2562, channel_both,
-               TAS2562_TDMConfigurationReg4, 0x01);
-       if (ret < 0)
-               return ret;
+       if (p_tas2562->mn_channels == 2) {
+               ret = p_tas2562->write(p_tas2562, channel_both,
+                       TAS2562_TDMConfigurationReg4, 0x11);
+               if (ret < 0)
+                       return ret;
+       else {
+               ret = p_tas2562->write(p_tas2562, channel_both,
+                       TAS2562_TDMConfigurationReg4, 0x01);
+               if (ret < 0)
+                       return ret;
+       }
        ret = p_tas2562->write(p_tas2562, channel_both,
                TAS2562_CLOCKCONFIGURATION, 0x0c);
        if (ret < 0)
index 71e850b503a60557873ac08c163b3253121a8038..1e56efbb2ace291ea9c01a0cba426bea3ad757e7 100644 (file)
@@ -1049,6 +1049,7 @@ static int tas2562_i2c_probe(struct i2c_client *p_client,
                                "request_irq failed, %d\n", n_result);
                        goto err;
                }
+               disable_irq_nosync(p_tas2562->mn_irq);
        }
        if (gpio_is_valid(p_tas2562->mn_irq_gpio2) &&
                        (p_tas2562->mn_channels == 2)) {
@@ -1075,6 +1076,7 @@ static int tas2562_i2c_probe(struct i2c_client *p_client,
                                "request_irq failed, %d\n", n_result);
                        goto err;
                }
+               disable_irq_nosync(p_tas2562->mn_irq2);
        }
        tas2562_enable_irq(p_tas2562, true);
        INIT_DELAYED_WORK(&p_tas2562->init_work, init_work_routine);