]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas2557sw-android/tas2557-android-driver.git/blobdiff - tas2557-core.c
Class D edge rate control
[tas2557sw-android/tas2557-android-driver.git] / tas2557-core.c
index d482a71e32c872b058afb5bbddcd1240e9da4fff..444693069baf0a624e67f50d4161860059c09f93 100755 (executable)
@@ -445,6 +445,18 @@ end:
        return nResult;
 }
 
+int tas2557_update_edge(struct tas2557_priv *pTAS2557)
+{
+       int nResult = 0;
+       dev_dbg(pTAS2557->dev,
+               "%s, edge: %d\n",
+               __func__, pTAS2557->mnEdge);
+
+       nResult = pTAS2557->update_bits(pTAS2557, TAS2557_SPK_CTRL_REG, 0x7, pTAS2557->mnEdge);
+
+       return nResult;
+}
+
 int tas2557_enable(struct tas2557_priv *pTAS2557, bool bEnable)
 {
        int nResult = 0;
@@ -1862,6 +1874,8 @@ int tas2557_set_program(struct tas2557_priv *pTAS2557,
        if (nResult < 0)
                goto end;
 
+       tas2557_update_edge(pTAS2557);
+
        if (pTAS2557->mbPowerUp) {
                pTAS2557->clearIRQ(pTAS2557);
                dev_dbg(pTAS2557->dev, "device powered up, load startup\n");