You are not logged in.

#1 2009-04-08 20:02:16

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Best Quality Audio in Linux

I am using ALSA atm. What would be better for the highest quality of music playback, on linux?


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#2 2009-04-08 20:05:24

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Best Quality Audio in Linux

OSSv4 and set the vmix0-src to production, you will be surprised with the result.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2009-04-08 20:34:01

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Best Quality Audio in Linux

It sounds awesome. However I have no audio in the left speaker when I play music. I do the test, left works fine, right is all staticy. Whats wrong?
When I turn the right one up, its extremly staticy, but the left is fine when I turn it up.

Last edited by haxit (2009-04-08 20:39:26)


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#4 2009-04-08 21:38:28

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: Best Quality Audio in Linux

What soundcard are you using?

ALSA can provide as good sound as your soundcard can.
If you soundcard works only on one samplerate f.ex. 48000 Hz, you should set dmix to resample all audio to the same samplerate and set the highest quality of resampling. I can try to find, how this can be done later if you need, because now I have no time.

But if your soundcard can work on any samplerate, you should route all audio bypass dmix. AFAIR this can be done by editing soundcard configuration in /usr/share/alsa/cards/ or you can set as outpot device in your soft smthng like that "pcm.plughw:1" (with number of your card).

I use my realtek for general purposes so sound quality is not critical. And I use my ESI Juli@ via ALSA for listening music in mpd and sound is as good as it can be.

Offline

#5 2009-04-08 21:39:22

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Best Quality Audio in Linux

haxit wrote:

It sounds awesome. However I have no audio in the left speaker when I play music. I do the test, left works fine, right is all staticy. Whats wrong?
When I turn the right one up, its extremly staticy, but the left is fine when I turn it up.

Last time this happened to me, my speaker cable was plugged in loosely. I twisted it around a bit and everything worked.

Offline

#6 2009-04-08 21:43:54

Yaro
Member
Registered: 2009-04-03
Posts: 154

Re: Best Quality Audio in Linux

Thank you for not foolishly suggesting Pulse Audio as a suggestion for improving sound. Every time I see PA implemented, it breaks too much and fixes nothing.

I have not tried OSSv4. I've always been satisfied with ALSA. There a way to get OSSv4 installed?

Offline

#7 2009-04-08 21:49:04

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Best Quality Audio in Linux

@eDio

i've stuck with alsa b/c i got both multiple sources at once and my 7.1 surround working immediately, these two things have been trouble for me in the past with both OSS and Pulse. 

i'm interested in your tweaks to get the best sound possible out of your card.  if you have some time later to expand on that i'd appreciate it. 

@haxit
do you know, can OSSv4 do multiple sources and surround easily?  how did you go about the switch?  simply, pacman -R/-S alsa/oss?

Offline

#8 2009-04-08 22:18:41

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Best Quality Audio in Linux

@eDio
Resampling may always be needed, even if the soundcard supports many sample rates you may run out of hardware channels, also (and this is what made me change to OSS) the resampling quality with alsa seems to suck, I have tried increasing the quality of it but I haven't been able to do so (documentation is scarce seems to be a bit outdated and falls a bit short on providing usable examples in many cases when it concerns more "advanced" functions), also recording from mic was broken. It really wasn't a smooth experience for me but in some cases it works perfectly, although lately alsa seems to be making lots of people scratch their heads (as hd audio codecs are used more and more).

@Yaro
Just do "pacman -S oss"

@brisbin33
Good questions .... I'm using it in my notebook and at first sight it seems capable of doing multichannel, at least vmix0-channels has two options: stereo and multich. As for multiple sources ... I can record from a "normal" headset and from a usb headset ..... never tried both at the same time though.
To get oss just do pacman -S oss and it will take care of everything, it will move the alsa stuff to another location and make things work. Don't forget to give ossxmix a try when you have oss working smile


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2009-04-08 22:41:20

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: Best Quality Audio in Linux

oss +1.

Alsa is crappy, poor sound quality, but much higher CPU usage compared to oss, mainly due to the dmixer in alsa. In oss, using vmix is much more powerful, as said by above, setting vmix to production will make your music sound much better, if your music is from good source and played by professional speakers, or audiophile headphones.

You can simple issue one command to turn the vmix on/off  or change the resampling rate of vmix in oss, instead of edit some text files from /etc like in alsa. Plus, oss has a GUI: ossxmix, for people who don't like cml to do all the above and more.

Remember to first put "!soundcore" into your MODULES in /etc/rc.conf to disable alsa from loading, then restart your computer before you install oss.
If you don't want to restart it, you can also manually unload all the soundcore modules before inistalling oss.  For more details, see Oss Wiki page.

Cheers!

Last edited by yingwuzhao (2009-04-08 22:42:39)

Offline

#10 2009-04-08 23:07:07

Yaro
Member
Registered: 2009-04-03
Posts: 154

