您尚未登录。

楼主 #1 2020-01-10 20:46:29

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

硬件:widora-neo开发板,
软件:widora官方固件Ver0.1.9-20190812
问题描述:使用portaudio播放音频流,上电第一次initialize的时候,底层驱动出现多次调用postinit()函数,伴有杂音,偶尔会造成系统奔溃。
有没大佬遇到这种情况,或者有什么idea?
现象如下:

[   62.280000] capture free_dma_buffer
[   62.290000] ptri2s_config->mmap_index:0
[   62.290000] playback free_dma_buffer
[   62.300000] ptri2s_config->mmap_index:0
[   62.340000] capture free_dma_buffer
[   62.340000] ptri2s_config->mmap_index:0
[   62.360000] playback free_dma_buffer
[   62.360000] ptri2s_config->mmap_index:0
[   62.370000] playback free_dma_buffer
[   62.370000] ptri2s_config->mmap_index:0
[   62.390000] playback free_dma_buffer
[   62.390000] ptri2s_config->mmap_index:0
[   62.400000] playback free_dma_buffer
[   62.400000] ptri2s_config->mmap_index:0
[   62.420000] playback free_dma_buffer
[   62.420000] ptri2s_config->mmap_index:0
[   62.430000] capture free_dma_buffer
[   62.430000] ptri2s_config->mmap_index:0
[   62.450000] playback free_dma_buffer
[   62.450000] ptri2s_config->mmap_index:0
[   62.460000] playback free_dma_buffer
[   62.470000] ptri2s_config->mmap_index:0
[   62.480000] playback free_dma_buffer
[   62.480000] ptri2s_config->mmap_index:0
[   62.490000] playback free_dma_buffer
[   62.500000] ptri2s_config->mmap_index:0
[   62.510000] playback free_dma_buffer
[   62.510000] ptri2s_config->mmap_index:0
[   62.520000] playback free_dma_buffer
[   62.530000] ptri2s_config->mmap_index:0
[   62.540000] playback free_dma_buffer
[   62.540000] ptri2s_config->mmap_index:0
[   62.550000] capture free_dma_buffer
[   62.560000] ptri2s_config->mmap_index:0
[   62.570000] playback free_dma_buffer
[   62.570000] ptri2s_config->mmap_index:0
[   62.580000] capture free_dma_buffer
[   62.590000] ptri2s_config->mmap_index:0
[   62.600000] playback free_dma_buffer
[   62.610000] ptri2s_config->mmap_index:0
[   62.620000] capture free_dma_buffer
[   62.620000] ptri2s_config->mmap_index:0
[   62.630000] playback free_dma_buffer
[   62.640000] ptri2s_config->mmap_index:0
[   62.650000] capture free_dma_buffer
[   62.650000] ptri2s_config->mmap_index:0
[   62.660000] playback free_dma_buffer
[   62.670000] ptri2s_config->mmap_index:0
[   62.680000] capture free_dma_buffer
[   62.680000] ptri2s_config->mmap_index:0
[   62.690000] playback free_dma_buffer
[   62.700000] ptri2s_config->mmap_index:0
[   62.710000] playback free_dma_buffer
[   62.710000] ptri2s_config->mmap_index:0
[   62.980000] ****** wm8960_postinit ******
[   63.260000] ****** wm8960_postinit ******
[   63.540000] ****** wm8960_postinit ******
[   63.820000] ****** wm8960_postinit ******
[   64.100000] ****** wm8960_postinit ******
[   64.380000] ****** wm8960_postinit ******
[   64.660000] ****** wm8960_postinit ******
[   64.940000] ****** wm8960_postinit ******
[   65.220000] ****** wm8960_postinit ******
[   65.500000] ****** wm8960_postinit ******
[   65.780000] ****** wm8960_postinit ******
[   66.060000] ****** wm8960_postinit ******
[   66.340000] ****** wm8960_postinit ******
[   66.620000] ****** wm8960_postinit ******
[   66.900000] ****** wm8960_postinit ******
[   67.180000] ****** wm8960_postinit ******
[   67.460000] ****** wm8960_postinit ******
[   67.740000] ****** wm8960_postinit ******
[   68.020000] ****** wm8960_postinit ******
[   68.040000] capture free_dma_buffer
[   68.040000] ptri2s_config->mmap_index:0
[   68.050000] ****** wm8960_preinit ******
[   68.820000] ****** wm8960_postinit ******
[   69.100000] ****** wm8960_postinit ******
[   69.380000] ****** wm8960_postinit ******
[   69.660000] ****** wm8960_postinit ******
[   69.940000] ****** wm8960_postinit ******
[   70.220000] ****** wm8960_postinit ******
[   70.500000] ****** wm8960_postinit ******
[   70.780000] ****** wm8960_postinit ******
[   71.060000] ****** wm8960_postinit ******
[   71.340000] ****** wm8960_postinit ******
[   71.620000] ****** wm8960_postinit ******
[   71.900000] ****** wm8960_postinit ******
[   72.180000] ****** wm8960_postinit ******
[   72.460000] ****** wm8960_postinit ******
[   72.740000] ****** wm8960_postinit ******
[   73.020000] ****** wm8960_postinit ******
[   73.300000] ****** wm8960_postinit ******
[   73.580000] ****** wm8960_postinit ******
[   73.600000] playback free_dma_buffer
[   73.610000] ptri2s_config->mmap_index:0
PortAudio: Output device: default
[   73.890000] ****** wm8960_postinit ******
[   73.910000] playback free_dma_buffer
[   73.910000] ptri2s_config->mmap_index:0
PortAudio: stream opened
Streaming connection opened.

