You are not logged in.
I want to take full advantage of my hardware. However, I'm having trouble understanding what settings I need to configure. I've spent several hours reading through wikis and searching online. Ultimately, I'm trying to achieve the highest quality audio output in stereo that's possible with my setup. USB > Behringer UAC202 > RCA out > Audioengine A2
I've had this DAC working for a couple of weeks, but I noticed that MPD was still eating a lot of CPU cycles upsampling music from 44.1 to 48khz. As I looked into it, it seems that this is unavoidable with ALSA, so I need to use OSS. Is that true? There's some conflicting ideas about when it's necessary to use OSS. I'm not using any legacy applications or old hardware. The "Hardware mixing" section in the ALSA wiki is pretty sparse.
I want all sound to go through the DAC, so I disabled all of the sound options in the BIOS (HDAudio and HDMI audio). I shouldn't need those enabled, right? (What's strange is that ALSA no longer wants to load without them.) I've added the OSS daemon and it starts, but I still don't have any sound in KDE. It no longer offers the "USB Audio CODEC" option. I'm ok with no system sound for now, if I can get MPD working.
/etc/mpd.conf contains:
audio_output {
type "oss"
name "UCA202"
device "/dev/oss/usb08bb2902-1/pcm0"
format "44100:16:2" # optional
mixer_device "/dev/mixer"
}MPD is still starting as the root user. (I know, I should change that)
The daemon starts, but trying to play any track results in the following error in /var/log/mpd/mpd.log:
May 21 10:46 : output: "UCA202" [oss] failed to play: Write error on /dev/oss/usb08bb2902-1/pcm0: Input/output error
So... any help would be appreciated. Maybe, first of all, do I need to use OSS or should I switch back to alsa? Or maybe something else like jack?
*******EDIT*******
ALSA was the correct choice. The simple solution was to create /etc/asound.conf containing:
pcm.!default{
type rate
slave{
pcm "plughw:0,0"
rate 44100
}
} Then change the audio output settings in mpd.conf to:
audio_output {
type "alsa"
name "MPD ALSA"
device "hw:0,0"
mixer_control "PCM"
} With these settings the DAC receives 44.1khz audio and no upmixing occurs. Only one application can make audio output at a time. MPD uses much less CPU.
Last edited by ioos (2012-05-24 23:34:51)
Offline
upsampling music from 44.1 to 48khz. As I looked into it, it seems that this is unavoidable with ALSA
That's completely false.
Dmix will use e.g. 44.1 if told - see the config in my sig, as an example.
disabled all of the sound options in the BIOS (HDAudio and HDMI audio)
Use probe_mask instead.
Offline
Thanks. So it sounds like I should stick with ALSA if it's able to output 44.1. First I need to get it to load again though. The snd_usb_audio module fails to load at start. I *think* this is because of disabling sound in the BIOS, however Ubuntu still recognized the DAC and output audio with zero config changes. Does Arch do something different when loading the kernel modules? brebs, can you please explain why you suggested using probe_mask? It's not something I've ever heard of and that article is incredibly dense.
Offline
Do you really NEED dmix? if not you can simply make mpd output to hw:0. But you lose the ability to play several sounds at once.
If music is what you are into mostly, it makes sense to force alsa to use 44.1 instead of 48 (which is the default)
If you do this, you MUST set up your movie player to do the resampling tho, otherwise things will be out of sync.
So without dmix: simply tell your apps to output straight to hw:0.
With dmix:
/etc/asound.conf:
pcm.!default {
type rate
slave {
pcm "plughw:0,0"
rate 44100
}
}relavent part of mplayer config:
ao=alsa
af=resample=44100:2 (not completely sure about this line, i have it commented out)
srate=44100He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
OK, the part about the modules was my fault. After reinstalling the kernel, the ALSA modules load correctly. (Even with the sound disabled in the BIOS)
I created /etc/asound.conf containing exactly what Rasi suggested. How do I confirm it's working correctly? MPD is still taking a lot of CPU. Do I need to specify anything in mpd.conf?
Here's what I have now:
audio_output {
type "alsa"
name "MPD ALSA"
mixer_device "snd_usb_audio"
mixer_control "PCM"
}Offline
showing your whole mpd.conf would help ![]()
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
showing your whole mpd.conf would help
Sure. It's mostly the defaults: http://pastebin.com/jvfZQamP
Offline
Wow, you havent set anything it seems ![]()
well this is a bit like seeing in the dark. Can you first check if 2 OTHER apps have sound at the same time?
e.g. mplayer and flash.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
...
mixer_device "snd_usb_audio"
...
This won't work, it's supposed to be something like "default" or "hw:1".
Offline
...
mixer_device "snd_usb_audio"
...This won't work, it's supposed to be something like "default" or "hw:1".
which doesnt matter.. its only the mixer....
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Wow, you havent set anything it seems
well this is a bit like seeing in the dark. Can you first check if 2 OTHER apps have sound at the same time?
e.g. mplayer and flash.
Nope. With a flash video playing, VLC had no sound. That's good, right?
What should I be using for the mixer_device? What I have didn't create any errors in mpd.log, so I thought it was correct.
Offline
well you still havent told us, if you want multiple output or not. and i already told you what to do in the latter case.
simply have " device "hw:0,0"
in mpd.conf
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
For the time being, I'm ok with single output, and focusing on playback quality in MPD.
I changed the device, it now reads:
audio_output {
type "alsa"
name "MPD ALSA"
device "hw:0,0"
mixer_control "PCM"
}Unfortunately after restarting MPD, there isn't any audio output. The log says:
May 23 12:32 : output: Failed to open "MPD ALSA" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busyLast edited by ioos (2012-05-23 19:40:26)
Offline
man you are complicated.. but anyway, your last statement FINALLY told us, that you DO want output from several applications.
if you put "default" instead of hw:0" it *should* work.
**edit** you probably should restart all apps that use sound in any way after this.
Last edited by Rasi (2012-05-23 20:16:28)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
man you are complicated..
Oh no! I swear I'm not trying to be. I'm doing my best to answer your questions. I really do appreciate your assistance.
Offline
no offense meant, dont take it this way ![]()
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
For good sound quality, flat response is the most important thing. Take a look at qloud, http://aur.archlinux.org/packages.php?ID=34412, and find yourself a very good microphone.
Then you will probably want to set a global equalizer for your machine. You can try with alsa, http://krustev.net/w/articles/Global_eq … _for_ALSA/.
If ALSA isn't finegrained enough, jack has a lot more flexibility, except for the fact that it doesn't allow you to set default output device, so you will need a helper application to redirect all output connections to your equalizer.
Offline
For good sound quality, flat response is the most important thing. Take a look at qloud, http://aur.archlinux.org/packages.php?ID=34412, and find yourself a very good microphone.
Then you will probably want to set a global equalizer for your machine. You can try with alsa, http://krustev.net/w/articles/Global_eq … _for_ALSA/.
If ALSA isn't finegrained enough, jack has a lot more flexibility, except for the fact that it doesn't allow you to set default output device, so you will need a helper application to redirect all output connections to your equalizer.
Well, i would say this is quite subjective. Untouched signal is superior to any equalized sound in my opinion, but i know this debate is never satisfying ![]()
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Pajaro, thanks. I didn't even know applications like qloud existed. I'll look into it down the road, but for now I'm just trying to get my basic settings right to utilize what I have.
Rasi, I made another mistake. The "hw:0,0" setting does work after setting it and rebooting. I'm not sure which app was taking it over before.
So... "default" and "hw:0,0" both work. Is there a difference? I'm using "hw:0,0" right now. MPD isn't taking a bunch of cpu, so I don't think it's upsampling anymore. Is there a way to verify the output?
Offline
i would say this is quite subjective. Untouched signal is superior to any equalized sound in my opinion, but i know this debate is never satisfying
Just to share my experience, I use two cheap 350W speakers intented for stage monitoring or small concerts that sound like crap (to much low-mid frequencies and low hi response at certain frequencies), but with a quick sound analysis and 8 band parametric equalization they became nice.
EDIT: sorry, 6 band parametric equalizer, 2 are disabled.
Last edited by Pajaro (2012-05-24 19:07:28)
Offline
Pajaro, thanks. I didn't even know applications like qloud existed. I'll look into it down the road, but for now I'm just trying to get my basic settings right to utilize what I have.
Rasi, I made another mistake. The "hw:0,0" setting does work after setting it and rebooting. I'm not sure which app was taking it over before.
So... "default" and "hw:0,0" both work. Is there a difference? I'm using "hw:0,0" right now. MPD isn't taking a bunch of cpu, so I don't think it's upsampling anymore. Is there a way to verify the output?
default SHOULD do dmix, so you have multiple apps using soundcard.
hw:0,0 will NEVER upmix, so you can be sure its alright now.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Thanks for everyones input, especially Rasi for sticking with me. I updated the first post with my solution.
Offline