Differences between revisions 9 and 32 (spanning 23 versions)
Revision 9 as of 2004-12-19 08:19:28
Size: 4306
Editor: anonymous
Comment:
Revision 32 as of 2020-05-14 13:23:14
Size: 4068
Editor: PaulWise
Comment: freedb.org is shutting down
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Auto-converted by kwiki2moinmoin v2005-10-07
["Hardware"]>["Sound"]>
#language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/SoundConfiguration|Français]] - [[it/SoundConfiguration|Italiano]] -~
Line 4: Line 4:
To listen to sound (["Ogg"], [["MP3"]], .au files, !["CDs"] etc) on your sound card, you need to: [[Hardware]] > [[Sound]]
----
To listen to sound (Ogg, [[MP3]], .au files, CDs etc.) on your [[SoundCard|sound card]], you need to:
Line 6: Line 8:
 * Run a ["kernel"] with the correct sound drivers for your sound card (information about ["PCI"]-soundcards can be found if you run '/sbin/lspci' or in the boot-messages ('/bin/dmesg')). The PC sound cars are Sound Blaste compatible.  * Run a [[Kernel|kernel]] with the correct sound drivers for your sound card (See [[SoundCard]] for information about your sound cards). The PC sound cards are Sound Blaster compatible.
Line 8: Line 10:
 * Load the required ["module"]s for your soundcard if using a modular kernel  * Load the required modules for your sound card if using a modular kernel.
Line 10: Line 12:
 * Install sound ["package"]s. To configure the sound, you can use ["sndconfig"].  * Install sound packages.
Line 12: Line 14:
You can install too eg [http://freshmeat.net/browse/113/?topic_id=113 Sound/Audio apps] or [http://www.underbit.com/products/mad/#using wiki:Self:MAD apps using], 'xfreecd' (music CD playing software), 'mp3blaster' (full-screen console mp3-player), or 'saytime' (if you have no CD drive and no !["MP3s"]). Try to run them as root (it should work). With Debian, ordinary users lack permission to read the CD drive and write to the audio device (usually /dev/dsp), and they probably can't use these programs (yet; see next paragraph).  * To configure alsa, you might have to run {{{alsactl init}}} as root.
Line 14: Line 16:
 * Use 'adduser USER_NAME audio' to allow a specific user to write to the /dev/dsp, /dev/mixer and /dev/audio devices and thus output sound from the soundcard; note: the user needs to log off and on again for such changes to take effect! This is the recommended way to allow a user to play audio. If, instead, you changed the permissions of the /dev/audio etc devices to make them accessible to anyone, that would open a security hole because you would be allowing any trojan to read the microphone device. You can install too e.g. [[http://freshmeat.net/browse/113/?topic_id=113|Sound/Audio apps]] or [[http://www.underbit.com/products/mad/#using|Applications using MAD]], 'xfreecd' (music CD playing software), 'mp3blaster' (full-screen console mp3-player), or 'saytime' (if you have no CD drive and no [[MP3|MP3s]]). Try to run them as root (it should work). With Debian, ordinary users lack permission to read the CD drive and write to the audio device (usually {{{/dev/dsp}}}), and they probably can't use these programs (yet; see next paragraph).
Line 16: Line 18:
 * To allow some users to play music !["CDs"] on the ["CDROM"] drive: 'ls -al /dev/cdrom' to check which special file /dev/cdrom is a symbolic link to. If it is hdc, then do: 'chgrp cdrom /dev/hdc' or if it is something else (i.e. /dev/scd0) do the corresponding thing. Then do 'addgroup USER_ID cdrom' to allow the user to play music ["CDs"]. Changing the group of /dev/hdc (or hdb or whatever) is necessary, because otherwise you would need to add the user to group disk, which is bad for security.  * Use '{{{adduser USER_NAME audio}}}' to allow a specific user to write to the {{{/dev/dsp}}}, {{{/dev/mixer}}} and {{{/dev/audio}}} devices and thus output sound from the soundcard; note: the user needs to log off and on again for such changes to take effect! This is the recommended way to allow a user to play audio. If, instead, you changed the permissions of the {{{/dev/audio}}} etc devices to make them accessible to anyone, that would open a security hole because you would be allowing any trojan to read the microphone device.
Line 18: Line 20:
 * If you run ["xfreecd"], remember to change the default CDDB server on the 'xfreecd' software from 'cddb.cddb.com' to 'freedb.freedb.org'. This is best done by directly editing the '.xfreecdrc' file in the home directories of the users who use the program.  * better is to add your user to the audio group
Line 20: Line 22:
Related Links:
 * ["SoundFAQ"]
 * ["GnomeSoundConfiguration"].
[http://www.timead.net/zgjs.html 窄告]
[http://www.timead.net/1 窄告]
[http://www.16safe.com/qiche/anquan.htm 轮胎安全]
[http://www.16safe.com/qiche/znjc.htm 智能监测]
[http://www.16safe.com/qiche/luntai.htm 轮胎防爆]
[http://www.16safe.com/qiche/qiche.htm 汽车轮胎]
[http://www.ltjz2000.com/zhentan.htm 私人侦探]
[http://www.ltjz2000.com/sj.htm 私家侦探]
[http://www.ltjz2000.com/xunren.htm 寻人]
[http://www.ltjz2000.com/hydc.htm 婚姻调查]
[http://www.ltjz2000.com/dc.htm 调查]
[http://www.ltjz2000.com/zhentan.htm 侦探]
[http://www.ltjz2000.com/sj.htm 北京私家侦探]
[http://www.ltjz2000.com/dc.htm 调查公司]
[http://www.etoo.cn/zhaigao 窄告]
[http://www.etoo.cn/zjtg 主机托管]
[http://www.etoo.cn/sports 健身器材]
[http://www.etoo.cn/sports 健康器材]
[http://www.etoo.cn/sports 体育器材]
[http://www.etoo.cn/stadium 场馆设备]
[http://www.etoo.cn/stadium 跑步机]
[http://www.etoo.cn/21win-win 拓展训练]
[http://www.wjmgy.com 脉管炎]
[http://www.wjmgy.com/1 脉管炎]
[http://www.wjmgy.com/hospitaljs.htm 脉管炎]
[http://www.wjmgy.com/zhuankejs.htm 脉管炎]
[http://www.wjmgy.com/zhuzhiys.htm 脉管炎]
[http://www.wjmgy.com/conact.htm 脉管炎]
[http://sinodragon.freewebpage.org 网站推广]
[http://sinodragon.freewebpage.org 北京网站推广]
 * To allow some users to play music CDs on the CDROM drive: '{{{ls -al /dev/cdrom}}}' to check which special file {{{/dev/cdrom}}} is a symbolic link to. If it is {{{hdc}}}, then do: '{{{chgrp cdrom /dev/hdc}}}' or if it is something else (e.g. {{{/dev/scd0}}}) do the corresponding thing. Then do '{{{adduser USER_ID cdrom}}}' to allow the user to play music CDs. Changing the group of {{{/dev/hdc}}} (or {{{hdb}}} or whatever) is necessary, because otherwise you would need to add the user to group disk, which is bad for security.

 * If you run xfreecd, remember to change the default CDDB server on the 'xfreecd' software from 'cddb.cddb.com' to 'gnudb.gnudb.org'. This is best done by directly editing the '{{{.xfreecdrc}}}' file in the home directories of the users who use the program.

== Testing ==
 * {{{speaker-test}}} - command-line speaker test tone generator for ALSA



== Alsa / OSS ==
There are two main projects, that aim to provide sound drivers in Linux.

 ALSA :: [[ALSA]] is the main current set of sound drivers in Linux. It provide some modules ({{{snd-mixer-oss}}}, {{{snd-mixer-pcm}}}, {{{snd-mixer-seq}}}) to emulate OSS with legacy application.

 OSS :: [[OSS]] was the original sound drivers.

To switch between ALSA and OSS, you should run:
 {{{dpkg-reconfigure linux-sound-base}}}
(see {{{/usr/share/doc/linux-sound-base/README.Debian}}})

=== ALSA ===
Some useful commands:
 * {{{alsactl store}}}/{{{alsactl restore}}} - save/restore the volume settings (this is normally performed on shutdown/boot)

The documentation is in {{{/usr/share/doc/alsa-base}}} (as usually!)

== Unix Group ==

If you notice that a user starts up Gnome and receives a message about Audio not working the likely cause is that the user is not in group audio (only the initialy created user is in the {{{audio}}} group by default). You need to:
{{{
  # adduser john audio
}}}

Next time user john logs on they will be able to use the audio device.

See also:
 [[DebianMan:8/adduser|adduser(8)]].


== See Also ==
 * [[SoundCard]] - supported sound cards
 * [[ALSA]]
 * [[SoundFAQ]]
 * [[http://www.linuxjournal.com/article/6809|Configuring your laptop for Gnome and sound]].

----
CategorySound

Translation(s): English - Français - Italiano


Hardware > Sound


To listen to sound (Ogg, ?MP3, .au files, CDs etc.) on your sound card, you need to:

  • Run a kernel with the correct sound drivers for your sound card (See SoundCard for information about your sound cards). The PC sound cards are Sound Blaster compatible.

  • Load the required modules for your sound card if using a modular kernel.
  • Install sound packages.
  • To configure alsa, you might have to run alsactl init as root.

You can install too e.g. Sound/Audio apps or Applications using MAD, 'xfreecd' (music CD playing software), 'mp3blaster' (full-screen console mp3-player), or 'saytime' (if you have no CD drive and no ?MP3s). Try to run them as root (it should work). With Debian, ordinary users lack permission to read the CD drive and write to the audio device (usually /dev/dsp), and they probably can't use these programs (yet; see next paragraph).

  • Use 'adduser USER_NAME audio' to allow a specific user to write to the /dev/dsp, /dev/mixer and /dev/audio devices and thus output sound from the soundcard; note: the user needs to log off and on again for such changes to take effect! This is the recommended way to allow a user to play audio. If, instead, you changed the permissions of the /dev/audio etc devices to make them accessible to anyone, that would open a security hole because you would be allowing any trojan to read the microphone device.

  • better is to add your user to the audio group
  • To allow some users to play music CDs on the CDROM drive: 'ls -al /dev/cdrom' to check which special file /dev/cdrom is a symbolic link to. If it is hdc, then do: 'chgrp cdrom /dev/hdc' or if it is something else (e.g. /dev/scd0) do the corresponding thing. Then do 'adduser USER_ID cdrom' to allow the user to play music CDs. Changing the group of /dev/hdc (or hdb or whatever) is necessary, because otherwise you would need to add the user to group disk, which is bad for security.

  • If you run xfreecd, remember to change the default CDDB server on the 'xfreecd' software from 'cddb.cddb.com' to 'gnudb.gnudb.org'. This is best done by directly editing the '.xfreecdrc' file in the home directories of the users who use the program.

Testing

  • speaker-test - command-line speaker test tone generator for ALSA

Alsa / OSS

There are two main projects, that aim to provide sound drivers in Linux.

ALSA

ALSA is the main current set of sound drivers in Linux. It provide some modules (snd-mixer-oss, snd-mixer-pcm, snd-mixer-seq) to emulate OSS with legacy application.

OSS

OSS was the original sound drivers.

To switch between ALSA and OSS, you should run:

  • dpkg-reconfigure linux-sound-base

(see /usr/share/doc/linux-sound-base/README.Debian)

ALSA

Some useful commands:

  • alsactl store/alsactl restore - save/restore the volume settings (this is normally performed on shutdown/boot)

The documentation is in /usr/share/doc/alsa-base (as usually!)

Unix Group

If you notice that a user starts up Gnome and receives a message about Audio not working the likely cause is that the user is not in group audio (only the initialy created user is in the audio group by default). You need to:

  # adduser john audio

Next time user john logs on they will be able to use the audio device.

See also:

See Also


CategorySound