[solved] Modprobe not loading pisound module : failed: -517


#1

Hi everybody,
I tried to install pisound on a minimal raspbian jessie on rpi2, I updated the kernel and the step by step works fine.
But the aplay -l, arecord -l and amidi -l command doesn’t find the pisound card…
I’ve got some errors loadind the pisound module : failed: -517
My power supply is 12v 3A

Here are some comandlines

pi@raspberrypi:~ $ uname -a

Linux raspberrypi 4.4.27-v7+ #917 SMP Tue Oct 25 16:00:29 BST 2016 armv7l GNU/Linux

pi@raspberrypi:~ $ amidi -l

Dir Device Name

pi@raspberrypi:~ $ aplay -l

**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: ALSA [bcm2835 ALSA], périphérique 0: bcm2835 ALSA [bcm2835 ALSA]
Sous-périphériques: 8/8
Sous-périphérique #0: subdevice #0
Sous-périphérique #1: subdevice #1
Sous-périphérique #2: subdevice #2
Sous-périphérique #3: subdevice #3
Sous-périphérique #4: subdevice #4
Sous-périphérique #5: subdevice #5
Sous-périphérique #6: subdevice #6
Sous-périphérique #7: subdevice #7
carte 0: ALSA [bcm2835 ALSA], périphérique 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0

pi@raspberrypi:~ $ arecord -l

**** Liste des Périphériques Matériels CAPTURE ****

pi@raspberrypi:~ $ lsmod

Module                  Size  Used by
snd_soc_pisound        10722  0 
snd_rawmidi            18516  1 snd_soc_pisound
snd_seq_device          3621  1 snd_rawmidi
cpufreq_stats           3463  0 
cfg80211              427855  0 
rfkill                 16037  1 cfg80211
evdev                  11396  5 
vc4                   109413  1 
drm_kms_helper        101028  2 vc4
drm_mipi_dsi            8702  1 vc4
drm                   262564  4 vc4,drm_kms_helper
syscopyarea             2945  1 drm_kms_helper
sysfillrect             3443  1 drm_kms_helper
sysimgblt               2069  1 drm_kms_helper
fb_sys_fops             1309  1 drm_kms_helper
snd_bcm2835            20447  1 
i2c_bcm2708             4834  0 
snd_soc_bcm2835_i2s     6354  0 
spi_bcm2835             6678  0 
bcm2835_gpiomem         3040  0 
bcm2835_wdt             3225  0 
snd_soc_pcm5102a        1763  0 
uio_pdrv_genirq         3164  0 
uio                     8000  1 uio_pdrv_genirq
snd_soc_core          125885  3 snd_soc_bcm2835_i2s,snd_soc_pisound,snd_soc_pcm5102a
snd_pcm_dmaengine       3391  1 snd_soc_core
snd_pcm                75762  4 snd_bcm2835,snd_soc_pisound,snd_soc_core,snd_pcm_dmaengine
snd_timer              19288  1 snd_pcm
snd                    51908  8 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_rawmidi,snd_seq_device
i2c_dev                 5859  0 
fuse                   84037  3 
ipv6                  347530  48 

pi@raspberrypi:~ $ dmesg | grep pisound

[ 4.799106] pisound: Searching for spi device…
[ 4.803848] pisound: SPI device not found, deferring!
[ 4.808934] pisound: pisnd_spi_init failed: -517
[ 5.909898] pisound: Searching for spi device…
[ 5.909934] pisound: SPI device not found, deferring!
[ 5.909945] pisound: pisnd_spi_init failed: -517
[ 5.914282] pisound: Searching for spi device…
[ 5.914302] pisound: SPI device not found, deferring!
[ 5.914314] pisound: pisnd_spi_init failed: -517
[ 5.928812] pisound: Searching for spi device…
[ 5.928833] pisound: SPI device not found, deferring!
[ 5.928845] pisound: pisnd_spi_init failed: -517
[ 5.953312] pisound: Searching for spi device…
[ 5.953346] pisound: Found!
[ 6.051086] pisound: Detected pisound card:
[ 6.051141] pisound: Serial: PS-2532500
[ 6.051165] pisound: Version: 1.00
[ 6.051181] pisound: Id: 1e931534583336383816051d
[ 6.052006] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 6.052050] pisound: snd_soc_register_card() failed: -517
[ 6.053337] pisound: Searching for spi device…
[ 6.053364] pisound: Found!
[ 6.134657] pisound: Detected pisound card:
[ 6.134709] pisound: Serial: PS-2532500
[ 6.134736] pisound: Version: 1.00
[ 6.134765] pisound: Id: 1e931534583336383816051d
[ 6.135372] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 6.135394] pisound: snd_soc_register_card() failed: -517
[ 6.307360] pisound: Searching for spi device…
[ 6.307404] pisound: Found!
[ 6.400578] pisound: Detected pisound card:
[ 6.400588] pisound: Serial: PS-2532500
[ 6.400592] pisound: Version: 1.00
[ 6.400598] pisound: Id: 1e931534583336383816051d
[ 6.401132] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 6.401140] pisound: snd_soc_register_card() failed: -517
[ 6.401967] pisound: Searching for spi device…
[ 6.401976] pisound: Found!
[ 6.478768] pisound: Detected pisound card:
[ 6.478806] pisound: Serial: PS-2532500
[ 6.478816] pisound: Version: 1.00
[ 6.478827] pisound: Id: 1e931534583336383816051d
[ 6.479348] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 6.479372] pisound: snd_soc_register_card() failed: -517
[ 6.529494] pisound: Searching for spi device…
[ 6.529547] pisound: Found!
[ 6.614927] pisound: Detected pisound card:
[ 6.614974] pisound: Serial: PS-2532500
[ 6.614986] pisound: Version: 1.00
[ 6.614998] pisound: Id: 1e931534583336383816051d
[ 6.615626] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 6.615671] pisound: snd_soc_register_card() failed: -517
[ 365.543048] pisound: Searching for spi device…
[ 365.543089] pisound: Found!
[ 365.618095] pisound: Detected pisound card:
[ 365.618146] pisound: Serial: PS-2532500
[ 365.618164] pisound: Version: 1.00
[ 365.618174] pisound: Id: 1e931534583336383816051d
[ 365.618828] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
[ 365.618855] pisound: snd_soc_register_card() failed: -517