系统启动log如下:

root@Widora:~# dmesg
[    0.000000] Linux version 3.18.29 (root@ubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49378) ) #9 Fri Jan 10 18:39:05 CST 2020
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] MIPS: machine is WIDORA-NEO
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80356100, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00038f64
[    0.000000] Readback ErrCtl register=00038f64
[    0.000000] Memory: 125952K/131072K available (2821K kernel code, 133K rwdata, 556K rodata, 192K init, 186K bss, 5120K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] intc: using register map from devicetree
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource_of_init: no matching clocksources found
[    0.050000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070000] pinctrl core: initialized pinctrl subsystem
[    0.080000] NET: Registered protocol family 16
[    0.090000] rt2880-pinmux pinctrl: try to register 47 pins ...
[    0.090000] pinctrl core: registered pin 0 (io0) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 1 (io1) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 2 (io2) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 3 (io3) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 4 (io4) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 5 (io5) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 6 (io6) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 7 (io7) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 8 (io8) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 9 (io9) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 10 (io10) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 11 (io11) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 12 (io12) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 13 (io13) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 14 (io14) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 15 (io15) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 16 (io16) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 17 (io17) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 18 (io18) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 19 (io19) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 20 (io20) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 21 (io21) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 22 (io22) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 23 (io23) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 24 (io24) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 25 (io25) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 26 (io26) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 27 (io27) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 28 (io28) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 29 (io29) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 30 (io30) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 31 (io31) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 32 (io32) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 33 (io33) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 34 (io34) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 35 (io35) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 36 (io36) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 37 (io37) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 38 (io38) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 39 (io39) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 40 (io40) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 41 (io41) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 42 (io42) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 43 (io43) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 44 (io44) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 45 (io45) on rt2880-pinmux
[    0.090000] pinctrl core: registered pin 46 (io46) on rt2880-pinmux
[    0.090000] pinctrl core: add 11 pinmux maps
[    0.090000] rt2880-pinmux pinctrl: found group selector 14 for gpio
[    0.090000] rt2880-pinmux pinctrl: found group selector 6 for perst
[    0.090000] rt2880-pinmux pinctrl: found group selector 5 for refclk
[    0.090000] rt2880-pinmux pinctrl: found group selector 11 for i2s
[    0.090000] rt2880-pinmux pinctrl: found group selector 13 for spis
[    0.090000] rt2880-pinmux pinctrl: found group selector 15 for wled_an
[    0.090000] rt2880-pinmux pinctrl: found group selector 16 for ephy_p1
[    0.090000] rt2880-pinmux pinctrl: found group selector 17 for ephy_p2
[    0.090000] rt2880-pinmux pinctrl: found group selector 18 for ephy_p3
[    0.090000] rt2880-pinmux pinctrl: found group selector 19 for ephy_p4
[    0.090000] rt2880-pinmux pinctrl: found group selector 7 for wdt
[    0.090000] rt2880-pinmux pinctrl: request pin 11 (io11) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 36 (io36) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 37 (io37) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 0 (io0) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 1 (io1) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 2 (io2) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 3 (io3) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 14 (io14) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 15 (io15) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 16 (io16) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 17 (io17) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 44 (io44) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 42 (io42) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 41 (io41) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 40 (io40) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 39 (io39) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: request pin 38 (io38) for pinctrl
[    0.090000] rt2880-pinmux pinctrl: failed to lookup the sleep state
[    0.100000] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.110000] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.110000] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.120000] Bluetooth: Core ver 2.19
[    0.120000] NET: Registered protocol family 31
[    0.120000] Bluetooth: HCI device and connection manager initialized
[    0.130000] Bluetooth: HCI socket layer initialized
[    0.130000] Bluetooth: L2CAP socket layer initialized
[    0.130000] Bluetooth: SCO socket layer initialized
[    0.140000] Switched to clocksource MIPS
[    0.140000] NET: Registered protocol family 2
[    0.150000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.160000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.160000] TCP: reno registered
[    0.170000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.170000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.180000] NET: Registered protocol family 1
[    0.180000] PCI: CLS 0 bytes, default 32
[    0.190000] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
[    0.190000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.200000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.210000] jffs2: version 2.2 (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.220000] msgmni has been set to 246
[    0.220000] io scheduler noop registered
[    0.220000] io scheduler deadline registered (default)
[    0.230000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[336]
[    0.230000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[350]
[    0.240000] pinctrl core: add 1 pinmux maps
[    0.240000] pinctrl core: add 1 pinmux maps
[    0.240000] rt2880-pinmux pinctrl: found group selector 1 for pwm0
[    0.240000] rt2880-pinmux pinctrl: found group selector 0 for pwm1
[    0.240000] rt2880-pinmux pinctrl: request pin 18 (io18) for 10005000.pwm
[    0.240000] rt2880-pinmux pinctrl: request pin 19 (io19) for 10005000.pwm
[    0.240000] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.250000] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    0.250000] pinctrl core: add 1 pinmux maps
[    0.250000] rt2880-pinmux pinctrl: found group selector 10 for uart0
[    0.250000] rt2880-pinmux pinctrl: request pin 12 (io12) for 10000c00.uartlite
[    0.250000] rt2880-pinmux pinctrl: request pin 13 (io13) for 10000c00.uartlite
[    0.250000] console [ttyS0] disabled
[    0.250000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.260000] mtk:mk8250_set_termios.baudrate=115200, port->uartclk=40000000, quot=22.
[    0.260000] console [ttyS0] enabled
[    0.270000] bootconsole [early0] disabled
[    0.280000] mtk:register my 8250 port sucess!!!!!!!!!!!!!!
[    0.280000] mtk:membase=0xb0000c00, mapbase=0x10000c00, irq=28.!!!!!!!!!!!!!!
[    0.280000] pinctrl core: add 1 pinmux maps
[    0.280000] rt2880-pinmux pinctrl: found group selector 3 for uart1
[    0.280000] rt2880-pinmux pinctrl: request pin 45 (io45) for 10000d00.uart1
[    0.280000] rt2880-pinmux pinctrl: request pin 46 (io46) for 10000d00.uart1
[    0.280000] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
[    0.290000] mtk:register my 8250 port sucess!!!!!!!!!!!!!!
[    0.290000] mtk:membase=0xb0000d00, mapbase=0x10000d00, irq=29.!!!!!!!!!!!!!!
[    0.290000] pinctrl core: add 1 pinmux maps
[    0.290000] rt2880-pinmux pinctrl: found group selector 2 for uart2
[    0.290000] rt2880-pinmux pinctrl: request pin 20 (io20) for 10000e00.uart2
[    0.290000] rt2880-pinmux pinctrl: request pin 21 (io21) for 10000e00.uart2
[    0.290000] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A
[    0.300000] mtk:register my 8250 port sucess!!!!!!!!!!!!!!
[    0.300000] mtk:membase=0xb0000e00, mapbase=0x10000e00, irq=30.!!!!!!!!!!!!!!
[    0.300000] pinctrl core: add 1 pinmux maps
[    0.300000] pinctrl core: add 1 pinmux maps
[    0.300000] rt2880-pinmux pinctrl: found group selector 8 for spi
[    0.300000] rt2880-pinmux pinctrl: found group selector 12 for spi cs1
[    0.300000] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000b00.spi
[    0.300000] rt2880-pinmux pinctrl: request pin 8 (io8) for 10000b00.spi
[    0.300000] rt2880-pinmux pinctrl: request pin 9 (io9) for 10000b00.spi
[    0.300000] rt2880-pinmux pinctrl: request pin 10 (io10) for 10000b00.spi
[    0.300000] rt2880-pinmux pinctrl: request pin 6 (io6) for 10000b00.spi
[    0.300000] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.320000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.320000] m25p80 spi32766.0: using chunked io
[    0.330000] 4 ofpart partitions found on MTD device spi32766.0
[    0.330000] Creating 4 MTD partitions on "spi32766.0":
[    0.340000] 0x000000000000-0x000000030000 : "u-boot"
[    0.350000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.350000] 0x000000040000-0x000000050000 : "factory"
[    0.360000] 0x000000050000-0x000001000000 : "firmware"
[    0.400000] 2 uimage-fw partitions found on MTD device firmware
[    0.400000] 0x000000050000-0x000000181fc7 : "kernel"
[    0.410000] 0x000000181fc7-0x000001000000 : "rootfs"
[    0.420000] mtd: device 5 (rootfs) set to be root filesystem
[    0.420000] 1 squashfs-split partitions found on MTD device rootfs
[    0.430000] 0x000000c20000-0x000001000000 : "rootfs_data"
[    0.450000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    0.460000] mt7621_wdt 10000100.watchdog: Initialized
[    0.460000] Bluetooth: HCI UART driver ver 2.2
[    0.470000] Bluetooth: HCI H4 protocol initialized
[    0.470000] Bluetooth: HCI BCSP protocol initialized
[    0.480000] Bluetooth: HCI Three-wire UART (H5) protocol initialized
[    0.480000] TCP: cubic registered
[    0.490000] NET: Registered protocol family 17
[    0.490000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.510000] Bluetooth: RFCOMM TTY layer initialized
[    0.510000] Bluetooth: RFCOMM socket layer initialized
[    0.520000] Bluetooth: RFCOMM ver 1.11
[    0.520000] 8021q: 802.1Q VLAN Support v1.8
[    0.530000] mtk:mk8250_set_termios.baudrate=115200, port->uartclk=40000000, quot=22.
[    0.530000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.540000] Freeing unused kernel memory: 192K (80370000 - 803a0000)
[    2.020000] init: Console is alive
[    2.020000] init: - watchdog -
[    4.500000] usbcore: registered new interface driver usbfs
[    4.500000] usbcore: registered new interface driver hub
[    4.510000] usbcore: registered new device driver usb
[    4.520000] reg_opt_init
[    4.520000] exFAT: Version 1.2.9
[    4.570000] SCSI subsystem initialized
[    4.580000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.590000] ehci-platform: EHCI generic platform driver
[    4.760000] U2PHY P0 set SRCTRL calibration value: 6
[    4.760000] ehci-platform 101c0000.ehci: EHCI Host Controller
[    4.770000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    4.770000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    4.800000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    4.800000] usb usb1: no of_node; not parsing pinctrl DT
[    4.800000] hub 1-0:1.0: no of_node; not parsing pinctrl DT
[    4.800000] hub 1-0:1.0: USB hub found
[    4.810000] hub 1-0:1.0: 1 port detected
[    4.810000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.820000] ohci-platform: OHCI generic platform driver
[    4.830000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    4.830000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    4.840000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    4.910000] usb usb2: no of_node; not parsing pinctrl DT
[    4.910000] hub 2-0:1.0: no of_node; not parsing pinctrl DT
[    4.910000] hub 2-0:1.0: USB hub found
[    4.910000] hub 2-0:1.0: 1 port detected
[    4.930000] MTK MSDC device init.
[    4.930000] pinctrl core: add 1 pinmux maps
[    4.930000] rt2880-pinmux pinctrl: found group selector 9 for sdmode
[    4.930000] rt2880-pinmux pinctrl: request pin 22 (io22) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 23 (io23) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 24 (io24) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 25 (io25) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 26 (io26) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 27 (io27) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 28 (io28) for 10130000.sdhci
[    4.930000] rt2880-pinmux pinctrl: request pin 29 (io29) for 10130000.sdhci
[    4.970000] mtk-sd: MediaTek MT6575 MSDC Driver
[    4.970000] sdhci: Secure Digital Host Controller Interface driver
[    4.980000] sdhci: Copyright(c) Pierre Ossman
[    4.980000] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.990000] usbcore: registered new interface driver usb-storage
[    5.020000] init: - preinit -
[    5.200000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    5.540000] usb 1-1: no of_node; not parsing pinctrl DT
[    5.550000] usb-storage 1-1:1.0: no of_node; not parsing pinctrl DT
[    5.550000] usb-storage 1-1:1.0: USB Mass Storage device detected
[    5.550000] scsi host0: usb-storage 1-1:1.0
[    5.570000] random: procd urandom read with 9 bits of entropy available
[    5.900000] rt305x-esw 10110000.esw: link changed 0x00
[    6.560000] scsi 0:0:0:0: Direct-Access     Generic  STORAGE DEVICE   1402 PQ: 0 ANSI: 6
[    6.570000] sd 0:0:0:0: no of_node; not parsing pinctrl DT
[    6.720000] sd 0:0:0:0: [sda] 15548416 512-byte logical blocks: (7.96 GB/7.41 GiB)
[    6.730000] sd 0:0:0:0: [sda] Write Protect is off
[    6.730000] sd 0:0:0:0: [sda] Mode Sense: 21 00 00 00
[    6.730000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    6.750000]  sda: sda1
[    6.760000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    8.910000] rt305x-esw 10110000.esw: link changed 0x01
[    9.250000] mount_root: loading kmods from internal overlay
[    9.780000] jffs2: notice: (395) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    9.790000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[    9.800000] block: extroot: not configured
[    9.890000] jffs2: notice: (392) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    9.900000] mount_root: loading kmods from internal overlay
[   10.190000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   10.200000] block: extroot: not configured
[   10.200000] mount_root: switching to jffs2 overlay
[   10.230000] procd: - early -
[   10.230000] procd: - watchdog -
[   10.990000] procd: - ubus -
[   12.010000] procd: - init -
[   13.020000] NET: Registered protocol family 10
[   13.100000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.120000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   13.130000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   13.220000] i2c /dev entries driver
[   13.240000] snd-soc-dummy snd-soc-dummy: no of_node; not parsing pinctrl DT
[   13.260000] pinctrl core: add 1 pinmux maps
[   13.260000] rt2880-pinmux pinctrl: found group selector 4 for i2c
[   13.260000] rt2880-pinmux pinctrl: request pin 4 (io4) for 10000900.i2c
[   13.260000] rt2880-pinmux pinctrl: request pin 5 (io5) for 10000900.i2c
[   13.260000] i2c-mt7621 10000900.i2c: clock 100 kHz
[   13.280000] Linux video capture interface: v2.00
[   13.300000] Enable Ralink GDMA Controller Module
[   13.310000] GDMA IP Version=3
[   13.330000] codec_wm8960 0-0034: no of_node; not parsing pinctrl DT
[   13.330000] *******Enter codec_wm8960_i2c_probe********
[   13.340000] wm8960 0-001a: no of_node; not parsing pinctrl DT
[   13.340000] mt76xx-i2s mt76xx-i2s: no of_node; not parsing pinctrl DT
[   13.340000] mt76xx-pcm mt76xx-pcm: no of_node; not parsing pinctrl DT
[   13.340000] soc-audio soc-audio: no of_node; not parsing pinctrl DT
[   13.340000] soc-audio soc-audio: ASoC: machine MTK APSoC I2S should use snd_soc_register_card()
[   13.350000] wm8960 0-001a: No platform data supplied
[   13.350000] ****** wm8960_preinit ******
[   13.860000] soc-audio soc-audio: wm8960-hifi <-> mt76xx-i2s mapping ok
[   13.880000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.900000] nf_conntrack version 0.5.0 (1971 buckets, 7884 max)
[   13.930000] usbcore: registered new interface driver uvcvideo
[   13.940000] USB Video Class driver (1.1.1)
[   13.960000] xt_time: kernel timezone is -0000
[   13.980000] PPP generic driver version 2.4.2
[   13.980000] NET: Registered protocol family 24
[   17.550000] rt305x-esw 10110000.esw: link changed 0x00
[   20.580000] rt305x-esw 10110000.esw: link changed 0x01
[   21.650000] device eth0.1 entered promiscuous mode
[   21.650000] device eth0 entered promiscuous mode
[   21.680000] br-lan: port 1(eth0.1) entered forwarding state
[   21.680000] br-lan: port 1(eth0.1) entered forwarding state
[   23.680000] br-lan: port 1(eth0.1) entered forwarding state
[   24.340000] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   36.240000] random: nonblocking pool is initialized

