Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh still not working after installing kernel from source #132

Closed
treii28 opened this issue Jan 26, 2019 · 5 comments
Closed

install.sh still not working after installing kernel from source #132

treii28 opened this issue Jan 26, 2019 · 5 comments
Labels

Comments

@treii28
Copy link

treii28 commented Jan 26, 2019

I tried installing using the install script but no devices showed up. After doing some sniffing through the issues and reading through what the script was trying to do, I found the problem was that the 4.14.92+ kernel (latest from the stretch repositories) apparently didn't have the source headers needed by the install script.
So I went and grabbed the linux kernel source code and build a version of 4.14.95+ from scratch, re-ran the install script, verified the modules are built in the various dkms directories but aplay -l still shows no pi-zero hat.

I'm not even sure where to begin looking for further problems. lsmod shows no seeed-voicecard module. The /etc/modules and /boot/config.txt have the correct entries. The service file appears to be installed and a log file is being generated when it tries to run (which doesn't seem to tell me anything useful)

I made sure raspi-config has spi and i2c enabled. I've tried lsmod - no seed modules in the list. I've tried restarting the service. I've rebooted more times than I care to count.

/var/log/seeed-voicecard.log:

+ dtparam i2c_arm=on

+ modprobe i2c-dev
+ dtparam spi=on
+ sleep 1
++ i2cdetect -y 1 0x1a 0x1a
++ grep 1a
++ awk '{print $2}'
+ is_1a=1a
++ grep 35
++ awk '{print $2}'
++ i2cdetect -y 1 0x35 0x35
+ is_35=
++ i2cdetect -y 1 0x3b 0x3b
++ grep 3b
++ awk '{print $2}'
+ is_3b=
+ rm /etc/asound.conf
+ rm /var/lib/alsa/asound.state
+ '[' x1a == x1a ']'
+ '[' x == x ']'
+ echo 'install 2mic'
install 2mic
+ dtoverlay seeed-2mic-voicecard
* Failed to apply overlay '5_seeed-2mic-voicecard' (kernel)
+ sleep 1
+ rm /etc/asound.conf
rm: cannot remove '/etc/asound.conf': No such file or directory
+ rm /var/lib/alsa/asound.state
rm: cannot remove '/var/lib/alsa/asound.state': No such file or directory
+ echo 'create 2mic asound configure file'
create 2mic asound configure file
+ ln -s /etc/voicecard/asound_2mic.conf /etc/asound.conf
+ echo 'create 2mic asound status file'
create 2mic asound status file
+ ln -s /etc/voicecard/wm8960_asound.state /var/lib/alsa/asound.state
+ '[' x == x3b ']'
+ '[' x == x3b ']'
+ alsactl restore
+ amixer cset numid=3 1
numid=3,iface=MIXER,name='PCM Playback Route'
  ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
  : values=1

other info related to script created items:

> uname -a
Linux myrpi 4.14.95+ #1 Sat Jan 26 08:58:37 EST 2019 armv6l GNU/Linux

> grep i2s /boot/config.txt 
dtparam=i2s=on
dtoverlay=i2s-mmap

> ls /boot/overlays/seeed-*
/boot/overlays/seeed-2mic-voicecard.dtbo
/boot/overlays/seeed-4mic-voicecard.dtbo
/boot/overlays/seeed-8mic-voicecard.dtbo

> tree /var/lib/dkms/seeed-voicecard/
/var/lib/dkms/seeed-voicecard/
|-- 0.3
|   |-- 0.0.0
|   |-- 4.14.79+
|   |   `-- armv6l
|   |       |-- log
|   |       |   `-- make.log
|   |       `-- module
|   |           |-- snd-soc-ac108.ko
|   |           |-- snd-soc-seeed-voicecard.ko
|   |           `-- snd-soc-wm8960.ko
|   |-- 4.14.79-v7+
|   |   `-- armv6l
|   |       |-- log
|   |       |   `-- make.log
|   |       `-- module
|   |           |-- snd-soc-ac108.ko
|   |           |-- snd-soc-seeed-voicecard.ko
|   |           `-- snd-soc-wm8960.ko
|   |-- 4.14.95+
|   |   `-- armv6l
|   |       |-- log
|   |       |   `-- make.log
|   |       `-- module
|   |           |-- snd-soc-ac108.ko
|   |           |-- snd-soc-seeed-voicecard.ko
|   |           `-- snd-soc-wm8960.ko
|   |-- 4.9.0-6-rpi
|   |   `-- armv6l
|   |       |-- log
|   |       |   `-- make.log
|   |       `-- module
|   |           |-- snd-soc-ac108.ko
|   |           |-- snd-soc-seeed-voicecard.ko
|   |           `-- snd-soc-wm8960.ko
|   |-- 4.9.0-6-rpi2
|   |   `-- armv6l
|   |       |-- log
|   |       |   `-- make.log
|   |       `-- module
|   |           |-- snd-soc-ac108.ko
|   |           |-- snd-soc-seeed-voicecard.ko
|   |           `-- snd-soc-wm8960.ko
|   `-- source -> /usr/src/seeed-voicecard-0.3
|-- 4.14.92+
|   |-- build
|   `-- source -> /usr/src/seeed-voicecard-4.14.92+
`-- 4.14.95+
    |-- 4.14.95+
    |   `-- armv6l
    |       |-- log
    |       |   `-- make.log
    |       `-- module
    |           |-- snd-soc-ac108.ko
    |           |-- snd-soc-seeed-voicecard.ko
    |           `-- snd-soc-wm8960.ko
    `-- source -> /usr/src/seeed-voicecard-4.14.95+

31 directories, 25 files

> ls -a /etc/voicecard/
.   ac108_6mic.state    asound_2mic.conf  asound_6mic.conf  .git
..  ac108_asound.state  asound_4mic.conf  dkms.conf         wm8960_asound.state

> cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
snd-soc-seeed-voicecard
snd-soc-ac108
snd-soc-wm8960

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

> i2cdetect -y 1          
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

> dkms status
seeed-voicecard, 0.3, 4.14.79+, armv6l: built
seeed-voicecard, 0.3, 4.14.79-v7+, armv6l: built
seeed-voicecard, 0.3, 4.14.95+, armv6l: built
seeed-voicecard, 0.3, 4.9.0-6-rpi2, armv6l: built
seeed-voicecard, 0.3, 4.9.0-6-rpi, armv6l: built
seeed-voicecard, 4.14.92+: added
seeed-voicecard, 4.14.95+, 4.14.95+, armv6l: built

>  cat /etc/voicecard/dkms.conf 
PACKAGE_NAME="seeed-voicecard"
PACKAGE_VERSION="0.3"
BUILT_MODULE_NAME[0]="snd-soc-wm8960"
BUILT_MODULE_NAME[1]="snd-soc-ac108"
BUILT_MODULE_NAME[2]="snd-soc-seeed-voicecard"
DEST_MODULE_LOCATION[0]="/kernel/sound/soc/codecs"
DEST_MODULE_LOCATION[1]="/kernel/sound/soc/codecs"
DEST_MODULE_LOCATION[2]="/kernel/sound/soc/bcm"
AUTOINSTALL="yes"

@treii28
Copy link
Author

treii28 commented Jan 26, 2019

at first inspection, it appears the modules aren't being installed properly in /lib/modules/{version} - what do I need to add to get the dependencies set up properly?
I manually added them under ....{version}/kernel/sound/soc/codecs and ran depmod and it seems to be working now. Is that the correct thing to do or is there a better way to do it?

@Pillar1989
Copy link
Contributor

It's all working. It looks good!

@0xueping
Copy link

0xueping commented Feb 2, 2019

Maybe I encounter with a same issue which you have.
Could you tell me the detail information about resolving the problem?
Thanks a lot for you!

BTW, my issue is as following link:
#134

@diyfr
Copy link

diyfr commented Feb 5, 2019

thanks @treii28
more precisely (for newbies ) :
Copy all .ko files founded in
/var/lib/dkms/seed-voicecard/0.3/{KERNEL}/armv7l/module/
in
/lib/modules/{KERNEL}/kernel/sound/soc/codecs
Exist a minimal two versions of your kernel (Sample on my Rpi3 and :4.14.79+ 4.14.79-v7+)
run depmod and reboot..

@Pillar1989
Copy link
Contributor

I will close this issue, the later you still have questions, you can reopen it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants