Jump to content

I2S on Orange Pi H3


Recommended Posts

I've a problem I can not get a wiring. The opi Zero has 26 gpio pin, I do not find the Data PA20 some in the table of first post.

PA20 is not available on the header, it is used for controlling wireless chip power. It can only be used by soldering a wire to one of pads for resistor R69 (can be seen on the board between wireless chip and Ethernet transformer, resistor itself needs to be desoldered) and changing wireless driver configuration. 

Link to comment
Share on other sites

try to use DAC ES9023 on orange pi zero

 

reconfigure  orangepizero.fex => orangepizero.bin

 


..
[twi0]
twi_used = 0
..

[pcm1]
daudio_used = 1
...
i2s_mclk = port:PA10<2><1><default><default>
i2s_bclk = port:PA11<2><1><default><default>
i2s_dout0 = port:PA12<2><1><default><default>
i2s_din = port:PA13<2><1><default><default>

connect my dac to PA10 11 12 GND +5V

 

boot kernel

root@OpenWrt:~# uname -a
Linux OpenWrt 3.4.113-sun8i #335 SMP PREEMPT Tue Nov 22 21:47:33 CET 2016 armv7l GNU/Linux

check syslog dmesg -c

looks like snddaudio detected

[    1.537136] pcm0 pcm0: pins are not configured from the driver
[    1.543797] asoc: snddaudio <-> pri_dai mapping ok
[    1.553153] asoc: sndhdmi <-> sunxi-hdmiaudio.0 mapping ok

[    1.774866] ALSA device list:
[    1.774883]   #0: snddaudio
[    1.774898]   #1: sndhdmi

check alsa devices - is ok

root@OpenWrt:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: snddaudio [snddaudio], device 0: SUNXI-TDM0 snddaudio-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

check sound

aplay -D sysdefault:CARD=snddaudio test.wav

ooops !!! not have soundonly silent ))))

 

check /sys/... for any information
 

root@OpenWrt:/sys/devices/platform/snddaudio/s_i2s1$ ls -l1
-r--r--r--    1      4096 Dec 10 07:44 codec_reg    
-r--r--r--    1      4096 Dec 10 07:44 dapm_widget    
-rw-r--r--    1      4096 Dec 10 07:44 pmdown_time
drwxr-xr-x    2         0 Dec 10 07:44 power
-rw-r--r--    1      4096 Dec 10 07:44 uevent
root@OpenWrt:/sys/devices/platform/snddaudio/s_i2s1$ grep "" *
dapm_widget:PM State: On
pmdown_time:5000

coodec_reg is empty ;(

 

who have sound please say what wrong !

 

! which codec needed ? maybe some like for odroid snd-soc-pcm5102.ko snd-soc-odroid-dac.ko

maybe need load some modules ?

 

i have loaded only

root@OpenWrt:~# lsmod
mac80211              358445  1 xradio_wlan
xradio_wlan           210530  0 

maybe try  kernel 4.9 ?

 

tnx for all

Link to comment
Share on other sites

You can only use predefined groups of pins for PCM/I2S, you can't just change

....

because you want to do so.

You can use either PA18/PA19/PA20/PA21 or PG10/PG11/PG12/PG13 for PCM_SYNC/PCM_CLK/PCM_DOUT/PCM_DIN respectively.

 

ok

 

my orange_pi_zero board

have only 26 pin

                                                2x13 Header
         1     3.3V                            2     5V
         3     TWI0_SDA / PA12                 4     5V                 
         5     TWI0_SCK / PA11                 6     GND
         7     PWM1 / PA06                     8     UART1_TX / PG06
         9     GND                             10    UART1_RX / PG07
         11    UART2_RX / PA01                 12    SIM_CLK/PA_EINT7 / PA07
         13    UART2_TX / PA00                 14    GND
         15    UART2_CTS / PA03                16    TWI1-SDA / PA19
         17    3.3V                            18    TWI1-SCK / PA18
         19    SPI1_MOSI / PA15                20    GND
         21    SPI1_MISO / PA16                22    UART2_RTS / PA02
         23    SPI1_CLK / PA14                 24    SPI1_CS / PA13
         25    GND                             26    SIM_DET/PA_EINT10 / PA10  

where i can get PG10/PG11/PG12/PG13  or PA20/PA21 ?

 

tnx for reply

Link to comment
Share on other sites

Both PA20 and PG12 are used on this board - PA20 is used for wireless chip and PG12 is used for USB OTG detection. So if you really want to use I2S on this board the best option would be to unsolder R69 and use one of its pads. To power on the wireless module you'll have to either solder R66 resistor near it or solder a wire from one of R66 pads to other GPIO and change wireless driver configuration to use this GPIO.

Link to comment
Share on other sites

Both PA20 and PG12 are used on this board - PA20 is used for wireless chip and PG12 is used for USB OTG detection. So if you really want to use I2S on this board the best option would be to unsolder R69 and use one of its pads. To power on the wireless module you'll have to either solder R66 resistor near it or solder a wire from one of R66 pads to other GPIO and change wireless driver configuration to use this GPIO.

 

tnx for hi quality answers

 

i have try clarify your solution and illustrate it before hack board )))

