分享

(1)Raspberry Pi 音频设置

 书剑阁2013 2015-05-30
Raspberry <wbr>Pi <wbr>音频设置

安装声音服务
sudo apt-get install alsa-utils
加载驱动
sudo modprobe snd_bcm2835

编译DEMO
cd /opt/vc/src/hello_pi/
./rebuild.sh

测试DEMO
cd hello_audio

3.5毫米输出
./hello_audio.bin
HDMI输出
./hello_audio.bin 1

=============================================================

命令行播放器:
sudo apt-get install mplayer
GUI播放器:
sudo apt-get install smplayer
播放MP3
mplayer -ao alsa test.mp3

=============================================================

调节音量
GUI模式
alsamixer
命令行模式
amixer
amixer sset PCM 80%

amixer --help
Usage: amixer [command]
Available options:
-h,--help       this help
-c,--card N     select the card
-D,--device N   select the device, default 'default'
-d,--debug      debug mode
-n,--nocheck    do not perform range checking
-v,--version    print version of this program
-q,--quiet      be quiet
-i,--inactive   show also inactive controls
-a,--abstract L select abstraction level (none or basic)
-s,--stdin      Read and execute commands from stdin sequentially
Available commands:
scontrols       show all mixer simple controls
scontents       show contents of all mixer simple controls (default command)
sset sID P      set contents for one mixer simple control
sget sID        get contents for one mixer simple control
controls        show all controls for given card
contents        show contents of all controls for given card
cset cID P      set control contents for one control
cget cID        get control contents for one control

=============================================================

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章