slackware没有声音,确定不是权限问题 求高高手帮忙

其他Linux/Unix/BSD/OSX等发行版讨论
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

slackware没有声音,确定不是权限问题 求高高手帮忙

#1

帖子 sivaj » 2011-11-03 20:17

最近入手一台新电脑,dell inspiron m5110,安装了slackware13.1 32位版本,一切都很好很强大,就是没有声音,google了几天了,还是没找到答案 ,请高手帮忙看一下

确定所有用户加入了audio、video、cdrom、users组,右下角有小喇叭图标 点击显示为"IEC958" 但是无法调大调小

相关信息:

$ sudo lspci | grep -i audio
00:01.1 Audio device: ATI Technologies Inc Device 1714
00:14.2 Audio device: Advanced Micro Devices [AMD] Device 780d (rev 01)

$ sudo lsmod | grep -i snd
snd_seq_dummy 1107 0
snd_seq_oss 25580 0
snd_seq_midi_event 4620 1 snd_seq_oss
snd_seq 42857 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 4543 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 33917 0
snd_mixer_oss 13399 1 snd_pcm_oss
snd_hda_codec_idt 44406 0
snd_hda_codec_atihdmi 2123 1
snd_hda_intel 18936 3
snd_hda_codec 57091 3 snd_hda_codec_idt,snd_hda_codec_atihdmi,snd_hda_intel
snd_hwdep 5046 1 snd_hda_codec
snd_pcm 57736 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer 15699 2 snd_seq,snd_pcm
snd 43107 17 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore 4815 1 snd
snd_page_alloc 5849 2 snd_hda_intel,snd_pcm

运行 alsamixer 无法调大 始终是0值
运行 alsaconf 显示:no pnp or pci card found
系统设置里面 测试都没有声音
系统设置里面 测试都没有声音
希望有linux高手给把把脉, 谢谢!
onlylove
论坛版主
帖子: 5371
注册时间: 2007-01-14 16:23

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#2

帖子 onlylove » 2011-11-03 22:21

你的本子什么显卡,看样子是ati显卡带的hdmi,出声的那个没驱动起来,我猜应该是idt的(我不知道具体配置,不过最近戴尔很喜欢这个芯片)
#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#3

帖子 sivaj » 2011-11-03 22:57

在windows下是idt high definition audio codec, 另外一个是amd的
显卡是ati的 系统本来是有声音的 只是没办法调出来 default 那个似乎被占了 但在系统音效管理中 测试其中有一个是有声音的 后来从amd官方下了显卡驱动安装后 测试也没声音了 唉 有啥主意没?
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#4

帖子 Wjian » 2011-11-03 23:17

也许这个是你需要的:http://alsa.opensrc.org/FAQ026,把你的板载HD声卡设成默认。我现在就是这个情况。我的例子:

代码: 全选

cat /etc/asound.conf 
# use Soundblaster Live as default device
# (from /proc/asound/cards)
#
#

pcm.!default {
    type hw
    card Live
}
ctl.!default {
    type hw
    card Live
}
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#5

帖子 Wjian » 2011-11-03 23:20

或者把显卡的HDMI声卡模块放到/etc/modprob.d/blacklist里面,这个不推荐。
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#6

帖子 sivaj » 2011-11-05 11:55

尝试了你的,还是不行啊
amd ati显卡驱动里是不是包含有声卡驱动?
我装了 这个驱动 ati-driver-installer-11-9-x86.x86_64.run ,这个安装后会同时安装相关声卡的驱动吗
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#7

帖子 Wjian » 2011-11-05 12:44

这个不清楚了,我的是N卡。按理HDMI的声音驱动在内核模块里面的。
你把:
cat /proc/asound/cards
结果贴上来看看,
cat /proc/asound/cards
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfcffc000 irq 18
1 [Live ]: EMU10K1 - SB Live! Value [CT4780]
SB Live! Value [CT4780] (rev.7, serial:0x80221102) at 0xbc00, irq 16
这个是我的。

代码: 全选

cat /etc/asound.conf 
# use Soundblaster Live as default device
# (from /proc/asound/cards)
#
#

pcm.!default {
    type hw
    card Live
}
ctl.!default {
    type hw
    card Live
}
/etc/asound 那个文件默认是没有的,要新建一个文件。
如果根据上面的操作结果显示2个设备,即0和1
在我的例子中,把card后面的设备名称改为你的设备名,就是0和1的后面,[ Live] 那个就是设备名成。
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#8

帖子 sivaj » 2011-11-05 12:53

不好意思,这么迟才回复!

这是我的
$ cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xff744000 irq 30
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xff740000 irq 16

两个好像是一样的
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#9

帖子 Wjian » 2011-11-05 13:21

一个是 [Generic ],一个是 [Generic_1 ]

代码: 全选

pcm.!default {
    type hw
    card Generic
}
ctl.!default {
    type hw
    card Generic
}
现在改为Generic ,你alsamixer试试,
不行在改为Generic_1
:em06 :em06
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#10

帖子 sivaj » 2011-11-05 13:41

两种我都试了 然后重启,还是不行 , 没想到这次这个问题这么顽强
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#11

帖子 Wjian » 2011-11-05 13:54

我无解了,先前用过slackware,alsamixer打开的是nvidia的声卡,就禁用hdaudio模块(我没有hd声卡,一张老的创新卡),后来找到这个方法,现在gentoo下也是用相同办法处理之。有空的话,你编译一个pulseaudio 来试试吧,那个方法是过也可以,不过我不用KDE的,我用xfce4。不之是否KDE引起,
pulseaudio+pavucontrol.
:em20 :em06 :em06
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#12