post-3916-0-51348500-1481373141_thumb.jpg

 

cani use PA20 direct from cpu without any additional elements (from green dotted line on illustrate ) ???

 

what about R66 resistor its same R69? if i try change power on wifi from R69 ???

 

wireless driver configuration to use this GPIO? where ? which one i can i find this one? PA07 or PA10  ?

 

what need to change in fex for fix this hack?

what is it ?

[module_para]
module_power0 = port:PA20<1><default><default><0>
module_power0_vol = 1

what is it ?

[gpio_para]
gpio_used = 0
gpio_num = 2
gpio_pin_1 = port:PA07<1><default><default><0>
gpio_pin_2 = port:PA10<1><default><default><0>

tnx for all

Link to comment
Share on other sites

This is the relevant part in the schematic:

post-480-0-95003400-1481374121_thumb.png
 
So you can either solder a resistor (or maybe a piece of wire) in place of R66 to leave U56 converter always on, or you can solder a wire between bottom (on the schematic, one closer to R69 on the board) resistor pad to any other GPIO and put this GPIO here instead of PA20:
[module_para]
module_power0 = port:PA20<1><default><default><0>

For the reference, [gpio_para] section in FEX files for H3 boards is not used since there is a proper sysfs GPIO driver

Link to comment
Share on other sites

Dear sir,

 

please I don´t have experience niether linux or orange pi board, but I like start to know about this.

I need your help.

I like buy this board: 

https://www.aliexpress.com/item/New-Orange-Pi-Zero-H2-Quad-Core-Open-source-development-board-beyond-Raspberry-Pi/32760774493.html?

 

Beacause this have analog audio output and wifi, and my question are:

1) Can I configure this board how a wifi server and client? if is ok please explain to me to do it

2) Does the quality audio output is Hifi? if is ok, please explain to me how I can setup to optimal audio peformance 

Link to comment
Share on other sites

1) Can I configure this board how a wifi server and client? if is ok please explain to me to do it

2) Does the quality audio output is Hifi? if is ok, please explain to me how I can setup to optimal audio peformance 

 

If you want to attach I2S sound card on this particular board (Opi Zero) you will need to solder stuff. Get rather an Orange Pi PC+ board. It's few more extra bucks but you have analogue audio connector, I2S on header and more. On board wireless is also little better.

 

For hifi sound you need an extra board / external DAC, something like this ...

Link to comment
Share on other sites

If you want to attach I2S sound card on this particular board (Opi Zero) you will need to solder stuff. Get rather an Orange Pi PC+ board. It's few more extra bucks but you have analogue audio connector, I2S on header and more. On board wireless is also little better.

 

For hifi sound you need an extra board / external DAC, something like this ...

 

Thanks Igor, i  found these DAC boards cheaper at AliExpress  $7.21

Link to comment
Share on other sites

I have followed the first message in the thread for my opi one and i can see the i2s es9023 listed on "aplay -l" output but I couldn't have any sound out of it. Can someone help me find what is wrong about it?

 

If it helps, i get this output on command,

root@orangepione:~# cat /sys/devices/platform/snddaudio/s_i2s1/dapm_widget 
PM State: Standby
 
Another user's output is State on. Could this be related to what is wrong?
Link to comment
Share on other sites

 

