Xonar DG/DGX

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: cesium, dev, kodachi, hannu

Xonar DG/DGX

Postby fuzz » Fri May 18, 2012 1:04 pm

I am unable to make it work, using OSS4 on FreeBSD 9 built from ports with the oss_cmi878x driver. I compiled out any conflicting audio modules from the kernel. The card is a newer PCI-e version, DGX, but it's the same as DG which has been out a while. Both are chipset "CMI 8786".

I need it to work with Optical out to an AV receiver AND almost equally important - with MPD, or "MUSICPD" as FreeBSD now calls it. osstest works, and I hear the music through the receiver via SPDIF perfect. Anything else will not work. MPD outputs loud static. Trying to play Mplayer there is no sound at all. I'm not sure what I am doing wrong, I was certain this card would work. :(

Code: Select all
Version info: OSS 4.2 (b 2006/201205180713) (0x00040100) BSD
Platform: FreeBSD/amd64 9.0-RELEASE-p1 FreeBSD 9.0-RELEASE-p1 #0: Fri May 18 02:52:41 EDT 2012     root@FreeBSD:/usr/obj/usr/src/sys/FREEBSD (FreeBSD)

Number of audio devices:   2
Number of audio engines:   7
Number of MIDI devices:      1
Number of mixer devices:   1


Device objects
0: oss_cmi878x0 Asus Xonar (unknown) interrupts=38211 (38212)

MIDI devices (/dev/midi*)
0: CMI8788 UART (MIDI port 1 of device object 0)

Mixer devices
0: CMedia CMI8788 (Mixer 0 of device object 0)

Audio devices
Asus Xonar (unknown) (MultiChannel)  /dev/oss/oss_cmi878x0/pcm0  (device index 0)
Asus Xonar (unknown) (SPDIF)      /dev/oss/oss_cmi878x0/pcm1  (device index 1)

Nodes
  /dev/dsp -> /dev/oss/oss_cmi878x0/pcm0
  /dev/dsp_in -> /dev/oss/oss_cmi878x0/pcm0
  /dev/dsp_out -> /dev/oss/oss_cmi878x0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_cmi878x0/pcm1
  /dev/dsp_mmap -> /dev/oss/oss_cmi878x0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_cmi878x0/pcm0


Code: Select all
Selected mixer 0/CMedia CMI8788
Known controls are:
pcm [<leftvol>:<rightvol>] (currently 100:100)
rear [<leftvol>:<rightvol>] (currently 100:100)
center [<leftvol>:<rightvol>] (currently 100:100)
side [<leftvol>:<rightvol>] (currently 100:100)
ext.monitor.analog ON|OFF (currently OFF)
ext.monitor.spdif ON|OFF (currently OFF)
ext.monitor.inputsrc <Line|Mic> (currently Line)
ext.routing.spread ON|OFF (currently OFF)
ext.routing.spdif-loopback ON|OFF (currently OFF)
spdif-out.enable ON|OFF (currently ON)
spdif-out.adc/dac ON|OFF (currently OFF)
spdif-out.pro <Consumer|Professional> (currently Consumer)
spdif-out.audio <Audio|Data> (currently Audio)
spdif-out.copy ON|OFF (currently OFF)
spdif-out.pre-emph ON|OFF (currently OFF)
spdif-out.rate <44.1KHz|48KHz|32KHz|88.2KHz|96KHz|64KHz|176.4KHz|192KHz> (currently 44.1KHz)
spdif-out.vbit ON|OFF (currently OFF)
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.pcm1 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm2 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm3 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm4 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)


This forum is not very active, I may not get far. Just wondering if this is a known problem w/ these CMI 878x cards. I am limited to PCI Express, and there's a handful of good ones that are cheap. :?
fuzz
New Member
 
Posts: 5
Joined: Fri May 18, 2012 12:33 pm

Re: Xonar DG/DGX

Postby cesium » Fri May 18, 2012 3:17 pm

Various Xonar Dsomething cards use different chips, and not all are supported. But if yours works, we can work with that. First, does "osstest -V" work? Second, does playing via /dev/oss/oss_cmi878x/pcm0 work (you can test with "ossplay -d...") or just pcm1?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Xonar DG/DGX

Postby fuzz » Sat May 19, 2012 12:51 am

osstest -V

Code: Select all
*** Scanning sound adapter #-1 ***
/dev/oss/oss_cmi878x0/pcm0 (audio engine 0): Asus Xonar (unknown) (MultiChannel)
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 47965.00 Hz (-0.07%)>
/dev/oss/oss_cmi878x0/pcm1 (audio engine 6): Asus Xonar (unknown) (SPDIF)
- Performing audio playback test...
  <left> OK <right> OK <stereo> OK <measured srate 48003.00 Hz (0.01%)>


