amixer做的相关配置
# amixer contents
numid=25,iface=MIXER,name='Headphone Source Playback Route'
; type=ENUMERATED,access=rw------,values=2,items=2
; Item #0 'DAC'
; Item #1 'Mixer'
: values=0,0
numid=3,iface=MIXER,name='Headphone Playback Switch'
; type=BOOLEAN,access=rw------,values=2
: values=off,off
numid=2,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=63,step=0
: values=0
| dBscale-min=-63.00dB,step=1.00dB,mute=1
numid=5,iface=MIXER,name='FM In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=4,iface=MIXER,name='Line In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=7,iface=MIXER,name='Mic Boost Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=4
| dBrange-
rangemin=0,,rangemax=0
| dBscale-min=0.00dB,step=0.00dB,mute=0
rangemin=1,,rangemax=7
| dBscale-min=24.00dB,step=3.00dB,mute=0
numid=6,iface=MIXER,name='Mic In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=3
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=13,iface=MIXER,name='ADC Mixer Left FM In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=10,iface=MIXER,name='ADC Mixer Left Out Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=11,iface=MIXER,name='ADC Mixer Line In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=14,iface=MIXER,name='ADC Mixer Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=12,iface=MIXER,name='ADC Mixer Right FM In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=9,iface=MIXER,name='ADC Mixer Right Out Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=8,iface=MIXER,name='ADC Capture Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=3
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=1,iface=MIXER,name='DAC Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=63,step=0
: values=62
| dBscale-min=-73.08dB,step=1.16dB,mute=0
numid=17,iface=MIXER,name='Left Mixer FM In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=16,iface=MIXER,name='Left Mixer Left DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=18,iface=MIXER,name='Left Mixer Line In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=19,iface=MIXER,name='Left Mixer Mic In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=15,iface=MIXER,name='Left Mixer Right DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=22,iface=MIXER,name='Right Mixer FM In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=20,iface=MIXER,name='Right Mixer Left DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=23,iface=MIXER,name='Right Mixer Line In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=24,iface=MIXER,name='Right Mixer Mic In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=21,iface=MIXER,name='Right Mixer Right DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
使用播放命名播放音乐
# aplay on_phone.wav
Playing WAVE 'on_phone.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
#
我在OUT+和OUT-两端接了一个4W喇叭
这是一首5秒的音乐,播放时间是正常的,但是没有声音
最近编辑记录 秦皇岛岛主 (2020-09-16 20:57:58)
离线
改成这样,可以播放了
# amixer contents
numid=25,iface=MIXER,name='Headphone Source Playback Route'
; type=ENUMERATED,access=rw------,values=2,items=2
; Item #0 'DAC'
; Item #1 'Mixer'
: values=0,0
numid=3,iface=MIXER,name='Headphone Playback Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=2,iface=MIXER,name='Headphone Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=63,step=0
: values=63
| dBscale-min=-63.00dB,step=1.00dB,mute=1
numid=5,iface=MIXER,name='FM In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=4,iface=MIXER,name='Line In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=0
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=7,iface=MIXER,name='Mic Boost Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=4
| dBrange-
rangemin=0,,rangemax=0
| dBscale-min=0.00dB,step=0.00dB,mute=0
rangemin=1,,rangemax=7
| dBscale-min=24.00dB,step=3.00dB,mute=0
numid=6,iface=MIXER,name='Mic In Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=3
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=13,iface=MIXER,name='ADC Mixer Left FM In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=10,iface=MIXER,name='ADC Mixer Left Out Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=11,iface=MIXER,name='ADC Mixer Line In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=14,iface=MIXER,name='ADC Mixer Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=12,iface=MIXER,name='ADC Mixer Right FM In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=9,iface=MIXER,name='ADC Mixer Right Out Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=8,iface=MIXER,name='ADC Capture Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
: values=3
| dBscale-min=-4.50dB,step=1.50dB,mute=0
numid=1,iface=MIXER,name='DAC Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=63,step=0
: values=63
| dBscale-min=-73.08dB,step=1.16dB,mute=0
numid=17,iface=MIXER,name='Left Mixer FM In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=16,iface=MIXER,name='Left Mixer Left DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=18,iface=MIXER,name='Left Mixer Line In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=19,iface=MIXER,name='Left Mixer Mic In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=15,iface=MIXER,name='Left Mixer Right DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=22,iface=MIXER,name='Right Mixer FM In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=20,iface=MIXER,name='Right Mixer Left DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=23,iface=MIXER,name='Right Mixer Line In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=24,iface=MIXER,name='Right Mixer Mic In Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=21,iface=MIXER,name='Right Mixer Right DAC Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
离线
如何使用tiny200 录音和放音(内容虽然简单,献给向我一样的小白)
0. 在OUT+和OUT-两端接一个小喇叭
1. 在buildroot中打开tinyalsa(aodzip大佬推荐tinyalsa,tinyalsa用起来确实比较简单)
2. 使用tinyalsa的tinymix配置输入输出通道和音量,效果如下
# tinymix contents
Number of controls: 25
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 Line In Playback Volume 0 (range 0->7)
4 INT 1 FM In Playback Volume 0 (range 0->7)
5 INT 1 Mic In Playback Volume 3 (range 0->7)
6 INT 1 Mic Boost Volume 4 (range 0->7)
7 INT 1 ADC Capture Volume 3 (range 0->7)
8 BOOL 1 ADC Mixer Right Out Capture Switch Off
9 BOOL 1 ADC Mixer Left Out Capture Switch Off
10 BOOL 1 ADC Mixer Line In Capture Switch Off
11 BOOL 1 ADC Mixer Right FM In Capture Switch Off
12 BOOL 1 ADC Mixer Left FM In Capture Switch Off
13 BOOL 1 ADC Mixer Mic Capture Switch On
14 BOOL 1 Left Mixer Right DAC Playback Switch Off
15 BOOL 1 Left Mixer Left DAC Playback Switch Off
16 BOOL 1 Left Mixer FM In Playback Switch Off
17 BOOL 1 Left Mixer Line In Playback Switch Off
18 BOOL 1 Left Mixer Mic In Playback Switch Off
19 BOOL 1 Right Mixer Left DAC Playback Switch Off
20 BOOL 1 Right Mixer Right DAC Playback Switch Off
21 BOOL 1 Right Mixer FM In Playback Switch Off
22 BOOL 1 Right Mixer Line In Playback Switch Off
23 BOOL 1 Right Mixer Mic In Playback Switch Off
24 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
3. 测试播放成功
# tinyplay on_phone.wav
playing 'on_phone.wav': 2 ch, 48000 hz, 16 bit
#
测试录音成功
#tinycap 1.wav -d 0 -c 1 -r 44100 -b 16
离线