yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] stonegroover:
I know most people on here don't want to know about the Lumias, but this might help shed light on the matter and might save you some time wasted on trying to fix something that can't be fixed....if you read the article you'll see it's as much to do with the physical properties/specs of the mics as it is the firmware/software.

http://www.wpcentral.com/nokia-lumia-920-sports-high-quality-rich-recording-microphones

I've seen stuff about this kind of thing before, I've had loads of phones that sound fine in call etc but when I've taken video footage with them in a pub, gig or concert I'm lucky to get even a few seconds of anything recognisable- I wasted an hour holding my phone in the air at The Stone Roses last year recording my favourite tracks, gutted when I got home and played it back. Every HTC I've had has been cr*p, my N4 is sh*t as far as this goes, despite the iPhone's technically transparent and flat mic, at high volume it's rubbish too..... however my other phone, a RAZRi is crystal clear, even in really LOUD venues and of course these Nokias are too apparently (808 Pure View records in Stereo, Lumia is Mono though).

This issue and the fact that the radio reception is very poor compared to the RAZRi means I'm quite underwhelmed by my N4, if it wasn't for the interesting Ubuntu for phone (Nexus first) thing that's just been announced it would probably be on eBay now (I've only had it for a couple of weeks, boxfresh, even still got the the original screen protector on) and I would be looking at getting some sort of Motorola with a bigger screen. Or maybe the gods will smile on us, Stephen Elop will get struck by lightning and Nokia will start to release Android phones....
[Nexus 4 General] jackierobinson:
Is it even possible that the changes in Faux's kernel could somehow revert overnight? Because After flashing his kernel last night I had some improvement, especially with talking close to the mic not causing inaudible fuzz. And now this afternoon it's as bad as ever. I have my old voice messages from last night and am comparing them and there's a huge difference.

Both are from the same bedroom with no background noise...

Urgg why is it so hard to get a phone without faults. At least with computers you can pick your parts.
[Nexus 4 General] -Mindroid-:
No! Something else changed. Maybe the way you hold your phone out some added interference, I can't say what exactly.
[Nexus 4 General] Haomuch:
Has anyone report this problem to google? I believe they will provide a fix if there are enough users complaining about this issue.
[Nexus 4 General] andy o:
I thought I had linked this before but I guess not.

Please vote here to bring the issue more attention.
[Nexus 4 General] clubtech:
Sadly it doesn't look like the problem was fixed in the 4.2.2 update. I am beginning to think this is a hardware issue and that they used some supper cheap mics to keep costs low.
[Nexus 4 General] -Mindroid-:
Sad to hear that it wasn't fixed in 4.2.2.

Btw I strongly doubt it's a mic issue, even very cheap microphones capture good quality audio.

It's possible that it is a hardware problem - bad ground or poorly designed signal path layout.

I'm not fully convinced that the distortion is caused by high mic gain. With the help of ALSA

I was able to adjust the Mic Gain and the distortion was still present.

http://xdaforums.com/showthread.php?t=2098066

Since the in-call audio is pretty good I suspect that there is something screwy in the routing of

the audio drivers.
[Nexus 4 General] CADude:
Bump!

More people need to vote on this!

http://code.google.com/p/android/issues/detail?id=9913
[Nexus 4 General] andy o:
I'm not sure that that does what we want here. I think the kernel has to allow it. From reading that thread a bit, they're using it for volume, not gain.
[Nexus 4 General] cmaxwe:
There is some interesting code in the board-8960.c kernel file that has the following comment:

/* Micbias setting is based on 8660 CDP/MTP/FLUID requirement

* 4 micbiases are used to power various analog and digital

* microphones operating at 1800 mV. Technically, all micbiases

* can source from single cfilter since all microphones operate

* at the same voltage level. The arrangement below is to make

* sure all cfilters are exercised. LDO_H regulator ouput level

* does not need to be as high as 2.85V. It is choosen for

* microphone sensitivity purpose.

*/

So it sounds like if we change the voltage of the mic it impacts the sensitivity... might play around with it and recompile with a lower less sensitive voltage and see what happens.

---------- Post added at 04:05 PM ---------- Previous post was at 04:01 PM ----------

Looks like there are 3 voltage attributes define within micbias...

.cfilt1_mv = 1800,

.cfilt2_mv = 2700,

.cfilt3_mv = 1800,

So 2 are at the normal 1800mv level and one is significantly higher...maybe change the high one down to 1800?
[Nexus 4 General] clubtech:
Interesting. Guess u can try and see what happens?
[Nexus 4 General] -Mindroid-:
Good find!

I'm sorry for the noob question but where did you find that file "board-8960.c" What is the full path?

If you compile a kernel I will be happy to help test it.
[Nexus 4 General] cmaxwe:
Turns out our device uses the 8064 not the 8690. So the correct file can be found here:

kernel/arch/arm/mach-msm/8064.c

I have compiled an updated version of franco's kernel but haven't tried it yet.
[Nexus 4 General] cmaxwe:
I haven't been able to compile a kernel that will actually boot. Oh well... probably wouldn't have worked anyway. :crying:
[Nexus 4 General] skyracer53:
seems like a typical android phone problem. been through so many phones and yet to find one that doesnt blow away the audio input... had to capture this video at a distance just for it to be somewhat bearable

http://www.youtube.com/watch?v=Iid0iB6fe8c
[Nexus 4 General] -Mindroid-:
Thank you!

I see it over here on line 1004:

https://android.googlesource.com/ke...o-3.4-jb-mr1.1/arch/arm/mach-msm/board-8064.c

I will be curious to compare it with the code for other 8064 based devices.

---------

Can somebody make sense of this change:

https://android.googlesource.com/kernel/msm/+/975c53ad24a4e21b70d17c12367bcbf8b19bb012^!/
[Nexus 4 General] Platine:
Pls Help

I Have The 4.2.2 Update And M Running Paranoid Android 3.0 Rom And Franco Kernel r90

But As Soon As I Connect My Headphones With Mic, I Cannot Make Calls Neither Can I Listen To Music.. It Opens Google Now.. And Doesn't Go Forward..

But If I Use Headphones Without Mic It Works Fine.. But I Like To Change A Song By Pressing The Button In The Mic.. Pls Guide Me What To Do..
[Nexus 4 General] rr5678:
I was thinking.....the US Galaxy S3 has the same DAC as the Nexus 4, but it seems to have no audio issues......why don't we just steal their settings? (or is it not that simple?)
[Nexus 4 General] springy:
Nope, I get it on both the Nexus 4 and 10. The nexus 10 is worse because the what comes out from the speaks goes back into the mic so the other side gets echoes. Nexus 4 has the same problem but is not as bad.

I think it is a generic Android problem...
[Nexus 4 General] rr5678:
Are we talking about the same thing? Audio that sounds horribly clipped whenever there's a loud sound during recording?

Plus maybe stealing settings from the Galaxy S3 will help with the low headphone volume, too. Ill try it when I get home today.
[Nexus 4 General] -Mindroid-:
There are 2 audio chips in the Nexus4 which complicates things. There is a DAC but the

audio routing is done inside the SoC (APQ8064). I suspect this problem is with the SoC firmware,

if I'm right the code from the Sony Xperia Z (yuga) should fix it.
[Nexus 4 General] Haomuch:
I have submitted this issue to Franco and hope he could solve it.
[Nexus 4 General] RussianBear:
Subscribed. The issue is currently present while making Skype calls. I don't remember it being there in 4.2.1, however.
[Nexus 4 General] javiertoti:
Is this problem the cause of my video recordings sound so bad?

There is any hope to fix it or is it a hardware problem. I'm considerging to sell my N4.
[Nexus 4 General] Haomuch:
Very likely yes.
[Nexus 4 General] .coomb.:
Yesterday I tried recording some music with me singing over it. What sounded great on my Xperia T came out as a mess on the N4. I'm quite disappointed with it, really. Let's hope Google or someone else takes a look at it. Basic things like this shouldn't be left out when manufacturers decide to launch a new phone.
[Nexus 4 General] RussianBear:
Post the recording, and we'll be the judge of how good it really is.
[Nexus 4 General] javiertoti:
Will this mod fix our problem?

http://xdaforums.com/showthread.php?t=2046613
[Nexus 4 General] .coomb.:
Are you kidding me or do you really want to hear the recording? :laugh:
[Nexus 4 General] -Mindroid-:
According to posts in this thread the problem is caused by the microphone gain set too high.

That's one hypothesis that we are working with but there could be something else wrong.

I don't have enough recording experience to tell what's wrong just by the sound of it.

But if a recording engineer hears it he/she should be able to pinpoint the problem.

A microphone gain problem is the very likely cause but it will help to have an expert opinion.
[Nexus 4 General] RaveOnSRV:
I'm surprised this hasn't been mentioned yet, but Faux123's kernel has a sound mod with an accompanying app that allows you to adjust microphone gain. I can personally vouch for Faux's kernel because my phone is running ridiculously well, so help out a dev and buy a few of his apps.

https://play.google.com/store/apps/details?id=com.teamkang.fauxsound

(NOTE: There MUST be kernel support for this app to work!)
[Nexus 4 General] manjee:
I'm not a sound engineer but a simple musician. I often record myself with my phone but never achieved to obtain the quality of my old galaxy s (voodoo sound really did magic) or of an iPhone with the nexus 4.

The only solution to get a listenable record is to use an app like recforge which allows to disable the mic's automatic gain control (AGC). Even with that the sound is decent but far from great.

In conclusion I'd say the easiest solution is to disable AGC and create an easy way to adjust the gain tunable on the fly, eg. in notification bar. My educated guess is that it's controlled at kernel level as voodoo sound was injecting a module in the kernel. But there must be some userspace access as I don't think recforge has root permission. Maybe a way to follow... :confused:

A more complete approach would involve digging in the dsp driver as I suspect some strong audio filters to be applied. Disabling them would probably help with the clarity of the record.

Unfortunately I can't help for the coding stuff but of you need me to test things I'll do my best.
[Nexus 4 General] clubtech:
This.

Just installed the kernel and app from the play store and it seems like it is not only lowering the gain but also at -17 there is no distortion either.
[Nexus 4 General] Haomuch:
It doesn't solve the problem.
[Nexus 4 General] ph0b0z:
It doesn't? Why? I'm about to give it a try again.. mhh..
[Nexus 4 General] clubtech:
It absolutely solved it for me on Media5 (VoIP app), Skype and other apps I checked using the mic. It is no longer distorted.

Make sure u flash both the kernel and buy the app from the market. He advised that u have to set this after every boot as the app auto startup doesn't seem to work.

Warning though: it also lowers the mic volume on regular calls so people were hardly able to hear me on a normal call. Since I only use VoIP on my nexus it doesn't really matter for me.
[Nexus 4 General] andy o:
Works for me too, in the camcorder as well. Don't know about the startup thing.
[Nexus 4 General] javiertoti:
Yes, it's like if it has Low and High pass filters.
[Nexus 4 General] clubtech:
The fact that this can be fixed with a custom Kernel is just showing this is a software problem and not a hardware issue but for some reason Google is not really trying to fix the bugs on this phone. 4+ months on the market and only one single bug fix update which didn't fix much (BT still sucks, BT+Wifi still can;t work at the same time, phone mic is all messed up).
[Nexus 4 General] andy o:
I don't think it ever was thought of as a hardware issue. The post linked in the first thread is even asking Google to fix this problem globally across the board, not just on the Nexus 4.
[Nexus 4 General] andy o:
Actually the set on boot is working for me, have you tried it yourself?

I can confirm that the regular calls would usually be lower for your voice compared to VoIP apps, some of them you can calibrate relative to voice call volume, like Groove IP, Talkatone, and various SIP apps, which have their own (not real) gain setting, but others like Viber and Skype can't.
[Nexus 4 General] ninjafan:
I play the trombone, and if I try to record with this phone it sounds like.. Paper tearing
[Nexus 4 General] javiertoti:
Could you be more specific? Thanks.
[Nexus 4 General] volkswagner:
Please call Google Support

Please call Google Play Support 855-836-3987, inform them of the issue. I firmly believe this can be fixed with a software update.

The support representative was very patient when I called using my sip client :)

I used sip dial to prove the issue. I said I don't want a replacement because the problem will exist on the new device as well.

Call now!
[Nexus 4 General] Haomuch:
I tried that method but the recording effect is the same.
[Nexus 4 General] javiertoti:
Any news?
[Nexus 4 General] Haomuch:
try this http://xdaforums.com/showthread.php?p=29509524
[Nexus 4 General] javiertoti:
Have you tried? Does it fix the problem?
[Nexus 4 General] andy o:
I know that the fix with faux's kernel posted before works. I'm using it, but I wish I tried this other option before so I didn't have to install a new kernel.
[Nexus 4 General] Haomuch:
Yes I tried and I can only say it soften the problem but has some side effect.
[Nexus 4 General] javiertoti:
The app requests root acces :rolleyes:
[Nexus 4 General] andy o:
Did you really expect any apps like this not to require root? I didn't even think you could do this without the kernel itself providing the functionality.

Anyway, I did try the eXperience Pro app and I'm keeping it. I was using faux's app which also works fine but requires a kernel with the required code, which the CM guys are unlikely to implement. It's also working fine, but one thing faux's app has that this doesn't is to link headphone output volume, but that's out of the topic of this thread.