帖子 sivaj » 2011-11-05 13:57

重新到alsa主页下载了所有的驱动,终于有声音了
默认是pcsp,这个播放出来的完全就是杂音,google后找到这个

/etc/modprobe.d/aslsa-base.conf 加入
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=2 a或者 ”-2“ (不知道有什么区别)

根据 http://alsa.opensrc.org/FAQ026 这上面 的


$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: STAC92xx Analog [STAC92xx Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: pcsp [pcsp], device 0: pcspeaker [pcsp]
Subdevices: 1/1
Subdevice #0: subdevice #0

$ cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xff744000 irq 30
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xff740000 irq 16
2 [pcsp ]: PC-Speaker - pcsp
Internal PC-Speaker at port 0x61

然后 /etc/modprobe.d/aslsa-base.conf 加入
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=2
$ cat /etc/asound.conf
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}

但是将其中的card 后面的分别试过改成Generic或Generic_1,都不成!

现在网页视频,mplayer播放声音工作良好,就是kmix这里,默认的那个还是”card 0“,无法直接调声音大小,必须打开混音器窗口切换到第二个才可以调大小

我想最开始就出现的声音问题搜到的这帖子可以很好的解释了
http://forums.gentoo.org/viewtopic-t-89 ... art-0.html
You actually have two sound devices

代码:
00:01.1 Audio device: ATI Technologies Inc Device 1714
00:14.2 Audio device: Advanced Micro Devices [AMD] Device 780d (rev 01)


As the first on is a subfunction of your Graphics card I expect that its HDMI sound.
Now the bad news. This will be your default sound card as its enumerated before the on board sound card.

And the worse news ... both cards need the snd_hda_intel kernel modules. As you need to separate your sound cards using the alsa configuration files, you must make snd_hda_intel as a module.

Look in /dev/snd for files named controlC0 controlC1 and so on.
If they are missing, your kernel has no alsa support yet so follow the Alsa Guide to get your kernel and user space set up to support sound.
If those devices are present and your kernel has snd_hda_intel configured with *, then you need to change it to <M> so the userspace setup can take effect.
我和上面有着同样的lspci | grep -i audio 输出,也就是完全是一样的情况。

再次感谢楼上的关注和帮助!谢谢!
上次由 sivaj 在 2011-11-05 20:03,总共编辑 2 次。
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#13

帖子 sivaj » 2011-11-05 19:14

http://forums.gentoo.org/viewtopic-t-89 ... art-0.html

http://forums.gentoo.org/viewtopic-p-63 ... ml#6339697
......
You actually have two sound devices

Code:
00:01.1 Audio device: ATI Technologies Inc Device 1714
00:14.2 Audio device: Advanced Micro Devices [AMD] Device 780d (rev 01)


As the first on is a subfunction of your Graphics card I expect that its HDMI sound.
Now the bad news. This will be your default sound card as its enumerated before the on board sound card.

And the worse news ... both cards need the snd_hda_intel kernel modules. As you need to separate your sound cards using the alsa configuration files, you must make snd_hda_intel as a module.
.....
Look in /etc/modprobe.d/alsa.conf There will be some coments there already.

You can copy my alsa.con almost.

Code:
# Alsa kernel modules' configuration file.

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
## ALSA portion
alias snd-card-0 snd-hda-intel index=1
alias snd-card-1 snd-hda-intel index=0
## OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
##

# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

## OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=2


The key bit is
Code:
## ALSA portion
alias snd-card-0 snd-hda-intel index=1
alias snd-card-1 snd-hda-intel index=0


Run
Code:
/sbin/update-modules
to update your modules.conf to include the alsa.conf
and
Code:
modprobe -r snd-hda-intel
modprobe snd-hda-intel
to remove the snd-hda-intel module and reload it with your new settings.

If the modprobe -r fails, you will need to reboot.
......
上次由 sivaj 在 2012-01-17 17:01,总共编辑 1 次。
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#14

帖子 Wjian » 2011-11-06 11:21

呵呵,LZ终于免强解决了。我的情况和你的有点相似,原来不是一个原因。可能因为我的不是声卡和显卡同时有HDaudio,所以好弄吧。
好像KDE用esd作为前端,试过一次用kde,KMIX那里有个!号跳出来,很不爽,就干掉换为xfce了。MS不用重装alsa也行?感觉就多了个snd-pcsp ?
/etc/modprobe/alsa** 里面好像是禁用pcsp的,记不清了。
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

Re: slackware没有声音,确定不是权限问题 求高高手帮忙

#15

帖子 sivaj » 2011-11-06 15:51

这个应该和桌面无关,因为我的显卡带有一声卡的子功能(subfunction),显卡先于板载声卡被枚举,而其带的声卡自然也就先于板载声卡被启动,更糟的是他们都用snd-intel的驱动
确实应该是不需要重装alsa的,但我的板载声卡驱动在解决过程中ms被删掉了
我的系统默认没有这个/etc/modprobe/alsa-base.conf文件,所以得自己创建,加入pcsp的禁止

现在仍然没有办法解决kmix上面的排序问题,不过做的那个在kmix中仍然排在第一个,所以每次系统调声音的话还得打开kmix的管理器,换到第二个才能调
现在暂时没时间弄了 基本也不影响使用,现将就着
kmix管理器第二项才是工作的声卡
kmix管理器第二项才是工作的声卡
抓图1.png (25.25 KiB) 查看 5024 次
回复