ALC888 oss-Audio setup (wav, ogg) (dmesg only showed HDA at pci0)

Posting this because various snd_hda attempts so far failed, this may be easier:
Code:
cd /usr/ports/audio/oss && make install
kldload /usr/local/lib/oss/modules/osscore.ko
kldload /usr/local/lib/oss/modules/oss_hdaudio.ko
Other modules available besides oss_hdaudio. The following then should work with wav, ogg files at least:
Code:
ossplay -d /dev/oss/oss_hdaudio0/pcm0 [file]

(More information to include, however, IANAE and this post should just relate what I know for certain...)

..........
edit 1...
........
Code:
mpg123 -v -a /dev/oss/oss_hdaudio0/pcm0 [mp3 file]
........
edit 2... Seems to play Ogg GOOD
........
Code:
cd /usr/ports/audio/vorbis-tools
/bin/rm -rf work
make install
rehash
ogg123 -v -d oss -o dsp:/dev/oss/oss_hdaudio0/pvcm0 [ogg file]
 
jb_fvwm2 said:
Code:
kldload /usr/local/lib/oss/modules/osscore.ko
kldload /usr/local/lib/oss/modules/oss_hdaudio.ko
Code:
echo oss_enable="YES" >> /etc/rc.conf
/usr/local/etc/rc.d/oss start
 
I'm adding this here in case it helps someone.

I also was having trouble getting emulators/virtualbox-ose to have sound, and OSS was the only driver that was supported that I could see). Some things I needed to do:
  1. Install audio/oss
    # portmaster audio/oss
  2. Enable OSS in rc.conf.
    # vim /etc/rc.conf
    Add the following:
    Code:
    oss_enable="YES"
  3. Check dmesg output to see which dsp your soundcard outputs to.
    # dmesg | grep pcm
    Code:
    pcm0: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 0 nid 1 on hdac0
    pcm1: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 1 nid 1 on hdac0
    pcm2: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 2 nid 1 on hdac0
    pcm3: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 3 nid 1 on hdac0
    pcm4: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 0 nid 1 on hdac1
    pcm5: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 1 nid 1 on hdac1
    pcm6: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 2 nid 1 on hdac1
    pcm7: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 3 nid 1 on hdac1
    pcm8: <HDA Realtek ALC888 PCM #0 Analog> at cad 0 nid 1 on hdac2
    pcm9: <HDA Realtek ALC888 PCM #1 Analog> at cad 0 nid 1 on hdac2
    pcm10: <HDA Realtek ALC888 PCM #2 Digital> at cad 0 nid 1 on hdac2
    Note that pcm8 is the one where the output goes. (See this thread for more info on testing.)
  4. Edit /etc/sysctl.conf so that the right dsp link is created (I think this is what it does).
    # vim /etc/sysctl.conf
    Add the following (note that the 8 comes from pcm8 above):
    Code:
    hw.snd.default_unit=8
  5. Reboot.
  6. Get oss_detect to work.
    # ossdetect -v
  7. See that it worked.
    # cat /usr/local/lib/oss/etc/installed_drivers
    Code:
    oss_hdaudio #Intel High Definition Audio (PCH)
  8. Reboot

Now provided that you have "OSS Audio Driver" and "ICH AC97" selected in VirtualBox Audio settings, your VMs should have sound.
 
Why are you telling folks to load both the OSSv4 driver from ports and the OSSv3 driver from the base system? They will be very lucky if that doesn't lead to a kernel panic.

Adam
 
adamk said:
Why are you telling folks to load both the OSSv4 driver from ports and the OSSv3 driver from the base system? They will be very lucky if that doesn't lead to a kernel panic.

Adam
Could you elaborate? Not sure which post and which part of the post you are referring to.
 
In step 1 you have users loading snd_hda, which is from the FreeBSD base system. In steps 2, 3, 7 and 8 you have users installing and configuring OSSv4. You're having users load two separate drivers, from different vendors, to drive the same hardware. That's bad and can often lead to kernel panics.

Adam
 
adamk said:
In step 1 you have users loading snd_hda, which is from the FreeBSD base system. In steps 2, 3, 7 and 8 you have users installing and configuring OSSv4. You're having users load two separate drivers, from different vendors, to drive the same hardware. That's bad and can often lead to kernel panics.

Adam
Ok, thanks for that, I'll try and then amend it.

Edit: Amended.
 
Updating current (5-24-2011) to RELENG_9 (as of yesterday) seems to panic the box used in the original post, removing either the sound drivers (i.e. snd_hda, sound) in the GENERIC new kernel, and/or the debugging options (debug, WITNESS etc...) may make it not panic. No time to test as of yet, since the snd_hda works "out of the box" for playing mp3's at least, and the machine is not the one I use primarily. (Several reboots to fix it since I had the oss drivers loaded via a .login file, serving as a crafted (alias) audio/yell.
 
Back
Top