I2S Аудио на mainline ядре OrangePi

Включение I2S аудио на armbian для Allwinner H2 & H3 на mainline ядре 4.13.

собирал armbian на Win10 с  VirtualBox + Ubuntu 16.04 x64 Developer-Guide_Build-Preparation

./compile.sh BOARD=orangepipc BRANCH=next RELEASE=jessie BUILD_DESKTOP=no KERNEL_ONLY=on KERNEL_CONFIGURE=yes

make linux-menuconfig (by buildroot)

Device Drivers
<*>-->Sound card support
<*> -->Advanced Linux Sound Archtecture
<*>  -->ALSA for Soc audio support
        -->Allwinner Soc Audio support
             <*> Allwinner A10 Codec Support
             <*> Allwinner SUN8I audio codec
             <*> Allwinner sun8i Codec Analog Controls Suppor  
             <*> Allwinner A10 I2S Support
             <M> Allwinner A10 SPDIF Support

На Opi: cat /proc/asound/cards

0 [Codec          ]: H3_Audio_Codec - H3 Audio Codec
                      H3 Audio Codec
 1 [allwinnerhdmi  ]: allwinner_hdmi - allwinner,hdmi
                      allwinner,hdmi

Включение «Line Out»  — линейный выход на Opi (по умолчанию выключен)

amixer -c 0 -q set "Line Out"  100%+ unmute
amixer -c 0 -q set "DAC"  100%+ unmute
speaker-test -twav -c2

ставим headers(нужный пакет ищем после сборки имиджа в build/output/debs)
в моём случае:

dpkg -i linux-headers-next-sunxi_5.35_armhf.deb

Get the source & Build:

git clone https://github.com/ua3nbw-cf/ak4554.git
cd ak4554
make all install
armbian-add-overlay sun8i-h3-I2S.dts
reboot

в файле /boot/armbianEnv.txt появится строка:

user_overlays=sun8i-h3-I2S
проверка:

root@orangepipc:~# cat /proc/asound/cards
 0 [Codec          ]: H3_Audio_Codec - H3 Audio Codec
                      H3 Audio Codec
 1 [i2S            ]: i2S - i2S
                      i2S
 2 [allwinnerhdmi  ]: allwinner_hdmi - allwinner,hdmi
                      allwinner,hdmi
root@orangepipc:~# speaker-test -twav -c2 -Dhw:1
root@orangepipc:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: i2S [i2S], device 0: 1c22000.i2s-ak4554-hifi ak4554-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Ну и запись по I2S

root@orangepipc:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: i2S [i2S], device 0: 1c22000.i2s-ak4554-hifi ak4554-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Поделиться
Отправить
Запинить
2017   armbian   I2S   OrangePI PC
Ваш комментарий
адрес не будет опубликован

ХТМЛ не работает

Ctrl + Enter
Популярное