AnsweredAssumed Answered

sound: ASoC: CODEC DAI ssm2602-hifi not registered

Question asked by flatmax on Jul 16, 2015
Latest reply on Jul 20, 2015 by larsc

Hi there,


I am setting up a custom board. Using your SSM2602 chip.

Right now I am writing an ALSA machine driver.


I get the following error when the system boots :

sound: ASoC: CODEC DAI ssm2602-hifi not registered


I have tried to fix this problem in two ways.

1] Using a DTS and manually setting the name in the machine driver link.

2] By dynamically looking at the SSM2602 device during probe time of my machine driver.


My DTS defines the ssm2602 as per the Documentation/devicetree/bindings/sound/adi,ssm2602.txt file :

ssm2602: ssm2602@900 {

                compatible = "adi,ssm2602";

                reg = <0x900>;


sound {

... snip ...

  audio-codec = <&ssm2602>;

... snip ...


My machine driver defines the link like so :

static struct snd_soc_dai_link my_ssm2602_dai = {

  .name = "my-ssm2602",

  .stream_name = "SSM2602",

  .codec_dai_name = "ssm2602-hifi",

... snip ...


Any ideas on what I may be doing wrong ?

I have put a printk in the ssm2602.c various *_probe functions, however none of them are printed out ... I currently think the driver isn't being loaded, even though lsmod says the following :

snd_soc_ssm2602         7487  0

regmap_core            31326  4 snd_soc_ssm2602

snd_pcm                60679  4 snd_soc_ssm2602

Currently I don't have the codec on the i2c lines ... nor the i2s lines ... I assume that this will not stop the driver from probing.

I have also tried to dynamically set the codec_dai_name at my machine driver probe time using  :

codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0);

codec_dev = of_find_i2c_device_by_node(codec_np); //<<<<<<<<<<<===========   fails here


But this fails to get the i2c device by node ... not sure whats going on there, but that is probably a clue !