[HELP ME] Calibrate an SPL meter app for N4 - Nexus 4 Q&A, Help & Troubleshooting

Can someone with an SPL meter help calibrate the Nexus4 for a sound meter app?
I like Sound Meter Lite but any free app from the Play Store will do.
Thanks in advance!

bump
Anyone? Any recording professionals out here?
This should not take more than 2 min of your time.
- Download a Sound Meter app from the Play Store.
- Play a tone through your speakers. Since phone microphones are mostly flat in the human speech region (300-3k Hz)
it is probably best to use a 1kHz tone.
- Hold an SPL meter aligned with the Nexus4 phone mic (located next to the microUSB port).
Make a note of the dB level on the SPL meter and the app.
- Report the app used and the dB difference between the app and the SPL meter in this thread.

First, are you sure the app is using the mic on the bottom as there is another on the top and it could even be utilizing both and even noise cancellation which would be bad.
Second, the mic on this phone has a very high sensitivity. I would guess the limit would be somewhere around 80db at which point it will start limiting and giving false readings. Pretty useless in and audio environment in that case.
Third, you would want to use pink noise to calibrate a spl meter. A sine wave is generally used to calibrate electrical components of audio (eg. dac).

smacksa said:
First, are you sure the app is using the mic on the bottom as there is another on the top and it could even be utilizing both and even noise cancellation which would be bad.
Second, the mic on this phone has a very high sensitivity. I would guess the limit would be somewhere around 80db at which point it will start limiting and giving false readings. Pretty useless in and audio environment in that case.
Third, you would want to use pink noise to calibrate a spl meter. A sine wave is generally used to calibrate electrical components of audio (eg. dac).
Click to expand...
Click to collapse
1. The Sound Meter Lite app shows a higher dB reading when I point the phone's bottom at the sound source.
Pointing the top (at the same distance) shows a few dB less so I think it's reasonable to assume that the main mic
is indeed at the bottom of the phone.
2. You are right about that. It's a limitation that I'm willing to overlook.
3. Pink noise is ideal.
A tone burst is only useful if one knows the mic's frequency response.
I asked for it because I will attempt to measure the FR on my own and post it here if I succeed.
I will take anything at this point.

Related

Hardware fix for internal voice recording

Many guys are looking for a method of recording both sides of voice during a call. But it seems that HTC mobile phones including X1 Xperia don't support internal voice recording. Someone said that's hardware limitation. The only way to recording both sides voice is by turning on speaker.
I got an idea about fix this issue by adding simple circuit to X1 Xperia. Please see the attached file. It's a circuit diagram. As illustrated in the diagram, the signal of other side is introduced by a capacitance. Two voices, one from you, the other from the participant of your call, are mixed together and go to the ADC(analogue/digital converter).
Someone may be concerned about the self-excitation by the feedback. I think the phone works well even if you turn on the speaker, that would introduce the feedback. So the phone will work well if you introduce the signal via electronic form.
I haven't implemented this idea. Guys, please help to review this idea, and make the solution more applicable.
Thanks All!
(Diagram updated, potentiometer added.)
Lol
Maybe implement it and let us know I have a feeling that even with the decoupling capacitor it's still going to cause horrendous feedback. The speaker output will probably still excite the microphone and since the microphone is going to be d.c. shifted into the positive because of the lack of a negative supply. And that's without even knowing for certain the circuitry used here.
It's very interesting idea to make a fix for internal voice recording for X1. Usually speakerphone handsets are factory equipped with some circuitry which avoids unwanted feedback. I doubt that X1 doesn't have one.
You can always experiment with any cheap old phone to check if your idea has a chance to work. Maybe some potentiometer should be used to adjust depth of the feedback.
alias_neo said:
Maybe implement it and let us know I have a feeling that even with the decoupling capacitor it's still going to cause horrendous feedback. The speaker output will probably still excite the microphone and since the microphone is going to be d.c. shifted into the positive because of the lack of a negative supply. And that's without even knowing for certain the circuitry used here.
Click to expand...
Click to collapse
I don't quite understand what you mean. The capacitor between the speakerphone and microphone isn't a decoupling capacitor. It's a coupling capacitor for audio signals. It let audio signals go through and blocks direct current.
And could you explain more about negative supply? As far as I know, symmetrical power supply isn't common in nowadays electric appliance with battery. It seems that self-excitation has nothing to do with negative supply.
Thanks neo and Macko for your reviewing. Experimenting on an old phone is really a good idea! But it is still difficult since we don't know the exact circuitry inside X1.
It's really necessary to have potentiometer to control the amount of signal to be introduced. Thanks Macko!
so phones which cost nearly as much as a laptop cant do smthg that cheap phones can do?
this is a very necessary feature and learning that its hardware limitation is quite disappointing.
what about presenting this idea to htc so they can learn smthg
Nocturnal310 said:
so phones which cost nearly as much as a laptop cant do smthg that cheap phones can do?
this is a very necessary feature and learning that its hardware limitation is quite disappointing.
what about presenting this idea to htc so they can learn smthg
Click to expand...
Click to collapse
X1i is far more expensive than most laptops in discount stores and yes, seems that X1 can't do what SOME of cheaper phones do.
Dear HTC and SE: this is very very ugly dysfunction that XPERIA can't record calls properly! My wife's Nokia E51 does it perfectly. SHAME.
BUT caution please!
I've just done some research and found quite good working software solution of this issue. The problem is that signal from speaker isn't directly provided to DAC, so X1 just records what the mic "hears" from speaker, but if we use headphone or bluetooth headset, then recorded speech volume is far too low. But by applying some dynamics filtering on signal we can achieve desired gain of low volume part.
Here are instructions for volunteers:
- download and install some audio editor, for example CoolEdit
- download your recording from phone, open it in editor; low parts of wave are words of interlocutor
- apply a dynamic filtering as shown below:
- here are the results; as You see, low volume speech is gained by lots of dB, while your speech is almost untouched
My idea is to write some application working in background (as a service) which automatically applies such dynamic filtering DURING recording of a call. This is the best approach, but of course the same results can be reached by postprocessing.
Macko:
How is the voice quality after processing? I think it has some limitations.
sunshaking said:
Macko:
How is the voice quality after processing? I think it has some limitations.
Click to expand...
Click to collapse
Both sides are a bit distorted, which is unavoidable (dynamic processing distorts spectral envelope of signal) but acceptable. Of course all background sounds from opposite side are also gained, so do not talk to somebody who's mowing grass in the backyard
very interesting macko....if u can make such an app for X1..it ll be very useful and popular
Just downloading SDK and getting to work.
makro it is impractical to be forced to process all records. very bad for HTC
sunshaking said:
I don't quite understand what you mean. The capacitor between the speakerphone and microphone isn't a decoupling capacitor. It's a coupling capacitor for audio signals. It let audio signals go through and blocks direct current.
And could you explain more about negative supply? As far as I know, symmetrical power supply isn't common in nowadays electric appliance with battery. It seems that self-excitation has nothing to do with negative supply.
Thanks neo and Macko for your reviewing. Experimenting on an old phone is really a good idea! But it is still difficult since we don't know the exact circuitry inside X1.
It's really necessary to have potentiometer to control the amount of signal to be introduced. Thanks Macko!
Click to expand...
Click to collapse
This is exactly my point. Sorry I wasn't clear. As you say, no negative supply because we are running off of a battery. The signal itself is still an A.C. signal, so, in order to fit it within the confines of our supply it has to be DC shifted into the positive region yes? My point was that this DC level shift will be filtered by the capacitor for the reasons you gave, and so distorting the signal.
http://www.aray.cn/archives/3246
Studying how to disassemble X1.
I've disassambled my X1, but I can't find the microphone.
Here are two photos that might have micrtophone. I guess the microphone is attahed on the right side. But I really can't find it.
Haven't taken my X1 apart yet, but from the outside, the microphone is in the small hole/dent under the "OK" hardware button.
Anyone?
Has anyone found a solution to this hardware problem yet? I've been trying a hundred things with no success.

SGS mic volume / deciBel sensitivity

So, out of boredom i came across this useful App
deciBel
Apk: http://www.appbrain.com/app/decibel/bz.bsb.decibel
great tool to check and measure noise level in the area
however our SGS phone is so sensitive that even at a quiet room it measures 60+ db which is rather extremely high
in a noisy environment it jumps between 76 db to 140+ db
can some body else confirm?
also if you happen to have another Android phone with a less super active mic, can you compare what is the range difference between that phone and of the SGS
thanks
I wanted to calibrate it properly so i can use it to measure server room noise, and desktop fan noise, and other type of noise wherever i happen to be in to replace the noisy parts with quiet parts
Got that app too. Still got to calibrate it...
The best thing to do is to get an profesional Db-meter and try to calibrate it.
I'm in the Sound and Light engineering and the my boss has got a expensive machine for that like €1200 ($1627) because it must be extremely accurate.
So if you go to a concert and see a tent in the middle before the stage, ask if they have a dB meter

[Q] What Volume SHOULD the speakers achieve? whats the spec

Friends obviously a LOT of Nexus 7 owners have complained about sound issues, from obviously defective units to the simple issue of volume being inadequate for use
My question is what is "normal" on this device? anyone know a db / sound-pressure at radius specification?
other than obvious noise through a speaker, how does anyone know if their unit is "normal" ?
cognus said:
Friends obviously a LOT of Nexus 7 owners have complained about sound issues, from obviously defective units to the simple issue of volume being inadequate for use
My question is what is "normal" on this device? anyone know a db / sound-pressure at radius specification?
other than obvious noise through a speaker, how does anyone know if their unit is "normal" ?
Click to expand...
Click to collapse
My speaker is defective, and in need of going out for repair/replacement, but the volume seems like it will be fine for my needs once the rattle/vibration is fixed. It only happens at certain frequencies, so I can still get a solid sense of the output level.
Trying to determine the exact db at a specific distance isn't going to do you much good, because it will be based on either the loudest frequency, or 1khz. The 1khz rating is somewhat reasonable to use, but what if there's a massive spike there (and on small speakers, there generally is). Say it could hit 95-100db at 1khz, it still will likely only hit about 5db at 40hz. See where I'm going with this?
I don't know, I could grab my spl meter, and run a whole series of tests at 1 meter in a quasi-anechoic environment (though it's really cold outside here), if you're really that keen on finding out precise measurements of the frequency output over the 20-20 range. Seems a little overboard for a 7" tablet though. I would consider the volume more than adequate for listening to the news, or voip calls, but there isn't a tablet that exists where I would be happy with the sound of the speakers for music.
Of course, I'm kind of picky about these things.
From what I see in the boards, there are three types of view points on the output.
1. Plenty good for normal use.
2. Terribly low for music.
3. Flat out broken, so you can only turn it up half way (the second is my current situation).
Also, don't forget that the speaker is in the back, so you'll have to keep it turned around or bouncing straight off of a hard surface, to get the full output to your ears. Some cases may also significantly reduce the output as well.
more questions: if we presume/conclude "there is a volume problem even when the speakers are not defective", then two follow-on questions:
1. is it JUST speakers?
2. combo of lousy speakers and a problem with the DSP/firmware/software/etc.... ?
I think it is 2 but I'd love to hear a root cause on the whole issue.
with SOME music sources I can get through the speakers a little bit louder response, at FULL volume max'd - than I can with MX Player on a video with the Player set on Volume Boost [200%].
in the case of MX Player, its basically worthless through the speakers both from a dynamics standpoint [obvious...] and just volume unless you are in a stone-quiet area and are craning toward the device to hear.... and you have acutely good hearing.
Then, if one is unconcerned about warranty: anyone have suggestions on replacement speaker that perhaps would help?
cognus said:
more questions: if we presume/conclude "there is a volume problem even when the speakers are not defective", then two follow-on questions:
1. is it JUST speakers?
2. combo of lousy speakers and a problem with the DSP/firmware/software/etc.... ?
I think it is 2 but I'd love to hear a root cause on the whole issue.
with SOME music sources I can get through the speakers a little bit louder response, at FULL volume max'd - than I can with MX Player on a video with the Player set on Volume Boost [200%].
in the case of MX Player, its basically worthless through the speakers both from a dynamics standpoint [obvious...] and just volume unless you are in a stone-quiet area and are craning toward the device to hear.... and you have acutely good hearing.
Then, if one is unconcerned about warranty: anyone have suggestions on replacement speaker that perhaps would help?
Click to expand...
Click to collapse
#2
When I connect the Nexus 7 to my car stereo inline, via the headphone output, I get mixed results. I generally have to crank the car stereo way up, which can cause voltage induction through the 1/8" to RCA connector, if I have the Nexus charging simultaneously.
Now granted, induction of this sort is not something that is a Nexus only problem, and has more to do with the quality of cable shielding. If I move the USB charger so that it doesn't line up with the headphone output wire, the problem is reduced.
However, the issue is more that the headphone output is somewhat inconsistent, so that means that some audio will require me to turn the stereo to a level where the inductance is moot, and sometimes I will have to turn up the stereo to the point where charging and listening to audio through the car stereo is just brutal. Of course, you weren't asking specifically about car audio, but it leads to my theory.
Now, here in lies why I think it's you're "#2". If it were purely hardware, there shouldn't be that great of a difference from the headphone jack, assuming relatively similar reference volumes from the source. So software would seem to be at play here, as well as hardware.
As far as the speakers go, I don't think you'll be able to replace the internals. They're a very awkward shape, which probably doesn't help, and there is very little room in there.
Your best bet would be to find out if there is an external speaker option which can easily work for tablets. I listened to an Ipad 4 last night, and it wasn't good either. I think you have to consider the size of these things. A speaker the size of your pinky nail, can only be asked to do so much. Trying to cram one the size of your thumbnail in there, won't do much more, and just wouldn't fit.
now we're talking real issues. thank you.
yes, compared to any of my other android or pc or apple devices this one is uniquely odd
all as you have noted. inconsistent, output device matters, etc.
I admit I'm skewed by the ipad Mini - if you get a chance, sample that in terms of speaker performance. I have not access to Ipad 4 in my shop.
in my case, there is no distortion that I can observe/detect with my ears - clear enough, but there's not much substance there, oddly except for notifications which are crystal clear at full volume, if not particularly loud [my ancient droid optimus is louder - obnoxiously so which is why I keep it on vibe].
bladebarrier said:
#2
When I connect the Nexus 7 to my car stereo inline, via the headphone output, I get mixed results. I generally have to crank the car stereo way up, which can cause voltage induction through the 1/8" to RCA connector, if I have the Nexus charging simultaneously.
Now granted, induction of this sort is not something that is a Nexus only problem, and has more to do with the quality of cable shielding. If I move the USB charger so that it doesn't line up with the headphone output wire, the problem is reduced.
However, the issue is more that the headphone output is somewhat inconsistent, so that means that some audio will require me to turn the stereo to a level where the inductance is moot, and sometimes I will have to turn up the stereo to the point where charging and listening to audio through the car stereo is just brutal. Of course, you weren't asking specifically about car audio, but it leads to my theory.
Now, here in lies why I think it's you're "#2". If it were purely hardware, there shouldn't be that great of a difference from the headphone jack, assuming relatively similar reference volumes from the source. So software would seem to be at play here, as well as hardware.
As far as the speakers go, I don't think you'll be able to replace the internals. They're a very awkward shape, which probably doesn't help, and there is very little room in there.
Your best bet would be to find out if there is an external speaker option which can easily work for tablets. I listened to an Ipad 4 last night, and it wasn't good either. I think you have to consider the size of these things. A speaker the size of your pinky nail, can only be asked to do so much. Trying to cram one the size of your thumbnail in there, won't do much more, and just wouldn't fit.
Click to expand...
Click to collapse

