alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] ASoC: tas2770: Fix calling reset in probe
@ 2020-09-18 19:05 Dan Murphy
  2020-09-18 19:05 ` [PATCH 2/9] ASoC: tas2770: Add missing bias level power states Dan Murphy
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Dan Murphy @ 2020-09-18 19:05 UTC (permalink / raw)
  To: lgirdwood, broonie, tiwai, robh+dt
  Cc: devicetree, alsa-devel, linux-kernel, Dan Murphy

tas2770_reset is called during i2c probe. The reset calls the
snd_soc_component_write which depends on the tas2770->component being
available. The component pointer is not set until codec_probe so move
the reset to the codec_probe after the pointer is set.

Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 sound/soc/codecs/tas2770.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index c09851834395..03d7ad1885b8 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -575,6 +575,8 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
 
 	tas2770->component = component;
 
+	tas2770_reset(tas2770);
+
 	return 0;
 }
 
@@ -771,8 +773,6 @@ static int tas2770_i2c_probe(struct i2c_client *client,
 	tas2770->channel_size = 0;
 	tas2770->slot_width = 0;
 
-	tas2770_reset(tas2770);
-
 	result = tas2770_register_codec(tas2770);
 	if (result)
 		dev_err(tas2770->dev, "Register codec failed.\n");
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-09-22  9:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 19:05 [PATCH 1/9] ASoC: tas2770: Fix calling reset in probe Dan Murphy
2020-09-18 19:05 ` [PATCH 2/9] ASoC: tas2770: Add missing bias level power states Dan Murphy
2020-09-18 19:05 ` [PATCH 3/9] dt-bindings: tas2770: Fix I2C addresses for the TAS2770 Dan Murphy
2020-09-18 19:05 ` [PATCH 4/9] ASoC: tas2770: Fix required DT properties in the code Dan Murphy
2020-09-18 19:05 ` [PATCH 5/9] ASoC: tas2770: Fix unbalanced calls to pm_runtime Dan Murphy
2020-09-18 19:05 ` [PATCH 6/9] ASoC: tas2770: Convert bit mask to GENMASK in header Dan Murphy
2020-09-21 19:04   ` Mark Brown
2020-09-21 19:18     ` Dan Murphy
2020-09-21 19:19       ` Dan Murphy
2020-09-22  9:47         ` Mark Brown
2020-09-18 19:05 ` [PATCH 7/9] ASoC: tas2770: Fix error handling with update_bits Dan Murphy
2020-09-18 19:05 ` [PATCH 8/9] ASoC: tas2770: Fix the spacing and new lines Dan Murphy
2020-09-18 19:05 ` [PATCH 9/9] ASoC: tas2770: Refactor sample rate function Dan Murphy
2020-09-22  0:05 ` [PATCH 1/9] ASoC: tas2770: Fix calling reset in probe Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).