页次: 1
源代码如下(借鉴了CSDN上的代码):
void volume_control_init(void)
{
snd_mixer_t *mixer;
snd_mixer_elem_t *elem;
debug_msg(snd_mixer_open(&mixer,0),"opening mixer"); // 打开混音器设备
debug_msg(snd_mixer_attach(mixer, "default"),"attaching mixer"); // 连接到默认的声卡
debug_msg(snd_mixer_selem_register(mixer, NULL, NULL),"registering mixer"); // 载入声卡配置
debug_msg(snd_mixer_load(mixer),"load mixer");
// 循环找到自己想要的element
elem = snd_mixer_first_elem(mixer);
while(elem){
// find element name(此处要找的就是上面看的speaker元素)
if(strcmp("Headphone",snd_mixer_selem_get_name(elem)) == 0){
printf("elem name : %s\n",snd_mixer_selem_get_name(elem));
break;
}
elem = snd_mixer_elem_next(elem);
}
if(!elem){
printf("snd_mixer_find_selem Error\n");
snd_mixer_close(mixer);
mixer = NULL;
return;
}
long min, max;
snd_mixer_selem_get_playback_volume_range(elem, &min, &max);
printf("volume range: %ld -- %ld\n", min, max);
long lVal, rVal;
snd_mixer_handle_events(mixer); // 确保混音器状态和应用程序状态的同步
snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &lVal);
snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, &rVal);
printf("currnet volume: leftVal = %ld, rightVal = %ld\n", lVal, rVal);
/* 设置 音量 */
snd_mixer_selem_set_playback_volume_all(elem, 50);
/* 关闭 静音 */
snd_mixer_selem_set_playback_switch_all(elem, 1);
// 释放资源
snd_mixer_close(mixer);
}
再搞V3S的Codec,实在是不想用Shell的方式控制音量和静音,于是翻了各种帖子,大部分都是:
amixer -c 0 sset 'Headphone',0 70% unmute
aplay 01.wav
CSDN上有控制音量的C代码:
https://blog.csdn.net/augu_/article/details/140218122
https://blog.csdn.net/cnclenovo/article/details/46044831
https://blog.csdn.net/a827143452/article/details/89248136
但是静音控制一直没翻到,无奈只能看“amixer”的源代码了,搜关键字“unmute”倒是很容易找到。
buildroot-2020.02.8\output\build\alsa-utils-1.2.1\amixer\amixer.c
static int sset_channels(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
{
unsigned int channels = ~0U;
unsigned int dir = 3, okflag = 3;
unsigned int idx;
snd_mixer_selem_channel_id_t chn;
int check_flag = ignore_error ? 0 : -1;
for (idx = 1; idx < argc; idx++) {
char *ptr = argv[idx], *optr;
int multi, firstchn = 1;
channels = channels_mask(&ptr, channels);
if (*ptr == '\0')
continue;
dir = dir_mask(&ptr, dir);
if (*ptr == '\0')
continue;
multi = (strchr(ptr, ',') != NULL);
optr = ptr;
for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) {
char *sptr = NULL;
int ival;
if (!(channels & (1 << chn)))
continue;
if ((dir & 1) && snd_mixer_selem_has_playback_channel(elem, chn)) {
sptr = ptr;
if (!strncmp(ptr, "mute", 4) && snd_mixer_selem_has_playback_switch(elem)) {
snd_mixer_selem_get_playback_switch(elem, chn, &ival);
if (snd_mixer_selem_set_playback_switch(elem, chn, get_bool_simple(&ptr, "mute", 1, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "off", 3) && snd_mixer_selem_has_playback_switch(elem)) {
snd_mixer_selem_get_playback_switch(elem, chn, &ival);
if (snd_mixer_selem_set_playback_switch(elem, chn, get_bool_simple(&ptr, "off", 1, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "unmute", 6) && snd_mixer_selem_has_playback_switch(elem)) {
snd_mixer_selem_get_playback_switch(elem, chn, &ival);
if (snd_mixer_selem_set_playback_switch(elem, chn, get_bool_simple(&ptr, "unmute", 0, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "on", 2) && snd_mixer_selem_has_playback_switch(elem)) {
snd_mixer_selem_get_playback_switch(elem, chn, &ival);
if (snd_mixer_selem_set_playback_switch(elem, chn, get_bool_simple(&ptr, "on", 0, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "toggle", 6) && snd_mixer_selem_has_playback_switch(elem)) {
if (firstchn || !snd_mixer_selem_has_playback_switch_joined(elem)) {
snd_mixer_selem_get_playback_switch(elem, chn, &ival);
if (snd_mixer_selem_set_playback_switch(elem, chn, (ival ? 1 : 0) ^ 1) >= 0)
check_flag = 1;
}
simple_skip_word(&ptr, "toggle");
} else if (isdigit(*ptr) || *ptr == '-' || *ptr == '+') {
if (set_volume_simple(elem, chn, &ptr, 0) >= 0)
check_flag = 1;
} else if (simple_skip_word(&ptr, "cap") || simple_skip_word(&ptr, "rec") ||
simple_skip_word(&ptr, "nocap") || simple_skip_word(&ptr, "norec")) {
/* nothing */
} else {
okflag &= ~1;
}
}
if ((dir & 2) && snd_mixer_selem_has_capture_channel(elem, chn)) {
if (sptr != NULL)
ptr = sptr;
sptr = ptr;
if (!strncmp(ptr, "cap", 3) && snd_mixer_selem_has_capture_switch(elem)) {
snd_mixer_selem_get_capture_switch(elem, chn, &ival);
if (snd_mixer_selem_set_capture_switch(elem, chn, get_bool_simple(&ptr, "cap", 0, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "rec", 3) && snd_mixer_selem_has_capture_switch(elem)) {
snd_mixer_selem_get_capture_switch(elem, chn, &ival);
if (snd_mixer_selem_set_capture_switch(elem, chn, get_bool_simple(&ptr, "rec", 0, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "nocap", 5) && snd_mixer_selem_has_capture_switch(elem)) {
snd_mixer_selem_get_capture_switch(elem, chn, &ival);
if (snd_mixer_selem_set_capture_switch(elem, chn, get_bool_simple(&ptr, "nocap", 1, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "norec", 5) && snd_mixer_selem_has_capture_switch(elem)) {
snd_mixer_selem_get_capture_switch(elem, chn, &ival);
if (snd_mixer_selem_set_capture_switch(elem, chn, get_bool_simple(&ptr, "norec", 1, ival)) >= 0)
check_flag = 1;
} else if (!strncmp(ptr, "toggle", 6) && snd_mixer_selem_has_capture_switch(elem)) {
if (firstchn || !snd_mixer_selem_has_capture_switch_joined(elem)) {
snd_mixer_selem_get_capture_switch(elem, chn, &ival);
if (snd_mixer_selem_set_capture_switch(elem, chn, (ival ? 1 : 0) ^ 1) >= 0)
check_flag = 1;
}
simple_skip_word(&ptr, "toggle");
} else if (isdigit(*ptr) || *ptr == '-' || *ptr == '+') {
if (set_volume_simple(elem, chn, &ptr, 1) >= 0)
check_flag = 1;
} else if (simple_skip_word(&ptr, "mute") || simple_skip_word(&ptr, "off") ||
simple_skip_word(&ptr, "unmute") || simple_skip_word(&ptr, "on")) {
/* nothing */
} else {
okflag &= ~2;
}
}
if (okflag == 0) {
if (debugflag) {
if (dir & 1)
error("Unknown playback setup '%s'..", ptr);
if (dir & 2)
error("Unknown capture setup '%s'..", ptr);
}
return 0; /* just skip it */
}
if (!multi)
ptr = optr;
firstchn = 0;
}
}
return check_flag;
}
找到关键代码:
snd_mixer_selem_set_playback_switch(elem, chn, get_bool_simple(&ptr, "unmute", 0, ival)
然后去 alsa-lib 中找到了:
int snd_mixer_selem_set_playback_switch_all(snd_mixer_elem_t *elem, int value)
索性把所有channel都取消静音好了。
关于Linux 设备树配置:
Linux 6.10.3中存在“sun8i-v3s-licheepi-zero.dts”设备树文件,只需要开启 “emac” 即可。
编译 & 烧录, 然后就可以愉快的上网了。
[ 1.782389] EXT4-fs (mmcblk0p2): re-mounted 8c8a5bb5-5a3d-42ed-afac-715e90ba2c77 r/w. Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator... [ 4.582345] random: crng init done
done.
Starting network: [ 4.709165] dwmac-sun8i 1c30000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 4.719859] dwmac-sun8i 1c30000.ethernet eth0: PHY [mdio_mux-0.1:01] driver [Generic PHY] (irq=POLL)
[ 4.729193] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[ 4.736613] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 4.744319] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 4.752272] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[ 4.766263] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
ip: SIOCGIFFLAGS: No such device
FAIL
Starting sshd: OK
Welcome to xinqd
xinqd login: root
Password:
#
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:00:07:68:A0:D1
inet addr:192.168.1.188 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:73 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6026 (5.8 KiB) TX bytes:0 (0.0 B)
Interrupt:32
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# udhcpc
udhcpc: started, v1.31.0
udhcpc: sending discover
udhcpc: sending select for 192.168.1.220
udhcpc: lease of 192.168.1.220 obtained, lease time 1800
deleting routers
adding dns 192.168.10.1
adding dns 192.168.10.1
#
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:00:07:68:A0:D1
inet addr:192.168.1.220 Bcast:192.168.15.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8960 (8.7 KiB) TX bytes:684 (684.0 B)
Interrupt:32
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
# ping baidu.com
PING baidu.com (110.242.68.66): 56 data bytes
64 bytes from 110.242.68.66: seq=0 ttl=50 time=59.631 ms
64 bytes from 110.242.68.66: seq=1 ttl=50 time=56.642 ms
64 bytes from 110.242.68.66: seq=2 ttl=50 time=63.370 ms
64 bytes from 110.242.68.66: seq=3 ttl=50 time=62.954 ms
64 bytes from 110.242.68.66: seq=4 ttl=50 time=67.450 ms
^C
--- baidu.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 56.642/62.009/67.450 ms
在 ifconfig eth0 up 过程中,会打印错误日志,具体原因未知,还请晕哥等大神们指点一下。
# ifconfig eth0 down
[ 368.372342] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
# ifconfig eth0 up
[ 371.130525] dwmac-sun8i 1c30000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 371.141311] dwmac-sun8i 1c30000.ethernet eth0: PHY [mdio_mux-0.1:01] driver [Generic PHY] (irq=POLL)
[ 371.150613] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[ 371.157991] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 371.165672] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 371.172215] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
# [ 373.285981] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
这两条日志在经典的Linux 4.14 中也会打印出来。
No MAC Management Counters available
PTP not supported by HW
这条日志在Linux 4.14 中没有,在Linux 6.10.3中会出现。
No Safety Features support found
截止发帖前,https://www.kernel.org/ Linux最新主线内核为:6.10.3。
先贴上启动日志:
U-Boot SPL 2017.01-rc2 (Oct 19 2022 - 20:28:30)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2 (Oct 19 2022 - 20:28:30 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, c2, 12
*** Warning - spi_flash_probe() failed, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2 (Oct 19 2022 - 20:28:30 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, c2, 12
*** Warning - spi_flash_probe() failed, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
5190360 bytes read in 891 ms (5.6 MiB/s)
reading sun8i-v3s-licheepi-zero.dtb
12914 bytes read in 70 ms (179.7 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42df9000, end 42dff271 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 6.10.3-licheepi-zero (charlie@ubuntu) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609, GNU ld (GNU Binutils for Ubuntu) 2.26.1) #2 SMP Sat Aug 10 11:28:23 CST 2024
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero Charlie
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000040000000-0x0000000043e88fff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x0000000043e88fff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000043e88fff]
[ 0.000000] percpu: Embedded 13 pages/cpu s20564 r8192 d24492 u53248
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 0.000000] Unknown kernel command line parameters "earlyprintk", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16009
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 49952K/64036K available (8192K kernel code, 785K rwdata, 2128K rodata, 1024K init, 292K bss, 14084K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000271] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000710] Console: colour dummy device 80x30
[ 0.000798] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000823] CPU: Testing write buffer coherency: ok
[ 0.000892] pid_max: default: 32768 minimum: 301
[ 0.001139] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001170] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.002515] /cpus/cpu@0 missing clock-frequency property
[ 0.002576] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.004767] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.005199] rcu: Hierarchical SRCU implementation.
[ 0.005225] rcu: Max phase no-delay instances is 1000.
[ 0.006533] smp: Bringing up secondary CPUs ...
[ 0.006598] smp: Brought up 1 node, 1 CPU
[ 0.006618] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.006631] CPU: All CPU(s) started in SVC mode.
[ 0.007687] devtmpfs: initialized
[ 0.011986] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.012374] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.012421] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.012688] pinctrl core: initialized pinctrl subsystem
[ 0.015135] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.015760] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.017139] thermal_sys: Registered thermal governor 'step_wise'
[ 0.017465] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.017497] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.031813] usbcore: registered new interface driver usbfs
[ 0.031890] usbcore: registered new interface driver hub
[ 0.031953] usbcore: registered new device driver usb
[ 0.032324] mc: Linux media interface: v0.10
[ 0.032414] videodev: Linux video capture interface: v2.00
[ 0.032716] Advanced Linux Sound Architecture Driver Initialized.
[ 0.034557] clocksource: Switched to clocksource arch_sys_counter
[ 0.051664] NET: Registered PF_INET protocol family
[ 0.052022] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.053069] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.053135] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.053156] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.053184] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.053254] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.053414] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.053482] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.053876] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.055543] Initialise system trusted keyrings
[ 0.056811] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.057454] JFS: nTxBlock = 390, nTxLock = 3122
[ 0.305765] Key type asymmetric registered
[ 0.305808] Asymmetric key parser 'x509' registered
[ 0.305937] io scheduler mq-deadline registered
[ 0.305954] io scheduler kyber registered
[ 0.419391] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.432289] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[ 0.432328] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[ 0.432340] dwmac-sun8i 1c30000.ethernet: IRQ sfty not found
[ 0.432444] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.432568] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.433221] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.433255] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.433264] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.433276] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.433285] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.433293] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.435657] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[ 0.436406] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[ 0.436441] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[ 0.438295] usbcore: registered new interface driver cdc_ether
[ 0.438368] usbcore: registered new interface driver rndis_host
[ 0.438409] usbcore: registered new interface driver cdc_subset
[ 0.438513] usbcore: registered new interface driver r8153_ecm
[ 0.438929] usbcore: registered new interface driver cdc_acm
[ 0.438948] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 0.441042] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 0.441147] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T01:50:00 UTC (6600)
[ 0.441572] i2c_dev: i2c /dev entries driver
[ 0.442193] usbcore: registered new interface driver uvcvideo
[ 0.443184] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.444787] sun4i-ss 1c15000.crypto: Die ID 7
[ 0.449137] Initializing XFRM netlink socket
[ 0.449224] NET: Registered PF_PACKET protocol family
[ 0.449774] Registering SWP/SWPB emulation handler
[ 0.456232] Loading compiled-in X.509 certificates
[ 0.470690] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.475057] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.476073] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes
[ 0.476111] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 0.481039] Console: switching to colour frame buffer device 100x30
[ 0.484302] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 0.485029] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[ 0.486836] printk: legacy console [ttyS0] disabled
[ 0.507863] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 100, base_baud = 1500000) is a U6_16550A
[ 0.507976] printk: legacy console [ttyS0] enabled
[ 1.302886] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 1.314128] spi-nand spi0.0: Macronix SPI NAND was found.
[ 1.319649] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[ 1.328669] 4 fixed-partitions partitions found on MTD device spi0.0
[ 1.335187] Creating 4 MTD partitions on "spi0.0":
[ 1.340003] 0x000000000000-0x000000100000 : "uboot"
[ 1.349026] 0x000000100000-0x000000120000 : "dtb"
[ 1.356862] 0x000000120000-0x000000620000 : "kernel"
[ 1.370323] 0x000000620000-0x000008000000 : "rootfs"
[ 1.518690] phy phy-1c19400.phy.0: Changing dr_mode to 1
[ 1.524057] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.529802] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.537827] ehci-platform 1c1a000.usb: irq 103, io mem 0x01c1a000
[ 1.545223] Goodix-TS 0-005d: supply AVDD28 not found, using dummy regulator
[ 1.552556] Goodix-TS 0-005d: supply VDDIO not found, using dummy regulator
[ 1.560040] Goodix-TS 0-005d: Error reading 1 bytes from 0x8140: -6
[ 1.566500] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.574078] hub 1-0:1.0: USB hub found
[ 1.578129] hub 1-0:1.0: 1 port detected
[ 1.604713] Goodix-TS 0-005d: Error reading 1 bytes from 0x8140: -6
[ 1.644579] Goodix-TS 0-005d: I2C communication failure: -6
[ 1.651445] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[ 1.666551] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.679415] clk: Disabling unused clocks
[ 1.683489] ALSA device list:
[ 1.686608] #0: V3s Audio Codec
[ 1.703329] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.710762] Waiting for root device /dev/mmcblk0p2...
[ 1.751616] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.761669] mmc0: new high speed SDHC card at address 59b4
[ 1.768594] mmcblk0: mmc0:59b4 EZSD1 29.4 GiB
[ 1.777277] mmcblk0: p1 p2
[ 1.865303] EXT4-fs (mmcblk0p2): recovery complete
[ 1.870377] EXT4-fs (mmcblk0p2): mounted filesystem 8c8a5bb5-5a3d-42ed-afac-715e90ba2c77 r/w with ordered data mode. Quota mode: disabled.
[ 1.883067] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.899222] devtmpfs: mounted
[ 1.903498] Freeing unused kernel image (initmem) memory: 1024K
[ 1.909731] Run /sbin/init as init process
[ 2.034720] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 2.094635] EXT4-fs (mmcblk0p2): re-mounted 8c8a5bb5-5a3d-42ed-afac-715e90ba2c77 r/w. Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
[ 2.237437] hub 1-1:1.0: USB hub found
Running sysctl: [ 2.251682] hub 1-1:1.0: 4 ports detected
OK
Initializing random number generator... [ 3.494549] random: crng init done
done.
Starting network: [ 3.623860] dwmac-sun8i 1c30000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 3.634900] dwmac-sun8i 1c30000.ethernet eth0: PHY [mdio_mux-0.1:01] driver [Generic PHY] (irq=POLL)
[ 3.644107] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[ 3.651561] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 3.659258] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 3.667258] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[ 3.688458] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
ip: SIOCGIFFLAGS: No such device
FAIL
Starting sshd: OK
页次: 1