Skip to content

Instantly share code, notes, and snippets.

View ayufan's full-sized avatar

Kamil Trzciński ayufan

View GitHub Profile
@ayufan
ayufan / asound-amix.txt
Created June 21, 2019 15:07
`/proc/asound/amix` from Android playing audio
rk3399_mid:/proc/asound # amix
Card:0
id iface dev sub idx num perms type name
1 MIXER 0 0 0 2 rw R INT32 HP Playback Volume: 0 0 { 0-0 }
2 MIXER 0 0 0 2 rw R INT32 HPMixer Gain: 3 3 { 0-7 }
3 MIXER 0 0 0 2 rw R INT32 DAC Playback Volume: 192 192 { 0-192 }
4 MIXER 0 0 0 1 rw BOOL Enable DAC Soft Ramp: ON { OFF=0, ON=1 }
5 MIXER 0 0 0 1 rw INT32 DAC Soft Ramp Rate: 0 { 0-4 }
6 MIXER 0 0 0 1 rw ENUM Playback Polarity: (0 Normal) { Normal=0, R Invert=1, L Invert=2, L + R Invert=3 }
7 MIXER 0 0 0 1 rw BOOL DAC Notch Filter: OFF { OFF=0, ON=1 }
@ayufan
ayufan / rk3399-pinebook-pro-v2-android.dts
Created June 5, 2019 09:51
Android DTS for Pinebook Pro v2
/dts-v1/;
/memreserve/ 0x0000000005600000 0x0000000000014000;
/memreserve/ 0x0000000005bf0000 0x00000000001ad6cc;
/ {
compatible = "rockchip,rk3399-mid\0rockchip,rk3399";
interrupt-parent = < 0x01 >;
#address-cells = < 0x02 >;
#size-cells = < 0x02 >;
@ayufan
ayufan / MSI_LED.cs
Created February 14, 2019 09:45
The MBAPI_x86.dll interface
namespace MSI_LED
{
using System;
using System.Runtime.InteropServices;
internal static class MB
{
internal const string MB_DLL_FileName = @"Lib\MBAPI_x86.dll";
[DllImport(@"Lib\MBAPI_x86.dll")]
@ayufan
ayufan / sdcard-vs-ssd.md
Created December 22, 2018 16:20
Rock64 SDCard vs SSD

SDCard Samsung EVO+ 32GB

Command line used: iozone -e -I -a -s 100M -r 16k -r 512k -r 1024k -i 0 -i 1 -i 2 -f /sdcard/test

                                                          random    random     bkwd    record    stride                                    
          kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
      102400      16     8490     9201    14664    14678    14657     8770                                                          
      102400     512    20849    21052    22413    22475    22452    20742                                                          
      102400    1024    15644    18549    22679    22703    22702    20718       
@ayufan
ayufan / docker-bionic-ssh-server.bash
Last active November 14, 2018 18:38
Run simplest docker bionic server
docker run --rm ubuntu:bionic 'apt-get update -y && apt-get install -y openssh-server && useradd -g -s /bin/bash -m ayufan && mkdir -p /run/sshd && echo ayufan:ayufan | chpasswd && exec /usr/sbin/sshd -D'
@ayufan
ayufan / rockpro64-pcie-nvme-x4.txt
Last active July 3, 2018 21:28
RockPro64 PCIE iozone3 Samsung PM961 (gen2 x4)
Iozone: Performance Test of File I/O
Version $Revision: 3.429 $
Compiled for 64 bit mode.
Build: linux
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
@ayufan
ayufan / rockpro64-pcie-nvme-x4-lspci.txt
Created July 3, 2018 21:21
RockPro64 lspci x4 gen2
00:00.0 PCI bridge: Rockchip Inc. RK3399 PCI Express Root Port Device 0100 (prog-if 00 [Normal decode])
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 255
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00000000-00000fff
Memory behind bridge: fa000000-fa0fffff
Prefetchable memory behind bridge: 00000000-000fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
@ayufan
ayufan / rockpro64-pcie-nvme-x2-lspci.txt
Created May 31, 2018 13:58
RockPro64 lspci x2 gen2
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 (prog-if 02 [NVM Express])
Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 223
Region 0: Memory at fa000000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
@ayufan
ayufan / rockpro64-pcie-nvme-x2.txt
Created May 31, 2018 13:20
RockPro64 PCIE iozone3 Samsung PM961 (gen1 x2)
Iozone: Performance Test of File I/O
Version $Revision: 3.429 $
Compiled for 64 bit mode.
Build: linux
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
@ayufan
ayufan / rockpro64-pcie.txt
Created May 25, 2018 13:00
RockPro64 PCIE
$ lspci -vvv
00:00.0 PCI bridge: Rockchip Inc. RK3399 PCI Express Root Port Device 0100 (prog-if 00 [Normal decode])
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ <TAbort+ <MAbort+ >SERR+ <PERR+ INTx-
Latency: 0
Interrupt: pin A routed to IRQ 228
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00000000-00000fff
Memory behind bridge: fa000000-fa0fffff
Prefetchable memory behind bridge: 00000000-000fffff