[alsa-devel] Codec driver gets probed prior to the machine driver

Fabio Estevam festevam at gmail.com
Sun Jun 9 16:50:01 CEST 2013


When running linux-next 20130607 on a mx6qsabrelite I see that the
audio drivers fail to probe.
Added some printk's to better illustrate the problem:

mmcblk0: mmc0:b5a1 SD04G 3.69 GiB
**** reading the chip 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 defer

The problem here is that the codec driver (sgtl5000) is being probed
prior to the machine driver (imx-sgtl5000).

The reading of the chip ID fails because at this point in time there
is no codec clock, which is turned on by imx-sgtl5000.

Running 3.10-rc4, the order of the events is as expected: imx-sgtl5000
is called first and sgtl5000 is called later.
In this case the probe works as usual.

Tried doing a bisect, but this was not succesful due to several bisect
breakages (build issues and non-booting kernels) on  its way.

Would anyone have some suggestion as to why the codec driver is
getting probed first?


Fabio Estevam

More information about the Alsa-devel mailing list