Static / buzzing from speakers at low volumes

I just started playing a few games on this Nexus 7, and I turned the volume down to the lowest setting because it is late at night and other people in my house are sleeping. I immediately noticed a soft but very audible static buzz coming from the speakers... about the same volume as the audio itself. I held my ear up to the hardware and confirmed it is both top and bottom speakers.
Anybody else experience this?
copyists sorpeno
I didn't notice at first. Noticed this morning with audio low as well.
I'd like to know if anyone else has this too. Kinda wanna know if its hardware since I purchased at best buy and only have 2 weeks to return.
Yup, I was going to report this too, but since it only occurs at minimal volume I didn't bother. I lost my good headphones so I can test the audio jack. Does it happen to you with them on too?
Btw- if this the trade off with the fantastic (for tablet speakers) surround sound I'll take it. Watch the test video on the Play Videos app.
Sent from my Nexus 7
I don't hear it. on mine. But My hearing is horked.
It's because the Nexus 7 uses a crappy digital volume control that simply reduces the volume of the digital waveform before it hits the DAC, instead of having a real analog volume control -an op-amp that adjusts the volume of the signal before it hits the headphone/speaker amplifier.
What you're hearing is quantization noise as at the lowest volume the audio uses only 2-4 bits of dynamic range instead of the full 16 (or 24, dunno what DAC is in this thing). It's the same as the bit-crushing effect you hear in some dubstep and other electronic music that degrades the audio into a robotic crunchy mess, only here it's not on purpose, it's just cheap design.
There is nothing you can do about it.
I've also noticed this (at first I was like, WTF? Is it raining in my game?). If what was said above is true, that makes me sad that nothing can be done about it.
siraltus said:
It's because the Nexus 7 uses a crappy digital volume control that simply reduces the volume of the digital waveform before it hits the DAC, instead of having a real analog volume control -an op-amp that adjusts the volume of the signal before it hits the headphone/speaker amplifier.
What you're hearing is quantization noise as at the lowest volume the audio uses only 2-4 bits of dynamic range instead of the full 16 (or 24, dunno what DAC is in this thing). It's the same as the bit-crushing effect you hear in some dubstep and other electronic music that degrades the audio into a robotic crunchy mess, only here it's not on purpose, it's just cheap design.
There is nothing you can do about it.
Click to expand...
Click to collapse
I'm not sure how you know that but if you're right I guess that means it would happen on all of them... which.. sucks.. Is there anyone that doesn't have this issue to disprove this?
smurfqq said:
I'm not sure how you know that but if you're right I guess that means it would happen on all of them... which.. sucks.. Is there anyone that doesn't have this issue to disprove this?
Click to expand...
Click to collapse
I'm a professional audio engineer, I know exactly how these things work. Most cheap devices do volume controls that way, because adding a dedicated op-amp for analog volume control increases costs of the device, and the Nexus 7 is a budget device.
It does happen on mine, too, in every app that plays sound.
I love when pros come in here and give the technical explanation haha hats off to you, sir!
Sent from my Samsung Galaxy S4 using Tapatalk 4 Beta
siraltus said:
It's because the Nexus 7 uses a crappy digital volume control that simply reduces the volume of the digital waveform before it hits the DAC, instead of having a real analog volume control -an op-amp that adjusts the volume of the signal before it hits the headphone/speaker amplifier.
Click to expand...
Click to collapse
As the others have said, thanks for the explanation. Nice to hear from somebody who understands it, and if the problem is present in all units that actually makes me feel better since I don't have to worry about returning my otherwise perfect unit.
Question though, how come I don't hear the static when using headphones, even on the lowest volume settings where I hear the static from the built-in speakers? That makes me think it's related to the speakers and not the audio hardware... but you obviously know more than me on this.
mrmartin86 said:
I've also noticed this (at first I was like, WTF? Is it raining in my game?). If what was said above is true, that makes me sad that nothing can be done about it.
Click to expand...
Click to collapse
Yeah, funny thing is the first game I played was Bad Piggies on some levels with an ocean tide moving back and forth at the bottom of the screen. I thought the static was the tide sounds... until I heard it in another game too.
tweaked said:
I don't hear it. on mine. But My hearing is horked.
Click to expand...
Click to collapse
It only happens at the absolute lowest volume setting... i.e. one notch up from muted. It sort of happens at the next notch up too, but is most noticeable at the quietest setting, and you need to be in a quiet room. I only noticed because I was using the device in a small echoey mostly tile room (you can probably guess where) and because of the room having such acoustics I put the device on the lowest setting just above mute.
Had something like this on my original nexus 7
Except it happened regardless of the volume setting. Wasn't that audible- had to put my ear against the speaker to really hear it, but it did interfere with other devices, such as my radio, or keyboard with a head phone jack. It would make a sound like a quick DUH-DUH-DUH-DUH-DUH-DUH...DUH-DUH-DUH-DUH-DUH-DUH. My nexus 4 can sometimes cause static interference with other devices, too. Haven't gotten the new nexus 7 so I cannot say whether or not my new one has this issue
Well.. mine's not only happening at the lowest volume notch. If I put it to my ear (never actually going to do this for normal use) it's there at every volume level, just hard to hear once whatever I'm playing gets loud enough. The display unit at a local best buy does the same. I can hear it in a quiet room at the first couple notches (normal use), which is annoying. Also, since someone asked - No it doesn't happen through headphones.
The111 said:
As the others have said, thanks for the explanation. Nice to hear from somebody who understands it, and if the problem is present in all units that actually makes me feel better since I don't have to worry about returning my otherwise perfect unit.
Question though, how come I don't hear the static when using headphones, even on the lowest volume settings where I hear the static from the built-in speakers? That makes me think it's related to the speakers and not the audio hardware... but you obviously know more than me on this.
Click to expand...
Click to collapse
My pleasure! There's tons of FUD on XDA about many things, so I try to contribute on stuff I know well to reduce that.
Without looking at the schematics of the thing I can only guess:
The speaker amplifier is probably just a simple design that outputs 100% power all the time, so you have to control the volume of the signal that enters it, whereas the headphone amp probably has an integrated analog volume control.
A volume control is much easier (read: cheaper) to do in an integrated chip with low power signals (headphone out) than higher power (speaker out), and again, cheaper was the way to go with the Nexus 7.
Hence, there are two separate outputs from the audio chip - one that feeds the speaker amplifier and uses the bit-crushing digital volume control, the other outputs full-scale audio to the headphone amplifier which controls the volume in analog.
siraltus said:
My pleasure! There's tons of FUD on XDA about many things, so I try to contribute on stuff I know well to reduce that.
Without looking at the schematics of the thing I can only guess:
The speaker amplifier is probably just a simple design that outputs 100% power all the time, so you have to control the volume of the signal that enters it, whereas the headphone amp probably has an integrated analog volume control.
A volume control is much easier (read: cheaper) to do in an integrated chip with low power signals (headphone out) than higher power (speaker out), and again, cheaper was the way to go with the Nexus 7.
Hence, there are two separate outputs from the audio chip - one that feeds the speaker amplifier and uses the bit-crushing digital volume control, the other outputs full-scale audio to the headphone amplifier which controls the volume in analog.
Click to expand...
Click to collapse
Makes sense. Thanks again.
siraltus said:
My pleasure! There's tons of FUD on XDA about many things, so I try to contribute on stuff I know well to reduce that.
Without looking at the schematics of the thing I can only guess:
The speaker amplifier is probably just a simple design that outputs 100% power all the time, so you have to control the volume of the signal that enters it, whereas the headphone amp probably has an integrated analog volume control.
A volume control is much easier (read: cheaper) to do in an integrated chip with low power signals (headphone out) than higher power (speaker out), and again, cheaper was the way to go with the Nexus 7.
Hence, there are two separate outputs from the audio chip - one that feeds the speaker amplifier and uses the bit-crushing digital volume control, the other outputs full-scale audio to the headphone amplifier which controls the volume in analog.
Click to expand...
Click to collapse
Is this something they can fix (or at least mitigate) in a software update?
paxunix said:
Is this something they can fix (or at least mitigate) in a software update?
Click to expand...
Click to collapse
No, this is how the hardware is designed.
Noticed this too from the speakers regardless of volume, and regardless of what is playing audio. It's a high pitched squeal to my ears which I can't stand. I've thrown out computer power supplies and video cards that have made similar(obviously, louder) noises.
Was hoping it could be something improved in software, but I guess not. Time to sell this.
http://youtu.be/c9aQnuOrTY8
Recorded what it sounds like at lower volumes with a small condenser mic next to it. Let me know if that's similar to what you guys are hearing too.

Qualcomm Audio/Usb DAC Optimization, Spl monitor, Biquad Helper

Project Purposes: Optimize sound quality of snapdragon audio codec devices when played through the headset port at moderate to low volumes, especially using low impedance, high sensitivity in ear monitors. The optimization will mainly affect signal to noise ratio, noise floor, perhaps THD. In addition, real time Spl monitoring on any device has been added for hearing protection, curiosity and viewing the dynamic range of music tracks. Integration of the Biquad equalization/filter mod by @chdloc as a parametric equalizer. The equalizer is capable of 5 bands, different left and right parameters and clipping protection.
Potential Users: Listen to music with high efficiency headphones/IEM and music volume generally below 2/3 max. Low distortion, noise important. Will also provide a finer granularity to the volume heard, about 1 dB increment change vs 3 dB through android volume control. Ability to make custom equalization filters for anything that plays through the headset jack.
Requirements:
For Gain Control:
Rooted, snapdragon based sound codec device (tested on galaxy S3, Note 4, Sony Tablet Z, Nexus 5). Totally stock ROM and kernel is fine. AOSP and custom kernels should work, even Faux audio kernels.
For Spl measurement only:
Non rooted, stock android 4.4 and beyond.
Usb DAC-you need to be rooted but any brand codec, Usb audio must work already, Not compatible with 3rd party Usb sound apps/drivers. You will also need ALSAmixer and thanks to the developer for making this tool. Use version 251.
This app supports Neutron, Poweramp, Spotify and Google play music. Other music play apps should work using a “polling” method to detect if they are playing
Background
You may have heard various reviewers say that the codec/DAC of a device is of high quality but the software has not been designed to take advantage of said hardware. Well, that seems to be unfortunately true. The situation is that most if not all headphone audio is not designed to maximize signal to noise ratio, distortion and noise floor. The volume output of the device is dependant on "gain" from both analog and digital controls. Unless you are playing back at max levels, volume attenuation using the digital control results in data truncation and potentially loss of information. Therefore the use of analog gain to control the volume(with digital gain near 0) should provide the most optimal signal. Measurements done by myself show about a 10 dB noise floor improvement at low gain levels using an analog method of gain level optimization . But at near max output this difference should disappear.
Reference is zipped below from a presentation from ESS, a company that makes high quality DAC chips.
Is there a way to do this? Yes, by keeping the digital gains near or at 0 dB and using analog gain control. There are 3 different gains that we can adjust, RX digital gain(in /system/etc/mixer_paths.xml with value 84 generally zero dB), Android volume(0-15---15 being 0 dB) and analog control(HPHL and HPHR-also in mixer_paths). The problem is that each time you adjust mixer_paths you need to restart your phone--not a very good solution unless you listen at one fixed volume. There is a utility called tinymix that will adjust these as well but in my experience(Note 4) it's not very reliable/fast.
In the process of working on some other sound mods with my friend @chdloc) we stumbled on a specific file that is a codec debug tool. It shows the codec register values(the ones above as well as a plethora of other data) but more importantly--it can be written to! So we have a way to smoothly and quickly read and adjust digital and analog gains. There is a catch though. If the audio path changes (listening to music then a text notification comes in, or alarm goes off, or you get a phone call) the audio gain will revert to whatever was default in the mixerpaths.xml file(kind of a master control file for audio). We have been able to compensate somewhat for this as will be seen below and is a main feature of this mod.
The Spl monitoring is covered below in more detail. Although it was not my initial goal for this project, I believe the Spl monitoring offers a unique glimpse into the actual sound pressure level coming out of the headset as well as the dynamic range of your music. As far as I have seen, there is not another mod that does this and it was something I have always wanted to do. My hearing has already been degraded by rock concerts, noisy subways, loud weddings etc and I wanted a way to protect against any further damage (but at the same time I do like to listen at a relatively high volume). This feature is helpful in that compromise.
The Biquad integration provides a way to both design custom filters (equalization) that will work for all music apps playing through the headset jack. The filters can be asymmetric--left different from right.
Setup--
0- Backup/Nandroid everything.
1- place "tinymix" in system/bin, permission to execute. Tinymix is used in the initial codec query/calibration. Make the appropriate changes to mixer_paths.xml (see below).
2- make sure you have busybox installed(most custom Roms already have this, if you are stock rooted get it from playstore)
3- Install the Gainctrl apk. This is the main app to control gains, logically raise and lower the gain to achieve the desired listening volume. The app will ask for permissions dealing with starting on boot, root functions, reading sms since it can read back messages.
4- Put a set of headphones in the jack
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5- Open the app Gainctrl----
You will presented with three choices. If you want the usual install press the top button.
(The second button will install Spl monitoring software only for non root.
The third option is for codec tools which will be used for future debugging and I will skip it.)
For Usb Dac control just press the choice and the screen will close.
When you plug in a Usb Dac, the program will detect this and will be discussed below.
Then a setup screen will open
There is an auto calibration step that needs to be done once-press the button on the lower part of the screen that says calibrate.
The app will find the range and location of the analog gains that your codec supports. This is where tinymix is used to determine the HPH levels your codec supports. The app will use Google play music to play a track(whatever you were last listening to, so make sure that app is installed), go through some measuring and then let you know when it’s done. It will then quit.
Quick start usage--just start playing Google music again and the notification controls will appear up top. Press the up/down buttons to raise /lower volume or use the 3rd triple line icon to open the gain slider screen.
Here are sliders for Android volume (each tick is 3 dB), Digital gain and Analog gain. Analog goes from 0 to 20 (usually, sometimes 12). Digital is the RX1 and RX2 (L,R side and each tick is 1 dB) from mixerpaths and incidentally also corresponds to what Faux sound modifies. We should initially keep Analog at zero, Android at max 15 and then use the Digital to get a comfortable level. If you have maxed out digital to 84 (0 dB) then start raising Analog (each tick is 1.5 dB).
6- Setup Screen Usage---Choosing which music app you will use(Poweramp and Google are the same button). Each music app will fire "broadcast intents" when playing or not-these are used to rerun the codec scripts for gain changes on music play-so choose carefully. The calibration above uses Google music so that is what is chosen as default. As mentioned above the gain settings/biquads usually don't stick after the music stops so the app needs to know when tracks play/pause/change.. “Say text” on or off to verbally read text messages or not. In addition I have added a switch to enable automatic reapplication of the "Biquad" mod on each pause/play. This is a brilliant piece of work done by my friend @chdloc that creates a 5 band parametric equalizer on the qualcomm platform. His post has the details of how to implement the feature and further instructions are below.
Music polling-certain music apps don’t broadcast play pause info that this app can catch(Pandora). By choosing the polling method a loop will be set up on headset insertion that “listens” for music playing every 4 secs. It should not be used with the defined player options above it and if it is chosen the others become inactive, and visa versa.
Summary:
- The notification bar is where you increase or decrease the volume. The far right icon next to the arrows goes to the gain slider screen as an alternate adjustment.
- If you restart the phone/tablet you will not need to restart the app--it should auto start.
- If you get a call, the music will stop and on resume the volume will go back to the last chosen levels.
- If you get a text, music will pause and it will be "read" over the music channel so no volume shifting occurs. However, the text reading can be disabled by the button in the settings screen.
From any of the screens there is a master menu, 3 dots on the top left, it will go to all relevant screens. It can be activated by pressing the notification icon of the app, the Home button on the "Biquad" bar, opening the app from the app drawer if no notifications are present.
Help- will bring you to this post:
There are also 2 mini apps--"Up" and "Down". These can serve in place as up or down clicks on the notification bar. They are good as "shortcuts" to put on the home screen, or even mapping the volume up/down keys using "xposed additions". A single launch/click of the Up/Down app will change the gains by 1 dB according to the logical algorithm (keeping android vol/digital at or near 0 dB and analog gain as low as possible).
Spl control-
Preface-One of my fears in many long years of listening, is what damage is being done in regards to permanent hearing loss. There are studies and recommendations as to time and volume levels that are safe. The SPL calc is an attempt to provide a rough estimate of the Spl(sound pressure level) coming out of the headphone using the following assumptions.
The full output of the codec is 1 V, the published headphone stats(sensitivity and impedance) and measured/published phone amplifier impedance are correct. The software will compute the Spl using the above and the gains selected. So you need the headphone’s published sensitivity( my Shure SE846 is 114 dB SPL/mW), some are published in dB/V so be careful with the entry box. The Spl window uses these units so be reasonably certain. The headphone out impedance is usually about 1 to10 Ohm (Note 4 is 1.4) but you should be able to find the value on the net or measure it yourself(here). The headphones impedance at 1 Khz is usually published but can be also taken from Goldenears.net reviews( again my SE846 is about 9 Ohm)
You should be able to raise/lower gain by 1 dB, monitor the Spl from the notification bar. If you are curious and have the right gear you can also use this in bench testing to easily compare different settings(high analog vs digital attenuation) but at the same Spl(gain). I have measured the actual Spl using a handheld meter, using a full-scale 1 kHz sine wave and the matching is very close. Actual music will be less but varies depending on what you are listening to. Informal observations show average music to be 5-6 dB down from the 1 kHz sine. Please consult published guidelines for safe listening.
Spl and Visualizer
As noted above, one of the purposes of this app/mod is to try to inform the listener about excess sound levels which will cause hearing loss. It does not limit or change the sound in any way but based on the gains(voltage put out by the phone), the headphone/amplifier output impedance and headphone sensitivity, calculates what a 1 kHz sine wave Spl would be. Depending on what you are listening to (silence, over compressed rock music, everything in between) the sound coming out of the headphone will be quite different. There is a class available in android that measures the peak and RMS audio levels on a real time basis. By using this measurement we can then compensate for whatever the played signal is for a much more accurate determination of Spl. Unfortunately there is a bug in the measurement process that makes levels only accurate at maximum android volume levels. With this app, we keep them there anyway so it is not an issue. However, if you do not do so the numbers put out will not be accurate.
Additional Feature:
Spl Monitoring Mode Only- Any device, any onboard DAC- No root needed, the volume keys will provide the gain parameters. Of course, you still need to input the amplifier, headphone specs. In addition, the maximum output voltage will need to be measured(to figure out the maximum volume possible). A male to male headset connector, voltmeter and a 1 kHz full scale sine wave is needed(below). Play the sine wave at max volume(do not attach headphone), measure the voltage and that is used in the input screen. My Galaxy S6 only puts out .525 V so it's max Spl will be quite a bit different than the Note 4 (1 V).
The new Spl measurement process gets peak and RMS levels every 1.5 seconds and put these values in an array of 8 values. At the end of the 8th measurement, the array is averaged and saved to a text file on your root storage(about every 15 sec). The two files contain the peak values and RMS in dB. So let's say the track has a peak value at 1 minute into the song of 0 dB, and an RMS level of -7 dB. The dynamic range would be 7 and if the calculated Spl was 90 by the original OP formula, the new net Spl would be 83 dB. A very quiet track may have a peak of -3 dB and RMS -16 resulting in a dynamic range of 13 and corrected Spl (90-16) of 74. More info on dynamic range calculations
The “visualizer” is enabled in the Spl Ctrl screen.
Be extra careful which headphone sensitivity units are used--either dB/V or dB/mw. Enter either one but not both. The website of the manufacturer should have the specs. Note: Shure is in dB/mw and Sennheiser is dB/V.
The visualizer engine does take considerable CPU resources and battery use. If you don’t want/need it, keep it disabled. On my Note 4, there is no lag and minimal battery compromise but devices may vary. The following screenshot shows the effect on my Note 4, about an extra 5-7%.
[/IMG]
The values are in a separate notification bar, with the last 8 array members over the previous 15 seconds.
The graph icon will show a graph of the Spl and dynamic range over time. It uses google graph api, so an internet connection is needed. The graph is scrollable by dragging it. Every time the headphone is pulled a separate “session” begins and the graph zeros out. But the last session can still be seen by pressing the button noted. Very long sessions won’t function with the google graph api that is used so the data gets automatically resized to every other value. Pause/play stays in the same session.
The left side of the graph has units for Spl in dB, the right(which may need to be scrolled since it is off screen) has the legend for dynamic range. Most tracks will have a dynamic range of between 8-15 (corresponds to the DR album database of 5-12 values). Parts of a track may have more range than others and certainly will have different Spl values. I have placed a yellow caution line at about 78 dB and a red at 85.
I have enclosed a couple of papers from recent literature regarding safe/prolonged listening levels and hearing loss. This software does not “A” weight the Spl, which is what is seen in the literature, but it is not far off, based on my A vs C weighted Spl meter comparing the levels.
Additional information
Neutron users must enable generic driver in settings.
Poweramp working with gains and Spl, use the google music toggle in setup, make sure direct volume control off and MusicFx is on in settings
Biquad Control:
One of the most significant accomplishments in regards to the qualcomm codec platform was the development of the Biquad filter/equalization system by @chdloc. This give us either a hard coded fixed equalizer(see his post for the mixerpath mods) or (with a bit of work) an on demand custom 5 band parametric equalizer that you can totally control. What my app will do is capture the numeric band codes from the Biquad app scripts, and take a screenshot of the frequency curve.
Step 1 is to install Biquads app, make the required mixerpath mods and probably make an extreme filter(bad sounding) to make sure it actually works when we test it out.
Step 2- From this apps main menu open Biquad Bar.
Another notification bar will appear up top, back arrow or close the main menu for now.
Step 3- Open @chdloc’s Biquad app, design your filter and press “Design Biquad”.
It will calculate the filter and put up a nice graphic--do not close this! Go to the notification bar opened above and press the “Capture” button. A screenshot is taken and you are presented with a screen to name the filter. Call it something descriptive, ie +2 dB 4 Khz Q 2 lets say, then hit save. You can now go back to chdloc Biquad app, hit ok to put away the graphic and then design another. Note--all captures are done on biquad #1--so do not design on the others.
Step 4- Design “Multi filter”- from the main menu, choose that entry and a screen opens showing left, right channels and the previously added individual biquads are in the drop down positions in a grid form. By default, they are all disabled. Just pick one at a time. A few comments. After measuring my Shure 846 freq response I noted a bit of a channel imbalance. So I made a 2 dB boost at 4K in the R and 4 dB boost in the L. So each band does not need to have the same gaines L or R. Each line can also have just a unilateral change. So if you need a boost or cut in just one side, leave the other disabled.
To prevent clipping it is very important to cut the “preamp” (INP1) by whatever the max boost was in your filters. So if you are boosting low bass by 8 dB, INP1 reduction needs to be 8. The net Spl calculation will reflect this as well.
Step 5- Go back to Setup from the main menu and enable Biquads.
Step 6- From the Main menu click “Active Filter” or the “Biquads bar” in notifications(click on the icon-not the Home) will open the same window. You will see a list of all the filter composites you have made, including a disabled choice. Just click on the entry you want to be active and it will run some tinymix commands to implement it. The details of the “mix” will show below the choice list in case you forgot what you picked. Long clicking will delete any entry.
Step 7-optional-Biquad library- from the main menu again, this lists all the single filters we took from the Biquad app, with screenshots(not scaled) to get an idea of what each looks like. Long clicking will delete.
Once this is done, the overall filter/equalization will occur automatically on playing.
Mixerpath mods:
As noted above, if the music stops or something interrupts the music stream, the default gain settings kick back in, potentially leading to a loud music blast as the track resumes, before the scripts have a chance to fire. To prevent this I highly recommend changing a few values in the mixer_paths.xml file that control HPH, which are the headphone analog gains and RX1, RX2 which are digital gains. Important: as above, the setup screen choice of what music app you are using is key for the scripts to run on playing, if they are not chosen the app will not know when to run the scripts.
In system/etc resides mixer_paths.xml. Use an appropriate file explorer and text editor to make the changes. There is one mixer_path change that is needed (at least on my device). That change involves turning off the "compander". The purpose of the compander is to reduce noise but I have seen no such improvement in testing. Unfortunately, having this on will prevent the analog gains from reliably changing so it needs to be off. So open mixer_paths.xml and under the "Headset" path change the "COMP1 Switch"=1 to "COMP1 Switch"=0.
Open and "find" occurrences of "HPHL" and "HPHR" in the path "Headset". Replace values with something low-- (2 to 4 range). That is to assure that analog gain does not get out of hand on audio stream type change(default is 20 on the Note 4 which is 30 dB higher than the 0 some people will use). Especially change the HPHL/R values of 0 in the beginning of the file, also to 2 to 4.
If your Digital gains are usually 65-75 in the control screen, I would also change the RX1 and RX2 values at the beginning of the file to whatever you generally use as well as the values under the "Headset" path(both usually 80-84). (NOTE- the path is under “headphones” on the Nexus 5 so again be careful). Save the file. If the formatting is not proper, audio may not work and/or the phone may not even boot.
Do not forget to change the COMP1 switch to 0.
Finally, if you use the “Up” and “Down” miniapps, they will trigger the above actions without pulling down the notification bar. They can also be mapped to the volume buttons using xposed additions(free version works fine). If you do this and media is not playing, the buttons should still control incall volume. However if no media is playing and not in a call, volume button (Up and Down miniapps) will trigger a volume screen below(since it does not know what you would like to adjust). Note--if tasker is running as a freestanding app, a broadcast error may flash-it is of no consequence.:
Usb Dac control;
On insertion you may see:
You must check the "always" box and hit OK.
First time use you will see:
The top box will populate with sound card devices and the Usb Dac will usually be device 1.
So enter 1 in "Device ID" field as shown.
Then the next scroll box will show the details of that sound card. We are interested in "PCM playback volume". Notice that the Numid is 3. That is entered in the next line as Numid.
Now, I have defaulted some boxes with my Dragonfly Red data but as shown, the Soundblaster E3 has markedly different values. The next part is critical. The "Range" must be put in (if not 64)--so in this case it's 12560. Then a Start Gain, this will trigger every time the Usb Dac is plugged--pick 5-10 percent of max, but this can be altered later. If you are interested in Spl levels, the voltage, impedance data etc must be put in. It is useful not only for ear protection but can help in loudness matching between headphone jack and Usb. The visualizer is explained above. The default player is Google music but the 3 dot menu can take you to "Setup" to change that.
When the Usb Dac is plugged, the notification bar will have a control similar to the qualcomm one. The up and down arrows will boost or decrease the Usb Dac gain by 1 dB (if the Range is 64) and the 3 lines on the right will take you to sliders that do the same.
If you do not want to have the Usb Dac control anymore, there is a Disable button on the control screen.
Finally, many thanks again to @chdloc for direction, knowledge, encouragement, friendship and the brilliant Biquad app. And for helping with the Usb Dac, Alsa particulars.
I would also like to thank the makers of Tasker, one of the most useful coding tools I have used in my many years of amateur programming. This app was created solely in Tasker including android java api usage.
Scope shots and etc..
A couple of oscilloscope shots of the difference between keeping analog gain low (so digital attenuation is minimal)
This is stock:
This is the same voltage/spl but analog at 0 and digital near max(this is at the highest level I listen to, about 40 dB down from the max possible with my shure se 846 and Note4). Improved noise floor and band spiking. Test chain is Note 4 to asus xonar u7, unloaded, scope software Visual analyzer
Great work @bjrmd !
I've been using this mod for about a week without a problem.
Great mod
pvnsai73 said:
Great mod
Click to expand...
Click to collapse
Thanks--
I made a major advance in Spl measurement that will be in the next version soon. As stated above, the Spl is based on the analog/digital gains plus amp/headphone specs. This gives a worse case figure for playing a full scale 1 khz sine wave. But we don't listen to full scale sine waves, and music levels vary tremendously depending on many factors (type of genre, dynamic range compression-loudness wars, the way it was mastered etc). Using the "visualizer class" in android, I have been able to get the peak/RMS levels in real time as the track is played. So, based on what that shows, we will have a much more accurate net Spl. I am very interested in maintaining/protecting hearing and this will be a major focus in the next version.
bjrmd said:
Thanks--
I made a major advance in Spl measurement that will be in the next version soon. As stated above, the Spl is based on the analog/digital gains plus amp/headphone specs. This gives a worse case figure for playing a full scale 1 khz sine wave. But we don't listen to full scale sine waves, and music levels vary tremendously depending on many factors (type of genre, dynamic range compression-loudness wars, the way it was mastered etc). Using the "visualizer class" in android, I have been able to get the peak/RMS levels in real time as the track is played. So, based on what that shows, we will have a much more accurate net Spl. I am very interested in maintaining/protecting hearing and this will be a major focus in the next version.
Click to expand...
Click to collapse
Bro I have a doubt
Wt is the main purpose of this mod and how it can be used wisely
I have changed my mixerpath value like below
Are they right?.. like mentioned in install instructions
pvnsai73 said:
Bro I have a doubt
Wt is the main purpose of this mod and how it can be used wisely
I have changed my mixerpath value like below
Are they right?.. like mentioned in install instructions
Click to expand...
Click to collapse
The changes look correct.
The mod has 2 main purposes:
First, was originally intended as a kind of "voodoo sound" app like @supercurio did for the wolfson codec. Keep analog gain to a minimum so digital gain stays near 0dB, minimizing loss of signal information(see above for full explanation and presentation by ESS).
Second, it became possible (because we now know the contribution of all gain parameters, ie digital, analog, android volume) to estimate the projected Spl if we also can get the specs for headphone sensitivity, impedance and phone headphone jack impedance. This will be even better estimated by the visualizer correction noted above.
And yes the key: to use wisely!
There are plenty of studies and sites on music induced hearing loss -you can do some reading-there is plenty out there. So a major objective is to know when to back off on the volume
bjrmd said:
The changes look correct.
The mod has 2 main purposes:
First, was originally intended as a kind of "voodoo sound" app like @supercurio did for the wolfson codec. Keep analog gain to a minimum so digital gain stays near 0dB, minimizing loss of signal information(see above for full explanation and presentation by ESS).
Second, it became possible (because we now know the contribution of all gain parameters, ie digital, analog, android volume) to estimate the projected Spl if we also can get the specs for headphone sensitivity, impedance and phone headphone jack impedance. This will be even better estimated by the visualizer correction noted above.
And yes the key: to use wisely!
There are plenty of studies and sites on music induced hearing loss -you can do some reading-there is plenty out there. So a major objective is to know when to back off on the volume
Click to expand...
Click to collapse
Thanks for replying and all the help yu done to me
Thanks for info and tutorial
kevinnol said:
Thanks for info and tutorial
Click to expand...
Click to collapse
You are very welcome
There is a bit of a "bug" if you use google music and have a device that "offloads" the signal to the DSP. The mixerpaths are reapplied on track change(not all devices--yes to Nexus 5, Note 4, no to the Sony tablet) so we lose our current settings. Will have a fix out the next day or 3. Neutron/Spotify should be fine even now.
Spl and Visualizer
As noted above, one of the purposes of this app/mod is to try to inform the listener about excess sound levels which will cause hearing loss. It does not limit or change the sound in any way but based on the gains(voltage put out by the phone), the headphone/amplifier output impedance and headphone sensitivity, calculates what a 1 kHz sine wave Spl would be. Depending on what you are listening to (silence, over compressed rock music, everything in between) the sound coming out of the headphone will be quite different. There is a class available in android that measures the peak and RMS audio levels on a real time basis. By using this measurement we can then compensate for whatever the played signal is for a much more accurate determination of Spl. Unfortunately there is a bug in the measurement process that makes levels only accurate at maximum android volume levels. With this app, we keep them there anyway so it is not an issue. However, if you do not do so the numbers put out will not be accurate.
Additional Feature:
On any android 4.4 or later device it is now possible to monitor the real time Spl/Dynamic Range as above. No root needed, the volume keys will provide the gain parameters. Of course, you still need to input the amplifier, headphone specs. In addition, the maximum output voltage will need to be measured(to figure out the maximum volume possible). A male to male headset connector, voltmeter and a 1 kHz full scale sine wave is needed(below). Play the sine wave at max volume(do not attach headphone), measure the voltage and that is used in the input screen. My Galaxy S6 only puts out .525 V so it's max Spl will be quite a bit different than the Note 4 (1 V).
The new Spl measurement process gets peak and RMS levels every 1.5 seconds and put these values in an array of 8 values. At the end of the 8th measurement, the array is averaged and saved to a text file on your root storage(about every 15 sec). The two files contain the peak values and RMS in dB. So lets say the track has a peak value at 1 minute into the song of 0 dB, and an RMS level of -7 dB. The dynamic range would be 7 and if the calculated Spl was 90 by the original OP formula, the new net Spl would be 83 dB. A very quite track may have a peak of -3 dB and RMS -16 resulting in a dynamic range of 13 and corrected Spl (90-16) of 74. More info on dynamic range calculations
The “visualizer” is enabled in the Spl setup screen.
Be extra careful which headphone sensitivity units are used--either dB/V or dB/mw. Enter either one but not both. The website of the manufacturer should have the specs. Note: Shure is in dB/mw and Sennheiser is dB/V.
The visualizer engine does take considerable CPU resources and battery use. If you don’t want/need it, keep it disabled. On my Note 4, there is no lag and minimal battery compromise but devices may vary. The following screenshot shows the effect on my Note 4, about an extra 5-7%.
[/IMG]
The values are in a separate notification bar, with the last 8 array members over the previous 15 seconds.
The graph icon will show a graph of the Spl and dynamic range over time. It uses google graph api, so an internet connection is needed. The graph is scrollable by dragging it. Every time the headphone is pulled a separate “session” begins and the graph zeros out. But the last session can still be seen by pressing the button noted. Very long sessions won’t function with the google graph api that is used so the data gets automatically resized to every other value. Pause/play stays in the same session.
The left side of the graph has units for Spl in dB, the right(which may need to be scrolled since it is off screen) has the legend for dynamic range. Most tracks will have a dynamic range of between 8-15 (corresponds to the DR album database of 5-12 values). Parts of a track may have more range than others and certainly will have different Spl values. I have placed a yellow caution line at about 78 dB and a red at 85.
I have enclosed a couple of papers from recent literature regarding safe/prolonged listening levels and hearing loss. This software does not “A” weight the Spl, which is what is seen in the literature, but it is not far off, based on my A vs C weight Spl meter comparing the levels.
Again, many thanks to @chdloc for helping me make this possible.
Additional information
Neutron users must enable generic driver in settings.
Poweramp working with gains and Spl, use the google music toggle in setup, make sure direct volume control off and MusicFx is on in settings
A word about the effect of equalization:
If you apply cuts using the equalizer, they will reflect accurately in the Spl (the visualizer responds depending on the amount of cut). But if you significantly apply gain, depending on the amount of clipping, the Spl will be underestimated. So in general apply boost sparingly and mainly cut the frequency bands you don't like(or to make the others sound louder). The brilliant codec mod by @chdloc is not reflected in the Spl either, so try to keep the boost/cuts equivalent to keep the Spl accurate (and the signal without clipping).
interesting MOD, great work mate.
Update:
Version 2.1: Now has Spl monitoring for any device running android 4.4+, no root needed, but you will need to measure maximum output voltage from the headset jack. This is an "observer" feature only-it will not affect the output in any way.
for exynos mode ? ty
Borfas said:
for exynos mode ? ty
Click to expand...
Click to collapse
Sure, works on the S6
But Spl mode only
Hi do you think that we can hardcode these settings into the system?
tetsuo55 said:
Hi do you think that we can hardcode these settings into the system?
Click to expand...
Click to collapse
What do you want to "hard code"?
If it's the analog gain, then yes--just change your mixerpaths as I suggested and your regular volume key will still work but you will need near max to drive your headphones(this is the desirable condition--digital gains at or near max--analog gain low to allow this)
bjrmd said:
What do you want to "hard code"?
If it's the analog gain, then yes--just change your mixerpaths as I suggested and your regular volume key will still work but you will need near max to drive your headphones(this is the desirable condition--digital gains at or near max--analog gain low to allow this)
Click to expand...
Click to collapse
Yes perfect.
Does it make sense to do the same for the built in speaker?
tetsuo55 said:
Yes perfect.
Does it make sense to do the same for the built in speaker?
Click to expand...
Click to collapse
Not really, you would never hear the improvement in quality listening to the external speaker.
bjrmd said:
Not really, you would never hear the improvement in quality listening to the external speaker.
Click to expand...
Click to collapse
Ok so it would improve the sound quality just the same, but since the speaker are generally crap you won't hear the difference.
Thanks and keep up the great work
EDIT: it turns out my device does not have the mixer path xml, so i will have to figure that out first.

Categories

Resources