ASUS Xonar DG - a Linux user's impressions... and workarounds

Once I decided that my soundcard was crap, and I need a relatively cheap soundcard that can produce anything worthy from my Sennheiser HD438 headphones. I paid for these headphones ~45€ after all, and heavily distorted bass from my built-in Realtek card wasn't what I was looking for, especially considering that 70% of my music is very bassy. I bought ASUS Xonar DG sound card, which looked like the best option for me. It has integrated headphone amplifier, it's kinda cheap (25€), quick check on Phoronix seemed to confirm that the card has (relatively new) ALSA drivers, so I thought "that's my new card".


Anyway, with my new Xonar DG in my computer's PCI slot, I started testing out what it has to offer. On Windows, after playing a bit with bundled software's settings (key option: headphone impendance, also some bassy equalizing needs to be done), the bass was clear, loud, and I could finally enjoy my quality headphones. Switching to Linux, it wasn't so nice though. 

It turned out that this card doesn't have much more features working than playing sounds. First, the card even seemed not to work. That was because volume controls were missing - as ALSA wiki suggests, I needed to install Pulseaudio as a workaround. (that was a good excuse to replace my Gentoo install with Pulseaudio-defaulting Ubuntu to make things easier) It worked, I could hear sounds and change the volume. But sound was exactly like on my integrated shitty card, much quieter than on Windows and with distorted bass, which made me sad - I bought this card to use it mainly with Linux, right?

The problem is missing headphone amplifier support for this card in ALSA. Also because of that, I needed to set "Analog output" to either "Speakers" or "FP Headphones". When set to "Headphones" I got no sounds. I assume both of the proper settings sort-of workaround amplifier chip (I can notice a 'tick' sound coming from the card when changing the setting, by the way).

Now, after almost 3 months with my card, and being forced to listen to music on Windows for this time, I found a dumb way to make Linux-powered Xonar DG produce nice bass. The trick is to install Pulseaudio Equalizer, or use equalizer built into your music player (like Clementine, which I am using) - but Pulseaudio equ's advantage is that it will also change equ settings for YouTube videos etc. You can download it from there. If you use Ubuntu, it probably will install fine. If you have another distro, or got any problems installing the package in Ubuntu the normal way, you can unpack .DEB file, unpack data.tar.gz file from the inside, and copy contents of 'usr' folder to your /usr with command:

cp -r /home/sado/pulseaudio/usr/* /usr/

(where /home/sado/pulseaudio is the folder you unpacked data.tar.gz to). Remember that you need to install swh-plugins and bc from your distribution's repositories, python is of course needed too but you probably already have that one. If you have an error about missing /usr/share/icons/hicolor/16x16/apps/gnome-volume-control.svg file, try this:

wget http://upload.wikimedia.org/wikipedia/commons/4/44/Gnome-multimedia-volume-control.svg
sudo cp Gnome-multimedia-volume-control.svg /usr/share/icons/hicolor/16x16/apps/gnome-volume-control.svg

Now, run pulseaudio-equalizer-gtk and play with equalizer settings. For equalizing newbies I'll remind you that a good equalizer set doesn't go above 0 decibels (in other words, above the center level).

Now, the workaround for nice bass on Xonar DG is to, first, set volume in your system mixer to (almost) maximum level (so it gives enough power to headphones without using amplifier), then make a bass-loving equalizer setting like one on the picture below: it doesn't have to be exactly like that, the key things to remember are: first frequency needs to be on 0.0, while all other freqs need to be set much lower. You could make all of them on almost lowest level (as my middle ones look like), but it's good to keep 2-3 frequencies lower than first but higher than next ones for better sounding bass. Also, same for last frequencies (on the right) - these ones give you better treble (high tones), so music doesn't sound too flat.
These equalizer settings may suck if someone's more experienced in that kind of stuff, but it sounds good for me and that's what matters. You can also use built-in presets, then lower decibels for middle frequencies. I also needed to add "pulseaudio-equalizer enable" to be ran on start of my KDE session, because settings weren't on after rebooting/logging off and in again. It worked fine on Ubuntu before, for some reason it doesn't anymore since I changed to Arch, so you might not need to do it.

Comments

  1. I have a Xonar DG too and am running into the exact same problem. The headphones don't work when plugged into the front port in Ubuntu 12.04. Do you have any suggestions to get this working? Thanks for the great blog post!

    ReplyDelete
  2. I'm sorry, I know no solution. You need to wait until ALSA guys add front panel support to the driver.

    ReplyDelete
  3. I'm also affected by the lack of headphone amp/FP support.
    The ALSA developer who implemented support for Xonar cards (Clemens Ladisch) has said that it's unlikely that he'll ever implement these missing features. He said this on January 2011 so I guess it's true, probably because lack of time, or he doesn't have a DG to test it on.

    That's too bad because it's the best thing about the DG. There are multiple people affected by this, should we try to urge the ALSA guys to give it a try? Or maybe ask the guy behind the UNi Xonar driver (Windows 3rd party driver) how he did it?

    ReplyDelete
  4. To be honest I don't care much anymore. I gave the card to a friend since I barely use my PC nowadays (got myself a laptop shortly after buying the Xonar... funnily enough, this one is ASUS as well, but thankfully Linux works really well there). Anyway, what would need to happen for ALSA devs to care about the issue, should we donate to buy them a card for testing?

    ReplyDelete
  5. (v1ron) Currently I have the driver almost developed for Xonar DG. Nice bass, but I need to make 5.1 working and will send the patches to ALSA community. From Russia with love :)

    ReplyDelete
    Replies
    1. While working on the drivers, have you been able to make the volume control work? If so, how?

      The reason I'm asking is that I installed FreeBSD a while ago and have dabbled with the OSS drivers the last few days to get some response from the card. Whatever I do, I only seem to be able to do what the mainline Linux kernel (=ALSA) drivers do which is to play stereo sound at deafening volume and that's it. Frankly, it seems you don't need to massage the driver much to achieve that, which is probably good, because I have no expertise on the subject. Still, CS4245 should have volume control but I've yet to see it work with the card (except in Windows). (The sorry excuse for a datasheet I found for CS4361, which I gather should be the surround sound DAC in DG, doesn't even mention volume control.)

      Anyway, I would be very curious to find out what exactly it is that you're doing driver-wise especially if you've managed to make the hardware volume controls work.

      Delete
    2. That's because CS4245 is only for headphones in this card. Windows driver uses software volume instead of changing volume of CS4245. That's interesting, CS4245 volume changes in Windows driver only when you select the headphones resistance. This card doesn't have global volume control. Use any software workarounds in ALSA\Pulseaudio to change volume.

      Delete
    3. Hi Roman Volkov, thanks so much for making the driver.

      I'm currently using your patches with the latest kernel and it works perfect, including input and amp.
      The only detail is that when booting the amp turns on (audible click) and then it turns off, I guess this is because "Stereo Headphones" is the first option in the "Output" item. Can you make "Multichannel" the first?

      How much do you think it will take for them to accept the patches?

      Delete
    4. Hello, can you write an instruction on how to do it? Or if there's one already, point me to it, I was not able to find any last time I tried.

      Delete
    5. Hello Noert, to apply Roman's patches I had to recompile the kernel. I
      think you can apply the patches only to the Oxygen driver, but it didn't
      work for me.

      Here I uploaded Roman's patches:
      oxygen1.patch http://pastebin.com/w3VY2tPu
      oxygen2.patch http://pastebin.com/ffRa7rkA
      oxygen3.patch http://pastebin.com/TSfE41P6
      oxygen4.patch http://pastebin.com/T3DcgkK1
      oxygen5.patch http://pastebin.com/dxADhghK

      There are distribution specific ways to do this, but normally you get
      the Linux kernel sources, then go into the directory, copy the patches
      inside and apply them with this command:

      patch -p1 < filename.patch

      Then you configure the kernel, compile it and install it.

      These patches enable input, headphone amp and front panel in the Xonar
      DG sound card. It works well. Good work, Roman, I hope these get
      accepted soon.

      Noert, if you need more help feel free to send me an e-mail to z411 [at]
      krutt [dot] org

      Good luck.

      Delete
  6. That's cool, even if I don't use the card anymore. Nice to see that nothing in Linux community will remain broken :)

    ReplyDelete
  7. Hello.
    So how are the drivers working right now?
    My last empty slots are PCI and this card is perfect, good brand and cheap.
    I will mainly use it for gaming and play .mp3 and .flac files.
    I have Lubuntu 14.04 64bits.

    ReplyDelete
  8. Hello. I'm using Fedora 22, and it seems the Headphone AMP has been solved. The one thing I'm not been able no get to work it the Dolby Surround feature. Besides from that, the sound card works perfectly.

    ReplyDelete
  9. Hello. I own Xonar DS, but bass on headphones is destroyed. i dont have any equalizer settings, or maybe i dont know how to make it.

    @Gabriel Verdi about Surround i can help you.

    ReplyDelete

Post a Comment

Popular Posts