Hi, I did get my BPI-M64 up and running with the 4.4 Debian image
pi@bpi-iot-ros-ai:~$ uname -a
Linux bpi-iot-ros-ai 4.4.89-BPI-M64-Kernel #8 SMP PREEMPT Thu Nov 1 15:46:06 CST 2018 aarch64 GNU/Linux
pi@bpi-iot-ros-ai:~$ cat /etc/issue
Debian GNU/Linux 9 \n \l
With the help of some forum posts I got Ethernet and WiFi up and running.
Then I tried to get the audio-jack working. Unfortunately most forum and wiki posts seem either to describe way older configurations, or newer ones. As far as I understand the new device tree configuration is however only available in newer kernels like 4.19
As a side note I saw the git repo of the 4.4 kernel at https://github.com/BPI-SINOVOIP/BPI-M64-bsp-4.4 and for the R64 board one using kernel 4.19 at https://github.com/BPI-SINOVOIP/BPI-R64-bsp-4.19 , sadly however it seems to be not compatible with the M64. Have to see if I get Armbian running instead.
Anyhow what I tried so far to try yo get the audio-jack running:
Replace asound.state
and aound.state.bpi-m64
under /var/lib/alsa
Try to unmute
pi@bpi-iot-ros-ai:~$ amixer set Master unmute
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 65536 [100%] [on]
Front Right: Playback 65536 [100%] [on]
pi@bpi-iot-ros-ai:~$ sudo amixer | grep Headphone -A 10
Simple mixer control 'Headphone',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Linein_detect',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Phoneout Mixer Lout_Mixer_Switch',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Checkin devices
pi@bpi-iot-ros-ai:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC codec-aif1-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 1: bb Voice codec-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 2: bb-bt-clk codec-aif2-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: audiocodec [audiocodec], device 3: bt Voice codec-aif3-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@bpi-iot-ros-ai:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=audiocodec
audiocodec,
Default Audio Device
dmix:CARD=audiocodec,DEV=0
audiocodec,
Direct sample mixing device
dmix:CARD=audiocodec,DEV=1
audiocodec,
Direct sample mixing device
dmix:CARD=audiocodec,DEV=2
audiocodec,
Direct sample mixing device
dmix:CARD=audiocodec,DEV=3
audiocodec,
Direct sample mixing device
dsnoop:CARD=audiocodec,DEV=0
audiocodec,
Direct sample snooping device
dsnoop:CARD=audiocodec,DEV=1
audiocodec,
Direct sample snooping device
dsnoop:CARD=audiocodec,DEV=2
audiocodec,
Direct sample snooping device
dsnoop:CARD=audiocodec,DEV=3
audiocodec,
Direct sample snooping device
hw:CARD=audiocodec,DEV=0
audiocodec,
Direct hardware device without any conversions
hw:CARD=audiocodec,DEV=1
audiocodec,
Direct hardware device without any conversions
hw:CARD=audiocodec,DEV=2
audiocodec,
Direct hardware device without any conversions
hw:CARD=audiocodec,DEV=3
audiocodec,
Direct hardware device without any conversions
plughw:CARD=audiocodec,DEV=0
audiocodec,
Hardware device with all software conversions
plughw:CARD=audiocodec,DEV=1
audiocodec,
Hardware device with all software conversions
plughw:CARD=audiocodec,DEV=2
audiocodec,
Hardware device with all software conversions
plughw:CARD=audiocodec,DEV=3
audiocodec,
Hardware device with all software conversions
sysdefault:CARD=sndhdmi
sndhdmi,
Default Audio Device
dmix:CARD=sndhdmi,DEV=0
sndhdmi,
Direct sample mixing device
dsnoop:CARD=sndhdmi,DEV=0
sndhdmi,
Direct sample snooping device
hw:CARD=sndhdmi,DEV=0
sndhdmi,
Direct hardware device without any conversions
plughw:CARD=sndhdmi,DEV=0
sndhdmi,
Hardware device with all software conversions
tried to change asound.conf
pi@bpi-iot-ros-ai:~$ cat /etc/asound.conf
#pcm.!default {
# type hw
# card 1 #If you want to set HDMI as output ,turn 0 to 1.
# device 0
#}
#ctl.!default {
# type hw
# card 1 #If you want to set HDMI as output ,turn 0 to 1.
#}
pcm.!default {
type hw card 0 device 0
}
ctl.!default {
type hw card 0
}
try to play a sound
pi@bpi-iot-ros-ai:~$ aplay -vD hw:0,0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Hardware PCM card 0 'audiocodec' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 24000
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 6755399441055744000
appl_ptr : 0
hw_ptr : 0
pi@bpi-iot-ros-ai:~$ sudo speaker-test -c2 -D plughw:0,0
speaker-test 1.1.3
Playback device is plughw:0,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 16384
Period size range from 31 to 16385
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
Time per period = 5.673465
0 - Front Left
1 - Front Right
...
to no avail…