]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas2557sw-android/tas2557-android-driver.git/blobdiff - tas2557-core.c
If thermal sensor wrong, mute output
[tas2557sw-android/tas2557-android-driver.git] / tas2557-core.c
index a0d55e5e97012dabcf24b3d9aae4b3abeff975ed..233143ea099c0e7c71d42a9cedd2bacb5c0b9e6b 100755 (executable)
@@ -452,6 +452,13 @@ int tas2557_enable(struct tas2557_priv *pTAS2557, bool bEnable)
 
        dev_dbg(pTAS2557->dev, "Enable: %d\n", bEnable);
 
+       tas2557_get_die_temperature(pTAS2770, &nValue);
+       if(nValue == 0x80000000)
+       {
+               dev_err(pTAS2557->dev, "%s, thermal sensor is wrong, mute output\n", __func__);
+               goto end;
+       }
+
        if ((pTAS2557->mpFirmware->mnPrograms == 0)
                || (pTAS2557->mpFirmware->mnConfigurations == 0)) {
                dev_err(pTAS2557->dev, "%s, firmware not loaded\n", __func__);