嗨,最近我在arm底下调试鑫创的SSS1629 USB声卡,但是系统起来以后kernel创建了单声道的MIC control设备,使用amixer列出 control设备 如下:
# amixer controls
numid=2,iface=MIXER,name='Mic Playback Switch'
numid=3,iface=MIXER,name='Mic Playback Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=7,iface=MIXER,name='Mic Capture Volume'
numid=4,iface=MIXER,name='Speaker Playback Switch'
numid=5,iface=MIXER,name='Speaker Playback Volume'
numid=1,iface=PCM,name='Playback Channel Map'
#
当前的问题是,我USB声卡电路设置的是LineIn 立体声模式而非Mic,单声道,但是系统将声卡识别成单声道Mic设备了,这个问题导致了我用amixer 命令设置采集音量和播放音量时都没效果
各个control设备的信息如下
# amixer contents
numid=2,iface=MIXER,name='Mic Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=3,iface=MIXER,name='Mic Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=496,step=0
: values=496
| dBminmax-min=0.00dB,max=31.00dB
numid=6,iface=MIXER,name='Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=7,iface=MIXER,name='Mic Capture Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=496,step=0
: values=496
| dBminmax-min=0.00dB,max=31.00dB
numid=4,iface=MIXER,name='Speaker Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=5,iface=MIXER,name='Speaker Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=1008,step=0
: values=848,848
| dBminmax-min=-63.00dB,max=0.00dB
numid=1,iface=PCM,name='Playback Channel Map'
; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
: values=0,0
| container
| chmap-fixed=FL,FR
#
设置采集的音量
amixer cset numid=7,iface=MIXER,name='Mic Capture Volume' 100,100
设置播放的音量
amixer cset numid=3,iface=MIXER,name='Mic Playback Volume' 100,100
但是设置过后都没有效果,因为现在声卡使用的模式是LineIn的,查找很多资料都没找到怎么修改这个问题,有谁懂得能指导下吗?
还有我发现别人使用一下指令查找的control设备跟我的都不太一样
[root@FORLINX6410]# amixer scontrols
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone Mixer Aux',0
Simple mixer control 'Headphone Mixer Beep',0
Simple mixer control 'Headphone Playback ZC',0
Simple mixer control 'Tone',0
Simple mixer control 'Tone Cut-off',0
Simple mixer control 'Bass',0
Simple mixer control 'Bass Control',0
Simple mixer control 'Bass Cut-off',0
Simple mixer control 'PCM',0
Simple mixer control 'Sidetone Mux',0
Simple mixer control 'Line In',0-----------(这里是设置Line-in的音量的参数,同以上设置Line-in音量功能相同)
Simple mixer control 'Mic 1',0
Simple mixer control 'Mic 1 Preamp',0
Simple mixer control 'Mic 2',0
Simple mixer control 'Mic 2 Preamp',0
Simple mixer control 'Mic A Source',0
Simple mixer control 'Mic B Source',0
。。。
Simple mixer control 'Left Capture Source',0 (这项很重要,左声道音频源输入选择)
Simple mixer control 'Right Capture Source',0 (右声道音频源输入选择)
在我的ARM板子上执行amixer scontrols 确只有两个 ,没有看到LineIn的相关control
# amixer scontrols
Simple mixer control 'Speaker',0
Simple mixer control 'Mic',0
#