#!/bin/sh
amixer: Unable to find simple control 'PCM Playback',0
#.....................
amixer cset name='Capture Volume' 100,100
#PCM
amixer sset 'PCM Playback' on
amixer sset 'Playback' 255
amixer sset 'Right Output Mixer PCM' on
amixer sset 'Left Output Mixer PCM' on
#ADC PCM
amixer sset 'ADC PCM' 200
#....../................................................/......
#Turn on Headphone
amixer sset 'Headphone Playback ZC' on
#Set the volume of your headphones(98% volume...127 is the MaxVolume)
amixer sset Headphone 125,125
#Turn on the speaker
amixer sset 'Speaker Playback ZC' on
#Set the volume of your Speaker(98% volume...127 is the MaxVolume)
amixer sset Speaker 125,125
#Set the volume of your Speaker AC(80% volume...100 is the MaxVolume)
amixer sset 'Speaker AC' 4
#Set the volume of your Speaker AC(80% volume...5 is the MaxVolume)
amixer sset 'Speaker DC' 4
#..............................
#Turn on Left Input Mixer Boost
amixer sset 'Left Input Mixer Boost' off
amixer sset 'Left Boost Mixer LINPUT1' off
amixer sset 'Left Input Boost Mixer LINPUT1' 0
amixer sset 'Left Boost Mixer LINPUT2' off
amixer sset 'Left Input Boost Mixer LINPUT2' 0
#Turn off Left Boost Mixer LINPUT3
amixer sset 'Left Boost Mixer LINPUT3' off
amixer sset 'Left Input Boost Mixer LINPUT3' 0
运行所给案例 发现始终出现
amixer: Unable to find simple control 'PCM Playback',0 ----该问题
之后去理解--查看alsa的声卡配置信息
amixer scontents
使用该命令--查看配置值设置的范围
amixer scontrols
查看有哪些配置项
最终修改.sh文件
#!/bin/sh
#.....................
amixer cset name='Capture Volume' 100,100
#PCM
amixer sset 'PCM Playback -6dB' on
amixer sset 'Playback' 255
amixer sset 'Right Output Mixer PCM' on
amixer sset 'Left Output Mixer PCM' on
#ADC PCM
amixer sset 'ADC PCM' 200
#....../................................................/......
#Turn on Headphone
amixer sset 'Headphone Playback ZC' on
#Set the volume of your headphones(98% volume...127 is the MaxVolume)
amixer sset Headphone 125,125
#Turn on the speaker
amixer sset 'Speaker Playback ZC' on
#Set the volume of your Speaker(98% volume...127 is the MaxVolume)
amixer sset Speaker 125,125
#Set the volume of your Speaker AC(80% volume...100 is the MaxVolume)
amixer sset 'Speaker AC' 4
#Set the volume of your Speaker AC(80% volume...5 is the MaxVolume)
amixer sset 'Speaker DC' 4
#..............................
#Turn on Left Input Mixer Boost
amixer sset 'Left Input Mixer Boost' off
amixer sset 'Left Boost Mixer LINPUT1' off
amixer sset 'Left Input Boost Mixer LINPUT1' 0
amixer sset 'Left Boost Mixer LINPUT2' off
amixer sset 'Left Input Boost Mixer LINPUT2' 0
#Turn off Left Boost Mixer LINPUT3
amixer sset 'Left Boost Mixer LINPUT3' off
amixer sset 'Left Input Boost Mixer LINPUT3' 0