Hi to all of you!
I'm just new to LibreELEC 8.0.1 official build (used OpenELEC before on a ITX PC Board) and wanted to set up a second system on an RPi Zero W.
Everything is fine so far, but I'm having problems getting PWM Output working on the Zero.
What I've done so far:
Altered the config.txt with the following lines:
# Remap PWM Out Pins for Audio
dtparam=audio=on
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
audio_pwm_mode=2
# Set up LIRC
dtoverlay=lirc-rpi,gpio_out_pin=15,gpio_in_pin=17
# CVBS PAL
sdtv_mode=2 # Normal PAL
Display More
Most likely the 'dtparam=audio=on' isn't needed at all, nevertheless I've tested a lot of stuff in the meanwhile.
(Lirc is working as expected - Picture is fine on PAL TV)
I've soldered my band-pass to the according pins.
As I don't hear anything I've started to try to debug the system.
LibreELEC:~ # lsmod
Module Size Used by
hci_uart 17434 1
btbcm 5989 1 hci_uart
bluetooth 311780 23 hci_uart,btbcm
bridge 93509 0
stp 1323 1 bridge
llc 3224 2 bridge,stp
snd_bcm2835 18434 0
brcmfmac 186291 0
snd_pcm 69875 1 snd_bcm2835
brcmutil 5069 1 brcmfmac
snd_timer 17204 1 snd_pcm
snd 43049 3 snd_timer,snd_bcm2835,snd_pcm
cfg80211 256604 1 brcmfmac
rfkill 14411 5 bluetooth,cfg80211
bcm2835_gpiomem 2759 0
lirc_rpi 6120 3
lirc_dev 7253 1 lirc_rpi
rc_core 17302 1 lirc_dev
fixed 2381 0
Display More
So basically the drivers seems to be loaded.
Therefor I've additionally checkedthe gpio assignment:
LibreELEC:~ # cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-53, parent: platform/20200000.gpio, pinctrl-bcm2835:
gpio-47 ( |? ) out lo
Mhh - wondering a little bit ..... the lirc is working ... but also not there .....
Check available devices with aplay:
LibreELEC:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
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
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
LibreELEC:~ #
Display More
Basically looks good .....
Now I've tried to playback some sounds with aplay.
LibreELEC:~ # aplay -Dhw:0,0 /usr/share/kodi/addons/resource.uisounds.kodi/resources/notify.wav
Playing WAVE '/usr/share/kodi/addons/resource.uisounds.kodi/resources/notify.wav' : Signed 16 bit Little Endian, Rate 32000 Hz, Mono
LibreELEC:~ #
NOTHING TO HEAR - this thing is driving me crazy
Maybe a bug / short in my filters?
Written some small bash script ....
#!/bin/bash
# Exports pin to userspace
echo "18" > /sys/class/gpio/export
echo "13" > /sys/class/gpio/export
# Sets pin 18 as an output
echo "out" > /sys/class/gpio/gpio18/direction
echo "out" > /sys/class/gpio/gpio13/direction
COUNTER=0
while [ $COUNTER -lt 10000 ]; do
echo The counter is $COUNTER
let COUNTER=COUNTER+1
echo "1" > /sys/class/gpio/gpio18/value
echo "0" > /sys/class/gpio/gpio18/value
echo "1" > /sys/class/gpio/gpio13/value
echo "0" > /sys/class/gpio/gpio13/value
done
Display More
Testing - I HEAR SOME NOISE .... so the HW seems to be fine.
So I've NO idea how to ge further .....
(For sake of completeness I've attached the dmesg)
Basically I can set up a full distro and try some tests with that .....
But this could easily cost me hours more ....
So - does anybody has working PWM Sound with LibeELEC 8.0.1 on a Pi Zero?
Thanks in advance for your help!!
cu
Thomas