Says both are OK, but I hear no sound with pcm0. I am more concerned with pcm1 anyway. In a nutshell:

osstest [pcm0] - NO
osstest [pcm1] - YES

ossplay -d /dev/oss/oss_cmi878x/pcm0 sample.wav - NO
ossplay -d /dev/oss/oss_cmi878x/pcm1 sample.wav - YES

mpd [pcm0] - NO
mpd [pcm1] - NO (noise/static)

If I could iron out the pcm1 static in MPD - I'd be a happy camper. It's got to be a problem with MPD? And who knows about mplayer, I get nothing at all. But that isn't my main objective.
fuzz
New Member
 
Posts: 5
Joined: Fri May 18, 2012 12:33 pm

Re: Xonar DG/DGX

Postby fuzz » Sat May 19, 2012 2:20 am

Good news, it seems to be working now. But only Optical Out / SPDIF [pcm1] - which is fine by me. The MPD Wiki had this to say:

MPD includes support for OSSv3. OSS4 will work, except for the mixer.

So the OSS piece in my musicpd.conf, is now more or less:

Code: Select all
audio_output {
           type            "oss"
           name            "Xonar DGX"
           device          "/dev/oss/oss_cmi878x0/pcm1"    # alternatively, /dev/dsp_ac3 (linked)
           format          "44100:16:2"       
           mixer_type      "none"
}

And now it works! The "none" for mixer being the key. I am unable to control volume from an MPD client, but I can use the Onkyo receiver I'm running out to.

Xonar DGX PCI-E card for OSS4/FreeBSD 9 = success? Well, optical out anyway. :D
fuzz
New Member
 
Posts: 5
Joined: Fri May 18, 2012 12:33 pm

Re: Xonar DG/DGX

Postby cesium » Sat May 19, 2012 8:12 am

Glad to hear this works for you. I suggest following this and making pcm1 the default output with vmix attached. This would make configuration of programs easier and can allow using multiple programs on pcm1 (using vmix. Note that if you do that, I suggest setting the default rate [vmix0-src in the mixer] to be same as your desired MPD's rate - 44.1K). It's also possible the regular out will work if you play with the mixer ("ext." options especially analog and spread).

As for MPD, this specific OSS driver should do OSSv3 mixer ioctls - not sure why it fails. Moreover IIRC there were ifdefs in the MPD source (or patches somewhere) to make it use more pallateble volume control to OSSv4 (SNDCTL_DSP_SETPLAYVOL etc. which would benefit from having vmix attached), so maybe examining the port would help here.
Mplayer should also work using "-ao oss:/dev/oss/..." syntax to set output node, and again to simply this you can change the default output to pcm1.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Xonar DG/DGX

Postby cladisch » Mon May 21, 2012 9:34 am

S/PDIF works on all CMI878x cards because it doesn't need any external chips.

The DG/DGX are not supported by OSS.
cladisch
Member
 
Posts: 30
Joined: Mon Apr 07, 2008 8:14 am
Location: Earth

Re: Xonar DG/DGX

Postby fuzz » Tue May 22, 2012 3:35 am

Thank you cesium, will do. :D

cladisch wrote:S/PDIF works on all CMI878x cards because it doesn't need any external chips.

The DG/DGX are not supported by OSS.


Er, what? The driver cannot make regular sound work, because it depends on stuff other than my sound card? I don't totally understand. :o

Why does osstest say it's working fine, I wonder?

My DGX is then partially supported at least? All the switches in ossmix to control SPDIF seem to work. I could not hope to do this with OSS version in FreeBSD base, the card is not even recognized.
fuzz
New Member
 
Posts: 5
Joined: Fri May 18, 2012 12:33 pm

Re: Xonar DG/DGX

Postby cladisch » Tue May 22, 2012 6:35 am

The driver cannot make regular sound work, because it depends on stuff other than my sound card?
I meant all the other chips that are connected to the CMI8786.

Why does osstest say it's working fine, I wonder?
Because the driver lies about whether it knows how to enable the analog I/Os.
cladisch
Member
 
Posts: 30
Joined: Mon Apr 07, 2008 8:14 am
Location: Earth

Re: Xonar DG/DGX

Postby fuzz » Tue May 22, 2012 7:52 am

Well, that's a bummer.

As long as the Optical keeps working like a champ I'll be OK, I guess. :wink:
fuzz
New Member
 
Posts: 5
Joined: Fri May 18, 2012 12:33 pm


Return to BSD

Who is online

Users browsing this forum: No registered users and 0 guests