[PATCH] ARM: mach-imx6q: Enable the codec clock earlier
Fabio Estevam
festevam at gmail.com
Fri Jun 7 19:16:46 EDT 2013
Hi Russell,
On Fri, Jun 7, 2013 at 7:20 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> Umm... doesn't that mean that imx-sgtl5000 should be getting this clock
> and turning it on itself, and disabling it on device removal?
Yes, you are right.
Actually imx-sgtl500 does get this clock and turn it on itself.
The problem is that imx-sgtl5000 is getting called after the codec
sgtl500 codec is probed.
***** reading codec ID
sgtl5000: probe of 0-000a failed with error -5
***** enabling the codec clock
imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered
imx-sgtl5000 sound.13: snd_soc_register_card failed (-517)
platform sound.13: Driver imx-sgtl5000 requests probe deferral
And then If I do:
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1525,7 +1525,7 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
/* read chip information */
ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®);
if (ret)
- return ret;
+ return -EPROBE_DEFER;
if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) !=
SGTL5000_PARTID_PART_ID) {
Then the probe is succesful on the second attemp.
I will post this to the alsa-devel list.
Thanks,
Fabio Estevam
More information about the linux-arm-kernel
mailing list