tail -f /var/log/syslog

Oct 26 16:57:39 raspberrypi rtkit-daemon[828]: Canary thread running.
Oct 26 16:57:39 raspberrypi rtkit-daemon[828]: Watchdog thread running.
Oct 26 16:57:39 raspberrypi systemd[1]: Started RealtimeKit Scheduling Policy Service.
Oct 26 16:57:39 raspberrypi rtkit-daemon[828]: Successfully made thread 827 of process 827 (/usr/bin/pulseaudio) owned by ‘1000’ high priority at nice level -11.
Oct 26 16:57:39 raspberrypi rtkit-daemon[828]: Supervising 1 threads of 1 processes of 1 users.
Oct 26 16:57:39 raspberrypi org.a11y.Bus[809]: Activating service name=‘org.a11y.atspi.Registry’
Oct 26 16:57:39 raspberrypi org.a11y.Bus[809]: Successfully activated service ‘org.a11y.atspi.Registry’
Oct 26 16:57:39 raspberrypi org.a11y.atspi.Registry[836]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Oct 26 16:57:51 raspberrypi systemd[753]: Time has been changed
Oct 26 16:57:51 raspberrypi systemd[1]: Time has been changed
Oct 26 17:03:28 raspberrypi kernel: [ 365.543048] pisound: Searching for spi device…
Oct 26 17:03:28 raspberrypi kernel: [ 365.543089] pisound: Found!
Oct 26 17:03:28 raspberrypi kernel: [ 365.618095] pisound: Detected pisound card:
Oct 26 17:03:28 raspberrypi kernel: [ 365.618146] pisound: Serial: PS-2532500
Oct 26 17:03:28 raspberrypi kernel: [ 365.618164] pisound: Version: 1.00
Oct 26 17:03:28 raspberrypi kernel: [ 365.618174] pisound: Id: 1e931534583336383816051d
Oct 26 17:03:28 raspberrypi kernel: [ 365.618828] snd-rpi-pisound soc:sound: ASoC: CPU DAI (null) not registered
Oct 26 17:03:28 raspberrypi kernel: [ 365.618855] pisound: snd_soc_register_card() failed: -517

If somebody have some clues, it will be great!!


#2

Hi, you are getting EPROBE_DEFER error, as defined in https://github.com/raspberrypi/linux/blob/rpi-4.4.y/include/linux/errno.h

The function that fails is: snd_soc_bind_dai_link, https://github.com/raspberrypi/linux/blob/rpi-4.4.y/sound/soc/soc-core.c

Can you share your /boot/config.txt and kernel command line? This could be some issue with configuration.

One thing you could try, if you have a free SDCARD available is to make a clean raspbian install on it and see if you can get the driver to work on that, then we would know whether this is software or hardware issue.


#3

Hi,
I’m waiting for the clean raspbian image to download and I’ll tcheck if the problem persist…
Meanwhile here are my config.txt and cmdline.txt

CONFIG.TXT

Enable audio (loads snd_bcm2835)

dtparam=audio=on
dtoverlay=vc4-kms-v3d
dtparam=i2c_arm=on
dtoverlay=pisound
dtoverlay=i2s-mmap

CMDLINE.TXT

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fastboot noswap cgroup_enable=memory

I’ve tweaked the cmdline.txt and pieces of kernel from ccrma sattelite that could be the reason of the problem…
I’ll tcheck the clean install and put the results here.

thank’s


#4

config.zip (1011 Bytes)

I’ve attached the config.txt I have. Can you check whether you have this enabled:

dtparam=i2s=on

My cmdline.txt looks like this:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait


#5

I’ve tested pisound on the clean raspbian and everything works great !

I’ve copied your config.txt on my minimal tweaked raspbian and it work’s great too !!!
I think there was a conflict with an experimental opengl overlay that I tested a while ago to try gem on pure data with the rpi2:
dtoverlay=vc4-kms-v3d
I’ve just had to comment this line and everything works fine,it was missing
dtparam=i2s-on dtparam=spi-on
but it doesn’t seem to have any conflict with pisound module recognition, so i’ll keep your config.txt file and will begin to test audio capabilities !

thank’s!


#6

Glad to hear it worked! I think the dtparam=i2s-on was the main issue - from dmesg log, SPI was already working.