Beats Audio on Linux

R

ryanvade

Guest
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 &
Note: as of Ubuntu 13.10, hda-jack-retask is part of alsa-tools.

Just install the alsa-tools-gui package from the regular archive and start hdajackretask.
How to use HDA-jack-retask.

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

HDA-retask1_zps2cefe831.png


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
HDA-retask2_zpsf185fe8f.png


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:
HDA-retask3_zps82a03bf0.png


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,
Downside your sub will work but when you put the headphone in your sub is still active.
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...
 

Attachments

  • slide.jpg
    slide.jpg
    59.2 KB · Views: 87,617
Last edited:


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)
 
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.)
 
right, it should be:
Code:
sudo add-apt-repository  ppa:diwic/hda
 
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
 
Assuming Ubuntu, sorry if you are not using it, because it is the most widely used Linux distribution.

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:
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.

No, I won't use Ubuntu and derivatives. I prefer the parent of ubuntu which is Debian GNU/Linux, Kali and Arch Linux as well on my Desktop, while on server I always prefer CentOS and Gentoo. Other linux distros will never die. :D
 
I wrote the article with Ubuntu instructions because covering all Linux distributions would take too long and too much space. If you don't use Ubuntu then find the packages in your repositories and follow the rest of the guide. Or write your own article.
 
Excellent article, thank you! Here's my data point (tl;dr: 0x10 was my bass pin too)

Laptop model: HP Envy 15-j052tx
OS: Linux Mint Rebecca (17.1)
Alsainfo: alsa-project org db ?f=3425c20f203285b62c7790c15ab483dd2fbf284c

Ran 'hdajackretask' (no hyphens) as follows:

Code:
sudo apt-get install alsa-tools-gui
hdajackretask &

0x0d was already mapped to "Internal Speaker, Front Side" so I left it be. Remapped 0x10 to "Internal Speaker (LFE)", applied.

Used 'aplay test.wav' on an mp3 I converted to wav:

Code:
sudo apt-get install mpg321
mpg123 -w test.wav ~/Music/test.mp3
aplay -vv test.wav

bass is definitely working :)

Thanks again!
 
Excellent article, thank you! Here's my data point (tl;dr: 0x10 was my bass pin too)

Laptop model: HP Envy 15-j052tx
OS: Linux Mint Rebecca (17.1)
Alsainfo: alsa-project org db ?f=3425c20f203285b62c7790c15ab483dd2fbf284c

Ran 'hdajackretask' (no hyphens) as follows:

Code:
sudo apt-get install alsa-tools-gui
hdajackretask &

0x0d was already mapped to "Internal Speaker, Front Side" so I left it be. Remapped 0x10 to "Internal Speaker (LFE)", applied.

Used 'aplay test.wav' on an mp3 I converted to wav:

Code:
sudo apt-get install mpg321
mpg123 -w test.wav ~/Music/test.mp3
aplay -vv test.wav

bass is definitely working :)

Thanks again!
Thank you for sharing the database.
 
According to dmidecode, I have an HP Envy TS 17 Notebook PC.

I couldn't get sound to work (initially) because every "apply now" in hdajackretask attempt came back with:

tee: /sys/class/sound/hwC0D0/reconfig: Device or resource busy

Fortunately, someone hinted about just punting and applying the retasked pins as boot options and trying that. Fortunately, that worked. These settings finally got sound working for the non-HDMI audio device (IDT 92HD91BXX):
0x0c - internal speaker
0x0f - internal speaker
0x10 - LFE

For the record, AFAICT, everything now works under Fedora 21 on this HP Envy, including the touchscreen, the backlit keyboard, the WiFi, and now the sound. With 12 GB of RAM, hyperthreaded quad-core I7, 1TB HDD, and 17" touch screen at 1920x1280, this was a pretty good deal at $640 US from woot as a refurb laptop.

As soon as I am not considered a noob/spammer by this site, I'll post the full link to my alsa db entry for this laptop for anyone with the same or similar model. For now, the option is:
f=6d567198aa1d6d1243c3685fad0ded5f20723f4d
 
Last edited:
Thank you for adding the information. ;)
Oh, no, thank you! I probably would not have gotten sound working on this new laptop without your article. I definitely benefited from your writing it. I'm more than happy to post up details if they help anyone else. Cheers.
 
Yes, I own a Hp 15-J009VVM With amd cpu and gpu Beats Audio will this work with amd
 


Top