Beats Audio on Linux

Discussion in 'X org / Desktop' started by ryanvade, Aug 15, 2013.

  1. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,342
    Likes Received:
    447
    Trophy Points:
    83
    What is Beats Audio?
    Beats Audio is essentially a technology that is supposed to give a more in-depth sound experience to users. By adding more speakers, subwoofers, and an amplifier Beats Electronics LLC tries to emulate studio quality audio. The extra speakers and subwoofers are arranged in a special way to help compensate for the shape of the laptop. From a software standpoint extra codecs and digital audio processing is used to improve the sound due to the lack of true surround sound speakers.

    According to HP, “...the sound gets optimized to deliver music more clearly than what is offered on most other PCs. We want to increase the dynamics and rich, fullness of the music as if you were listening to it live. This does wonders for those songs that have been dynamically compressed during mastering...PC audio can sound so flat– because there is so much digital noise inside a computer. That affects both the low end and the high end (the stuff that Victor just mentioned matters the most). The Beats people figured out how to compensate for the problems. Usually, the first thing you lose in digital audio is the bass. The sound just isn’t as meaty.”

    More here: http://h20435.www2.hp.com/t5/The-Next-Bench-Blog/HP-s-Beats-Audio-Explained/ba-p/78953

    I have Beats Audio, why does it not seam to work on Linux?
    The biggest issue is of course, drivers. Beats Electronics LLC has refused to release any firmware or drivers for use on Linux. While many new Linux distributions have compensated by providing modest support, like Ubuntu usually being able use the two ‘front’ speakers, there is no FULL support for Linux. Like many hardware companies Beats Electronics LLC does not see Linux as a platform worth exploring.
    So, what does this lack of support mean for me?

    Like many other hardware issues, a developer will need to get their hands on data sheets for each HP laptop with Beats Audio and write some drivers themselves. Of course HP is treating the Beats Audio technology with a guarded hand, which means you have to find out how many speakers you have by experimenting. I have found a way to fix the beats audio mess on some HP laptops, which is the purpose of this article. Due to the differences in laptop models I cannot confirm this technique works on all laptops, I know this technique will require the user to understand their laptop more than most consider sane. If you decide to try this be warned that the process will take many hours of trial and error. This process can work on more than just Beats Audio users by the way...

    Getting more information on your audio system.
    A friend from the Oz Unity forums showed me this. It will come in handy.
    Code:
    wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh
    Then just follow the directions. Eventually you will be given a text file with a more detailed overview of your audio system. Including the most important information, the pins.

    What tools do I need to fix my Beats Audio on Linux?

    The main tool we will be using is HDA-jack-retask. This program allows the user to retask audio jack pins on the motherboard, so that ALSA can recognize them differently. Essentially HDA-jack-retask will apply a firmware patch to the IDT audio firmware.
    How to install HDA-jack-retask.

    Assuming Ubuntu, sorry if you are not using it, because it is the most widely used Linux distribution.
    Code:
    sudo add-apt-repository ppa:diwic/hda 
    Code:
    sudo apt-get update
    Code:
    sudo apt-get install hda-jack-retask
    Code:
    hda-jack-retask &
    How to use HDA-jack-retask.

    When you start HDA-jack-retask you should see a window like this:

    [​IMG]

    Two important features you will need to look at are the current codec you are editing, for me the IDT92HD91BXX, and the options panel. If you are using the same codec as I am you can use my configuration and hopefully it will work for you. If the current codec does not look right, I have an HDMI out as well which can be shown here, make sure to check.

    Unfortunately the program is not able to determine which pins to use, the reason why full support is not automatic, so this next bit will start to get confusing. If you know what motherboard you have, try to find a schematic. Hopefully it will provide some clues. You might be able to check in the BIOS, most models anyway.

    Now the long procedure. We have to figure out which pins need to be retasked and to what. This next part will be for my HP dv6t-7000 Select Entertainment laptop. All jacks (and other inputs/outputs) are shown under "Pin configuration". To override one of your jacks, click the "Override" checkbox for that pin and select the desired function. Note: If you select a "Line out (back)" override, you should also have a "Line out (front)" override. A "Line out (Center/LFE)" override will only work with the previous two overrides, and so on. You can try out your new configuration by clicking "Apply now". To make your new configuration the boot up default, click "Install boot override". Each pin has a few options. Mostly the following:

    Line out (Front) -- line out, front of computer

    Line out (Center/LFE) -- line out, sometimes on motherboard (not accessible outside of the case)

    Line out (Back) -- normal line out from back

    Line out (Side) -- line out from side, mostly laptops

    Internal Speaker -- normal internal speaker, sometimes a front speaker on some HP Envy laptops


    Internal Speaker (LFE) -- Usually the SUB on Beats Audio

    Internal Speaker (Back) -- rear facing, sometimes normal speaker or front speaker on some HP Envy laptops

    Not Connected --- make sure this pin is not used

    You will need to check the box for “Show unconnected pins” to see all your options. For non Beats Audio users, sometimes “Set Mode = auto” will work, for Beats Audio advanced configuration is needed. Again the following is for MY laptop. If you have the same model or a similar model you can try this.

    Set 0x0d to Override and the speaker type to internal Speaker -- this is the normal speakers

    Set 0x10 to Override and the speaker type to internal Speaker (LFE) -- this is the SUB

    POSSIBLE: Set 0x0f to Override and the speaker type to Internal Speaker -- extra set of speakers on some dv6 models
    [​IMG]

    With the pins remapped, click Apply now. You will need to use a program that is not affected by the Pulse reset. VLC seems to work. You will also want to make sure the Headphones still work, sometimes the remap of some pins can break Headphone support.

    If everything works click Install boot override to make the changes permanent. You can also check the volume levels with alsamixer. Output should be similar to this:
    [​IMG]

    Master is overall volume. Headphones is just volume when headphones are plugged in. Speaker is the regular speakers. PCM is important, it is the SUB. Beep is the Motherboard internal warning speaker.

    Another option.
    A friend from the Oz Unity forums also found a technique that can solve this issue. He recommended adding
    Code:
    options snd-hda-intel model=hp-dv5
    or
    Code:
    options snd-hda-intel model=rev
    to /etc/modprobe.d/alsa-base.conf

    However,
    To fix this, you have to open alsamixer and turn down the pcm (sub) when you are using headphones. I think this is more of a quick patch to a permanent fix. However, if you do not have time to test all the pin configurations, his technique can be used in some circumstances. Thanks Linuxfreack!!!

    Hopefully after experimenting with the different pins you can get a sound that you paid extra for.


    ryanvade...

    Attached Files:

    Last edited: May 19, 2014
    nebulousfocus, Rob and DevynCJohnson like this.
  2. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,355
    Likes Received:
    1,084
    Trophy Points:
    113
    Nice article!
    ryanvade likes this.
  3. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,342
    Likes Received:
    447
    Trophy Points:
    83
    Updated with some new information
    Rob likes this.
  4. Sky3 T3ch

    Sky3 T3ch New Member

    Messages:
    1
    Likes Received:
    2
    Trophy Points:
    1
    i also had to use first or i got a error

    killall pulseaudio


    to do the settings then had to hit alt+f2 and restart pulse audio then when going into the the system sound settings and actally hitting the test button I get nothing however once a start a movie or a song everything works ( have not tested headphones but I don't care) i just figured I would add this for user who are just using default test on the sound system settings it didn’t work for me. I tested with the test and repeated the proccess 5 times and was thinking it didnt work till I actally opened a movie thanks to all who wrote this guide. Hope my info helps some other n00b like me.

    Edit: I also couldn’t get the hda re task from the apt-get so i had to download tar ball and compile myself(yes i feel special if its not compiling make sure you have the the necessary library files downloaded)
    ryanvade and DevynCJohnson like this.
  5. bartovan

    bartovan New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the article, I'm working my way through it now. One remark on the way: the command for adding the ppa is not "sudo add-ppa-repository ppa:diwic/hda" as you state, but:
    Code:
    sudo apt-add-repository ppa:diwic/hda
    .
    (You can remove my message once you correct your typo, if you do.)
  6. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,342
    Likes Received:
    447
    Trophy Points:
    83
    right, it should be:
    Code:
    sudo add-apt-repository  ppa:diwic/hda
  7. nebulousfocus

    nebulousfocus New Member

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    1
    Thanks for the post, it helped immensely. My model and settings below.

    model- HP 17 J150nr
    successful settings:
    0x0c - internal speaker
    0x0f - internal speaker
    0x10 - LFE
    ryanvade likes this.
  8. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,342
    Likes Received:
    447
    Trophy Points:
    83
    Updated yet again. 20+K views...Awesome.
  9. deandownsouth

    deandownsouth New Member

    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    1
    I guess we should all just use Ubuntu then because, well, it is the most widely used Linux distribution. All other distros should just shut down, Ubuntu has won.

    Edit:
    Oh, and if you just happen to be using Fedora (Mate spin in my case), just do: 'sudo yum install alsa-tools' and that will get you hdajackretask and places it under Applications > Sound & Video.
    Last edited: May 31, 2014
    DevynCJohnson likes this.

Share This Page