{"id":4146,"date":"2012-11-08T21:51:11","date_gmt":"2012-11-08T13:51:11","guid":{"rendered":"http:\/\/jpuyy.com\/?p=4146"},"modified":"2013-03-20T21:14:48","modified_gmt":"2013-03-20T13:14:48","slug":"linux-beep","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=4146","title":{"rendered":"linux beep\u8702\u9e23\u58f0"},"content":{"rendered":"<p>\u516c\u53f8\u642c\u5bb6\u5f97\u5230\u4e00\u53f0\u8001IBM\u7b14\u8bb0\u672c\uff0c\u5404\u79cd\u6298\u817e\uff0c\u4eca\u5929\u6298\u817e\u4e00\u4e0b\u8702\u9e23\u58f0\u3002<\/p>\n<p>\u6709\u65f6\u5019\u6309tab\u8865\u5168\uff0cvim\u8f93\u5165\u9519\u8bef\u7b49\u90fd\u4f1a\u542c\u5230\u8fd9\u6837\u7684\u62a5\u8b66\u58f0\uff0c\u5f88\u96be\u542c\uff0c\u5982\u679c\u60f3\u5173\u6389\u5b83\uff0c<\/p>\n<p>\u4e34\u65f6\u5173\u95ed<\/p>\n<p>debian:<\/p>\n<pre> $sudo rmmod pcspkr<\/pre>\n<p>centos\u4ee5root\u6267\u884c<\/p>\n<pre> #rmmod pcspkr<\/pre>\n<p>\u6c38\u4e45\u5173\u95ed<\/p>\n<p>debian:<\/p>\n<pre> $sudo echo \"blacklist pcspkr\" &gt;&gt; \/etc\/modprobe.d\/blacklist<\/pre>\n<p>centos\u4ee5root\u6267\u884c\uff1a<\/p>\n<pre> #echo \"alias pcspkr off\" &gt;&gt; \/etc\/modprobe.conf<\/pre>\n<p>\u4e0d\u5173\u95ed\u5c31\u53ef\u4ee5\u7528beep\u6765\u505a\u4e00\u4e9b\u6709\u610f\u601d\u7684\u8b66\u544a\u4e86\uff0c\u751a\u81f3\u628a\u8b66\u544a\u53d8\u4e3amusic<\/p>\n<pre>apt-get install beep<\/pre>\n<p>\u52a0\u8f7d\u9a71\u52a8\uff1a<\/p>\n<pre> modprobe pcspkr<\/pre>\n<p>\u901a\u8fc7beep\u6765\u64cd\u4f5c\uff08\u4f1a\u542c\u5230\u5600\u4e00\u58f0\uff09\uff1a<\/p>\n<pre> beep -f 1000<\/pre>\n<p>\u4ee5\u4e0b\u201c\u97f3\u4e50\u201d\u6458\u81ea<br \/>\n<a href=\"http:\/\/kirrus.co.uk\/2010\/09\/linux-beep-music\/\">http:\/\/kirrus.co.uk\/2010\/09\/linux-beep-music\/<\/a><\/p>\n<p>beep -f 1000 -n -f 1500 -n -f 600 -n -f 500 -n -f 100 -r 2 -l 10 -n -f 50 -r 2 -l 200 -n -f 40 -r 2 -l 300 -n -f 60 -r 3 -n -f 50 -r 3<\/p>\n<p>\u661f\u7403\u5927\u6218\u7684\u7ecf\u5178\u94c3\u58f0\uff1a<\/p>\n<p>beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 -f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 466.16 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 587.32 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 300 -f 392.00 -D 150 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 392<\/p>\n<p>&#8211;add by jpuyy@2013\u5e7403\u670820\u65e5<\/p>\n<p>\u89e3\u51b3linux\u64ad\u653e\u97f3\u4e50\u4e0d\u51fa\u58f0\u7684\u95ee\u9898<\/p>\n<p>\u60f3\u7528\u8fd9\u53f0\u8001\u672c\u653e\u97f3\u4e50\uff0c\u4f46\u662f\u6bcf\u6b21\u90fd\u4e0d\u51fa\u58f0\uff0c\u5b89\u88c5\u597d\u4e86alsa\uff0c\u4f7f\u7528lsmod\u67e5\u770b\u80fd\u770b\u5230\u58f0\u5361\u3002\u56f0\u6270\u5f88\u4e45\uff0c\u540e\u6765\u67e5\u5230\u4e00\u7bc7\u6587\u7ae0\uff0c<a href=\"http:\/\/xghe110.blog.51cto.com\/337884\/65713\">http:\/\/xghe110.blog.51cto.com\/337884\/65713<\/a>\u00a0\u67e5\u5230\u539f\u6765alsamixer\u9ed8\u8ba4\u662f\u4e0d\u51fa\u58f0\u7684\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<p>1. root\u7528\u6237\u8f93\u5165 #alsamixer\uff0c\u5728\u754c\u9762\u4e2d\uff0c\u5de6\u53f3\u65b9\u5411\u952e\u9009\u62e9\u58f0\u9053\uff0c\u4e0a\u4e0b\u65b9\u5411\u9009\u62e9\u5927\u5c0f\u3002\uff08\u5173\u952e\uff09\u6309m\u6253\u5f00\u5bf9\u5e94\u7684\u58f0\u9053\u3002<\/p>\n<p>2. \u8f93\u5165# alsactl store \u4fdd\u5b58\u5f53\u524d\u7684\u914d\u7f6e\u3002<\/p>\n<p>3. \u5728\/etc\/rc.local\u4e2d\u52a0\u5165\u00a0alsactl restore\uff0c\u4e0b\u6b21\u91cd\u542f\u540e\u81ea\u52a8\u8f7d\u5165\u5f53\u524d\u7684alsa\u914d\u7f6e\u3002<\/p>\n<p>\u8fd9\u65f6\uff0c\u901a\u8fc7mpg321\uff0cmplayer\uff0cmocp\u6765\u64ad\u653e\u97f3\u4e50\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u516c\u53f8\u642c\u5bb6\u5f97\u5230\u4e00\u53f0\u8001IBM\u7b14\u8bb0\u672c\uff0c\u5404\u79cd\u6298\u817e\uff0c\u4eca\u5929\u6298\u817e\u4e00\u4e0b\u8702\u9e23\u58f0\u3002 \u6709\u65f6\u5019\u6309tab\u8865\u5168\uff0cvim\u8f93\u5165\u9519\u8bef\u7b49\u90fd\u4f1a\u542c\u5230\u8fd9\u6837\u7684\u62a5\u8b66\u58f0\uff0c\u5f88\u96be\u542c\uff0c\u5982\u679c\u60f3\u5173\u6389\u5b83\uff0c \u4e34\u65f6\u5173\u95ed debian: $sudo rmmod pcspkr centos\u4ee5root\u6267\u884c #rmmod pcspkr \u6c38\u4e45\u5173\u95ed debian: $sudo echo &#8220;blacklist pcspkr&#8221; &gt;&gt; \/etc\/modprobe.d\/blacklist centos\u4ee5root\u6267\u884c\uff1a #echo &#8220;alias pcspkr off&#8221; &gt;&gt; \/etc\/modprobe.conf \u4e0d\u5173\u95ed\u5c31\u53ef\u4ee5\u7528beep\u6765\u505a\u4e00\u4e9b\u6709\u610f\u601d\u7684\u8b66\u544a\u4e86\uff0c\u751a\u81f3\u628a\u8b66\u544a\u53d8\u4e3amusic apt-get install beep \u52a0\u8f7d\u9a71\u52a8\uff1a modprobe pcspkr \u901a\u8fc7beep\u6765\u64cd\u4f5c\uff08\u4f1a\u542c\u5230\u5600\u4e00\u58f0\uff09\uff1a beep -f 1000 \u4ee5\u4e0b\u201c\u97f3\u4e50\u201d\u6458\u81ea http:\/\/kirrus.co.uk\/2010\/09\/linux-beep-music\/ beep -f 1000 -n -f 1500 -n -f 600 -n -f 500 -n -f 100 -r 2 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-4146","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4146"}],"version-history":[{"count":8,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4146\/revisions"}],"predecessor-version":[{"id":4155,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4146\/revisions\/4155"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}