手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Raspberry Pi(树莓派)声音输出的设置

[日期:2013-10-05] 来源:CSDN  作者:蒋国宝 [字体: ]

Raspberry Pi(树莓派)声音输出可以设置为自动,耳机输出,从HDMI输出三种,默认为自动

pi@aborn ~ $ sudo apt-get install alsa-utils
pi@aborn ~ $ sudo modprobe snd-bcm2835    #把声音模块加入内核
pi@aborn ~ $ sudo aplay /usr/share/sounds/alsa/Front_Center.wav
pi@aborn /opt/vc $ sudo amixer cset numid=3 2
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=2
pi@aborn /opt/vc $ sudo aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
pi@aborn /opt/vc $ sudo amixer cset numid=3
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=0
pi@aborn /opt/vc $ sudo amixer cset numid=3 1
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=1

values取不同的值分别代表:
0=auto(自动), 1=headphones(耳机), 2=hdmi

 

我发现播放视频的时候非常消耗cpu资源

参考:http://raspberrypi.stackexchange.com/questions/44/why-is-my-audio-sound-output-not-working

推荐阅读:

Raspberry Pi 树莓派搭LAMP服务器 http://www.linuxidc.com/Linux/2013-06/86687.htm

在树莓派Raspberry Pi上安装游戏模拟器 http://www.linuxidc.com/Linux/2013-07/86842.htm

Raspberry Pi 树莓派上安装Weston http://www.linuxidc.com/Linux/2013-06/86685.htm

用于Raspberry Pi 的Linux 操作系统已经可用 http://www.linuxidc.com/Linux/2012-03/56058.htm

Raspberry Pi(树莓派)试用小记 http://www.linuxidc.com/Linux/2013-10/91008.htm

Raspberry Pi(树莓派)的安装、配置IP及软件源等入门 http://www.linuxidc.com/Linux/2013-10/91009.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款