Problems with OSS in Haiku OS

OSS related discussion in general (i.e. not limited to Linux/Solaris/BSD)

Moderators: hannu, dev, kodachi, cesium

Problems with OSS in Haiku OS

Postby paulfxh » Sat Oct 30, 2010 5:20 pm

I'm running Haiku R1A2 OS on a Dell E520 which has an Intel 82801H (ICH8) soundcard.
Unfortunately the hda driver for Haiku, which should be appropriate for this card, is buggy so it didn't work for me.
However, I was able to get a Haiku version of OSS to work perfectly by disabling both the pre-installed hda and auich sound drivers.
Interesting that although OSSTEST worked fine when I had disabled the hda driver (All tests completed OK -- although only got sound from one of 16 audio engines), the media player gave no sound until I had additionally disabled the auich driver.
About a week ago, however, I had to do a clean re-install of Haiku and subsequently went about configuring the OS for my normal use. Once again, I installed OSS for Haiku (from the above link), disabled the hda and auich drivers but this time no sound.
Now OSSTEST works just as before (All tests completed OK -- although hear sound only from one of 16 audio engines). Nevertheless, no amount of enabling or disabling the other sound drivers has allowed my media player to produce sound.
Perhaps the problem lies in the mixer. However, in Haiku there is no GUI for the mixer and I have not succeeded in experimenting as suggested in the troubleshooting section of the OSS wiki.
Can anybody help me get sound working here?
paulfxh
 
Posts: 7
Joined: Sun Mar 30, 2008 4:50 am

Re: Problems with OSS in Haiku OS

Postby cesium » Sun Oct 31, 2010 11:35 am

A) I suggest you try the IRC channel - mmu_man did the porting...
B) IIRC, there's an haiku module which needs to be enabled (a translator driver of sorts) to translate between OSS and Haiku's media manager. Is it enabled?
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Problems with OSS in Haiku OS

Postby cesium » Sun Oct 31, 2010 9:34 pm

Oh, and hearing sound from only one engine isn't unusual - I recall the default build has vmix disabled.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Problems with OSS in Haiku OS

Postby paulfxh » Sun Oct 31, 2010 9:43 pm

Thank you for your reply.
I'm not aware of the "translator driver of sorts" that you mention but I will enquire in Haiku circles.
However, in the meantime, I have made some progress.
OSSPLAY works fine for me as long as I direct it away from /dev/dsp, which doesn't exist, to /dev/oss/oss_hdaudio0/pcm0 (which is the only one of the 16 audio engines that worked in OSSTEST).
The other necessity for OSSPLAY to work for me in Haiku is that I need to convert my .mp3 files to .wav for which Haiku has a nice app.
I can even play a full playlist, or album, by cd'ing to the folder where my .wav files are stored and typing
Code: Select all
ossplay -d /dev/oss/oss_hdaudio0/pcm0 *.wav

Note that I had tried to symlink /dev/oss/oss_hdaudio0/pcm0 to /dev/dsp as suggested in the OSS Wiki Tips & Tricks section. However, Haiku would not allow symlinks to /dev/dsp for reasons that are not clear to me.
Further, I can't get either VLC or Haiku's native media player to produce sound from my .mp3's although they do "play".
Seems, therefore. that the problem lies within either Haiku or the media players and NOT with oss.
paulfxh
 
Posts: 7
Joined: Sun Mar 30, 2008 4:50 am

Re: Problems with OSS in Haiku OS

Postby cesium » Sun Oct 31, 2010 10:30 pm

mmu_man intentionally did not expose OSS API (or enabled vmix), but instead kept the Haiku media manager API as the near only way for programs to output sound. This is the translator plugin - make sure it's enabled. Btw, ossplay also supports ogg files if compiled in the right way (and libvorbisfile is present), not sure this is the case with this compile.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Problems with OSS in Haiku OS

Postby paulfxh » Sun Oct 31, 2010 11:40 pm

Thanks again for your reply and the link.
Well, there already is a file called opensound.media_addon (of 127 kB) in the directory /boot/system/add-ons/media which I presume (but don't know for sure) that what you are proposing is already enabled.
Yet, neither VLC 0.8.6 nor the native Media Player produce sound from .mp3 files in my system.
paulfxh
 
Posts: 7
Joined: Sun Mar 30, 2008 4:50 am

Re: Problems with OSS in Haiku OS

Postby cesium » Mon Nov 01, 2010 12:10 am

<mmu_man> there must be a mixer interface in Media preferences
<mmu_man> the driver itself is listed in the panel, and clicking it should reveal a mixer interface built from what the driver exposes with the OSS ioctls
<mmu_man> http://revolf.free.fr/beos/shot_haiku_o ... ng.003.png

Is it there? Maybe it got muted? Can you paste output of 'ossmix'?

<mmu_man> now, the media addon should not be able to output sound when osstest/ossplay is using the card
<mmu_man> actually if he can use osstest/play they the media addon likely didn't open it correctly
<mmu_man> or it opened another channel buit it should take them all
<mmu_man> might want to try killing media_server and media_addon_server
<mmu_man> and restarting it from Terminal
<mmu_man> /system/servers/media_server &
<mmu_man> also make sure the card is set as default in media prefs
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: Problems with OSS in Haiku OS

Postby paulfxh » Mon Nov 01, 2010 12:57 am

Well, this is quite remarkable but VLC 0.8.6 has now started playing .mp3 files perfectly.
Other than opening and closing Media Preferences a few times, I really do not believe that I did anything at all, either purposely, nor, I'm pretty sure, inadvertently.
In any event, yes, there is an Audio Mixer present in the Media preferences and neither the Master Output nor the player output are muted.
For what it's worth, here's the output of ossmix:
Many thanks for you help in getting this resolved although I'd love to know what was the real problem:

~> ossmix
Selected mixer 0/High Definition Audio STAC9227X
Known controls are:
jack.fp-black.mode1 <front|center/LFE|input> (currently front)
jack.fp-black.mode2 <front|center/LFE|input> (currently front)
jack.pink.mode <center/LFE|input> (currently center/LFE)
jack.pink.center/lfe [<leftvol>:<rightvol>] (currently 76.4:76.4 dB)
jack.green.mode <front|input> (currently front)
jack.green.front [<leftvol>:<rightvol>] (currently 76.4:76.4 dB)
jack.black.mode1 <rear|input> (currently rear)
jack.black.rear [<leftvol>:<rightvol>] (currently 76.4:76.4 dB)
jack.orange.mode <side|input> (currently side)
jack.orange.side [<leftvol>:<rightvol>] (currently 76.4:76.4 dB)
jack.blue.mode <rear|input> (currently input)
jack.gray.mode <center/LFE|input> (currently center/LFE)
jack.black.mode2 <spdif-out|adat|input1-mux|input2-mux|input3-mux> (currently spdif-out)
record.input1-mux.input1-mux1 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.input1-mux.input1-mux2 <fp-mic|center/LFE|rear> (currently fp-mic)
record.input1-mux [<leftvol>:<rightvol>] (currently 17.9:17.9 dB)
record.input1-mux.mute ON|OFF (currently OFF)
record.input2-mux.input2-mux1 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.input2-mux.input2-mux2 <fp-mic|center/LFE|rear> (currently fp-mic)
record.input2-mux [<leftvol>:<rightvol>] (currently 17.9:17.9 dB)
record.input2-mux.mute ON|OFF (currently OFF)
record.input3-mux.input3-mux1 [<leftvol>:<rightvol>] (currently 39.9:39.9 dB)
record.input3-mux.input3-mux2 <fp-mic|center/LFE|rear> (currently fp-mic)
record.input3-mux [<leftvol>:<rightvol>] (currently 17.9:17.9 dB)
record.input3-mux.mute ON|OFF (currently OFF)
misc.headphone [<leftvol>:<rightvol>] (currently 76.4:76.4 dB)
misc <-28.-8dB|-19.-2dB|-9.-6dB|0.0dB> (currently -28.-8dB)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 24.7 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm14 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm15 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
~>
paulfxh
 
Posts: 7
Joined: Sun Mar 30, 2008 4:50 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest