LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 936|回复: 2

[算解决了]alsa声卡独占问题

[复制链接]
发表于 2010-10-21 12:13:37 | 显示全部楼层 |阅读模式
安装了alsa-lib alsa-oss alsa-utils

mpd 后mpc play可以完美播放声音
此时再mplayer 123.mp3

  1. [AO_ALSA] alsa-lib: pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave
  2. [AO_ALSA] Playback open error: Device or resource busy
  3. Failed to initialize audio driver 'alsa'
  4. [AO_ALSA] alsa-lib: pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave
  5. [AO_ALSA] Playback open error: Device or resource busy
  6. DVB card number must be between 1 and 4
  7. AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
  8. Starting playback...
复制代码


mp3没有声音

如果停掉mpc 即mpc stop
则mplayer 123.mp3很正常

  1. lsmod
  2. Module                  Size  Used by
  3. snd_seq_dummy           1542  0
  4. snd_seq_oss            24687  0
  5. snd_seq_midi_event      5898  1 snd_seq_oss
  6. snd_seq                45534  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
  7. snd_seq_device          5511  3 snd_seq_dummy,snd_seq_oss,snd_seq
  8. snd_pcm_oss            33010  0
  9. snd_mixer_oss          12927  1 snd_pcm_oss
  10. snd_hda_codec_conexant    30927  1
  11. snd_hda_intel          21310  1
  12. snd_hda_codec          74046  2 snd_hda_codec_conexant,snd_hda_intel
  13. snd_hwdep               5722  1 snd_hda_codec
  14. snd_pcm                70234  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
  15. snd_timer              17852  2 snd_seq,snd_pcm
  16. snd                    55667  13 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_conexant,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
  17. ath5k                 118823  0
  18. snd_page_alloc          7141  2 snd_hda_intel,snd_pcm
  19. ath                     9206  1 ath5k
复制代码

  1. aplay -l
  2. **** List of PLAYBACK Hardware Devices ****
  3. card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
  4.   Subdevices: 1/1
  5.   Subdevice #0: subdevice #0
  6. card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]
  7.   Subdevices: 1/1
  8.   Subdevice #0: subdevice #
复制代码

  1. cat /etc/modprobe.d/alsa.conf
  2. # Alsa kernel modules' configuration file.

  3. # ALSA portion
  4. # OSS/Free portion

  5. ##
  6. ## IMPORTANT:
  7. ## You need to customise this section for your specific sound card(s)
  8. ## and then run `update-modules' command.
  9. ## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
  10. ##
  11. ##  ALSA portion
  12. ## alias snd-card-0 snd-interwave
  13. ## alias snd-card-1 snd-ens1371
  14. ##  OSS/Free portion
  15. ## alias sound-slot-0 snd-card-0
  16. ## alias sound-slot-1 snd-card-1
  17. ##

  18. # OSS/Free portion - card #1
  19. ##  OSS/Free portion - card #2
  20. ## alias sound-service-1-0 snd-mixer-oss
  21. ## alias sound-service-1-3 snd-pcm-oss
  22. ## alias sound-service-1-12 snd-pcm-oss

  23. alias /dev/mixer snd-mixer-oss
  24. alias /dev/dsp snd-pcm-oss
  25. alias /dev/midi snd-seq-oss

  26. # Set this to the correct number of cards.

  27. # --- BEGIN: Generated by ALSACONF, do not edit. ---
  28. # --- ALSACONF version 1.0.21 ---
  29. alias snd-card-0 snd-hda-intel
  30. alias sound-slot-0 snd-hda-intel
  31. # --- END: Generated by ALSACONF, do not edit. ---
复制代码

  1. uname -a
  2. Linux Apple 2.6.34-gentoo-r11 #1 SMP Thu Oct 21 09:54:41 CST 2010 x86_64 Pentium(R) Dual-Core CPU T4200 @ 2.00GHz GenuineIntel GNU/Linux
复制代码

  1. cat /usr/src/linux/.config | grep -i "CONFIG_SND_HDA"
  2. CONFIG_SND_HDA_INTEL=m
  3. CONFIG_SND_HDA_HWDEP=y
  4. CONFIG_SND_HDA_RECONFIG=y
  5. # CONFIG_SND_HDA_INPUT_BEEP is not set
  6. CONFIG_SND_HDA_INPUT_JACK=y
  7. # CONFIG_SND_HDA_PATCH_LOADER is not set
  8. CONFIG_SND_HDA_CODEC_REALTEK=y
  9. CONFIG_SND_HDA_CODEC_ANALOG=y
  10. CONFIG_SND_HDA_CODEC_SIGMATEL=y
  11. CONFIG_SND_HDA_CODEC_VIA=y
  12. CONFIG_SND_HDA_CODEC_ATIHDMI=y
  13. CONFIG_SND_HDA_CODEC_NVHDMI=y
  14. CONFIG_SND_HDA_CODEC_INTELHDMI=y
  15. CONFIG_SND_HDA_ELD=y
  16. CONFIG_SND_HDA_CODEC_CIRRUS=y
  17. CONFIG_SND_HDA_CODEC_CONEXANT=y
  18. CONFIG_SND_HDA_CODEC_CA0110=y
  19. CONFIG_SND_HDA_CODEC_CMEDIA=y
  20. CONFIG_SND_HDA_CODEC_SI3054=y
  21. CONFIG_SND_HDA_GENERIC=y
  22. CONFIG_SND_HDA_POWER_SAVE=y
  23. CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
复制代码


另外顺便问下emerge -av alsa-lib时,alisp的use是作什么用的
 楼主| 发表于 2010-10-21 12:17:22 | 显示全部楼层
另外emerge时mpd USE
  1. aac alsa bzip2 cue curl ffmpeg fifo flac id3 lame mad network ogg unicode wavpack -ao -audiofile -avahi -cdio -debug -fluidsynth -ipv6 -jack -lastfmradio -libmms -libsamplerate -mikmod -modplug -musepack -oss -pipe -profile -pulseaudio -sid -sqlite -vorbis -zip
复制代码

mplayer USE
  1. X a52 aac alsa ass cddb cdio dirac directfb dts dv dvb dvd dvdnav enca encode faac faad gif iconv ipv6 jpeg live mmx mp3 network opengl osdmenu png quicktime rar real rtc schroedinger shm speex sse sse2 ssse3 theora toolame tremor truetype twolame unicode vorbis x264 xscreensaver xv xvid -3dnow -3dnowext -aalib (-altivec) -amr -bidi -bindist -bl -bs2b -cdparanoia -cpudetection -custom-cpuopts -debug -dga -doc -dxr3 -esd -fbcon -ftp -ggi -gmplayer -jack -joystick -ladspa -libcaca -lirc -lzo -mad -md5sum -mmxext -mng -nas -nut -openal -oss -pnm -pulseaudio -pvr -radio -samba -sdl (-svga) -teletext -tga -v4l -v4l2 -vdpau (-vidix) (-win32codecs) -xanim -xinerama -xvmc -zoran" VIDEO_CARDS="-mga -nvidia -s3virge -tdfx
复制代码
  1. cat /etc/make.conf | grep -i "USE="
  2. USE="mmx sse sse2 ssse3 -hal -arts -esd -oss -cups opengl -qt4 -qt3 -kde -gpm X dbus alsa gtk2 cdr dvd dbus bash-completion"
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-21 13:47:02 | 显示全部楼层
还是没解决,发正在mpd 抢占声卡的时候,mplayer无法发声

而使用mplayer同时播放2首mp3,则混音正常.....

汗,解决了....mpd配置文件问题....
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表