Page 1 of 10 123 ... LastLast
Results 1 to 10 of 96

Thread: HOWTO: M-audio Revolution and upgrade Alsa

  1. #1
    Join Date
    May 2006
    Location
    Oslo, Norway
    Beans
    243
    Distro
    Ubuntu 13.10 Saucy Salamander

    HOWTO: M-audio Revolution and upgrade Alsa

    I got sick and tired of having half working 5.1 sound cards, and bought a M-audio Revolution 5.1 after thorough research. I highly recommend the M-audio Revolution 5.1 for Ubuntu. There are three main reasons for choosing this card. With this card your 5.1 configuration works, you get a high quality card and you support a manufacturer who releases the card's specs to the linux community. Don't support Creative! With their attitude towards Linux, they should not get our money. The Revolution 5.1 is a bit more expensive than a Creative eqvivalent, but it's worth the extra money.

    This card should more or less work out of the box with an updated system. You should read on if you
    • Still have Edgy
    • Want to use the line in port
    • Want to duplicate the front channel audio stream to the rear channels


    This card doesn't work well with Alsa versions older than 1.0.12. Since Edgy includes version 1.0.11, you should upgrade to the latest version. If you have Feisty installed, you should be ok. It comes with Alsa 1.0.13. The line-in port only works from 1.0.14rc1 or newer, so you should upgrade if you need that feauture.

    Bugs and untested features

    I should note that after any reboot, the front left channel is muted, but it's a known bug, and will probably be fixed in a future Alsa release. To fix it for the current session, you have to adjust the volume of the front channels in alsamixer, e.g. up and down once. There is one more known bug, which is the headphones output. It does not work. Unfortunately I'm not able to test the digital S/PDIF output. If somebody has information about this, please make a post about it here.

    Installing the latest Alsa drivers

    I'll show you how to install Alsa properly. First of all you should run
    Code:
    sudo /etc/init.d/alsa-utils stop
    This stops the Alsa machinery. I didn't do this first time I installed the Alsa drivers, and got some severe problems because of it. It's important that you do not forget the above command. Now, download the latest development release of alsa-driver, alsa-lib and alsa-utils from the Alsa webpage, and do the following with all the tarballs in the order I listed the three tarballs:
    Code:
    tar xvf <filename>.tar.bz2
    cd <filename>
    sudo ./configure --with-kernel=/usr/src/linux-headers-$(uname -r) --with-cards=ice1724 --with-oss=yes
    sudo make
    sudo make install
    If you have any other cards (like an onboard card), you can add it to --with-cards seperated by commas. After the installation is finished, do a complete reboot. Then run
    Code:
    cat /proc/asound/version
    to check if you successfully upgraded Alsa. The first time you reboot after upgrading Alsa or installing a new system, you must increase the volume of all channels in alsamixer.

    Duplicating the front channel audio stream to the rear channels

    Now, you should have a working card. If you try play a DVD with Totem, you will hear 5.1 surround. If you want to duplicate the stereo stream in the front channels to the rear channels you should continue reading.

    To make that work you need to edit your ~/.asoundrc. If it doesn't exist, create it. I went through a lot to find out what to add to the file. I tried to copy different .asoundrc files I found here at the forum and on the web, but no files worked correctly. Most of them did duplicate the speakers, but they also added a chipmunk effect, i.e. sound was playing slightly too fast. Sharon den Adel on speed. Anyway, in addition any sound using the xine engine (e.g. amarok) was also choppy.

    I ended up in the #alsa IRC channel at irc.freenode.net, and you have no idea how helpful they're there. I got some personal service, and was given this final working .asoundrc. It's fine-tuned for the M-audio Revolution 5.1 (and 7.1?)
    Code:
    # 6 channel dmix:
    pcm.dmix6 {
         type dmix
            ipc_key 1024
            ipc_key_add_uid false
            ipc_perm 0660
            slave {
                    pcm "hw:0,0"
                    rate 48000
                    channels 6
                    period_time 0
                    period_size 1024
                    buffer_time 0
                    buffer_size 5120
            }
         }
    
    # upmixing: 
    pcm.ch51dup {
            type route
            slave.pcm dmix6
            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
       }
    
    pcm.duplex {
         type asym
         playback.pcm "ch51dup" # upmix first
         capture.pcm "hw:0"
    }
    
    # change default device:
    pcm.!default {
         type plug 
         slave.pcm "duplex"
    }
    
    # for aoss
    pcm.dsp "duplex"
    
    pcm.dsp1 "duplex"
    For the changes to take effect, run
    Code:
    sudo /etc/init.d/alsa-utils restart
    and reopen any program using the sound card. Now amarok will duplicate the channels as default, and totem will play DVD movies with 5.1 surround as default.

    What you have to do with some other programs:
    • xmms: Open the preferences. Go to "output plugin" and click on "configure", and write default as audio device.
    • mplayer: Files with a 2 channel audio stream will automatically be duplicated as default. To play a file with a surround stream (e.g. AC3), use the following command:
      Code:
      mplayer -ao alsa:device=plug=dmix6 filename


    I haven't figured out how to configure VLC correctly. If you know, post it here, and I'll include it in the HOWTO. The same applies for any other programs.

    miceagol
    Last edited by miceagol; May 23rd, 2007 at 11:05 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    Brampton, Ontario
    Beans
    883

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    miceagol,

    My M-Audio 7.1 came last night in the mail and I installed it, man it sounds great! I used this HowTo and have gotten it working just fine with everything, but my 5.1 is not working right. I also have not edited my .asoundrc file as you instructed as I don't need to duplicate sound to rear speakers, my Logi system has a Matrix Mode button to do that optionally.

    So I have installed alsa 1.0.13 successfully, etc. and it's good. But I'm getting this when I do speaker-test

    Code:
    bobby@bobby-ubuntu:~$ speaker-test -Dplug:surround51 -c6
    
    speaker-test 1.0.13
    
    Playback device is plug:surround51
    Stream parameters are 48000Hz, S16_LE, 6 channels
    Using 16 octaves of pink noise
    ALSA lib confmisc.c:1105:(snd_func_refer) Unable to find definition 'defaults.pcm.surround51.card'
    ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib confmisc.c:242:(snd_func_getenv) error evaluating default
    ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_getenv returned error: No such file or directory
    ALSA lib conf.c:3957:(snd_config_expand) Args evaluate error: No such file or directory
    ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM surround51
    Playback open error: -2,No such file or directory
    
    bobby@bobby-ubuntu:~$
    Any help would be appreciated!
    "For those who believe, no explanation is necessary. For those who do not, none will suffice." - Joseph Dunninger

  3. #3
    Join Date
    May 2006
    Location
    Oslo, Norway
    Beans
    243
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    Quote Originally Posted by herbster View Post
    miceagol,

    My M-Audio 7.1 came last night in the mail and I installed it, man it sounds great! I used this HowTo and have gotten it working just fine with everything, but my 5.1 is not working right. I also have not edited my .asoundrc file as you instructed as I don't need to duplicate sound to rear speakers, my Logi system has a Matrix Mode button to do that optionally.

    So I have installed alsa 1.0.13 successfully, etc. and it's good. But I'm getting this when I do speaker-test

    Code:
    bobby@bobby-ubuntu:~$ speaker-test -Dplug:surround51 -c6
    
    speaker-test 1.0.13
    
    Playback device is plug:surround51
    Stream parameters are 48000Hz, S16_LE, 6 channels
    Using 16 octaves of pink noise
    ALSA lib confmisc.c:1105:(snd_func_refer) Unable to find definition 'defaults.pcm.surround51.card'
    ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib confmisc.c:242:(snd_func_getenv) error evaluating default
    ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_getenv returned error: No such file or directory
    ALSA lib conf.c:3957:(snd_config_expand) Args evaluate error: No such file or directory
    ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM surround51
    Playback open error: -2,No such file or directory
    
    bobby@bobby-ubuntu:~$
    Any help would be appreciated!
    Nice that you decided to buy the card.

    Hmm, my guess is that you need surround51 defined in asoundrc to do that, hence
    Code:
    ALSA lib confmisc.c:1105:(snd_func_refer) Unable to find definition 'defaults.pcm.surround51.card'
    Have you tried playing a DVD in Totem? I think it worked out of the box for me before I edited the asoundrc-file. You could try editing asoundrc anyway, unless you really don't want it.

    I guess these two commands won't work for you either unless you edit asoundrc:
    Code:
    speaker-test -Dplug:ch51dup -c6 -twav
    Code:
    speaker-test -Dplug:dmix6 -c6 -twav
    This command gives just 2 channel sound with my system too:
    Code:
    speaker-test -c6 -twav
    I'm not really good with this myself. I got all the help I needed in #alsa. You could try going there and ask for someone called wishie, that was the guy who helped me. You can tell him I sent you there (I'm called michaeka on IRC).

  4. #4
    Join Date
    Feb 2007
    Location
    Brampton, Ontario
    Beans
    883

    Thumbs up Re: HOWTO: M-audio Revolution and upgrade Alsa

    miceagol,

    I was in #alsa yesterday and got this sucker working BRILLIANTLY! Full 5.1, as well as regular upmixing with 2channels videos and songs, and also couldn't play multiple prog sounds simultaneously, but fixed all of this with wishie (a genius!!)'s help!

    Here's my .asoundrc:

    Code:
    # <wishie[out]> that is where i force ALSA to use my "default" device, not its own internally defined one.
    # <wishie[out]> type "plug" means its going through the "plug" plugin, which does sample rate/format conversion
    # <wishie[out]> slave.pcm "duplex"
    # <wishie[out]> means to pass the audio stream to the pcm.duplex device..
    # <wishie[out]> type asym  <-- makes a 'full duplex' (input/output) device.
    # <wishie[out]> so for output (playback) pass the audio on to "ch51dup"
    # <wishie[out]> and for input (capture) use hw:0
    # <wishie[out]> hw:0 just means your first soundcard.
    # <wishie[out]> now to the tricky stuff...
    # <wishie[out]> pcm.ch51dup
    # <wishie[out]> type route  <-- means we want to route audio to other speakers/channels
    # <wishie[out]> the interesting parts here, are the ttable lines
    # <wishie[out]> front left/right are channels "0" and "1"
    # <wishie[out]> so, we are doing the following
    # <wishie[out]> ttable.0.0 1   <-- copying channel 0 to speaker 0 with gain (volume) of 1
    # <wishie[out]> ttable.1.1 1   <-- copying channel 1 to speaker 1 with gain (volume) of 1
    # <wishie[out]> ttable.0.2 1  <-- copying channel 0 (front left) to speaker 2 (rear left) with volume 1
    # <wishie[out]> now, for the center.. we have 2 entries..
    # <wishie[out]> ttable.0.4 0.5 
    # <wishie[out]> ttable.1.4 0.5
    # <wishie[out]> first one says copy front left to the center speaker
    # <wishie[out]> second one says copy the front right to the center speaker
    # <wishie[out]> therefore, you are actually getting front left AND right signals from the center speaker
    # <wishie[out]> same for the LFE (sub channel) which is speaker 5
    # <wishie[out]> now, for the center and sub, you see i have the volume (gain) at 0.5
    # <wishie[out]> since i found that using "1" was too over powering
    # <wishie[out]> moving on..
    # <wishie[out]> you will see it has slave.channels 6
    # <wishie[out]> since we "upmixed" the 2 channel mp3 to 6 channels.
    # <wishie[out]> and the "slave.pcm dmix6" tells alsa to pass the audio onto the device pcm.dmix6
    # <wishie[out]> now, dmix6 basically takes 6 channels input, and passes it to its slave (which is hw:0,0)
    # <wishie[out]> but, multiple programs can access dmix6 at the one time.
    # <wishie[out]> where as only 1 program can access hw:0,0 at any time.
    # <wishie[out]> so ALSA takes all the input via dmix6, mixes the streams together, THEN sends them to hw:0,0 (which is your soundcard)
    # <wishie[out]> so, as far as your sound card is concerned, it is only getting accessed once.
    # <wishie[out]> ALSA it taking care of the multiple sound streams, and making them all into one.
    
    
    
    # 6 channel dmix:
    pcm.dmix6 {
         type dmix
            ipc_key 1024
            ipc_key_add_uid false
            ipc_perm 0660
            slave {
                    pcm "hw:0,0"
                    rate 48000
                    format "S32_LE"
    		channels 6
                    period_time 0
                    period_size 1024
                    buffer_time 0
                    buffer_size 8192
            }
         }
    
    # upmixing: 
    pcm.ch51dup {
            type route
            slave.pcm dmix6
            slave.channels 6
            ttable.0.0 1
            ttable.1.1 1
            ttable.0.2 0.6
            ttable.1.3 0.6
            ttable.0.4 0.5
            ttable.1.4 0.5
            ttable.0.5 0.5
            ttable.1.5 0.5
       }
    
    pcm.duplex {
         type asym
         playback.pcm "ch51dup" # upmix first
         capture.pcm "hw:0"
    }
    
    # change default device:
    pcm.!default {
         type plug 
         slave {
    	pcm "duplex"
    	}
    }
    
    # for aoss
    pcm.dsp "duplex"
    
    pcm.dsp1 "duplex"
    That gives me full 5.1 from a song in amarok or a regular video in vlc, etc.

    AND, I got VLC working too! I popped in a DVD, started playing and all I need to do is click Audio > Audio Device > 5.1, and bam! Perfect, genuine 5.1 with movies, and 5.1 also plays at the same time as other programs too, so this is just a complete solution at last.

    The M-Audio card is EXTREMELY recommended to anyone who wants a full, high-quality sound experience in linux!!!!

    And thanks again for your help, miceagol! Now I really have no need to ever boot into windows

    P.S. Also attached my /usr/share/alsa/alsa.conf for anyone who gets this card. Get it!
    Attached Files Attached Files
    Last edited by herbster; April 21st, 2007 at 07:33 PM.
    "For those who believe, no explanation is necessary. For those who do not, none will suffice." - Joseph Dunninger

  5. #5
    Join Date
    May 2006
    Location
    Oslo, Norway
    Beans
    243
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    I'm so happy it worked out for you. And yes, this card satifies both quality and Linux demands. It's not hard to get it working, and when it works, it works really well. I'm thinking about sending a mail to both M-audio and Creative, and send them a link to this thread. That'll show M-audio that their business model is working, and Creative that their business model is not working.

    It seems like wishie has made some revisions to .asoundrc since last time, so I'll test it and see how it works compared to the old one.
    Last edited by miceagol; April 21st, 2007 at 08:12 PM. Reason: minor error

  6. #6
    Join Date
    Apr 2005
    Location
    Czech Republic
    Beans
    26
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    I have bought this card lately too. The sound is clear but it seems I'm missing microphone and line-in input controls in alsamixer (and other mixers, too). Do you guys have the controls as this guy:

    http://seehuhn.de/comp/hardware/revolution

    ? I'm missing Line Loopback, Mic Loopback, CD Loopback, Loopback, and Capture Channel.

    I used to use my onboard soundcard (that came with the nVidia Neo2 Platinum mobo) but disabled it in the BIOS. Then, I put it M-Audio and rebooted. Do I have to remove some of the modules that the previous sound card used?

    I'm using Feisty Fawn with their ALSA 1.0.13.

    Thank you!

  7. #7
    Join Date
    Apr 2007
    Beans
    3

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    HI guys, I have extremely new to Ubuntu - this is my first day =)
    I followed your tutorial and finally sound works on my m-audio revo 5.1
    but the issue i am having is when i click on the music icon and click volume control
    i can see all the channels but they are not correct. LFE runs my Right channel and the center runs the left and the right and left run the center.
    How do i fix this? i am at a loss and not very good at manipulating this =)
    thanks a lot
    Grant

  8. #8
    Join Date
    May 2006
    Location
    Oslo, Norway
    Beans
    243
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    Quote Originally Posted by whiskybar View Post
    I have bought this card lately too. The sound is clear but it seems I'm missing microphone and line-in input controls in alsamixer (and other mixers, too). Do you guys have the controls as this guy:

    http://seehuhn.de/comp/hardware/revolution

    ? I'm missing Line Loopback, Mic Loopback, CD Loopback, Loopback, and Capture Channel.

    I used to use my onboard soundcard (that came with the nVidia Neo2 Platinum mobo) but disabled it in the BIOS. Then, I put it M-Audio and rebooted. Do I have to remove some of the modules that the previous sound card used?

    I'm using Feisty Fawn with their ALSA 1.0.13.

    Thank you!
    I quote from the HOWTO above:
    The line-in port only works from 1.0.14rc1 or newer, so you should upgrade if you need that feauture.
    I.e. you must install the latest development release of Alsa. You'll find instructions on how to do this in the HOWTO.

  9. #9
    Join Date
    May 2006
    Location
    Oslo, Norway
    Beans
    243
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    Quote Originally Posted by gorezz View Post
    HI guys, I have extremely new to Ubuntu - this is my first day =)
    I followed your tutorial and finally sound works on my m-audio revo 5.1
    but the issue i am having is when i click on the music icon and click volume control
    i can see all the channels but they are not correct. LFE runs my Right channel and the center runs the left and the right and left run the center.
    How do i fix this? i am at a loss and not very good at manipulating this =)
    thanks a lot
    Grant
    What version of Alsa do you have? Check with:
    Code:
    cat /proc/asound/version
    I've got 1.0.14rc3, and my controls are correct (I have 4.1 though, so can't test Center and LFE). Is the same problem present in alsamixer? Open a terminal, and enter alsamixer on the command line to start it. If upgrading to the latest Alsa doesn't work, you might want to report it as a bug .

    Anyway, this shouldn't be harder than remembering which control controls which speaker, or am I wrong?
    Last edited by miceagol; April 24th, 2007 at 09:20 PM. Reason: added info

  10. #10
    Join Date
    Apr 2005
    Location
    Czech Republic
    Beans
    26
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: M-audio Revolution and upgrade Alsa

    Thank you for responding. I think my version is fine though:

    cat /proc/asound/version

    Advanced Linux Sound Architecture Driver Version 1.0.14rc1 (Tue Jan 09 09:56:17 2007 UTC).

    I will try to upgrade to the most recent version then (rc3). Maybe the problem is the previous card and its modules. I really don't know. Maybe I have other modules hanging around; anyway, I'm getting a new hard drive in a couple of days and will do a fresh install of ubuntu (after 2.5 years!).

    It seems as if all the input controls were disabled; I got the following in alsamixer:

    PCM PCM Cent PCM LFE PCM Rear IEC958 IEC958 O IEC958 1 Deemphas H/W H/W 1 H/W 2 H/W 3 H/W 4 H/W 5 Multi Tr Multi Tr Multi Tr Multi Tr Multi Tr Multi Tr

    Can you see some controls between "PCM Rear" and "IEC958" in alsamixer? And do you use 64bit or 32bit drivers? My system is 64bit.

    Jiri
    Last edited by whiskybar; April 24th, 2007 at 11:00 PM.

Page 1 of 10 123 ... LastLast

Bookmarks

Posting Permissions

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