dony71
-
Posts
128 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by dony71
-
-
hotspot also no internet on BPI M2+
it should have on board ap6212 wifi
any solution on this?
-
I have armbian 5.65 ( kernel 4.14.78-sunxi) on BPI M2 Plus
I can enable hotspot using armbian-config but when connect to AP, no internet access
Is there any setting missing here??
/etc/network/interfaces
# Network is managed by Network manager auto lo iface lo inet loopback pre-up ifconfig eth0 hw ether 22:33:44:55:66:77
/etc/network/interfaces.d/armbian.ap.nat
# armbian NAT hostapd allow-hotplug wlan0 iface wlan0 inet static address 172.24.1.1 netmask 255.255.255.0 network 172.24.1.0 broadcast 172.24.1.255
/etc/hostapd.conf
# # armbian hostapd configuration example # # nl80211 mode # ssid=ARMBIAN interface=wlan0 hw_mode=g channel=5 #bridge=br0 driver=nl80211 logger_syslog=0 logger_syslog_level=0 wmm_enabled=1 wpa=2 preamble=1 wpa_psk=xxxxxxxxxxxxxx wpa_passphrase=xxxxxxx wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP auth_algs=1 macaddr_acl=0 noscan=1 ## IEEE 802.11n ieee80211n=1 ht_capab=[DSSS_CK-40][HT20+] country_code=US ieee80211d=1 ## IEEE 802.11n ### IEEE 802.11a #hw_mode=a ### IEEE 802.11a ### IEEE 802.11ac #ieee80211ac=1 #vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3] #vht_oper_chwidth=1 #vht_oper_centr_freq_seg0_idx=42 ### IEEE 802.11ac # controlling enabled ctrl_interface=/var/run/hostapd
-
How to set video to composite TV out?
-
On 12/9/2018 at 12:50 AM, jernej said:
I gave you new link few posts back. This work has been done about 2 years ago, so I forgot many details. It seems CONFIG_VIDEO_DE2=y is enough to enable driver, TV plug-in is auto-detected at boot only and only PAL is supported. It seems that that branch also doesn't have simplefb support.
I don't know when I will get back to this, since I'm busy with Linux kernel stuff, mostly Cedrus and DE2 driver.
I modify all u-boot source file mark with "sunxi: video: Add H3/H5 TV out driver"
Also I make sure 'CONFIG_VIDEO_DE2=y' is there in .config
u-boot compilation is successful but still no TVE out
looking at kern.log, kernel is doing something related to TVE, but I don't understand
Can you give some highlight what happenings?
Attached is kern.log and debug
-
On 11/20/2018 at 2:55 PM, giri@nwrk.biz said:
Hint on how to maybe fix overscanning:
set a smaller resolution by kernel parameter (example):
video=Composite-1:720x480
Move the picture using this tool: https://projects.nwrk.biz/projects/allwinner-tvout
This is a similar approach like I did on legacy kernel (read here)
how do you set kernel parameter 'video=Composite-1:720x480' for mainline kernel ?
-
On 2/5/2017 at 3:20 PM, jernej said:
@zador,
I just added support for TV out, PAL and NTSC standard. Do you think that it is interesting enough to include in Armbian? Maybe for OPi0?
https://github.com/jernejsk/u-boot/tree/h3_hdmi_tv_v1
You have to include "CONFIG_VIDEO_COMPOSITE=y" in defconfig. PAL is selected by default and can be overriden by environment variable.
@jernej you're saying it needs CONFIG_VIDEO_COMPOSITE=y in defconfig?
I add this in Sinovoip_BPI_M2_Plus_defconfig but I don't see it include CONFIG_VIDEO_COMPOSITE=y in .config while u-boot compile. Also that link you provide no longer working. Any more details?
-
54 minutes ago, jernej said:
The reason why that patch is still not merged in U-Boot is that it's hardcoded to PAL.
BTW, that U-Boot branch doesn't exist anymore. Use that one instead: https://github.com/jernejsk/u-boot/tree/tv_out_v2
@jernej do you know whether i need to patch u-boot also for getting tvout on bpi-m2plus board?
I follow this guideline below, but still no display on tvout
-
1 hour ago, guidol said:
Could you please tell how how did you compile snd-soc-pcm5102a.ko?
On my NanoPi Neo I
- changed the .dtb for the Neo
- did armbian-add-overlay ./sun8i-h3-I2S-out.dts
- now have in armbianEnv.txt:
user_overlays=sun8i-h3-I2S-out
- lsmod|grep i2s
sun4i_i2s 16384 0
snd_soc_core 118784 2 sun4i_i2s,sun8i_codec_analog
snd_pcm 69632 3 sun4i_i2s,snd_pcm_dmaengine,snd_soc_coreI think I do only need the .ko in my system - compiled for
ARMBIAN 5.65 stable Debian GNU/Linux 9 (stretch) 4.14.84-sunxi
Linux npi-neo 4.14.84-sunxi #3 SMP Sat Dec 1 07:18:41 CET 2018 armv7l GNU/Linux
I did try to see it in "only U-Boot/kernel" in the armbian-build-system - BUT failed :(
I did see that kernel-menuconfig, but dont know what to do with it and the patch:For the Neo I have the PCM5102A-Hat from FriendlyARM
https://www.friendlyarm.com/index.php?route=product/product&product_id=169
and it is/was running fine with legacy kernel 3.4:
You have to modify config PCM5102A like below on cache\source\linux-mainline\v4.14.84\sound\soc\codecs\Kconfig
config SND_SOC_PCM5102A
tristate "Texas Instruments PCM5102A CODEC - I2S"then replace config-default.conf with attached
With this conf, script compilation will stop to overwrite kernel source to build patch
At that time, overwrite original Kconfig with the one you modified above
Then script compilation will stop again to ask whether you want to add pcm5102a to compile
Default is N, so you need to enter m for module compilation
-
-
On 2/5/2017 at 3:20 PM, jernej said:
@zador,
I just added support for TV out, PAL and NTSC standard. Do you think that it is interesting enough to include in Armbian? Maybe for OPi0?
https://github.com/jernejsk/u-boot/tree/h3_hdmi_tv_v1
You have to include "CONFIG_VIDEO_COMPOSITE=y" in defconfig. PAL is selected by default and can be overriden by environment variable.
Which file needed to set NTSC/PAL environment variable for u-boot compilation?
Sorry, I'm new on this
-
On 12/4/2018 at 2:49 PM, dony71 said:
I don't know why tve overlay is not being recognized in armbianEnv.txt so I decide to change board dts
Updated log attached and notice component /soc/tv-encoder@1e00000 being added
However why reported component No output to bind??
As a result sun4i_tv not showing in lsmod
Anybody has clue?
-
in legacy kernel tv mode (NTSC/PAL) being set in script.bin
how to do this in mainline kernel?
-
On 5/29/2017 at 11:17 AM, giri@nwrk.biz said:
Yeah!! I managed to fix the overscanning issue! (Credits go to this guy here for pointing me to the right direction!).
All in all my Picture was Overscanning 20 px on every edge.
At first I changed my resolution from the detected 720x576 to 680x536 (2 * -20 px = -40 px) in the script.bin. This results in an visible edge at the bottom of the screen and an visible edge on the right hand side (with a small black border!).
$ bin2fex /boot/script.bin ~/script.fex $ nano ~/script.fex find these lines: fb0_width = 0 fb0_height = 0 and change them to: fb0_width = 680 fb0_height = 536 then: $ fex2bin ~/script.fex ~/script.bin $ sudo cp ~/script.bin /boot $ sudo reboot
Now the picture needs to be moved down and to the right by 40px to be fully visible!
Next I needed to manipulate TV ENCODER RE-SYNC PARAMETERS REGISTER of the H2+ SoC. For this I used a little tool called devmem2
which helped me to directly read and write to the memory, and thus allowed me to manipulate the H2+ registers!
devmem2 can be installed by using following commands:
wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c sudo mv ./a.out /usr/local/bin/devmem2
After Installing devmem2 I was able to shift the picture by manipulating the value on following Address:
0x01E00130! (=
TV ENCODER RE-SYNC PARAMETERS REGISTER, this may differ depending on your SoC, check the Datasheet!)
First I read back the actual value (so I could revert back changes in case I messed anything up!):
$ sudo devmem2 0x01E00130 /dev/mem opened. Memory mapped at address 0xb6f0d000. Value at address 0x1E00130 (0xb6f0d130): 0x3005000A
Now I was able to move the picture by writing a custom value to the register according to the
R40 Datasheet:TV ENCODER RE-SYNC PARAMETERS REGISTER Datasheet entry:
Here is how I calculated this value with the help of the Datasheet:
31 ... Re-Sync Field => 0b
30 ... Re-Sync Disable => 0b
29:27 ... not used => 000b
26:16 ... Vertical => 40d px => 0000101000b
15:11 ... not used => 00000b
10:0 ... Horizontal => 40d px => 0000101000b
All in All: 000000000101000000000000101000b => 0x00140028
So I used this command to set my display:
$ sudo devmem2 0x01E00130 w 0x00140028
EDIT: I created a small tool which does the work above for you
Finally I saved the command above in my rc.local file to shift the picture during boot.
$ sudo nano /etc/rc.local paste following line: devmem2 0x01E00130 w 0x00140028
This is a dirty workaround and should be fixed within the driver!
Pictures:
Hope this helps to correct your overscanning issues! This should also work with many other Allwinner based Boards. I read that some Bananapi users had a pretty similar problem with overscanning on AV out.
I compile devmem2 but cannot write to register. It shows register value still the same
I have Banana Pi M2+ which has allwinner H3
root@bananapim2plus:~/Download/devmem# devmem2 0x01E00130 w 0x00140028
/dev/mem opened.
Memory mapped at address 0xb6fe2000.
Value at address 0x1E00130 (0xb6fe2130): 0xEBD771BF
Written 0x140028; readback 0xEBD771BF
-
On 2/27/2018 at 6:41 PM, Strontium said:
Just an update, X installs and runs fine on the Orange PI Zero using my patch. HOWTO:
Install a desktop using
sudo tasksel
after its all finished properly, reboot. You will then get this:
https://imgur.com/a/seu9t
if you want to change video mode, you can do it with xrandr like this:DISPLAY=:0 xrandr --output Composite-1 --mode NTSC DISPLAY=:0 xrandr --output Composite-1 --mode PAL
You only need the "DISPLAY=:0" if you are doing the mode setting from a ssh terminal.
Supposedly xrandr can scale the desktop and move it around (which could help with the overcan problem) but i couldn't get it to work in the 5 minutes I allocated to testing it.how to set NTSC mode if I don't have X11 ??
-
-
On 10/25/2018 at 8:53 AM, maracuja said:
Just for the sake of completeness:
I've changed the init script for AP6212, I've inserted this:I have BPI-M2+ and I don't have /usr/bin/dmem2 in the system
apt install dev2mem
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dev2memHow do i install dmem2 ?
-
anybody manage to get bluetooth on BPI-M2+ working?
I change dts and already enable uart1 and hook cts_rts but get init time out
> /etc/init.d/bluetooth stop
> rfkill unblock all> echo " " > /dev/ttyS1
> hciattach -t 5 /dev/ttyS1 bcm43xx 1500000
bcm43xx_init
Initialization timed out.
-
@Igor for improvement, you might want to create patch on sun4i-i2s.c and include in armbian kernel
this code will add 20bit and 24bit audio resolution
here is the code https://github.com/dony71/linux-sunxi/blob/sunxi-wip/sound/soc/sunxi/sun4i-i2s.c
also i have example overlay for allwinner H3 for pcm5102a codec here https://github.com/dony71/linux-sunxi/blob/sunxi-wip/arch/arm/boot/dts/sun8i-h3-I2S-master.dts
-
41 minutes ago, codekipper said:
This is not possible with your setup, based on the information in the A20 i2s documentation. From what I remember when I worked with the PCM5102A then I needed to provide a 32bit sample(this has also been seen with the HDMI audio), do you have these tdm settings in your dts/overlay?
that's the problem !!
thank you @codekipper
-
1 hour ago, dony71 said:
@nikkov I follow codekipper patch https://github.com/codekipper/linux-sunxi/commit/547fb172c31b4c02d1201004056228b3b553896c
but after compile and use new sun4i_i2s.ko, i got this error ...
anything that i'm missing?
aplay -vDhw:0,0 -c 2 --format=S24_LE --rate=192000 paradise.flac
Playing raw data 'paradise.flac' : Signed 24 bit Little Endian, Rate 192000 Hz, Stereo
aplay: set_params:1299: Sample format non available
Available formats:
- S16_LE
after checking, it seems i didn't implement fully patch from my kernel 4.14.78
manage to get it working after applied full source at https://github.com/codekipper/linux-sunxi/blob/sunxi-wip/sound/soc/sunxi/sun4i-i2s.c
however now i have problem playing 96K 24-bit music ... any idea?
dmesg says
[ 409.077119] COOPS sun4i_i2s_hw_params channels is 2, physical width is 32, rate is 96000, period size is 8192
[ 409.079325] sun4i_i2s_oversample_is_valid COOPS i0 is 128 looking for 256
[ 409.079341] sun4i_i2s_oversample_is_valid COOPS i1 is 192 looking for 256
[ 409.079356] sun4i_i2s_oversample_is_valid COOPS i2 is 256 looking for 256
[ 409.079376] sun4i_i2s_get_bclk_div COOPS word size 24 oversample_rate 256 mclk is 24576000
[ 409.079389] sun4i_i2s_get_bclk_div COOPS bdiv 0 div is 5
[ 409.079402] sun4i_i2s_get_bclk_div COOPS bdiv 1 div is 5
[ 409.079415] sun4i_i2s_get_bclk_div COOPS bdiv 2 div is 5
[ 409.079428] sun4i_i2s_get_bclk_div COOPS bdiv 4 div is 5
[ 409.079440] sun4i_i2s_get_bclk_div COOPS bdiv 6 div is 5
[ 409.079453] sun4i_i2s_get_bclk_div COOPS bdiv 8 div is 5
[ 409.079467] sun4i_i2s_get_bclk_div COOPS bdiv 12 div is 5
[ 409.079480] sun4i_i2s_get_bclk_div COOPS bdiv 16 div is 5
[ 409.079493] sun4i_i2s_get_bclk_div COOPS bdiv 24 div is 5
[ 409.079506] sun4i_i2s_get_bclk_div COOPS bdiv 32 div is 5
[ 409.079519] sun4i_i2s_get_bclk_div COOPS bdiv 48 div is 5
[ 409.079532] sun4i_i2s_get_bclk_div COOPS bdiv 64 div is 5
[ 409.079546] sun4i_i2s_get_bclk_div COOPS bdiv 96 div is 5
[ 409.079559] sun4i_i2s_get_bclk_div COOPS bdiv 128 div is 5
[ 409.079572] sun4i_i2s_get_bclk_div COOPS bdiv 176 div is 5
[ 409.079586] sun4i_i2s_get_bclk_div COOPS bdiv 192 div is 5
[ 409.079621] sun4i-i2s 1c22000.i2s: Unsupported BCLK divider: -22
[ 409.079647] sun4i-i2s 1c22000.i2s: ASoC: can't set 1c22000.i2s hw params: -22
-
On 1/3/2018 at 3:01 AM, nikkov said:
I checked your wip i2s driver code with my hardware and simple codec driver for my clock board. In function sun4i_i2s_set_clk_rate calculates lrck value as
(clk_rate / rate / oversample_rate)*word_size
and we have, eg (22579200 / 44100 / 128) * 16 = 64 of BCLKs within each channel. But in stereo i2s mode lrck value must be equal slot width. In stable version lrck fixed and equal 32. After I replace calculated value lrck to fixed 32 I successfully played 16/24 bit sample.
@nikkov I follow codekipper patch https://github.com/codekipper/linux-sunxi/commit/547fb172c31b4c02d1201004056228b3b553896c
but after compile and use new sun4i_i2s.ko, i got this error ...
anything that i'm missing?
aplay -vDhw:0,0 -c 2 --format=S24_LE --rate=192000 paradise.flac
Playing raw data 'paradise.flac' : Signed 24 bit Little Endian, Rate 192000 Hz, Stereo
aplay: set_params:1299: Sample format non available
Available formats:
- S16_LE
-
On 11/13/2018 at 9:28 PM, Igor said:
According to https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix yes.
There is already patch in armbian and it's working now
Just need to enable dts sound section
---------------------------------------------------------------------
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "allwinner,hdmi";
simple-audio-card,mclk-fs = <0x100>;
#status = "disabled";
status = "okay";
linux,phandle = <0x3f>;
phandle = <0x3f>;simple-audio-card,codec {
sound-dai = <0x2>;
};simple-audio-card,cpu {
sound-dai = <0x3>;
};
}; -
On 11/15/2018 at 5:58 PM, dony71 said:
Well, I manage to compile pcm5102a for kernel 4.14.78
I wonder why armbian kernel never include this in Kconfig, so it show none in menuconfig
I have to modify Kconfig on-the-fly during compilation, since .config will be overwritten at some point in compilation
Implementing "CONFIG_SND_SOC_PCM5102A=m" in userpatches/linux-sunxi-next.config also doesn't work
I try to play some music
mclk-fs = 128 in overlay and this will give default 96K sampling rate
playing 96K music has no issue, but when i try playing 44.1K music, the music speed is double faster
anybody knows what could be the problem? maybe some setting in pulseaudio?
-
pcm5102a.c is not exist but I can get it from sun8i-fay branch and copy it manually in directory. I know this is not proper way to add driver in the kernel but I don't know how is the proper way?
bananapi and realtek hostapd problem
in Beginners
Posted
armbianmonitor -u
http://ix.io/1A9D