Find the answer to your Linux question:
Results 1 to 5 of 5
Last week I was trying to find a way to enable 5.1 sound and multiple sounds at a time at first I found a code that enables the 5.1 channels ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Location
    Panama
    Posts
    17

    Lightbulb Improve the sound quality - .asoundrc


    Last week I was trying to find a way to enable 5.1 sound and multiple sounds at a time at first I found a code that enables the 5.1 channels the I notice that can't play multiple sounds after that I find in the ALSA site a code to multiple sounds at the sametime but no 5.1 channles and what I did is mix both of them like this:

    Code:
    pcm.!default {
            type plug
            slave.pcm dmixs51
            slave.channels 6
            route_policy duplicate
    }
    
    pcm.dmixs51 {
    	type dmix
    	ipc_key 1024
    	ipc_key_add_uid false # let multiple users share
    	ipc_perm 0660 # IPC permissions (octal, default 0600)
    	slave {
    		pcm "hw:0,1" # see below
    		rate 41000
    		channels 6
    		period_time 0
    		period_size 1024
    		buffer_time 0
    		buffer_size 4096
    	}
    }
    But now the thing is that any sound plays with some little crackling, but is more clear on song thats last longer that GAIM sounds.

    Does anybody knows a way to improve the quality of the sound??? or correct my code if it have something wrong.

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Using a ~/.asoundrc or /etc/asound.conf is really not necessary anymore with newer versions of alsa (starting with Ubuntu 5.10).

    Did you notice a sound improvement using one ?

    First, the rate should be 48000, or 44100 (not 41000). Then you can up a little the buffer_size and period_size.

    But I digress, as you shouldn't need to resample the sound, just reroute it :
    http://alsa.opensrc.org/faq/#FAQ028

    Some more info here :
    http://alsa.opensrc.org/.asoundrc
    http://www.alsa-project.org/alsa-doc...p/asoundrc.php
    http://www.cse.ohio-state.edu/~bondhugu/alsamch.shtml
    http://alsa.opensrc.org/SurroundSound
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    Just Joined!
    Join Date
    Jul 2006
    Location
    Panama
    Posts
    17
    thanks for the advice I change it to this now

    Code:
    pcm.!default {
            type plug
            slave.pcm dmixs51
            slave.channels 6
            route_policy duplicate
    }
    
    pcm.dmixs51 {
    	type route
        	slave.pcm surround51
        	slave.channels 6
        	ttable.0.0 1
        	ttable.1.1 1
        	ttable.0.2 1
        	ttable.1.3 1
        	ttable.0.4 0.5
        	ttable.1.4 0.5
        	ttable.0.5 0.5
        	ttable.1.5 0.5
    }
    works like a charm, but now MPlayer hangs also with videos, that doesn't happen with the other code, Amarok and Totem, play music just right, and other thing the crackling was because the PCM vol was at 100% and I was just moving the master after I lower the PCM volume to like 50% Voila, no crackling and cristal clear sound as far as I know about sound.

  4. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Quote Originally Posted by arkngelus
    works like a charm, but now MPlayer hangs also with videos,
    Does MPlayer display any errors ?
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  5. #5
    Just Joined!
    Join Date
    Jul 2006
    Location
    Panama
    Posts
    17
    yes only after I kill it

    Here's the message:
    MPlayer interrupted by signal 15 in module:ao2_init

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •