导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    d1s I2S2-DOUT0 无输出

    MR Series
    1
    1
    904
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • C
      cjia3254 LV 5 最后由 编辑

      自制d1s 开发板,外挂wm8960解编码芯片。
      设备树配置

      	daudio2_pins_a: daudio2@0 {
      		/* I2S_PIN: MCLK, BCLK, LRCK */
      		pins = "PB7", "PB5", "PB6";
      		function = "i2s2";
      		drive-strength = <100>;
      		bias-disable;
      	};
      
      	daudio2_pins_b: daudio2@1 {
      		/* I2S_PIN: DOUT0 */
      		pins = "PB4";
      		function = "i2s2_dout";
      		drive-strength = <100>;
      		bias-disable;
      	};
      
      	daudio2_pins_c: daudio2@2 {
      		/* I2S_PIN: DIN0 */
      		pins = "PB3";
      		function = "i2s2_din";
      		drive-strength = <100>;
      		bias-disable;
      	};
      
      
      &daudio2 {
      	mclk_div 	= <0x02>;
      	frametype 	= <0x01>;
      	tdm_config 	= <0x01>;
      	sign_extend 	= <0x00>;
      	tx_data_mode 	= <0x00>;
      	rx_data_mode 	= <0x00>;
      	msb_lsb_first 	= <0x00>;
      	pcm_lrck_period = <0x80>;
      	slot_width_select = <0x20>;
      	asrc_function_en  = <0x00>;
      	pinctrl-names   = "default", "sleep";
      	pinctrl-0       = <&daudio2_pins_a &daudio2_pins_b &daudio2_pins_c>;
      	pinctrl-1       = <&daudio2_pins_d>;
      	pinctrl_used	= <0x1>;
      	daudio_type	= <0x0>;
      	status = "okay";
      };
      &sounddaudio2 {
      
      	status = "okay";
      	model = "wm8960-audio";
      	simple-audio-card,name = "wlf,wm8960";
      	simple-audio-card,format = "i2s";
      	simple-audio-card,bitclock-master = <&daudio2_master>;
      	simple-audio-card,frame-master = <&daudio2_master>;
      	simple-audio-card,widgets =
      			"Microphone", "Mic Jack",
      			"Line", "Line In",
      			"Line", "Line Out",
      			"Speaker", "Speaker",
      			"Headphone", "Headphone Jack";
      	simple-audio-card,routing =
      			"Headphone Jack", "HP_L",
      			"Headphone Jack", "HP_R",
      			"Speaker", "SPK_LP",
      			"Speaker", "SPK_LN",
      			"Speaker", "SPK_RP",
      			"Speaker", "SPK_RN";
      	simple-audio-card,cpu {
      		sound-dai = <&daudio2>;
      	};
      
      	daudio2_master: simple-audio-card,codec {
      		sound-dai = <&wm8960>;
      	};
      
      };
      
      &twi3 {
      	clock-frequency = <400000>;
      	pinctrl-0 = <&twi3_pins_a>;
      	pinctrl-1 = <&twi3_pins_b>;
      	pinctrl-names = "default", "sleep";
      	status = "okay";
      
      	wm8960: wm8960@1a {
      		#sound-dai-cells = <0>;
      		compatible = "wlf,wm8960";
      		reg = <0x1a>;
      		clock-names = "mclk";
      		wlf,shared-lrclk;
      		status = "okay";
      	};
      };
      
      

      启动日志

      [    0.000000]   Normal   empty
      [    0.000000] Movable zone start for each node
      [    0.000000] Early memory node ranges
      [    0.000000]   node   0: [mem 0x0000000040000000-0x0000000043ffffff]
      [    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
      [    0.000000] On node 0 totalpages: 16384
      [    0.000000]   DMA32 zone: 224 pages used for memmap
      [    0.000000]   DMA32 zone: 0 pages reserved
      [    0.000000]   DMA32 zone: 16384 pages, LIFO batch:3
      [    0.000000] elf_hwcap is 0x20112d
      [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
      [    0.000000] pcpu-alloc: [0] 0 
      [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16160
      [    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500400 clk_ignore_unused initcall_debug=0 console=ttyS1,115200 loglevel=8 root=/dev/mmcblk0p5 init=/pseudo_init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:recovery@mmcblk0p6:rootfs_data@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.07-ge987def5-dirty(03/08/2024-08:54:18) mbr_offset=1556480 disp_reserve=4096000,0x0000000042b3a000 androidboot.dramsize=64 
      [    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
      [    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
      [    0.000000] Sorting __ex_table...
      [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
      [    0.000000] Memory: 44388K/65536K available (4728K kernel code, 483K rwdata, 1815K rodata, 168K init, 226K bss, 12956K reserved, 8192K cma-reserved)
      [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
      [    0.000000] rcu: Preemptible hierarchical RCU implementation.
      [    0.000000]  Tasks RCU enabled.
      [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
      [    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
      [    0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
      [    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
      [    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
      [    0.000009] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
      [    0.000034] riscv_timer_clockevent depends on broadcast, but no broadcast function available
      [    0.000475] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
      [    0.001211] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
      [    0.001237] pid_max: default: 32768 minimum: 301
      [    0.001489] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
      [    0.001511] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
      [    0.003871] ASID allocator initialised with 65536 entries
      [    0.004085] rcu: Hierarchical SRCU implementation.
      [    0.004937] devtmpfs: initialized
      [    0.024557] random: get_random_u32 called from bucket_table_alloc.isra.27+0x10a/0x12c with crng_init=0
      [    0.025822] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
      [    0.025864] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
      [    0.026535] pinctrl core: initialized pinctrl subsystem
      [    0.028293] NET: Registered protocol family 16
      [    0.031034] DMA: preallocated 256 KiB pool for atomic allocations
      [    0.031711] cpuidle: using governor menu
      [    0.085950] rtc_ccu: sunxi ccu init OK
      [    0.096761] clock: sunxi ccu init OK
      [    0.098965] clock: sunxi ccu init OK
      [    0.135533] sun6i-dma 3002000.dma-controller: sunxi dma probed
      [    0.138370] iommu: Default domain type: Translated 
      [    0.138619] sunxi iommu: irq = 4
      [    0.140105] SCSI subsystem initialized
      [    0.140569] usbcore: registered new interface driver usbfs
      [    0.141157] usbcore: registered new interface driver hub
      [    0.141316] usbcore: registered new device driver usb
      [    0.142290] sunxi-msgbox-amp 3003000.msgbox: invalid resource
      [    0.143364] Advanced Linux Sound Architecture Driver Initialized.
      [    0.144213] Bluetooth: Core ver 2.22
      [    0.144323] NET: Registered protocol family 31
      [    0.144338] Bluetooth: HCI device and connection manager initialized
      [    0.144367] Bluetooth: HCI socket layer initialized
      [    0.144388] Bluetooth: L2CAP socket layer initialized
      [    0.144434] Bluetooth: SCO socket layer initialized
      [    0.144818] pwm module init!
      [    0.147301] clocksource: Switched to clocksource riscv_clocksource
      [    0.165154] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
      [    0.169421] NET: Registered protocol family 2
      [    0.170584] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
      [    0.170648] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
      [    0.170673] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
      [    0.170693] TCP: Hash tables configured (established 512 bind 512)
      [    0.170883] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
      [    0.170940] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
      [    0.171254] NET: Registered protocol family 1
      [    0.172626] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
      [    0.173486] spi spi1: spi1 supply spi not found, using dummy regulator
      [    0.173797] sunxi_spi_resource_get()2438 - [spi1] SPI MASTER MODE
      [    0.173876] sunxi_spi_resource_get()2476 - Failed to get sample mode
      [    0.173889] sunxi_spi_resource_get()2481 - Failed to get sample delay
      [    0.173901] sunxi_spi_resource_get()2485 - sample_mode:-1431633921 sample_delay:-1431633921
      [    0.173987] sunxi_spi_clk_init()2527 - [spi1] mclk 100000000
      [    0.174700] sunxi_spi_probe()2978 - [spi1]: driver probe succeed, base ffffffd00405e000, irq 32
      [    0.177636] workingset: timestamp_bits=62 max_order=14 bucket_order=0
      [    0.188194] squashfs: version 4.0 (2009/01/31) Phillip Lougher
      [    0.188481] ntfs: driver 2.1.32 [Flags: R/W].
      [    0.217379] io scheduler mq-deadline registered
      [    0.217397] io scheduler kyber registered
      [    0.218507] [DISP]disp_module_init
      [    0.219358] disp 5000000.disp: Adding to iommu group 0
      [    0.220282] [DISP] parser_disp_init_para,line:1430:
      [    0.220288] of_property_read fb0_width fail
      [    0.220316] [DISP] disp_init,line:2387:
      [    0.220322] smooth display screen:0 type:1 mode:4
      [    0.268683] display_fb_request,fb_id:0
      [    0.334568] [DISP]disp_module_init finish
      [    0.335656] sunxi_sid_init()783 - insmod ok
      [    0.336654] pwm-regulator: supplied by regulator-dummy
      [    0.338463] disp_al_manager_apply ouput_type:1
      [    0.338682] [DISP] lcd_clk_config,line:774:
      [    0.338699] disp 0, clk: pll(420000000),clk(420000000),dclk(70000000) dsi_rate(70000000)
      [    0.338699]      clk real:pll(420000000),clk(420000000),dclk(105000000) dsi_rate(150000000)
      [    0.338815] sunxi_pwm_enable_dual: can't parse pwm device
      [    0.339749] uart uart1: uart1 supply uart not found, using dummy regulator
      [    0.340224] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
      [    0.340261] sw_console_setup()1807 - console setup baud 115200 parity n bits 8, flow n
      [    1.076390] printk: console [ttyS1] enabled
      [    1.084621] libphy: Fixed MDIO Bus: probed
      [    1.095536] Freeing logo buffer memory: 4000K
      [    1.100979] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
      [    1.112756] gmac-power0: NULL
      [    1.116072] gmac-power1: NULL
      [    1.119449] gmac-power2: NULL
      [    1.124708] Failed to alloc md5
      [    1.128367] eth0: Use random mac address
      [    1.133219] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
      [    1.140720] sunxi-ehci: EHCI SUNXI driver
      [    1.145945] get ehci1-controller wakeup-source is fail.
      [    1.152063] sunxi ehci1-controller don't init wakeup source
      [    1.158474] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe000730d00, 0x:ffffffd004070000, irq_no:31
      [    1.172157] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
      [    1.184912] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
      [    1.197508] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
      [    1.204845] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
      [    1.214733] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
      [    1.247370] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
      [    1.255214] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect
      [    1.265217] hub 1-0:1.0: USB hub found
      [    1.269659] hub 1-0:1.0: 1 port detected
      [    1.275197] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
      [    1.282277] sunxi-ohci: OHCI SUNXI driver
      [    1.287665] get ohci1-controller wakeup-source is fail.
      [    1.293660] sunxi ohci1-controller don't init wakeup source
      [    1.299966] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe0007310c8
      [    1.310538] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
      [    1.323251] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
      [    1.335781] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
      [    1.343130] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
      [    1.353028] sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
      [    1.432746] hub 2-0:1.0: USB hub found
      [    1.437025] hub 2-0:1.0: 1 port detected
      [    1.442981] usbcore: registered new interface driver uas
      [    1.449344] usbcore: registered new interface driver usb-storage
      [    1.456461] sunxi_gpadc_init,2151, success
      [    1.461561] sunxi_gpadc_setup: get channel scan data failed
      [    1.468564] input: sunxi-gpadc0 as /devices/virtual/input/input0
      [    1.476635] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1
      [    1.489640] sunxi-rtc 7090000.rtc: registered as rtc0
      [    1.495474] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3)
      [    1.504542] sunxi-rtc 7090000.rtc: sunxi rtc probed
      [    1.510764] i2c /dev entries driver
      [    1.514872] IR NEC protocol handler initialized
      [    1.520875] Bluetooth: HCI UART driver ver 2.3
      [    1.525877] Bluetooth: HCI UART protocol H4 registered
      [    1.531743] Bluetooth: HCI UART protocol BCSP registered
      [    1.538152] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
      [    1.549027] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
      [    1.559060] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
      [    1.565315] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
      [    1.571893] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
      [    1.578415] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
      [    1.584855] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
      [    1.591433] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
      [    1.598025] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
      [    1.604560] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
      [    1.612416] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.623603] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
      [    1.637368] usb 1-1: new high-speed USB device number 2 using sunxi-ehci
      [    1.644958] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.669352] sunxi-mmc 4020000.sdmmc: detmode:gpio polling
      [    1.675478] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.688044] sun8iw20-pinctrl 2000000.pinctrl: pin PG0 already requested by 4500000.eth; cannot claim for 4021000.sdmmc
      [    1.700126] sun8iw20-pinctrl 2000000.pinctrl: pin-192 (4021000.sdmmc) status -22
      [    1.708668] sun8iw20-pinctrl 2000000.pinctrl: could not request pin 192 (PG0) from group PG0  on device 2000000.pinctrl
      [    1.720805] sunxi-mmc 4021000.sdmmc: Error applying setting, reverse things back
      [    1.729419] sunxi-mmc: probe of 4021000.sdmmc failed with error -22
      [    1.736513] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.748868] ledtrig-cpu: registered to indicate activity on CPUs
      [    1.755624] exFAT: Version 1.3.0
      [    1.761864] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.776519] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
      [    1.788370] sunxi-daudio 2034000.daudio: regulator missing or invalid
      [    1.796564] [AUDIOCODEC][sunxi_codec_parse_params][2437]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1
      [    1.796564] 
      [    1.813882] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
      [    1.825674] [AUDIOCODEC][sunxi_codec_parse_params][2473]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
      [    1.837623] [AUDIOCODEC][sunxi_internal_codec_probe][2634]:codec probe finished
      [    1.848016] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present!
      [    1.858034] [SNDCODEC][sunxi_card_init][583]:card init finished
      [    1.868287] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
      [    1.880601] hub 1-1:1.0: USB hub found
      [    1.887054] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input1
      [    1.899039] hub 1-1:1.0: 4 ports detected
      [    1.904396] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished
      [    1.912042] mmc0: host does not support reading read-only switch, assuming write-enable
      [    1.921586] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch
      [    1.929966] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
      [    1.942323] random: fast init done
      [    1.949073] NET: Registered protocol family 10
      [    1.956438] Segment Routing with IPv6
      [    1.960812] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
      [    1.972957] NET: Registered protocol family 17
      [    1.978300] Bluetooth: RFCOMM TTY layer initialized
      [    1.983814] Bluetooth: RFCOMM socket layer initialized
      [    1.990069] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
      [    2.001930] Bluetooth: RFCOMM ver 1.11
      [    2.017539] mmc0: new high speed SDHC card at address aaaa
      [    2.028797] mmcblk0: mmc0:aaaa SC32G 29.7 GiB 
      [    2.053171]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
      [    2.059597] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
      [    2.074797] sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator
      [    2.085004] sunxi-i2c sunxi-i2c2: probe success
      [    2.090832] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator
      [    2.102528] sunxi-i2c sunxi-i2c3: sunxi-i2c3 supply twi not found, using dummy regulator
      [    2.130563] sunxi-i2c sunxi-i2c3: probe success
      [    2.137417] sun8iw20-pinctrl 2000000.pinctrl: pin PG0 already requested by 4500000.eth; cannot claim for 4021000.sdmmc
      [    2.149518] sun8iw20-pinctrl 2000000.pinctrl: pin-192 (4021000.sdmmc) status -22
      [    2.157872] sun8iw20-pinctrl 2000000.pinctrl: could not request pin 192 (PG0) from group PG0  on device 2000000.pinctrl
      [    2.170040] sunxi-mmc 4021000.sdmmc: Error applying setting, reverse things back
      [    2.178446] sunxi-mmc: probe of 4021000.sdmmc failed with error -22
      [    2.187012] sun8iw20-pinctrl 2000000.pinctrl: pin PB3 already requested by 2034000.daudio; cannot claim for 2000000.pinctrl:35
      [    2.199934] sun8iw20-pinctrl 2000000.pinctrl: pin-35 (2000000.pinctrl:35) status -22
      [    2.208705] reg-fixed-voltage: probe of usb1-vbus failed with error -22
      [    2.218862] debugfs: Directory '2034000.daudio' with parent 'wlf,wm8960' already present!
      [    2.231023] sunxi-audio-card 20340a0.sounddaudio2: wm8960-hifi <-> 2034000.daudio mapping ok
      [    2.327385] usb 1-1.2: new high-speed USB device number 3 using sunxi-ehci
      [    2.361938] otg manager soc@3000000:usbc0@0: soc@3000000:usbc0@0 supply usbc not found, using dummy regulator
      [    2.377239] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
      [    2.386978] clk: Not disabling unused clocks
      [    2.391972] ALSA device list:
      [    2.395293]   #0: audiocodec
      [    2.398622] cfg80211: failed to load regulatory.db
      [    2.404096]   #1: wlf,wm8960
      [    2.416171] VFS: Mounted root (squashfs filesystem) readonly on device 179:5.
      [    2.431123] devtmpfs: mounted
      [    2.434793] Freeing unused kernel memory: 168K
      [    2.439978] This architecture does not have kernel memory protection.
      [    2.447249] Run /pseudo_init as init process
      mount: mounting none on /dev failed: Device or resource busy
      [    3.184564] EXT4-fs: Warning: mounting with data=journal disables delayed allocation and O_DIRECT support!
      [    3.204786] EXT4-fs (mmcblk0p7): mounted filesystem with journalled data mode. Opts: data=journal
      Didn't found ubi volume "env"
      Cannot open /dev/ubi0: No such file or directory
      Didn't found ubi volume "env-redund"
      Cannot open /dev/ubi0: No such file or directory
      [    3.449277] 
      [    3.449277] insmod_device_driver
      [    3.449277] 
      [    3.456628] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
      can't run '/etc/preinit': No such file or directory
      mount: mounting proc on /proc failed: Device or resource busy
      [    3.487917] device_chose finished 142!
      mount: mounting tmpfs on /run failed: No such file or directory
      hostname: can't open '/etc/hostname': No such file or directory
      ------run rc.preboot file-----
      [    3.833146] EXT4-fs (mmcblk0p8): mounted filesystem with ordered data mode. Opts: (null)
      ------run rc.modules file-----
      ------run rc.final file-----
      numid=30,iface=MIXER,name='Headphone Switch'
        ; type=BOOLEAN,access=rw------,values=1
        : values=on
      

      但是在 cat /proc/asound/cards没有相应目录

      root@TinaLinux:/# cd /proc/
      1/            16/           53/           65/           fs/
      10/           2/            54/           67/           irq/
      11/           3/            57/           68/           net/
      12/           4/            58/           7/            self/
      123/          46/           59/           8/            sys/
      124/          47/           6/            9/            sysvipc/
      13/           48/           60/           91/           thread-self/
      136/          49/           61/           92/           tty/
      14/           5/            62/           bus/
      142/          51/           63/           device-tree/
      15/           52/           64/           driver/
      

      aplay 播放报错

      root@TinaLinux:/# aplay -D hw:1,0 -vvv /mnt/UDISK/voyager.wav 
      Playing WAVE '/mnt/UDISK/voyager.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
      Hardware PCM card 1 'wlf,wm8960' device 0 subdevice 0
      Its setup is:
        stream       : PLAYBACK
        access       : RW_INTERLEAVED
        format       : S16_LE
        subformat    : STD
        channels     : 2
        rate         : 44100
        exact rate   : 44100 (44100/1)
        msbits       : 16
        buffer_size  : 22052
        period_size  : 5513
        period_time  : 125011
        tstamp_mode  : NONE
        tstamp_type  : MONOTONIC
        period_step  : 1
        avail_min    : 5513
        period_event : 0
        start_threshold  : 22052
        stop_threshold   : 22052
        silence_threshold: 0
        silence_size : 0
        boundary     : 6207086186423386112
        appl_ptr     : 0
        hw_ptr       : 0
      Max peak (11026 samples): 0x00000001 #                    0%
      Max peak (11026 samples): 0x00000001 #                    0%
      Max peak (11026 samples): 0x00000001 #                    0%
      Max peak (11026 samples): 0x00000002 #                    0%
      Max peak (64 samples): 0x00000001 #                    0%
      aplay: pcm_write:1980: write error: Input/output error
      

      使用其他人编写的alsa程序会在snd_pcm_writei出错

      
      		// 向PCM设备写入数据 snd_pcm_writei()函数第三个是帧单位,意思是这些个(buffer_size)大小缓存中有多少个frames(左右声道 * 一个采样位数)
      		while((ret = snd_pcm_writei(pcm_handle, buff, frames)) < 0){
      			if (ret == -EPIPE){
      				
                        /* EPIPE means underrun 基本上-32  的错误就是缓存中的数据不够 */
                        printf("underrun occurred -32, err_info = %s \n", snd_strerror(ret));
      				  //完成硬件参数设置,使设备准备好
                        snd_pcm_prepare(pcm_handle);
      			
                  } else if(ret < 0){
      				printf("ret value is : %d \n", ret);
      				debug_msg(-1, "write to audio interface failed");
      			}
      		}
      
      root@TinaLinux:~/userapp# ./alsexxx -m /mnt/UDISK/voyager.wav -f 161 -r 44
      打开文件 
      wav文件头结��体大小:   44 
      RIFF标志:                                      RIFF 
      文件大小:                                      59684706
      文件格式:                                      WAVE 
      格式块标��:                                    fmt 
      格式块长度:                                    16 
      编码格式代码:                                   1 
      声道数:                                         2
      采样频率:                                       44100
      传输速率:                                      176400 
      数据块对齐单位:                                 4
      采样位数(长度):                                 16
      format_arg value is : S16LE 
      rate_arg value is : 44.1HZ 
      rate value is : 44100 
      ret value is : -5 
      err: write to audio interface failed 失败!, result = -1, err_info = Operation not permitted 
      
      1 条回复 最后回复 回复 引用 分享 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策