Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2010, 01:31 AM
silkie silkie is offline
Junior Member
 
Join Date: Dec 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Angry No Sound - snd_hda.ko - HDA Realtek ALC888 PCM
I'm a FreeBSD user and I'm investigating PC-BSD. Was happy until I found my sound card wasn't working and the hardware has been fine in FreeBSD (8.0-RELEASE-p6)

I finished a fresh install of PC-BSD
Code:
FreeBSD pcbsd-4974 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sat Jul 17 14:19:59 PDT 2010     root@build8x64.pcbsd.org:/usr/obj/usr/pcbsd-build81/fbsd-source/8.1/sys/PCBSD  amd64
kldstat shows
Code:
Id Refs Address            Size     Name
16    4 0xffffffff81154000 751d0    sound.ko
17    1 0xffffffff811ca000 13eb0    snd_uaudio.ko
38    1 0xffffffff82226000 141c6    snd_hda.ko
mixer shows
Code:
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
osstest shows - bold section looks iffy!
Code:
Sound subsystem and version: FreeBSD native OSS ABI 801000 (0x00040000)                                                                               
Platform: FreeBSD/amd64 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sat Jul 17 14:19:59 PDT 2010     root@build8x64.pcbsd.org:/usr/obj/usr/pcbsd-build81/fbsd-source/8.1/sys/PCBSD
/dev/dsp0.p0 (audio engine 0): pcm0:play:dsp0.p0                                                                                                      
- Performing audio playback test... /dev/dsp0.p0: Device busy                                                                                         
Can't open the device                                                                                                                                 
/dev/dsp0.vp0 (audio engine 1): pcm0:virtual:dsp0.vp0                                                                                                 
- Performing audio playback test...                                                                                                                   
  <left> OK <right> OK <stereo> OK <measured srate 47995.00 Hz (-0.01%)> 
/dev/dsp0.vp1 (audio engine 2): pcm0:virtual:dsp0.vp1
- Performing audio playback test...                                                                                                                                                
  <left> OK <right> OK <stereo> OK <measured srate 47997.00 Hz (-0.01%)>                                                                                                           
/dev/dsp0.vp2 (audio engine 3): pcm0:virtual:dsp0.vp2
- Performing audio playback test... 
  <left> OK <right> OK <stereo> OK <measured srate 47995.00 Hz (-0.01%)> 
/dev/dsp0.vp3 (audio engine 4): pcm0:virtual:dsp0.vp3
- Performing audio playback test... 
  <left> OK <right> OK <stereo> OK <measured srate 47997.00 Hz (-0.01%)> 
/dev/dsp0.r0 (audio engine 5): pcm0:record:dsp0.r0
- Skipping input only device
/dev/dsp0.vr0 (audio engine 6): pcm0:virtual:dsp0.vr0
- Skipping input only device
/dev/dsp0.vr1 (audio engine 7): pcm0:virtual:dsp0.vr1
- Skipping input only device
/dev/dsp0.vr2 (audio engine 8): pcm0:virtual:dsp0.vr2
- Skipping input only device
/dev/dsp0.vr3 (audio engine 9): pcm0:virtual:dsp0.vr3
- Skipping input only device
/dev/dsp1.p0 (audio engine 10): pcm1:play:dsp1.p0
- Performing audio playback test... /dev/dsp1.p0: Device busy
Can't open the device
/dev/dsp1.vp0 (audio engine 11): pcm1:virtual:dsp1.vp0
- Performing audio playback test... 
  <left> OK <right> OK <stereo> OK <measured srate 47997.00 Hz (-0.01%)> 
/dev/dsp1.r0 (audio engine 12): pcm1:record:dsp1.r0
- Skipping input only device
/dev/dsp1.vr0 (audio engine 13): pcm1:virtual:dsp1.vr0
- Skipping input only device
/dev/dsp2.p0 (audio engine 14): pcm2:play:dsp2.p0
- Performing audio playback test... /dev/dsp2.p0: Device busy
Can't open the device
/dev/dsp2.vp0 (audio engine 15): pcm2:virtual:dsp2.vp0
- Performing audio playback test... 
  <left> OK <right> OK <stereo> OK <measured srate 47997.00 Hz (-0.01%)> 
/dev/dsp3.p0 (audio engine 16): pcm3:play:dsp3.p0
- Performing audio playback test... /dev/dsp3.p0: Device busy
Can't open the device
/dev/dsp3.vp0 (audio engine 17): pcm3:virtual:dsp3.vp0
- Performing audio playback test... 
  <left> OK <right> OK <stereo> OK <measured srate 47988.00 Hz (-0.03%)> 

*** Some errors were detected during the tests ***
dmesg shows
Code:
hdac0: <Intel 82801JI High Definition Audio Controller> mem 0xf9ff8000-0xf9ffbfff irq 22 at device 27.0 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
hdac0: HDA Codec #0: Realtek ALC888
pcm0: <HDA Realtek ALC888 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC888 PCM #1 Analog> at cad 0 nid 1 on hdac0
pcm2: <HDA Realtek ALC888 PCM #2 Digital> at cad 0 nid 1 on hdac0
pcm3: <HDA Realtek ALC888 PCM #3 Digital> at cad 0 nid 1 on hdac0
cat /dev/sndstat shows
Code:
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC888 PCM #0 Analog> (play/rec)
pcm1: <HDA Realtek ALC888 PCM #1 Analog> (play/rec)
pcm2: <HDA Realtek ALC888 PCM #2 Digital> (play)
pcm3: <HDA Realtek ALC888 PCM #3 Digital> (play) default
I have even toggled hw.snd.default_unit in /etc/sysctl.conf between digital and analog to no avail. Was analog in freebsd, I guess I grasping at straws.

