aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-04 12:46:11 -0400
committerMark Brown <broonie@kernel.org>2015-05-04 13:32:53 -0400
commita34c31a9892df5a11d64f5dda21a9d9b63ceb10f (patch)
treeb20f53b3596a5201c0aa321f606c10fbd545df5b
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
ASoC: adav80x: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/adav80x.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 4373ada95648..f762247ae5a8 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -539,7 +539,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
539 unsigned int freq, int dir) 539 unsigned int freq, int dir)
540{ 540{
541 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 541 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
542 struct snd_soc_dapm_context *dapm = &codec->dapm; 542 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
543 543
544 if (dir == SND_SOC_CLOCK_IN) { 544 if (dir == SND_SOC_CLOCK_IN) {
545 switch (clk_id) { 545 switch (clk_id) {
@@ -622,6 +622,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec,
622static int adav80x_set_pll(struct snd_soc_codec *codec, int pll_id, 622static int adav80x_set_pll(struct snd_soc_codec *codec, int pll_id,
623 int source, unsigned int freq_in, unsigned int freq_out) 623 int source, unsigned int freq_in, unsigned int freq_out)
624{ 624{
625 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
625 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 626 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
626 unsigned int pll_ctrl1 = 0; 627 unsigned int pll_ctrl1 = 0;
627 unsigned int pll_ctrl2 = 0; 628 unsigned int pll_ctrl2 = 0;
@@ -687,7 +688,7 @@ static int adav80x_set_pll(struct snd_soc_codec *codec, int pll_id,
687 688
688 adav80x->pll_src = source; 689 adav80x->pll_src = source;
689 690
690 snd_soc_dapm_sync(&codec->dapm); 691 snd_soc_dapm_sync(dapm);
691 } 692 }
692 693
693 return 0; 694 return 0;
@@ -801,11 +802,12 @@ static struct snd_soc_dai_driver adav80x_dais[] = {
801 802
802static int adav80x_probe(struct snd_soc_codec *codec) 803static int adav80x_probe(struct snd_soc_codec *codec)
803{ 804{
805 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
804 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 806 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
805 807
806 /* Force PLLs on for SYSCLK output */ 808 /* Force PLLs on for SYSCLK output */
807 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1"); 809 snd_soc_dapm_force_enable_pin(dapm, "PLL1");
808 snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2"); 810 snd_soc_dapm_force_enable_pin(dapm, "PLL2");
809 811
810 /* Power down S/PDIF receiver, since it is currently not supported */ 812 /* Power down S/PDIF receiver, since it is currently not supported */
811 regmap_write(adav80x->regmap, ADAV80X_PLL_OUTE, 0x20); 813 regmap_write(adav80x->regmap, ADAV80X_PLL_OUTE, 0x20);