aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Kulhavy <brain@jikos.cz>2016-10-03 10:40:48 -0400
committerMark Brown <broonie@kernel.org>2016-10-03 23:23:07 -0400
commit8b0678dc914271e9ad4317fe82555ead92ce1cb9 (patch)
tree424bbb5884efb453c5dc5f9aafc2d727bfb083e8
parente54de7f555970915c3856e7709a7ff74d352f315 (diff)
ASoC: tas571x: remove improper PDN signal usage in set_bias_level
The set_bias_level toggles the PDN signal when entering SND_SOC_BIAS_STANDBY and SND_SOC_BIAS_OFF. However this has no effect and actually breaks things down (tested with TAS5717) due to the following reasons: 1) holding down PDN does not save power but holding down RST does 2) now hard mute via register 0x5 is implemented and therefore it is no longer needed to toggle PDN to enter all channel shut down 3) in order to leave PDN it is required to toggle the RST signal (see TAS5721 datasheet), which was not implemented 4) toggling PDN as implemented actually mutes PWMs and there is no audio output (tested on TAS5717) For these reasons remove the PDN signal toggling and just initialize it to inactive in probe(). Signed-off-by: Petr Kulhavy <brain@jikos.cz> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/tas571x.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 512b9e663e89..810369f687d7 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -341,20 +341,9 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec,
341 return ret; 341 return ret;
342 } 342 }
343 } 343 }
344
345 gpiod_set_value(priv->pdn_gpio, 0);
346 usleep_range(5000, 6000);
347
348 regcache_cache_only(priv->regmap, false);
349 ret = regcache_sync(priv->regmap);
350 if (ret)
351 return ret;
352 } 344 }
353 break; 345 break;
354 case SND_SOC_BIAS_OFF: 346 case SND_SOC_BIAS_OFF:
355 regcache_cache_only(priv->regmap, true);
356 gpiod_set_value(priv->pdn_gpio, 1);
357
358 if (!IS_ERR(priv->mclk)) 347 if (!IS_ERR(priv->mclk))
359 clk_disable_unprepare(priv->mclk); 348 clk_disable_unprepare(priv->mclk);
360 break; 349 break;
@@ -771,9 +760,6 @@ static int tas571x_i2c_probe(struct i2c_client *client,
771 return ret; 760 return ret;
772 } 761 }
773 762
774 regcache_cache_only(priv->regmap, true);
775 gpiod_set_value(priv->pdn_gpio, 1);
776
777 return snd_soc_register_codec(&client->dev, &priv->codec_driver, 763 return snd_soc_register_codec(&client->dev, &priv->codec_driver,
778 &tas571x_dai, 1); 764 &tas571x_dai, 1);
779} 765}