Re: Best Quality Audio in Linux

yingwuzhao wrote:

oss +1.

Alsa is crappy, poor sound quality, but much higher CPU usage compared to oss, mainly due to the dmixer in alsa. In oss, using vmix is much more powerful, as said by above, setting vmix to production will make your music sound much better, if your music is from good source and played by professional speakers, or audiophile headphones.

You can simple issue one command to turn the vmix on/off  or change the resampling rate of vmix in oss, instead of edit some text files from /etc like in alsa. Plus, oss has a GUI: ossxmix, for people who don't like cml to do all the above and more.

Remember to first put "!soundcore" into your MODULES in /etc/rc.conf to disable alsa from loading, then restart your computer before you install oss.
If you don't want to restart it, you can also manually unload all the soundcore modules before inistalling oss.  For more details, see Oss Wiki page.

Cheers!

I followed the wiki. Putting ! before soundcore in modules didn't do it. But putting ! before alsa in the daemons did. Had to create an asound.conf to get GNOME to actually use OSS, though.

I am curious. Where is that test sound stored? I like it and want it to be my login sound.

Offline

#11 2009-04-08 23:33:16

pharcyde
Member
From: Connecticut
Registered: 2009-03-13
Posts: 88

Re: Best Quality Audio in Linux

I can only get 1 audio source working with OSSv4 at a time. For example: I'm watching a porn flick and listening to tunes at the same time, only the one I started first will play audio. Anyone know why?

Offline

#12 2009-04-09 00:12:08

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Best Quality Audio in Linux

ok another oss convert.  osstest varified my surround works.  and i successfully watched a porn, youtubed, and mpd'd all at once (sorry pharcyde)... also the per app volumes are sweet!

for what it's worth i modified alsa dvol script to work with oss.  requires dzen, bind it to some media keys.  the quality seems better too! enjoy.

#!/bin/bash
#
# ossvol is a simple script to manage oss volume levels and muting.
#
# Script by: Daniel J Griffiths <ghost1227@archlinux.us>
# Configure stuff
VOLSTORE=~/.volume
CHANNEL="vmix0-outvol"
ARGUMENT=$2

# dzen stuff (WIP)
SECS="1"            # sleep $SECS
BG="#080808"        # background colour of window
FG="#ffffff"        # foreground colour of text/icon
BAR_FG="#ffffff"    # foreground colour of volume bar
BAR_BG="#080808"    # background colour of volume bar
XPOS="750"          # horizontal positioning
YPOS="515"          # vertical positioning
HEIGHT="50"         # window height
WIDTH="400"         # window width
BAR_WIDTH="300"     # width of volume bar
ICON="$HOME/.icons/dvol/spkr_02.xbm"
FONT="fixed"

# You shouldn't have to edit below here.
PIPE="/tmp/dvolpipe"

err() {
    echo "$1"
    exit 1
}
usage() {
    echo "usage: ossvol [option] [argument]"
    echo
    echo "Options:"
    echo "     -i, --increase - increase volume by [argument]"
    echo "     -d, --decrease - decrease volume by [argument]"
    echo "     -t, --toggle   - toggle mute on and off"
    echo "     -h, --help     - display this"
    exit
}
toggle() {
    if [ -f $VOLSTORE ]; then
        ossmix $CHANNEL `cat $VOLSTORE`
        rm $VOLSTORE
    else
        VOLUME=$(ossmix $CHANNEL | awk '{print $10}' | awk -F : '{print $1}')
        ossmix $CHANNEL 0
        echo $VOLUME > $VOLSTORE
    fi
}
increase() {
    if [ -f $VOLSTORE ]; then
        TMPVOL=`cat $VOLSTORE`
        NEWVOL=`expr $TMPVOL + $ARGUMENT`
        ossmix $CHANNEL +$NEWVOL
        rm $VOLSTORE
    else
        ossmix $CHANNEL +$ARGUMENT
    fi
}
decrease() {
    if [ -f $VOLSTORE ]; then
        TMPVOL=`cat $VOLSTORE`
        NEWVOL=`expr $TMPVOL - $ARGUMENT`
        ossmix $CHANNEL -- -$NEWVOL
        rm $VOLSTORE
    else
        ossmix $CHANNEL -- -$ARGUMENT
    fi
}
case "$1" in
    '-i'|'--increase')
    increase
    ;;
    '-d'|'--decrease')
    decrease
    ;;
    '-t'|'--toggle')
    toggle
    ;;
    '-h'|'--help')
    usage
    ;;
    *)
    err "Unrecognized option \`$1', see ossvol --help"
    ;;
esac

#Using named pipe to determine whether previous call still exists
#Also prevents multiple volume bar instances
if [ ! -e "$PIPE" ]; then
  mkfifo "$PIPE"
  (dzen2 -tw "$WIDTH" -h "$HEIGHT" -x "$XPOS" -y "$YPOS" -fn "$FONT" -bg "$BG" -fg "$FG" < "$PIPE" 
   rm -f "$PIPE") &
fi

#Feed the pipe!
VOL=$(ossmix $CHANNEL | awk '{print $10}' | cut -d '.' -f 1)
VOL=$(expr $VOL \* 100 / 25)
(echo "$VOL" | gdbar -l "^i(${ICON})" -fg "$BAR_FG" -bg "$BAR_BG" -w "$BAR_WIDTH" ; sleep "$SECS") > "$PIPE"

exit 0

Offline

#13 2009-04-09 00:29:10

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Best Quality Audio in Linux

My install went perfect. But as I said, the right speaker is staticy when turned up. And when its is not, you cannot hear the left speaker (when they are both balanced.) Sound quality however is PERFECT! Only if it work properly.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#14 2009-04-09 01:37:53

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Best Quality Audio in Linux

i'm sure you've checked this... but try it with a pair of headphones to make sure you're not having random hardware issues... _just_ incase.

Offline

#15 2009-04-09 13:11:43

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Best Quality Audio in Linux

@haxit
That seems like oss is playing one of your input sources and I suspect it is the mic input because you get interference only in one channel.
You will need to either reduce the recording volume or find the control to make it stop playing that input (recording will still work but it doesn't get played).

@pharcyde
Make sure you tell your programs to output to /dev/dsp and enable vmix and set vmix-src to anything other than off.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#16 2009-04-09 16:48:35

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: Best Quality Audio in Linux

OSS is really good. And yes, it is better, than alsa. It takes less than 30 minutes for me to setup all soundcards in way, that I want: no mixing on Juli@, monitoring realtek by Juli@ via spdif and so on...
The only issue: xmixer is toooooo big.

brisbin33
Do you still need to tweak alsa? wink

Offline

#17 2009-04-09 17:05:55

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Best Quality Audio in Linux

eDio wrote:

brisbin33
Do you still need to tweak alsa? wink

no sir, happy oss user now!  i would love a way to stop ossxmixer from opening horizontally maximized though.  annoying...

edit: spelling...

Last edited by brisbin33 (2009-04-09 17:06:15)

Offline

#18 2009-04-09 17:08:20

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: Best Quality Audio in Linux

I've been using OSS from several months. I must say I'm satisfied with it except for some small problems.
At first I have taken off gnome-mixer-applet because it didn't let the system hibernate. I've recently tried 2.26 version but there's still some compatibility problem that makes me think that OSS should be more integrated with Gnome.
Other small problems are that I can't control volume into moc and that audio doesn't work into Gajim and Moonlight videos.


Till the last battle, till the last bottle.
aur - twitter

Offline

#19 2009-04-09 20:03:46

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Best Quality Audio in Linux

R00KIE wrote:

@haxit
That seems like oss is playing one of your input sources and I suspect it is the mic input because you get interference only in one channel.
You will need to either reduce the recording volume or find the control to make it stop playing that input (recording will still work but it doesn't get played).

Still doesn't work.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#20 2009-04-09 20:46:48

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Best Quality Audio in Linux

I adjusted the levels so that they are both even. But still in osstest, I get static on the right speaker.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#21 2009-04-09 22:20:09

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: Best Quality Audio in Linux

Just switched to oss4, seems better. I had a feint hiss in background with alsa which is now gone. Will test tomorrow with some loud speaker test

Offline

#22 2009-04-10 13:08:48

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Best Quality Audio in Linux

@haxit
Hmmm ... I have no other ideas then, It did work well for me right from the start (mic capture was harder to figure out but eventually I got it working perfectly). Maybe you should try to get some help at the oss forums, I guess someone that knows better will be able to help you (I guess that it may be a tinny detail that is keeping you from getting good sound).
http://www.4front-tech.com/forum/index.php


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#23 2009-04-10 15:19:28

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: Best Quality Audio in Linux

Sorry if it's already been asked, but how can I use Volume Up and Volume Down stuff in GNOME?

I tried setting the keys to the ossvol script's raise, lower, and mute stuff, only GNOME doesn't want to recognize it.

Offline

#24 2009-04-11 02:57:46

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Best Quality Audio in Linux

Arm-the-Homeless wrote:

Sorry if it's already been asked, but how can I use Volume Up and Volume Down stuff in GNOME?

I tried setting the keys to the ossvol script's raise, lower, and mute stuff, only GNOME doesn't want to recognize it.

Hm, I didn't need to set up anything. I even removed gnome's volume mixer applet, added ossxmix -b to startup programs. My multimedia keys changes the volume fine (total default oss setup) neutral

Offline

#25 2009-04-12 04:38:34

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Best Quality Audio in Linux

I just installed oss 4.1 1052_1 on xfce4 and I think it does sound better. I also installed ossvol and have my keytouch app using it for volume up/down/mute....


I haven't tried that suspend script yet.

Offline

Board footer

Powered by FluxBB