tutorial Enable Audio on OrangePi R1 with NAS-board

Recommended Posts

On newer armbian-build it seems that the codec-analog is disabled  by default :(

I activated analog-codec in armbian-config ==> System ==> Hardware

like in older builds.

aplay -l  did show the device, but could play.


So I did decompile the .dtb with:
dtc -I dtb -O dts /boot/dtb/sun8i-h2-plus-orangepi-r1.dtb -o /boot/dtb/sun8i-h2-plus-orangepi-r1.dts


Edited the allwinner,sun8i-h3-codec status from disabled to okay:

                codec@1c22c00 {
                        #sound-dai-cells = < 0x00 >;
                        compatible = "allwinner,sun8i-h3-codec";
                        reg = < 0x1c22c00 0x400 >;
                        interrupts = < 0x00 0x1d 0x04 >;
                        clocks = < 0x03 0x34 0x03 0x6d >;
                        clock-names = "apb\0codec";
                        resets = < 0x03 0x28 >;
                        dmas = < 0x14 0x0f 0x14 0x0f >;
                        dma-names = "rx\0tx";
                        allwinner,codec-analog-controls = < 0x19 >;
                        status = "okay";
                        phandle = < 0x58 >;

Then I compiled the .dts back to .dtb:
dtc -I dts -O dtb /boot/dtb/sun8i-h2-plus-orangepi-r1.dts -o /boot/dtb/sun8i-h2-plus-orangepi-r1.dtb


In armbian-config ==> System ==> Hardware I enabled also usbhost2 & usbhost3

(because no USB-device was recognized at the USB-ports of the NAS-board)

and I disabled cir and spi-jedec-nor which I had enabled for a test.


After a reboot the soundcard

Debian Buster with Armbian Linux 5.3.7-sunxi
package bsp-kernel[5.98.191026] u-boot[5.98] dtb[5.98.191026] firmware[5.98] config[5.98]

root@opi-r1( aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

is working again like in older builds :)


The 2nd Ethernet Port Bus 003 Device 002: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter

is also connected via USB, but is allways in the lsusb-list - even when usbhost0-usbhost3 is disabled.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.