全志V3s使用荔枝派
最新的 linux 4.13-y 分支,如何支持声卡?
离线
/tmp # ./tinymix contents
Number of controls: 13
ctl type num name value
0 INT 1 DAC Playback Volume 63 (range 0->63)
1 INT 1 Headphone Playback Volume 0 (range 0->63)
2 BOOL 2 Headphone Playback Switch Off, Off
3 INT 1 Mic1 Playback Volume 3 (range 0->7)
4 INT 1 Mic1 Boost Volume 4 (range 0->7)
5 INT 1 ADC Gain Capture Volume 3 (range 0->7)
6 BOOL 2 DAC Playback Switch Off, Off
7 BOOL 2 DAC Reversed Playback Switch Off, Off
8 BOOL 2 Mic1 Playback Switch Off, Off
9 BOOL 2 Mixer Capture Switch Off, Off
10 BOOL 2 Mixer Reversed Capture Switch Off, Off
11 BOOL 2 Mic1 Capture Switch Off, Off
12 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
这是默认的寄存器配置
在线
把第一个寄存器 [Headphone Playback Volume] 音量设置为 [63], 和第二个寄存器 [Headphone Playback Switch] 设为 [ON]
就可以用 tinyplay播放wav文件了
如何设置这两个寄存器?
离线
设置:
/tmp # ./tinymix set 1 63
/tmp # ./tinymix set 2 1
完成之后查看:
/tmp # ./tinymix contents
Number of controls: 13
ctl type num name value
0 INT 1 DAC Playback Volume 55 (range 0->63)
1 INT 1 Headphone Playback Volume 63 (range 0->63)
2 BOOL 2 Headphone Playback Switch On, On
3 INT 1 Mic1 Playback Volume 7 (range 0->7)
4 INT 1 Mic1 Boost Volume 7 (range 0->7)
5 INT 1 ADC Gain Capture Volume 7 (range 0->7)
6 BOOL 2 DAC Playback Switch On, On
7 BOOL 2 DAC Reversed Playback Switch On, On
8 BOOL 2 Mic1 Playback Switch On, On
9 BOOL 2 Mixer Capture Switch On, On
10 BOOL 2 Mixer Reversed Capture Switch On, On
11 BOOL 2 Mic1 Capture Switch On, On
12 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
发现设置成功了。
在线
谢谢,我去试一试。
离线
坑哥 原来你会玩丫!无语
离线
我目前遇到的情况是:
用群里提供的根文件可以实现声音播放了 ,我替换掉我自己制作的根文件就是不行。说明内核和设备树都正常了,我感觉是配置文件不对。
tinyalsa 这个软件怎么装进入的呀! 在buildroot 里面没看到呢!
离线
全志V3s使用荔枝派最新的 linux 4.13-y 分支,如何支持声卡?
哥们你搞定没有呀? 你自己制作了根文件了么? 我自己制作的根文件不正常。
离线
这里有编译过程:小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本
如果搞不定,需要静态链接的二级制文件请举手!
搞定的有点悲剧,我直接改的Makefile
CROSS_COMPILE =arm-linux-gnueabihf-
CC = $(CROSS_COMPILE)gcc
有点暴力的该法。
离线
晕哥 说:这里有编译过程:小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本
如果搞不定,需要静态链接的二级制文件请举手!
搞定的有点悲剧,我直接改的Makefile
CROSS_COMPILE =arm-linux-gnueabihf-
CC = $(CROSS_COMPILE)gcc有点暴力的该法。
现在可以播放了吗?
在线
1066950103 说:晕哥 说:这里有编译过程:小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本
如果搞不定,需要静态链接的二级制文件请举手!
搞定的有点悲剧,我直接改的Makefile
CROSS_COMPILE =arm-linux-gnueabihf-
CC = $(CROSS_COMPILE)gcc有点暴力的该法。
现在可以播放了吗?
OK 啦 可以啦 !我明白了。我不能播放的最终原因是因为没有开启耳塞以及音量。别个的根文件就做了这事情的。
离线
晕哥 说:1066950103 说:搞定的有点悲剧,我直接改的Makefile
CROSS_COMPILE =arm-linux-gnueabihf-
CC = $(CROSS_COMPILE)gcc有点暴力的该法。
现在可以播放了吗?
OK 啦 可以啦 !我明白了。我不能播放的最终原因是因为没有开启耳塞以及音量。别个的根文件就做了这事情的。
是mix那两个寄存器没设置对吧?
录音可以了吗?
在线
https://whycan.cn/files/members/3/QQ20171128142743.png
再次验证, 一点问题都没有。
怎么把tinymix设置的两个参数的默认值改一下,现在每次启动都要重新配置一下
离线
在线
V3s 新荔枝派Zero的自带MIC采集的tinymix如何设置?
我设置
./tinymix set 4 7
./tinymix set 5 7
./tinymix set 11 1
然后./tinycap mic.wav采集到的声音几乎全是噪音。
# ./tinymix contents
Number of controls: 13
ctl type num name value
0 INT 1 DAC Playback Volume 63 (range 0->63)
1 INT 1 Headphone Playback Volume 63 (range 0->63)
2 BOOL 2 Headphone Playback Switch On, On
3 INT 1 Mic1 Playback Volume 7 (range 0->7)
4 INT 1 Mic1 Boost Volume 7 (range 0->7)
5 INT 1 ADC Gain Capture Volume 7 (range 0->7)
6 BOOL 2 DAC Playback Switch Off, Off
7 BOOL 2 DAC Reversed Playback Switch Off, Off
8 BOOL 2 Mic1 Playback Switch Off, Off
9 BOOL 2 Mixer Capture Switch Off, Off
10 BOOL 2 Mixer Reversed Capture Switch Off, Off
11 BOOL 2 Mic1 Capture Switch On, On
12 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
离线
悲剧, 采集我也没有搞定, 搞定的大神请赐教!
离线
@晕哥
晕哥大神,请问下我使用了linux 4.13-y分支的内核,编译成功之后能够挂载u盘,也能够提示有声卡了,但是还是存在一个问题,当我使用移植好的alsa时,
输入命令:aplay 11.wav时,
系统提示:aplay:set_params:1437:not enough memory
这个问题我该怎么解决呢?
离线
@晕哥
晕哥,在进行tinyalsa移植时,具体的移植过程是不是跟alsa库那样要移植对应的文件和文件夹到开发板对应的文件夹中呢?具体我想请教下晕哥这个tinyalsa的移植过程是怎么样呢?
离线
@晕哥
晕哥,我刚才尝试了一下,tinyplay成功了,成功的步骤我总结了一下:
一。tinyplay移植
(1) git clone https://github.com/tinyalsa/tinyalsa.git
(2)把所有Makefile的 CC行都改成这样:
CC = $(CROSS_COMPILE)gcc
(3)把所有Makefile的改为
CROSS_COMPILE = arm-linux-gnueabihf-gcc;
使用的是静态链接,当然前提是要在电脑上安装了 :
arm-linux-gnueabihf-gcc,
安装方法:sudo apt-get install gcc-arm-linux-gnueabihf
(4)在tinyalsa文件内执行make命令
(5)接着在arm板上移植步骤如下:
1.将tinyalsa/utils/下的tinycap tinymix tinypcminfo 和tinyplay 复制到开发板的/bin目录下;
2.将tinyalsa/src下的libtinyalsa.so.1 libtinyalsa.so
libtinyalsa.so.1.1.1拷贝到开发板的/lib即可。
(6)运行tinymix 来调节音量
tinymix set 1 63
tinymix set 2 1
tinymix contents
(7)在这个之前我是已经将alsa移植过一次,不知这个会不会有影响,目前还没有测试过。
离线
@晕哥
晕哥,我想问下,我应该如何配置linx 4.13-y分支的内核才能够配置出显示屏编写程序所用到的fb0呢?想问下具体的内核配置参考步骤呢?
离线
在线
@晕哥
晕哥,现在我的板子上没有/dev/fb0,我配置了很久都没能配置出来,不知是不是v3s的lcd配置需要哪些步骤呢?
离线
在线
@晕哥
晕哥,下面是我的内核启动时的信息:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-44688-g507bd15-dirty (root@ubuntu) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #8 SMP Wed Dec 26 21:43:03 PST 2018
[ 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 with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 mtdparts=spi32766.0:1M(uboot),64k(dtb),4M(kernel),-(rootfs) rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 54464K/64036K available (5120K kernel code, 370K rwdata, 1300K rodata, 1024K init, 253K bss, 9572K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0600000 (6112 kB)
[ 0.000000] .init : 0xc0800000 - 0xc0900000 (1024 kB)
[ 0.000000] .data : 0xc0900000 - 0xc095cb40 ( 371 kB)
[ 0.000000] .bss : 0xc0962f2c - 0xc09a2514 ( 254 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 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] 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.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000210] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000459] Console: colour dummy device 80x30
[ 0.000495] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000510] pid_max: default: 32768 minimum: 301
[ 0.000639] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000655] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001251] CPU: Testing write buffer coherency: ok
[ 0.001618] /cpus/cpu@0 missing clock-frequency property
[ 0.001639] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002077] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002255] Hierarchical SRCU implementation.
[ 0.002747] smp: Bringing up secondary CPUs ...
[ 0.002762] smp: Brought up 1 node, 1 CPU
[ 0.002771] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002778] CPU: All CPU(s) started in SVC mode.
[ 0.003494] devtmpfs: initialized
[ 0.006559] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006852] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006878] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007038] pinctrl core: initialized pinctrl subsystem
[ 0.007921] random: get_random_u32 called from bucket_table_alloc+0xf0/0x23c with crng_init=0
[ 0.008062] NET: Registered protocol family 16
[ 0.008538] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009616] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009634] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.022704] SCSI subsystem initialized
[ 0.023365] usbcore: registered new interface driver usbfs
[ 0.023434] usbcore: registered new interface driver hub
[ 0.023509] usbcore: registered new device driver usb
[ 0.023792] pps_core: LinuxPPS API ver. 1 registered
[ 0.023803] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.023825] PTP clock support registered
[ 0.024055] Advanced Linux Sound Architecture Driver Initialized.
[ 0.025226] clocksource: Switched to clocksource arch_sys_counter
[ 0.035974] NET: Registered protocol family 2
[ 0.036552] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.036586] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.036610] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.036746] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036795] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037008] NET: Registered protocol family 1
[ 0.037697] RPC: Registered named UNIX socket transport module.
[ 0.037717] RPC: Registered udp transport module.
[ 0.037723] RPC: Registered tcp transport module.
[ 0.037729] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.039808] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.048590] NFS: Registering the id_resolver key type
[ 0.048644] Key type id_resolver registered
[ 0.048652] Key type id_legacy registered
[ 0.049636] random: fast init done
[ 0.049969] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.049986] io scheduler noop registered
[ 0.049993] io scheduler deadline registered
[ 0.050220] io scheduler cfq registered (default)
[ 0.050232] io scheduler mq-deadline registered
[ 0.050239] io scheduler kyber registered
[ 0.054864] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.122000] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.125455] console [ttyS0] disabled
[ 0.145685] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 0.727268] console [ttyS0] enabled
[ 0.732426] libphy: Fixed MDIO Bus: probed
[ 0.736624] CAN device driver interface
[ 0.741092] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.746965] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.752679] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.758714] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 0.768288] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.773945] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.781187] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.786853] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.794068] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.799039] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.806024] libphy: stmmac: probed
[ 0.811249] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.817908] ehci-platform: EHCI generic platform driver
[ 0.823425] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.829104] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.837068] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 0.865247] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.872418] hub 1-0:1.0: USB hub found
[ 0.876369] hub 1-0:1.0: 1 port detected
[ 0.880823] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.887115] ohci-platform: OHCI generic platform driver
[ 0.892666] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.899409] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.907345] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 0.980326] hub 2-0:1.0: USB hub found
[ 0.984148] hub 2-0:1.0: 1 port detected
[ 0.991300] usbcore: registered new interface driver usb-storage
[ 0.998539] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.007617] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.014413] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.019182] i2c /dev entries driver
[ 1.024017] IR NEC protocol handler initialized
[ 1.028675] IR RC5(x/sz) protocol handler initialized
[ 1.033726] IR RC6 protocol handler initialized
[ 1.038278] IR JVC protocol handler initialized
[ 1.042804] IR Sony protocol handler initialized
[ 1.047429] IR SANYO protocol handler initialized
[ 1.052127] IR Sharp protocol handler initialized
[ 1.056834] IR MCE Keyboard/mouse protocol handler initialized
[ 1.062658] IR XMP protocol handler initialized
[ 1.068020] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.135249] sunxi-mmc 1c0f000.mmc: base:0xc41f8000 irq:23
[ 1.185265] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.193404] mmc0: new SD card at address 88f7
[ 1.198331] sunxi-mmc 1c10000.mmc: base:0xc41fc000 irq:24
[ 1.204841] usbcore: registered new interface driver usbhid
[ 1.210509] usbhid: USB HID core driver
[ 1.215107] mmcblk0: mmc0:88f7 SU01G 943 MiB
[ 1.221775] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.229824] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.236327] mmcblk0: p1 p2
[ 1.244429] NET: Registered protocol family 17
[ 1.249040] can: controller area network core (rev 20170425 abi 9)
[ 1.255358] NET: Registered protocol family 29
[ 1.259804] can: raw protocol (rev 20170425)
[ 1.264071] can: broadcast manager protocol (rev 20170425 t)
[ 1.269770] can: netlink gateway (rev 20170425) max_hops=1
[ 1.275560] Key type dns_resolver registered
[ 1.279969] Registering SWP/SWPB emulation handler
[ 1.290645] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.302087] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.307935] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.317008] hub 3-0:1.0: USB hub found
[ 1.320903] hub 3-0:1.0: 1 port detected
[ 1.328664] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.339014] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:34:38 UTC (2078)
[ 1.347538] vcc5v0: disabling
[ 1.350513] ALSA device list:
[ 1.353477] #0: V3s Audio Codec
[ 1.359650] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.369063] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.484547] EXT4-fs (mmcblk0p2): recovery complete
[ 1.492110] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.500321] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.508222] devtmpfs: mounted
[ 1.512362] Freeing unused kernel memory: 1024K
[ 1.683684] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
mount: mounting /dev/sda1 on /mnt/udisk failed: No such file or directory
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
Welcome to Buildroot
buildroot login: root
# ls /dev/
离线
@晕哥
晕哥是不是说要能够使用显示屏的话,就首先需要在uboot里面设置启动,否则的话是没办法仅仅靠linux内核配置去配置framebuffer的呢?
离线
在线
@晕哥
晕哥,谢谢指导,确实我配置完uboot里的LCD启动之后,加上内核的配置simple framebuffer之后,再次启动内核,就出现了/dev/fb0了
离线
在线
@晕哥
前面我都uboot传递了480*272的屏幕参数。但是我的内核配置存在问题,所以我之后linux4.13-y使用了默认配置make ARCH=arm licheepi_zero_defconfig,重新编译一次,又神奇的出现了fb0了。
离线
@晕哥
晕哥,请问下是不是如果开发板没有接显示屏的话,执行cat /dev/urandom > /dev/fb0会出现如下的错误的呢?
cat: write error: No space left on device
因为我订购的屏幕暂时还没到货,我是没有接显示屏来执行该语句的,所以想请问下晕哥这是配置出错了还是没有接显示屏引起的呢?
离线
@晕哥,我使用 tinyalsa在linux 4.13-y 分支上已经可以正常播放音乐,耳机也有声音,现在换成bsp的内核,播放wav文件耳机没有声音。结束时打印这个:
# ./tinyplay 78.wav
playing '78.wav': 2 ch, 48000 hz, 16 bit
error playing sample
./tinymix contents的结果如下
# ./tinymix contents
Number of controls: 17
ctl type num name value
0 INT 1 Master Playback Volume 59 (range 0->63)
1 INT 1 Line Volume 0 (range 0->31)
2 INT 1 MIC1_G boost stage output mixer control 3 (range 0->7)
3 INT 1 MIC2_G boost stage output mixer control 3 (range 0->7)
4 INT 1 MIC1 boost AMP gain control 4 (range 0->7)
5 INT 1 MIC2 boost AMP gain control 4 (range 0->7)
6 INT 1 ADC input gain ctrl 3 (range 0->7)
7 BOOL 1 Audio headphone out On
8 BOOL 1 Audio speaker out Off
9 BOOL 1 Audio main mic Off
10 BOOL 1 Audio sub mic Off
11 ENUM 1 Audio record source , mic1mic2headsetmicmic3linein
12 BOOL 1 Audio noise reduced Off
13 BOOL 1 Audio linein Off
14 BOOL 1 Audio capture route switch Off
15 BOOL 1 Audio clear path Off
16 ENUM 1 Speaker Function , headsetspkheadset-spk
有朋友用bsp调通音乐播放了吗?
离线
@晕哥,上电启动执行
# ./tinymix contents
Number of controls: 17
ctl type num name value
0 INT 1 Master Playback Volume 0 (range 0->63)
1 INT 1 Line Volume 0 (range 0->31)
2 INT 1 MIC1_G boost stage output mixer control 3 (range 0->7)
3 INT 1 MIC2_G boost stage output mixer control 3 (range 0->7)
4 INT 1 MIC1 boost AMP gain control 4 (range 0->7)
5 INT 1 MIC2 boost AMP gain control 4 (range 0->7)
6 INT 1 ADC input gain ctrl 3 (range 0->7)
7 BOOL 1 Audio headphone out Off
8 BOOL 1 Audio speaker out Off
9 BOOL 1 Audio main mic Off
10 BOOL 1 Audio sub mic Off
11 ENUM 1 Audio record source , mic1mic2headsetmicmic3linein
12 BOOL 1 Audio noise reduced Off
13 BOOL 1 Audio linein Off
14 BOOL 1 Audio capture route switch Off
15 BOOL 1 Audio clear path Off
16 ENUM 1 Speaker Function , headsetspkheadset-spk
按照你说的执行
tinymix 1 24;tinymix 16 1;
后面是这样
Number of controls: 17
ctl type num name value
0 INT 1 Master Playback Volume 0 (range 0->63)
1 INT 1 Line Volume 24 (range 0->31)
2 INT 1 MIC1_G boost stage output mixer control 3 (range 0->7)
3 INT 1 MIC2_G boost stage output mixer control 3 (range 0->7)
4 INT 1 MIC1 boost AMP gain control 4 (range 0->7)
5 INT 1 MIC2 boost AMP gain control 4 (range 0->7)
6 INT 1 ADC input gain ctrl 3 (range 0->7)
7 BOOL 1 Audio headphone out Off
8 BOOL 1 Audio speaker out Off
9 BOOL 1 Audio main mic Off
10 BOOL 1 Audio sub mic Off
11 ENUM 1 Audio record source , mic1mic2headsetmicmic3linein
12 BOOL 1 Audio noise reduced Off
13 BOOL 1 Audio linein Off
14 BOOL 1 Audio capture route switch Off
15 BOOL 1 Audio clear path Off
16 ENUM 1 Speaker Function headset, spkheadset-spk
播放文件:
# ./tinyplay 78.wav
playing '78.wav': 2 ch, 48000 hz, 16 bit
耳机还是没有声音呢
离线
# ./tinymix set 1 24;./tinymix set 16 1;./tinyplay 78.wav
playing '78.wav': 2 ch, 48000 hz, 16 bit
#
还是一样,没有声音。
另外。我发现第7项跟第8项好像是开关,我尝试着去打开它,好像还是没有声音
离线
BSP 如何玩声卡呢?
离线
谢谢大神们的解答!
离线
@晕哥,上电启动执行
# ./tinymix contents
Number of controls: 17
ctl type num name value
0 INT 1 Master Playback Volume 0 (range 0->63)
1 INT 1 Line Volume 0 (range 0->31)
2 INT 1 MIC1_G boost stage output mixer control 3 (range 0->7)
3 INT 1 MIC2_G boost stage output mixer control 3 (range 0->7)
4 INT 1 MIC1 boost AMP gain control 4 (range 0->7)
5 INT 1 MIC2 boost AMP gain control 4 (range 0->7)
6 INT 1 ADC input gain ctrl 3 (range 0->7)
7 BOOL 1 Audio headphone out Off
8 BOOL 1 Audio speaker out Off
9 BOOL 1 Audio main mic Off
10 BOOL 1 Audio sub mic Off
11 ENUM 1 Audio record source , mic1mic2headsetmicmic3linein
12 BOOL 1 Audio noise reduced Off
13 BOOL 1 Audio linein Off
14 BOOL 1 Audio capture route switch Off
15 BOOL 1 Audio clear path Off
16 ENUM 1 Speaker Function , headsetspkheadset-spk
按照你说的执行
tinymix 1 24;tinymix 16 1;
后面是这样
Number of controls: 17
ctl type num name value
0 INT 1 Master Playback Volume 0 (range 0->63)
1 INT 1 Line Volume 24 (range 0->31)
2 INT 1 MIC1_G boost stage output mixer control 3 (range 0->7)
3 INT 1 MIC2_G boost stage output mixer control 3 (range 0->7)
4 INT 1 MIC1 boost AMP gain control 4 (range 0->7)
5 INT 1 MIC2 boost AMP gain control 4 (range 0->7)
6 INT 1 ADC input gain ctrl 3 (range 0->7)
7 BOOL 1 Audio headphone out Off
8 BOOL 1 Audio speaker out Off
9 BOOL 1 Audio main mic Off
10 BOOL 1 Audio sub mic Off
11 ENUM 1 Audio record source , mic1mic2headsetmicmic3linein
12 BOOL 1 Audio noise reduced Off
13 BOOL 1 Audio linein Off
14 BOOL 1 Audio capture route switch Off
15 BOOL 1 Audio clear path Off
16 ENUM 1 Speaker Function headset, spkheadset-spk播放文件:
# ./tinyplay 78.wav
playing '78.wav': 2 ch, 48000 hz, 16 bit
耳机还是没有声音呢
这位兄弟问题解决了吗?我也遇和你一样的问题?大神们有办法吗
如何录音播放声音?
离线
V3s linux 5.4 没办法录音
#
# tinymix set 11 1
#
# tinymix contents
Number of controls: 13
ctl type num name value
0 INT 1 DAC Playback Volume 63 (range 0->63)
1 INT 1 Headphone Playback Volume 63 (range 0->63)
2 BOOL 2 Headphone Playback Switch On, On
3 INT 1 Mic1 Playback Volume 3 (range 0->7)
4 INT 1 Mic1 Boost Volume 7 (range 0->7)
5 INT 1 ADC Gain Capture Volume 7 (range 0->7)
6 BOOL 2 DAC Playback Switch On, On
7 BOOL 2 DAC Reversed Playback Switch On, On
8 BOOL 2 Mic1 Playback Switch On, On
9 BOOL 2 Mixer Capture Switch On, On
10 BOOL 2 Mixer Reversed Capture Switch On, On
11 BOOL 2 Mic1 Capture Switch On, On
12 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
#
# tinycap /opt/x.wav -t 2
Capturing sample: 2 ch, 48000 hz, 16 bit
Error capturing sample
Captured 4294967295 frames
离线