最近编辑记录 checkout (2020-01-10 20:48:16)

离线

#2 2020-01-10 20:47:45

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

没遇到过

离线

楼主 #3 2020-01-10 20:55:04

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

使用aplay和madplay播放音频都没问题的,初步怀疑问题出在portaudio初始化的时候,对声卡多次进行设置。
同一程序在其他平台都没遇到这个bug。立个贴留个坑

离线

#4 2020-01-10 21:25:17

好想做个有钱人
会员
注册时间: 2019-12-19
已发帖子: 40
积分: 40

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

请教 portaudio 是声音合成平台吗?

离线

楼主 #5 2020-01-11 07:39:18

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

不是。

好想做个有钱人 说:

请教 portaudio 是声音合成平台吗?

离线

楼主 #6 2020-03-09 17:09:22

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

经测试,openwrt主线的声卡驱动不存在这个bug.
但遇到了文件系统一个bug。。。下面这个帖子
widora-neo-16128m开发板跑主线openwrt,不能进入kernel shell......

root@OpenWrt:/mnt/usb# ./paex_write_sine
PortAudio Test: output sine wave. SR = 44100, BufSize = 1024
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown[ 2405.709000]  wm8960-codec: ASoC: unmatched rate symmetry: 8000 - 44100
 PCM cards.pcm.surround51
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2564:(snd_pcm_open_noupdat[ 2405.747731]  wm8960-codec: ASoC: unmatched rate symmetry: 8000 - 44100
e) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression 'ioctl( devHandle, SNDCTL_DSP_SPEED, &sr )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 421
Expression 'ioctl( devHandle, SNDCTL_DSP_SPEED, &sr )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 421
Play 3 times, higher each time.
Play for 5 seconds.
Play for 5 seconds.
Play for 5 seconds.
Test finished.

最近编辑记录 checkout (2020-03-09 17:16:04)

离线

#7 2020-03-09 18:25:55

mango
会员
所在地: 芒果派1
注册时间: 2017-12-02
已发帖子: 780
积分: 726

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

有主线声卡的配置过程不?
我可以将wifi驱动移植到主线上去。






歪朵拉开源硬件: https://widora.cn
淘宝:  https://widora.taobao.com/

离线

楼主 #8 2020-03-09 19:08:59

checkout
会员
注册时间: 2018-11-09
已发帖子: 173
积分: 168

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

详情看这里:MT762X WM8960 ALSA SoC machine driver

mango 说:

有主线声卡的配置过程不?
我可以将wifi驱动移植到主线上去。

离线

#9 2020-03-09 19:16:31

mango
会员
所在地: 芒果派1
注册时间: 2017-12-02
已发帖子: 780
积分: 726

Re: openwrt(widora-neo)使用portaudio播放音频,出现多次调用postinit(),伴有杂音,偶尔会造成系统奔溃

checkout 说:

OK,有空了我试试






歪朵拉开源硬件: https://widora.cn
淘宝:  https://widora.taobao.com/

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn