How to adapt the SGTL5000 driver for other devices

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to adapt the SGTL5000 driver for other devices

1,684 Views
joshkurland
Contributor IV

Hello,

I have an I2S audio device connected to an i.MX6Q using the same interface as the common SGTL5000.  In order to test the basic functionality of my device, I would like to use ALSA and the imx-sgtl5000 driver to send sound from a user space application to the new hardware.  However, because the SGTL5000 codec is not physically present on my board, the driver probe fails.

  imx-sgtl5000 sound.22: ASoC: CODEC (null) not registered

  imx-sgtl5000 sound.22: snd_soc_register_card failed (-517)

How can I adapt the probe function to allow the imx-sgtl5000 driver to run without the hardware being present?

Thank you,

Josh K.

Labels (4)
0 Kudos
Reply
4 Replies

1,088 Views
saisuryanarayan
Contributor I

Hi Josh Kurland,

Is your problem got resolved.If so please reply to this I am also trying the same.we also don't have sgtl5000 Codec IC in our board and we want to sent some data from user space application to hardware.

Thank You,

SaiSurya

0 Kudos
Reply

1,088 Views
joshkurland
Contributor IV

Hi SaiSurya,

I apologize for responding to you so late.  Have you resolved your problem yet?

I was able to make my own audio codec to receive audio data from userspace.  However instead of modifying the sgtl5000 driver, I went ahead and wrote the full driver for my own device.

0 Kudos
Reply

1,088 Views
sinanakman
Senior Contributor III

Hi Josh

There is something called simple card and simple codec that

you might be able to use for this. Search for some of the

examples.

Hope this helps

Regards

Sinan Akman

0 Kudos
Reply

1,088 Views
igorpadykov
NXP Employee
NXP Employee

Hi Josh

in sgtl5000.c one can try to set "ret=0"

before all exspresions with "if (ret < 0)..", these are

checks for errors.

Best regards

igor

0 Kudos
Reply