I'm out of ideas!

I even double checked the speaker cable to the PC! The sound works fine when I boot by FreeBSD disk and simply specify snd_hda_load="YES" in loader.conf.

I wish to migrate to PC-BSD so any help would be awesome! Everything checks out I simply have no sound.

mplayer acts as if it'splaying the file also, just nothing!
Code:
mplayer 01\ Closing\ In.mp3 
MPlayer SVN-r30341-snapshot-4.2.1 (C) 2000-2009 MPlayer Team

Playing 01 Closing In.mp3.
Audio only file format detected.
Clip info:
 Title: Closing In
 Artist: Seventh Void
 Album: Heaven Is Gone
 Year: 2009
 Comment: .
 Track: 1
 Genre: Hard Rock
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
Selected audio codec: [ffmp3] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   4.7 (04.7) of 851.0 (14:11.0)  0.7% 

MPlayer interrupted by signal 2 in module: play_audio
A:   4.7 (04.7) of 851.0 (14:11.0)  0.7% 
Exiting... (Quit)
Thanks,
Jon
Reply With Quote
  #2  
Old 12-24-2010, 12:24 PM
silkie silkie is offline
Junior Member
 
Join Date: Dec 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default booted FreeBSD to check differences
audio works fine in FreeBSD on XFCE.

only difference I can spot is oss_enable="YES" is in /etc/rc.conf

reflected in kldstat output
Code:
 6    1 0xffffffff80ea3000 23ed0    snd_hda.ko
 7    2 0xffffffff80ec7000 75708    sound.ko
23    2 0xffffffff81f5b000 82dce    osscore.ko
24    1 0xffffffff81fde000 231fc     oss_hdaudio.ko
sndstat looks better also and note it's the same driver!
Code:
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC888 PCM #0 Analog> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex default)
pcm1: <HDA Realtek ALC888 PCM #1 Analog> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex)
pcm2: <HDA Realtek ALC888 PCM #2 Digital> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
pcm3: <HDA Realtek ALC888 PCM #3 Digital> at cad 0 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
no mixer availble in my FreeBSD install

osstest looks odd but as it works I'm not sure about the validity of this check
Code:
ound subsystem and version: OSS 4.2 (b 2003/201012201405) (0x00040100)
Platform: FreeBSD/amd64 8.0-RELEASE-p4 FreeBSD 8.0-RELEASE-p4 #0: Mon Jul 12 20:55:11 UTC 2010     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC


NOTICE! You don't have any audio devices available.
        It looks like your audio hardware was not recognized
        by OSS.
	       
        If you have installed OSS just a moment ago then it may be necessary to.
        to rebot the system before trying to use the device(s).
I'm thinking is is definietly some PC-BSD/KDE specific bug. Will report back on the update rc.conf on my PC-BSD install.

Ta,
Jon
Reply With Quote
  #3  
Old 01-03-2011, 05:05 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,568
Thanks: 0
Thanked 163 Times in 127 Posts
Default booted FreeBSD to check differences
That sounds like you are using the "oss" port from "audio/oss/"

Is that the case? If so, you can try adding oss_enable="YES" to start it on
PC-BSD as well, just be sure oss is installed from ports first
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #4  
Old 03-31-2011, 05:04 PM
Deithrian Deithrian is offline
Junior Member
 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
I have the same problem in 8.2.
Any solutions?

Edit: Never mind, i unplugged my webcam and wacom tablet and now the audio works with 2 channels only.

Last edited by Deithrian; 03-31-2011 at 05:34 PM.
Reply With Quote
  #5  
Old 07-06-2011, 05:04 PM
daemonwritus daemonwritus is offline
Junior Member
 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Was having the same problem. Somebody suggested

#sysctl hw.snd.default_unit=1

And it works. They talk about it in this forum:
http://www.daemonforums.org/showthread.php?t=5328

I don't even know what this command does being a noob and all. But thought this might be helpful to some.
Reply With Quote
  #6  
Old 12-10-2011, 09:54 AM
manumart1 manumart1 is offline
Junior Member
 
Join Date: Nov 2011
Location: Spain
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default Sound did not work, but now works well
I only wanted to share how I was able to solve my sound problem thanks to this forum.

I installed PCBSD 8.2, but noticed that the sound (phonon) did not work. Searching through this forum I found that I could solve my problem adding this line to the file /boot/loader.conf:

Quote:
hw.snd.default_unit="1"

I did that, and the problem was solved.
But thanks to this forum I also learned that there existed a file named /etc/sysctl.conf. I look at that file and found the following lines:

Quote:
# Autodetect the most recent sound card. Uncomment for Digital output / USB
#hw.snd.default_unit=1

So I decided to let file /boot/loader.conf as it was at the beginning (without hw.snd.default_unit="1"), and instead to uncomment the mentioned line in /etc/sysctl.conf.

This also solved my problem, and I think that this second option is better. But it seems that for other people (http://www.daemonforums.org/showthread.php?t=5328 the only working solution is the first.

Last edited by manumart1; 12-10-2011 at 10:19 AM. Reason: To give thanks to the forum
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:34 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.