I have followed the first message in the thread for my opi one and i can see the i2s es9023 listed on "aplay -l" output but I couldn't have any sound out of it. Can someone help me find what is wrong about it?

 

If it helps, i get this output on command,

root@orangepione:~# cat /sys/devices/platform/snddaudio/s_i2s1/dapm_widget 
PM State: Standby
 
Another user's output is State on. Could this be related to what is wrong?

 

 

Check and confirm changes to your fex file ? i also had to add these additional changes to my Nano Pi NEO to get my I2s dac working

 

[w1_para]
w1_used = 1
gpio = 20
should be
 
[w1_para]
w1_used = 0
gpio = 20
Link to comment
Share on other sites

in my case, after changes in the fex file and updating script.bin, aplay -l output has 3 devices, regardless of the i2s device being connected or not. I still have no audio output after changing w1_para parameter as suggested. (orange pi one and es9023 : https://www.aliexpress.com/item/DAC-Sabre-ES9023-Analog-I2S-24-Bit-192-KHz-Decoder-Board-Mode-Conversion/32672945889.html )

 

any suggestions?

 

(When I attached 5v cable to the 3.3v pin, I heard some random popping sounds but not the pink noise that speaker-test produces.)

Link to comment
Share on other sites

You using the correct output device ?

 

Try running this command:

 sudo speaker-test -twav -c2 -Dhw:1

This does not output pink noise but a voice saying "Front Left" "Front Right" and repeats

 

 

Dont attach 5v to the 3.3v pin

 

in my case, after changes in the fex file and updating script.bin, aplay -l output has 3 devices, regardless of the i2s device being connected or not. I still have no audio output after changing w1_para parameter as suggested. (orange pi one and es9023 : https://www.aliexpress.com/item/DAC-Sabre-ES9023-Analog-I2S-24-Bit-192-KHz-Decoder-Board-Mode-Conversion/32672945889.html )

 

any suggestions?

 

(When I attached 5v cable to the 3.3v pin, I heard some random popping sounds but not the pink noise that speaker-test produces.)

Link to comment
Share on other sites

I have successfully followed this tutorial to get an I2S soundcard (ES9023 TeraDak clone) working on the NanoPi Neo. I had no issues and it worked the first time without surprises on Armbian 5.24. 

 

I did have to clone and compile the sunxi-tools from https://github.com/linux-sunxi/sunxi-tools#buildingto get the bin2fex and fex2bin utilities.

Link to comment
Share on other sites

How can I set i2s function on OrangiPi PC2 (H5) - Armbian_Ubuntu?

The answer to this question is quite simple. Without soldering you will not get any I2S output, because Dout, PA20 is used for a led. So in my opinion  there is no need to activate this feature.

 

The PC2 is a fantastic Board, if you use the Multichannel HDMI output with the legacy Kernel from Xulong. My PC2 is running as active Crossover and mpd as Streamer. None of the other Oranges support this feature.

Link to comment
Share on other sites

Thanks Da Alchemist, good advice. I would like to try out the Multichannel HDMI function. However, the reason I asked the question is that the output of the mini board thinks i2s output is high quality sound. Raspberry pie has excellent software such as Volumino, Runeaudio, Moode Audio. All of them can output i2s. However, these software does not support OrangePi. On the other hand, PC Audio has excellent software such as foobar, Jplay, JRiver Media Center (JMC). PC Audio needs combo 384 etc DDC to output USB output i2s. Recently, I was able to introduce JMC for Raspberry to OrangePi PC - Armbian_Debian. Of course, the output is i 2 s. The scheme is as follows.

FLAC file(96 Hz / 24 bit) - OrangePi PC (Armbian_Debian - JMC - PCM 192 Hz / 32 bit i 2 s) - AK 4321 substrate (upsampling to DSD 512) - AK 4497 ​​DAC - AMP - SP

The sound that is output is the excellent!!

 

I am grateful to those who develop Armbian software.

Link to comment
Share on other sites

However, these software does not support OrangePi

 

Officially perhaps no, but I guess there must be some community builds. This is what I found with quick Google search:

http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=191

Since Armbian is a solid base, official builds could be made in the future. I know some people at Volumio and will ping / ask them.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines