Alsa A52 plugin

Non-LTS (non-Marathon) related topics
Ответить
Аватара пользователя
dsch
Сообщения: 17
Зарегистрирован: 28 сен 2014, 21:09
Operating system: ROSA Desktop Fresh R5
Откуда: Greece, Bulgaria
Контактная информация:

Alsa A52 plugin

Сообщение dsch » 28 сен 2014, 21:25

Hello everybody, this is my first post here and I'm new to ROSA Linux, too.

I'm a former windows user that shifted to Linux (Ubuntu) in 2008 and never looked back.
Recently, I decided that I want to test several distros in order to find the best one for my needs and style. After several months of testing I made my choice - ROSA!

I'm very happy with my decision over all, ROSA Linux seems to be both stable and beautiful! My transition is a little painful though, since I'm coming from Ubuntu, which is based on Debian and ROSA is based on Mandriva. I'm trying to get things to work and up to now, I did it painfully but successfully! But now I'm stuck!

I have a external audio receiver which is connected to my sound card through optical SPDIF. On ubuntu I used the Alsa A52 plugin to upmix stereo to 5.1 and send the data directly to the receiver, but I cannot figure out how to do the same in ROSA Linux.
Keep in mind that although I'm a Linux user for 6 years now, I'm not an IT expert and I need some help in plain English.

This is the wiki page with the instructions for what I'm trying to accomplish but for Ubuntu:
https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

Is it possible someone to assist me with this?

Kind regards,
D.
Dimitrios Charalampidis
Snail Trading Ltd.

Аватара пользователя
dsch
Сообщения: 17
Зарегистрирован: 28 сен 2014, 21:09
Operating system: ROSA Desktop Fresh R5
Откуда: Greece, Bulgaria
Контактная информация:

Re: Alsa A52 plugin

Сообщение dsch » 24 июн 2015, 16:05

OK, I am here to answer my own question after 9 months of no answer here.
During that period, I tested and used almost every popular distro out there and I am back here, using ROSA!

I decided to write an answer to help other people, in case they have the same problem with me.
By the time of writing this post, I am running: ROSA Desktop Fresh R5 2014.1 64bit.

OK, let's start.

While on Ubuntu the a52 plugin of ALSA is not present in the repos and one must compile it from source to use it, ROSA maintainers have chosen to include it and that's great!
All we have to do then, is to install it, either through the graphical application (Install & Remove Software: rpmdrake) or through the terminal (konsole) by running:
Now that the plugin is installed, we must create a configuration file, under our home directory to ask the system to use the plugin and upmix all less than 6-channel audio streams.

To do that, we must simple do the following:
  • Create and file under our home directory, named .asoundrc and open it for editing.
    I prefer using the nano text editor inside the terminal, but it is not installed by default is ROSA Desktop R5.
    To install it, just type:

    Код: Выделить всё

    sudo urpmi nano
    Then, to create the file and open it for editing, just type:

    Код: Выделить всё

    nano ~/.asoundrc
    Now inside the nano, copy & paste, or type the following text:

    Код: Выделить всё

    pcm.a52 {
      @args [CARD]
      @args.CARD {
        type string
      }
      type rate
      slave {
        pcm {
          type a52
          bitrate 448
          channels 6
          card $CARD
        }
      rate 48000 #required somehow, otherwise nothing happens in PulseAudio
      }
    }
    Now, save the document and exit nano, by pressing Ctrl+X, Y, Enter.
Now that we have created the configuration file for sound upmixing, we must first alter the default settings of PulseAudio, for better results.

To do that:
  • Type in a terminal:

    Код: Выделить всё

    sudo nano /etc/pulse/default.pa
    Navigate and find the following entry:

    Код: Выделить всё

    ### Automatically suspend sinks/sources that become idle for too long
    load-module module-suspend-on-idle
    This tells PulseAudio to load a module, which suspends idle sinks/sources and when necessary PulseAudio will enable them, again, later.
    That's not bad, but in most cases, it results in noise and cracking through the speakers, every time a sink/source is disabled and enabled.
    Thus, we must disable that module, so that sinks/sources will not be suspended when idle.

    To do that, we can either delete these lines or we can just comment them as follows:

    Код: Выделить всё

    ### Automatically suspend sinks/sources that become idle for too long
    #load-module module-suspend-on-idle
Now, we must also change some entries in the configuration file of PulseAudio's daemon:
  • Open the configuration file for editing:

    Код: Выделить всё

    sudo nano /etc/pulse/daemon.conf
    Find and change the entries, as follows:

    1. The entry that tells PulseAudio to include the subwoofer in process of mixing:

    Код: Выделить всё

    ; enable-lfe-remixing = no
    Uncomment it by removing the ";" to enable it and change it to "yes":

    Код: Выделить всё

    enable-lfe-remixing = yes
    2. The entry that sets the default sample rate. Most receiver can easily handle 44100Hz, but PulseAudio seems to have issues with that rate, that's why we chose 48000Hz in our configuration file for upmixing, above.
    Now, we must do the same here:

    Код: Выделить всё

    ; default-sample-rate = 44100
    Uncomment it by removing the ";" to enable it and change it to "48000":

    Код: Выделить всё

    default-sample-rate = 48000
    3. The that tells PulseAudio how many channels to output:

    Код: Выделить всё

    ; default-sample-channels = 2
    Uncomment it by removing the ";" to enable it and change it to "6":

    Код: Выделить всё

    default-sample-channels = 6
    4. The entry that sets the speakers' arrangement:

    Код: Выделить всё

    ; default-channel-map = front-left,front-right
    Uncomment it by removing the ";" to enable it and change it to "front-left,front-right,rear-left,rear-right,front-center,lfe":

    Код: Выделить всё

    default-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
    And that's pretty much all we need, so now save and exit by pressing Ctrl+X, Y, Enter.
In order for ALSA and PulseAudio to become aware of the changes we've made, we must restart them:

Код: Выделить всё

sudo alsactl restore
$ pulseaudio --kill
When done, open PulseAudio Volume Control: pavucontrol and navigate to the "Configuration" tab.
You can now see, that there are some new profiles created for your sound card(s). Select one that starts with "Digital Surround 5.1 (IEC958/AC3)" and you are ready to go!

P.S. I have also managed to do the same, upmixing on-the-fly in DTS format. But in my case at least, it produces cracking and noise, while also using more CPU power than Dolby Digital.
If anyone needs instruction to do it though, I'd be happy to help.
Dimitrios Charalampidis
Snail Trading Ltd.

Ответить

Вернуться в «ROSA Fresh R1-R3 (2012.1)»