Hi, I've used a Raspberry Pi Compute Module 1 with the HifiBerry DAC.
Now I replaced the module 1 with the Raspberry Pi Compute Module 3.
Unfortunately, I now no longer have a signal at the I2S.
I hope you can help me.
12 comments
-
Eteif aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: sndrpihifiberry [snd_rpi_hifiberry_dac], Gerät 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Sub-Geräte: 0/1
Sub-Gerät #0: subdevice #0 -
Eteif uname -a
Linux 4.4.45-v7+ #954 SMP Fri Jan 27 19:06:40 GMT 2017 armv7l GNU/Linux
cat /boot/config.txt
disable_overscan=1
start_file=start_x.elf
fixup_file=fixup_x.dat
dtoverlay=hifiberry-dac
boot_delay=2
disable_splash=1
cat /etc/asound.conf
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
device 0
}
lsmod
Module Size Used by
xt_state 1293 1
iptable_mangle 1454 0
iptable_nat 1725 0
sg 18319 0
nf_conntrack_ipv4 12912 2
nf_defrag_ipv4 1428 1 nf_conntrack_ipv4
sr_mod 13220 0
nf_nat_ipv4 4992 1 iptable_nat
nf_nat 12375 1 nf_nat_ipv4
cdrom 27410 1 sr_mod
nf_conntrack 77460 4 nf_nat,xt_state,nf_nat_ipv4,nf_conntrack_ipv4
ipv6 347556 49
iptable_filter 1409 1
ip_tables 11445 3 iptable_filter,iptable_mangle,iptable_nat
x_tables 13165 4 ip_tables,xt_state,iptable_filter,iptable_mangle
evdev 11396 1
snd_soc_hifiberry_dac 2511 2
snd_soc_bcm2835_i2s 6354 2
bcm2835_wdt 3225 0
bcm2835_gpiomem 3040 0
snd_soc_pcm5102a 1763 1
snd_soc_core 125949 3 snd_soc_bcm2835_i2s,snd_soc_hifiberry_dac,snd_soc_pcm5102a
snd_pcm_dmaengine 3391 1 snd_soc_core
snd_pcm 75762 4 snd_soc_core,snd_soc_hifiberry_dac,snd_pcm_dmaengine
snd_seq 53119 0
snd_seq_device 3621 1 snd_seq
snd_timer 19288 2 snd_pcm,snd_seq
snd 51908 8 snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq -
Eteif cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 noatime console=tty9 logo.nologo quiet rootwait loglevel=1 sdhci-bcm2708.enable_llm=1 dwc_otg.microframe_schedule=1 dwc_otg.fiq_fix_enable=0 dwc_otg.fiq_split_enable=0 -
HiFiBerry team Hi,
most likely a kernel patch is needed to enable the correct GPIOs. I recommend reporting this to the kernel developers:
https://github.com/raspberrypi/linux/issues
Best regards,
Daniel -
Eteif
Thank you.
The Solution:
Edit the dt-blob.bin
sudo apt-get install device-tree-compiler
wget https://github.com/raspberrypi/firmware/raw/master/extra/dt-blob.dts
nano dt-blob.dts
go to pins_cm3 section and ad
pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0
//--------------------------------------------------------------------------------------------------------------
pin@p28 {
function = "pcm";
termination = "no_pulling";
drive_strength_mA = < 10 >; // pcm/i2s
};
pin@p29 {
function = "pcm";
termination = "no_pulling";
drive_strength_mA = < 10 >; // pcm/i2s
};
pin@p30 {
function = "pcm";
termination = "no_pulling";
drive_strength_mA = < 10 >; // pcm/i2s
};
pin@p31 {
function = "pcm";
termination = "no_pulling";
drive_strength_mA = < 10 >; // pcm/i2s
};
//--------------------------------------------------------------------------------------------------------------
pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL
save the file
and convert to dt-blob.bin
sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob.dts
be shure not to blacklist in /etc/modprobe.d/*
blacklist i2c-bcm2708
blacklist snd-soc-pcm512x
blacklist snd-soc-wm8804
reboot -
AXM Hi,
Quite useful post.
I am also planning to use CM3 with HiFiBerry DAC+ Pro. I know that I have to connect GPIO28, 29,30,31 to the DAC+. I am a little bit confused about the i2c pins. I plan to connect it to GPIO0 (SDA) and GPIO(1). Is it correct?
Thanks
-
HiFiBerry team Yes, you also need to connect I2C. However, I2C is GPIO2 and GPIO3.
Best regards,
Daniel -
AXM We have two I2Cs in CM. GPIO0 (SDA0) and GPIO1 (SCL0) & GPIO2 (SDA1) and GPIO3 (SCL1). So can I not use GPIO0 and GPIO1 for DAC+?
Thanks
-
HiFiBerry team No you can't, except if you patch and re-compile the Linux kernel.
Best regards,
Daniel -
AXM Okay thanks.
But I think I can use GPIO18,19,20,21 for I2S, right?
-
HiFiBerry team Yes, these are the GPIOs for I2S.
Best regards,
Daniel -
AXM okay thanks a lot