Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Asus Xonair DX and USB microphone ALSA only.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dimko
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 126

PostPosted: Mon Feb 11, 2019 3:44 pm    Post subject: [Solved] Asus Xonair DX and USB microphone ALSA only. Reply with quote

Issue is resolved, but road to resolution was long and painful.

What I wanted:

1. I hate pulse audio. Passionately. Over years it gave many troubles. It is supposed to make life better, but it just doesn't. I found way to get rid of it. Since DMIX in ALSA is a thing, there is no need for Pulseaudio anymore. Unless you are really into mediocre stuff that Alsa cant do.(per program volume setting, easy configuration of sound routing, all of those at expense of additional latency and sacrifice of sound quality)

2. Xonair DX has amazing specs for a sound card. I could not get DMIX to work with all programs. Some programs worked fine with sample rate of 192000 khz but many refused. Finally, all works for me. I have couple of odd issues with some programs still. Currently Firefox does not produce sound with some videos on youtube. But i suspect it's either Firefox issue or some odd library problem. Something I think I can fix.

3. I am unemployed(anyone hiring Linux geek in Republic of Ireland?). So I avoid buying stuff I can avoid. I have USB web cam with microphone. It worked fine with pulse before. So I know it works. I wanted to make it work with existing set up to be able to skype out and use VOIP generally.(yes I know, skype needs pulse)

4. Work in progress: Downmix based on positional variable. Basically emulate all channels on stereo headset I have. You may ask, why? Imagine, video file with surround sound with 5.1 , where someone says something 'behind your back(back speakers)' and you dont have those, and you app does not have downmixing or simply doesn't have it enabled - you WILL NOT HEAR what was said, period.
Also, hypothetically, can be used for better sound positioning in 3d games.(to be tested yet, bt i wont be sharing findings, because it would be highly subjective if at all noticeable)

So what did I do?

1. Installed apulse, for skype and alike.
2. I finally got configuration right with .asoundrc, below
Code:


#this section I am still working on. I want to make it work with positional variable. but if you run something like 'speaker-test -t wav -c 6 -D surround51' - it will produce more output then just left and right channel.(centre and rear sounds will also be heard too).

pcm.!surround51 {
    type vdownmix
    slave.pcm "default"
}


# the main PCM, DMIX, allows several apps to work with sound card at the same time.
pcm.dmixed {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
#        period_size 1024
        buffer_size 4096
        rate 192000
   channels 6
   format S32_LE
}

}


# usb mic, dsnoop is same as DMIX but for microphone. It allows several apps to take input from microphone at the same time. I did not try,but hypothetically you could do gaming session with friends, talk to them over team speak or discord and record whole thing for youtube later on.
pcm.dsnooped {
    type dsnoop
    ipc_key 1025
    slave.pcm "hw:1,0"
    slave{
    rate 48000
    }
}

# asym cant be !default, hence this below.
pcm.duplex {
    type asym
    playback.pcm "dmixed"
    capture.pcm "dsnooped"
}


# Instruct ALSA to use pcm.duplex as the default device
pcm.!default {
    type plug
    slave.pcm "duplex"
}




I am still work on the .asoundrc. I want to be able to downsample 5.1 surround ound to stereo at will using variables.(to have better positional sound in 3d games), but all in all getting below, is extremely satisfying. And no, no lag or anything, apart from issues with chromium and Firefox. Firefox recompiled with no pulse. Chromium compiles now, but works currently with apulse just fine.
Code:

cat pcm*/sub*/hw_params
closed
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 6
rate: 192000 (192000/1)
period_size: 964
buffer_size: 4096
closed
closed



If you notice, buffer size is a bit small, but i got no problem with that. It does ocasionaly warning me in console that underruns do happen, but quality is impecible.

I really hope it helps some lost soul out there.

I strongly recommend Asus Xonair DX to any Linux user who needs PCI-E sound card. its PCI-E 1x, so any PCI-E slot will do.
It does require floppy power connector, but sound is superior and SNR is amazing, i wont even say anything about stats of it. Compatible with 3.5 jacks and optical.
_________________
Just a user.
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 564
Location: France

PostPosted: Tue Feb 12, 2019 11:26 am    Post subject: Reply with quote

Unfortunately, the Xonar DX card seems too old. Most of the online vendors I often visit don't sell it anymore. So I just bought a Xonar DGX card, which is low-profile too (it's an obligation, because of my box), to replace my "good-old", but too badly supported, Creative X-Fi 5.1 USB. I should have enough time to mount it next week-end. I suppose some of your configuration tips will help me. Thank you.

I also spent many years to fight against ALSA, Firefox, mplayer/MPV, and so on... fine configuration détails. I even had to disable the DMIX plugin, because of video lags inside Firefox. I finally gave up when Firefox decided to stop supporting ALSA. I installed pulseaudio... Most of my problems were solved, but I lost some capabilities, like adjusting the volume for each channel, especially the central one (most of the actors' voices play through this channel, in a movie). My neightbours hate me, now. :roll:

Sound in linux is still a PITA. :evil:
Back to top
View user's profile Send private message
dimko
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 126

PostPosted: Tue Feb 12, 2019 12:29 pm    Post subject: Reply with quote

Syl20 wrote:
Unfortunately, the Xonar DX card seems too old. Most of the online vendors I often visit don't sell it anymore. So I just bought a Xonar DGX card, which is low-profile too (it's an obligation, because of my box), to replace my "good-old", but too badly supported, Creative X-Fi 5.1 USB. I should have enough time to mount it next week-end. I suppose some of your configuration tips will help me. Thank you.

I also spent many years to fight against ALSA, Firefox, mplayer/MPV, and so on... fine configuration détails. I even had to disable the DMIX plugin, because of video lags inside Firefox. I finally gave up when Firefox decided to stop supporting ALSA. I installed pulseaudio... Most of my problems were solved, but I lost some capabilities, like adjusting the volume for each channel, especially the central one (most of the actors' voices play through this channel, in a movie). My neightbours hate me, now. :roll:

Sound in linux is still a PITA. :evil:


So I started to dig more. Yeah apparently Firefox dropped ALSA support, with that said, it still does work with ALSA. You dont have to support ALSA to make it work. hats what they did.

Now that i started to dig more into it. I uncovered:
1. Firefox does not like high frequency samples. Lowering them - makes it work again. Try lowering sample rate.
2. Apulse is blocked in portage by actual pulse audio. Something I would have to deal with...
_________________
Just a user.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum