特殊:Badtitle/NS100:DebuggingSoundProblemsMisc:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的3个中间版本) | |||
第8行: | 第8行: | ||
Now figure out which module you need go to [http://www.alsa-project.org/main/index.php/Matrix:Main Sound Drivers] and pick the manufacturer. With the information provided by previous commands it should be easy to find the right module. | Now figure out which module you need go to [http://www.alsa-project.org/main/index.php/Matrix:Main Sound Drivers] and pick the manufacturer. With the information provided by previous commands it should be easy to find the right module. | ||
To see if this module is available on your system (it usually is) try the following command: | To see if this module is available on your system (it usually is) try the following command: | ||
<pre><nowiki> $ modinfo [modulename] | <pre><nowiki> | ||
$ modinfo [modulename] | |||
</nowiki></pre> | </nowiki></pre> | ||
This will also list the possible parameters for the module. For example some ISA cards require you to pass isapnp=0 to modprobe. | This will also list the possible parameters for the module. For example some ISA cards require you to pass isapnp=0 to modprobe. | ||
It may also require the IRQ and IO of the card if that's the case, these can be found in the output of the aadebug script. | It may also require the IRQ and IO of the card if that's the case, these can be found in the output of the aadebug script. | ||
Now that you've figured out all this information, lets try loading the module | Now that you've figured out all this information, lets try loading the module | ||
<pre><nowiki> #modprobe example | <pre><nowiki> | ||
#modprobe example | |||
$ sudo modprobe snd_es18xx isapnp=0 port=0x220 mpu_port=0x330 dma1=1 dma2=5 irq=5 fm_port=0x388 | $ sudo modprobe snd_es18xx isapnp=0 port=0x220 mpu_port=0x330 dma1=1 dma2=5 irq=5 fm_port=0x388 | ||
</nowiki></pre> | </nowiki></pre> | ||
If this doesn't return any errors, we can save the parameters. | If this doesn't return any errors, we can save the parameters. | ||
<pre><nowiki> $ echo options [module-name] [module-options] | sudo tee /etc/modprobe.d/[module-name] | <pre><nowiki> | ||
$ echo options [module-name] [module-options] | sudo tee /etc/modprobe.d/[module-name] | |||
</nowiki></pre> | </nowiki></pre> | ||
Now we can test our setup | Now we can test our setup | ||
<pre><nowiki> #aplay should now list your sound card | <pre><nowiki> | ||
#aplay should now list your sound card | |||
root@ubuntu:/etc # aplay -l | root@ubuntu:/etc # aplay -l | ||
**** List of PLAYBACK Hardware Devices **** | **** List of PLAYBACK Hardware Devices **** | ||
card 0: ES1878 [ESS AudioDrive ES1878], device 0: ES1878 [ESS AudioDrive ES1878] | card 0: ES1878 [ESS AudioDrive ES1878], device 0: ES1878 [ESS AudioDrive ES1878] | ||
Subdevices: 1/1 | Subdevices: 1/1 | ||
Subdevice #0: subdevice #0 | Subdevice #0: subdevice #0 | ||
#the speaker should beep | #the speaker should beep | ||
$ /usr/bin/speaker-test | $ /usr/bin/speaker-test | ||
第33行: | 第37行: | ||
The recommended method is to use the pulseaudio daemon (esd replacement) and to leave/set applications to use ESounD output. See the Sound section in /usr/share/doc/mozilla-firefox/README.Debian | The recommended method is to use the pulseaudio daemon (esd replacement) and to leave/set applications to use ESounD output. See the Sound section in /usr/share/doc/mozilla-firefox/README.Debian | ||
=== Flash === | === Flash === | ||
If you have issues with Flash playback and sound, see [ | If you have issues with Flash playback and sound, see [[UbuntuHelp:RestrictedFormats/Flash#head-f036b17c3150dd72f58d952a0e13094568c9f92e|Restricted|Formats - Troubleshooting]]. | ||
=== Software Mixing === | === Software Mixing === | ||
A much better way of getting esd to work with non-esd-aware apps is to make alsa use its software mixer. | A much better way of getting esd to work with non-esd-aware apps is to make alsa use its software mixer. | ||
<pre><nowiki> sudo /etc/init.d/alsa-utils stop | <pre><nowiki> | ||
sudo /etc/init.d/alsa-utils stop | |||
</nowiki></pre> | </nowiki></pre> | ||
Then edit | Then edit | ||
<pre><nowiki> /var/lib/alsa/asound.state | <pre><nowiki> | ||
/var/lib/alsa/asound.state | |||
</nowiki></pre> | </nowiki></pre> | ||
and add the following text verbatim to the start of this file | and add the following text verbatim to the start of this file | ||
<pre><nowiki> # This text should be added to the beginning of | <pre><nowiki> | ||
# /var/lib/alsa/asound.state. You only need to add | # This text should be added to the beginning of | ||
# it once -- it is saved across reboots. | # /var/lib/alsa/asound.state. You only need to add | ||
pcm.asymed { | # it once -- it is saved across reboots. | ||
type asym | |||
playback.pcm dmix | pcm.asymed { | ||
capture.pcm dsnoop | type asym | ||
} | playback.pcm dmix | ||
pcm.default { | capture.pcm dsnoop | ||
type plug | } | ||
slave.pcm asymed | pcm.default { | ||
} | type plug | ||
pcm.dmix { | slave.pcm asymed | ||
type dmix | } | ||
ipc_key 5678293 | pcm.dmix { | ||
ipc_key_add_uid yes | type dmix | ||
slave { | ipc_key 5678293 | ||
pcm 'hw:0,0' | ipc_key_add_uid yes | ||
period_time 0 | slave { | ||
period_size 128 | pcm 'hw:0,0' | ||
buffer_size 2048 | period_time 0 | ||
format S16_LE | period_size 128 | ||
rate 48000 | buffer_size 2048 | ||
} | format S16_LE | ||
} | rate 48000 | ||
pcm.dsnoop { | } | ||
type dsnoop | } | ||
ipc_key 5778293 | pcm.dsnoop { | ||
ipc_key_add_uid yes | type dsnoop | ||
slave { | ipc_key 5778293 | ||
pcm 'hw:0,0' | ipc_key_add_uid yes | ||
period_time 0 | slave { | ||
period_size 128 | pcm 'hw:0,0' | ||
buffer_size 2048 | period_time 0 | ||
format S16_LE | period_size 128 | ||
rate 48000 | buffer_size 2048 | ||
} | format S16_LE | ||
} | rate 48000 | ||
} | |||
} | |||
</nowiki></pre> | </nowiki></pre> | ||
then | then | ||
<pre><nowiki> sudo /etc/init.d/alsa-utils start | <pre><nowiki> | ||
sudo /etc/init.d/alsa-utils start | |||
</nowiki></pre> | </nowiki></pre> | ||
Now as many programs as you want can all use the sound card simultaneously, both the output and the microphone! ESD-aware apps can use ESD, other apps will still work fine. | Now as many programs as you want can all use the sound card simultaneously, both the output and the microphone! ESD-aware apps can use ESD, other apps will still work fine. | ||
第89行: | 第98行: | ||
=== More on Software Mixing === | === More on Software Mixing === | ||
A problem is the default config is OSS doesn't let 2 apps make sound at the same time. Here is a report of how it was dealt with: Basically get esd to relinquish control of the sound when its not in use. Then add mixing for oss so you can use multiple oss programs at once, like Quake3 and Teamspeak, or in my case, Wolfenstein and Teamspeak | A problem is the default config is OSS doesn't let 2 apps make sound at the same time. Here is a report of how it was dealt with: Basically get esd to relinquish control of the sound when its not in use. Then add mixing for oss so you can use multiple oss programs at once, like Quake3 and Teamspeak, or in my case, Wolfenstein and Teamspeak | ||
First use section 3 here: [ | First use section 3 here: [[UbuntuHelp:RestrictedFormats|Restricted|Formats]] then do this: http://alsa.opensrc.org/index.php?page=DmixPlugin | ||
== References == | == References == | ||
[1] http://www.tldp.org/HOWTO/Sound-HOWTO/x96.html#AEN120 | [1] http://www.tldp.org/HOWTO/Sound-HOWTO/x96.html#AEN120 | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2008年10月19日 (日) 14:46的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/DebuggingSoundProblemsMisc }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/af | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Afrikaans| [[::DebuggingSoundProblemsMisc/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ar | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|العربية| [[::DebuggingSoundProblemsMisc/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/az | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|azərbaycanca| [[::DebuggingSoundProblemsMisc/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/bcc | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|جهلسری بلوچی| [[::DebuggingSoundProblemsMisc/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/bg | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|български| [[::DebuggingSoundProblemsMisc/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/br | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|brezhoneg| [[::DebuggingSoundProblemsMisc/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ca | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|català| [[::DebuggingSoundProblemsMisc/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/cs | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|čeština| [[::DebuggingSoundProblemsMisc/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/de | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Deutsch| [[::DebuggingSoundProblemsMisc/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/el | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Ελληνικά| [[::DebuggingSoundProblemsMisc/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/es | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|español| [[::DebuggingSoundProblemsMisc/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/fa | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|فارسی| [[::DebuggingSoundProblemsMisc/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/fi | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|suomi| [[::DebuggingSoundProblemsMisc/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/fr | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|français| [[::DebuggingSoundProblemsMisc/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/gu | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|ગુજરાતી| [[::DebuggingSoundProblemsMisc/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/he | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|עברית| [[::DebuggingSoundProblemsMisc/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/hu | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|magyar| [[::DebuggingSoundProblemsMisc/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/id | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Bahasa Indonesia| [[::DebuggingSoundProblemsMisc/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/it | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|italiano| [[::DebuggingSoundProblemsMisc/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ja | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|日本語| [[::DebuggingSoundProblemsMisc/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ko | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|한국어| [[::DebuggingSoundProblemsMisc/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ksh | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Ripoarisch| [[::DebuggingSoundProblemsMisc/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/mr | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|मराठी| [[::DebuggingSoundProblemsMisc/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ms | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Bahasa Melayu| [[::DebuggingSoundProblemsMisc/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/nl | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Nederlands| [[::DebuggingSoundProblemsMisc/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/no | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|norsk| [[::DebuggingSoundProblemsMisc/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/oc | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|occitan| [[::DebuggingSoundProblemsMisc/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/pl | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|polski| [[::DebuggingSoundProblemsMisc/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/pt | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|português| [[::DebuggingSoundProblemsMisc/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ro | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|română| [[::DebuggingSoundProblemsMisc/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/ru | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|русский| [[::DebuggingSoundProblemsMisc/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/si | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|සිංහල| [[::DebuggingSoundProblemsMisc/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/sq | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|shqip| [[::DebuggingSoundProblemsMisc/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/sr | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|српски / srpski| [[::DebuggingSoundProblemsMisc/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/sv | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|svenska| [[::DebuggingSoundProblemsMisc/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/th | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|ไทย| [[::DebuggingSoundProblemsMisc/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/tr | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Türkçe| [[::DebuggingSoundProblemsMisc/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/vi | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|Tiếng Việt| [[::DebuggingSoundProblemsMisc/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/yue | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|粵語| [[::DebuggingSoundProblemsMisc/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/zh | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|中文| [[::DebuggingSoundProblemsMisc/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/zh-hans | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|中文(简体)| [[::DebuggingSoundProblemsMisc/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DebuggingSoundProblemsMisc | UbuntuHelp:DebuggingSoundProblemsMisc | {{#if: | :}}DebuggingSoundProblemsMisc}}/zh-hant | • {{#if: UbuntuHelp:DebuggingSoundProblemsMisc|中文(繁體)| [[::DebuggingSoundProblemsMisc/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:DebuggingSoundProblemsMisc|:DebuggingSoundProblemsMisc|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :DebuggingSoundProblemsMisc/zh | | {{#ifexist: DebuggingSoundProblemsMisc/zh | | {{#ifeq: {{#titleparts:DebuggingSoundProblemsMisc|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:DebuggingSoundProblemsMisc|1|-1|}} | zh | | }}
This wiki tries to capture some of the sound issue corner cases. For general information regarding debugging sound issues, please refer to: https://help.ubuntu.com/community/DebuggingSoundProblems
Compatibility
A word about compatibility: even though most sound cards are claimed to be SoundBlaster compatible, very few currently sold cards are compatible enough to work with the Linux SoundBlaster driver. [1]
Manual installation of sound drivers
Now figure out which module you need go to Sound Drivers and pick the manufacturer. With the information provided by previous commands it should be easy to find the right module. To see if this module is available on your system (it usually is) try the following command:
$ modinfo [modulename]
This will also list the possible parameters for the module. For example some ISA cards require you to pass isapnp=0 to modprobe. It may also require the IRQ and IO of the card if that's the case, these can be found in the output of the aadebug script. Now that you've figured out all this information, lets try loading the module
#modprobe example $ sudo modprobe snd_es18xx isapnp=0 port=0x220 mpu_port=0x330 dma1=1 dma2=5 irq=5 fm_port=0x388
If this doesn't return any errors, we can save the parameters.
$ echo options [module-name] [module-options] | sudo tee /etc/modprobe.d/[module-name]
Now we can test our setup
#aplay should now list your sound card root@ubuntu:/etc # aplay -l **** List of PLAYBACK Hardware Devices **** card 0: ES1878 [ESS AudioDrive ES1878], device 0: ES1878 [ESS AudioDrive ES1878] Subdevices: 1/1 Subdevice #0: subdevice #0 #the speaker should beep $ /usr/bin/speaker-test
Other problems & troubleshooting
PulseAudio
The recommended method is to use the pulseaudio daemon (esd replacement) and to leave/set applications to use ESounD output. See the Sound section in /usr/share/doc/mozilla-firefox/README.Debian
Flash
If you have issues with Flash playback and sound, see Restricted|Formats - Troubleshooting.
Software Mixing
A much better way of getting esd to work with non-esd-aware apps is to make alsa use its software mixer.
sudo /etc/init.d/alsa-utils stop
Then edit
/var/lib/alsa/asound.state
and add the following text verbatim to the start of this file
# This text should be added to the beginning of # /var/lib/alsa/asound.state. You only need to add # it once -- it is saved across reboots. pcm.asymed { type asym playback.pcm dmix capture.pcm dsnoop } pcm.default { type plug slave.pcm asymed } pcm.dmix { type dmix ipc_key 5678293 ipc_key_add_uid yes slave { pcm 'hw:0,0' period_time 0 period_size 128 buffer_size 2048 format S16_LE rate 48000 } } pcm.dsnoop { type dsnoop ipc_key 5778293 ipc_key_add_uid yes slave { pcm 'hw:0,0' period_time 0 period_size 128 buffer_size 2048 format S16_LE rate 48000 } }
then
sudo /etc/init.d/alsa-utils start
Now as many programs as you want can all use the sound card simultaneously, both the output and the microphone! ESD-aware apps can use ESD, other apps will still work fine. One notable misfeature of ESD is that it often ruins the A/V sync when playing videos. After setting up the software mixer, you might find it useful to turn esd off altogether (in tthe Sound control panel uncheck "Enable Software Mixing"). Now, especially with GStreamer 0.10, your movies should have perfect A/V sync. It's a shame that software mixing isn't enabled on Ubuntu by default.
More on Software Mixing
A problem is the default config is OSS doesn't let 2 apps make sound at the same time. Here is a report of how it was dealt with: Basically get esd to relinquish control of the sound when its not in use. Then add mixing for oss so you can use multiple oss programs at once, like Quake3 and Teamspeak, or in my case, Wolfenstein and Teamspeak First use section 3 here: Restricted|Formats then do this: http://alsa.opensrc.org/index.php?page=DmixPlugin