An advantage is of course that you probably don't need to flash another kernel. I'm on full CM 10.1 here.
[Nexus 4 General] andy o:
Hey, is it working for you after a reboot, does it keep the custom volume/gain settings? Mine doesn't on the N4, I just went back to faux's thing. I enabled start on boot of course, the module does load but the values aren't kept. Also, unloading the modules doesn't work, have to disable start on boot and reboot.
[Nexus 4 General] Haomuch:
Mine keeps
[Nexus 4 General] andy o:
Did you update to yesterday's update? 1.18 IIRC. Also, what ROM/kernel are you using?
[Nexus 4 General] Haomuch:
Yes I updated to the latest version and I am using stock rom and Franco kernel rc2
[Nexus 4 General] mega98:
I have a solution for audio recording only. You can use Hi-Q mp3 recorder with raw audio input settings.

No kernel modification requiered. Clean and crisp sound:cool:
[Nexus 4 General] HozayStreets:
Went to a concert with a friend. He filmed on an iPhone 5 while I filmed on my Nexus 4. Got back home and we looked at the videos and his iPhone recorded in perfect audio while my Nexus 4 sounded terrible! I was bummed out but I did find that using FauxSound does help...A LOT actually. Faux Sound is in Matrix kernal and that is what I have been using. It definitely fixed it for me. I know FauxSound was already mention in this thread, I just wanted to confirm.
[Nexus 4 General] Ya Mudda:
I'm pretty sure that for videos, for whatever reason, the N4 records in mono rather than stereo.
[Nexus 4 General] andy o:
Unless there is some way to connect a USB mic or audio interface, which I don't think there is, all audio input to the n4 will be mono.
[Nexus 4 General] nowster:
Even though it has two microphones already?
[Nexus 4 General] salvatore94:
I think that the second channel is disabled...

Looking /etc/media_profiles.xml from cyanogenmod github:

<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="12000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="[COLOR="red"]96000[/COLOR]"
sampleRate="48000"
channels="[COLOR="Red"]1[/COLOR]" />
</EncoderProfile>

Someone could try to edit those values to :

<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="12000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="[COLOR="red"]192000[/COLOR]"
sampleRate="48000"
channels="2[COLOR="red"][/COLOR]" />
</EncoderProfile>

and also:

<AudioEncoderCap name="aac" enabled="true"
minBitRate="758" maxBitRate="288000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="[COLOR="red"]1[/COLOR]" />

to:

<AudioEncoderCap name="aac" enabled="true"
minBitRate="758" maxBitRate="288000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="[COLOR="red"]2[/COLOR]" />
[Nexus 4 General] andy o:
I have to admit I hadn't thought of that, but I wouldn't bet on it either. It's a quick test anyway. Not sure if any apps could make the mics work as a stereo pair either, since that's not what they're for originally.
[Nexus 4 General] impersonator:
My FauxSound was working fine for a few days, but suddenly after I installed the Vonage app, it brings up an error when starting FauxSound. "Please stop all music/sound to update!" Now the gain settings will not work and my mic went back to being super high in recordings and on VOIP. I am on stock rooted with Faux123's kernel. I uninstalled the Vonage app. I force stopped all individual apps. I installed Paranoid Android and Cyanogenmod, using both the motley kernel as well as Faux123's kernel, while having no additional installed apps. I could not find anyone else with the same problem with a thorough Google search. This is incredibly frustrating. The only thing I have not done is erase the SD card. Any ideas anyone?
[Nexus 4 General] ph0b0z:
I also recorded myself playing drums a few days ago, set Camcorder Microphone Gain to "-20" with the FauxSound app:

The distortion is gone but the soundquality is still really awful. I'm sad.
[Nexus 4 General] Crisisx1:
Yes this
[Nexus 4 General] ianilprasad:
thstInf cotton

I have seen on another forum that a long press on Mic button will resolve the issue once the headset is connected.

Not sure what it takes to start working but it seems to be the trick by trial and error by someone.

Hope this fixes yours too. But I would expect this to be fixed atleast in the next android version and not by a hardware fix as i can not buy something new again.
[Nexus 4 General] quickreactor:
This is a terrible problem with the Nexus, and is tainting my whole perception of the phone, I'm going to try Fauxsound cause I need SOMETHING, but its sad to hear from the drumming guy that the quality still sucks. Hope to see an innovative fix for this in future, I really hope it's not just terrible inbuilt mic quality....
[Nexus 4 General] funcrusher:
Yeah, I was hoping it would be fixed in 4.3, but it's not. Still horrible. Anyone have any recommended settings in fauxsound that help?? The few times I've tried the app, it didn't make enough of a difference for me to keep.
[Nexus 4 General] andy o:
I just have both mic gains at -7. Didn't test too much, just went with the first thing that didn't give me distorted audio. It's not that hard to check it, just keep lowering the gain until there's no more distortion in the apps you use.
[Nexus 4 General] javiertoti:
I've don't noticed any improvement in the new jellybean 4.3 :(
[Nexus 4 General] natzy85:
Really do appreciate if you can test this. I really want to buy a Nexus 4 but this is a huge letdown for me. Thank you!
[Nexus 4 General] javiertoti:
There is nothing to do I think because the microphone only has a simple membrane not double, as should be expected.
[Nexus 4 General] andy o:
I think at the time you posted your previous post fauxsound wasn't working on 4.3. Faux then tried to fix it but other problems cropped up where the gain gets reset every time an app uses it. It still kinda works if you open fauxsound and change the gain on the fly while you're using it. You can follow the fauxsound thread for updates on this.
[Nexus 4 General] andy o:
It's not the mic, it's the gain which is horribly calibrated. In reality the problem is Android which still doesn't let apps control it, like iOS started doing I think in iOS 5. Other Android phones also suffer from this but at a lesser degree, and it's only noticeable in very high volume environments such as concerts, and even then it's much less noticeable than on the N4.
[Nexus 4 General] javiertoti:
I don't know , I'm very skeptical. Hear this and you tell me.

[YOUTUBE]http://www.youtube.com/watch?v=xBbw-6TD_gE[/YOUTUBE]
[Nexus 4 General] andy o:
Sure, but that seems perfectly consistent with what I said. You can even tell that the N4's audio is not only distorted, but significantly higher as well. Also, the fact that FauxSound fixes the distortion. Others may have other sound quality issues, and it could be the quality of the mic, but the distortion (clipping) is most likely not.
[Nexus 4 General] javiertoti:
Ok, I'll go for the eXperience Pro app + root acces, even losing my warranty.

Any config suggested?
[Nexus 4 General] andy o:
Don't do that. I did and had troubles, apparently it has been abandoned. Check its thread and also on this thread I posted a little about my experience (no pun intended).
[Nexus 4 General] raz123:
Looks like the issue is with Qualcomm releasing crappy drivers.

In theory, the device has different mic audio "streams" that have different filters applied to them. For instance, the "VOICE_COMMUNICATION" stream has echo cancellation applied to it (amongst other things).

In practice, these filters are broken (thanks, Qualcomm!) and all mic audio "streams" are sounding the same to applications that make use of the microphone -- except the native dialer (I haven't figured out why yet).

Google ain't doing squat, so take it directly with Qualcomm: https://developer.qualcomm.com/forum/qdevnet-forums/mobile-technologies/snapdragon-sdk/26919
[Nexus 4 General] raz123:
Looks like the audio chip in question is a Qualcomm WCD9310.

It's used in a few other devices as well (eg: GS3 USA). If their audio runs fine, perhaps we could try running their audio drivers on our device?
[Nexus 4 General] raz123:
-- Removed useless crap --

Ok, it looks like I have this the other way around..

libqcomvoiceprocessing was introduced around May 2013, and might have fixed some of the echo issue.

See: https://android.googlesource.com/pl...+/bdfd2924d535d8d3de1bd63c407568134641ef18^!/

and

https://android.googlesource.com/pl...io/+/f70ffb40ca0c4e8cce15c77fd9edff7f2b6980de -- "Add support for AEC audio effect for voice communication."

EDIT:

Yep, looks like AEC and NS have been implemented, but AGC (automatic gain control) has not.
[Nexus 4 General] natzy85:
can someone pls upload a video with a recording loud sound using faux kernel ? I would gladly buy the app I just want to see it work. I don't have a Nexus 4 but I want to buy one and I don't want to get an expensive Galaxy S4 just because it has Wolfson chipset. Thank you!
[Nexus 4 General] andy o:
FauxSound doesn't work anymore for input gains since 4.3, he said he was looking into it but I guess no progress yet.
[Nexus 4 General] natzy85:
Yeah I know but I am also interested in 4.2.2
[Nexus 4 General] gd6noob:
when I try to send a voice message in whatsapp, it gets really distorted.. regular talking on the phone is fine...