Enabling A2DP Sink in CM11 - Nexus Q Q&A, Help & Troubleshooting

One thing I've always wanted to do with my Q was to stream bluetooth audio directly to it over A2DP, but the Bluedroid doesn't support that.
However, I came across this code (and this related blog post) that claimed to have gotten A2DP sink working on Android 4.4 by modifying a host of source files. I tried to build CM11 for the Q following this guide (with the hope of applying those changes to Bluedroid) but can't get anything to build without errors, modified or unmodified.
Anyone else interested in this, or have any advice on A2DP support? Are there any better guides for building CyanogenMod for the Q?

Related

(Q) DBV-T Stick on Vega

Hye guys!
I have a little question. I have a dvb-t tv stick connected to my pc, but I would really love it to have it on my Vega. Does anyone know if that's possible? I currently run ViewComb build 6. I know that in Corvus 5, there were additional .ko files. There were also for a dvb stick, but I don't know how to handle them. Can anybody help me?
Thanks!
If you can get it to connect correctly wouldn't you also need an app to watch TV?
I tried to search on the market but couldn't find anything.
And it's DVB-T and not DBV-T!
Could be possible.
Someone got a TV Tuner working on their Nexus One, details here.
Whether it works in Honeycomb? No idea.
Good find BTaylor927!
So you need to recompile a kernel to support kernel modules?
I guess stock kernel doesn't support modules, here is a custom kernel or use Corvus5 ROM or any other ROM with custom kernel that supports modules.
And you need the modules (.ko files that are mentioned in the script).
Those kernel modules needed to be recompiled or you can use those on this site?
Then you just play that "dvr0.ts" file that the script generates with any video player that supports playing Transport Stream (MPEG-2 Video Stream) (eg. VPlayer).
I think this goes like this (basically it's like on that site).
thomskipsp report back how it went, because I don't have a DVB-T USB stick.

Paranoid Android Bluetooth issues

Hi,
The bluetooth does not work on my tablet. When I try to enable it, it flashes, and turns off. It will not turn on, and I need it for various purposes. While I can get around without it, it's still really annoying as I'd like to use bluetooth. For reference I'm using the official Paranoid Android build version 3.10.
Thanks for any help.
i take it you havent bothered to read the last few pages of the PA thread?
its all explained in there with links to the BT fix....
The latest build has been released with working bluetooth. Follow the thread for the latest updates.

[Q] Support for LG G3 with Cyanogenmod 12?

Hi, I've read that support for LG G3 is in the works but is or will there be support for the G3 running CM12?
I've just tested this, even bought the version from Play store and for me it doesn't work. Is there a Kernel requirement for FM radio which CM12 may not have? I could supply any log data you request.
Thanks and great work so far.
Yup, i confirm, doesn't work on lg g3. Pitty.
joergherzinger said:
Hi, I've read that support for LG G3 is in the works but is or will there be support for the G3 running CM12?
I've just tested this, even bought the version from Play store and for me it doesn't work. Is there a Kernel requirement for FM radio which CM12 may not have? I could supply any log data you request.
Thanks and great work so far.
Click to expand...
Click to collapse
Sorry for my delay. I started a re-coding "marathon" on the weekend and it stretched for a week.
I intend to support the LG G3 as well as I possibly can, on any ROM. I have almost bought a G3 for testing a few times, but haven't gone through with it yet.
The CM12 kernel does not at present include the needed Qualcomm V4L FM radio "IRIS" driver.
I will try to submit the tiny 2 line config file change needed for that and see if they respond.
Someone built an FM friendly kernel and it worked, but there are/were still some audio issues. We can work around this with the new analog mode being added to Spirit2, and this should be properly resolved at some point.
Oh, thats great to hear.
For the Cyanogen part: They actually have a section in their bugtracker for FM Radio [1]. Once you have done that could you post the links to the pull request and the bug entry here. I will follow it and update my phone as soon as the fix is built. If there is anything I can do to help you please let me know.
[1] https://jira.cyanogenmod.org/secure...=+"FM+Radio"+ORDER+BY+priority+DESC&mode=hide
joergherzinger said:
Oh, thats great to hear.
For the Cyanogen part: They actually have a section in their bugtracker for FM Radio [1]. Once you have done that could you post the links to the pull request and the bug entry here. I will follow it and update my phone as soon as the fix is built. If there is anything I can do to help you please let me know.
[1] https://jira.cyanogenmod.org/secure...=+"FM+Radio"+ORDER+BY+priority+DESC&mode=hide
Click to expand...
Click to collapse
OK.
Last night I submitted the same patch for Xperia Z1 and it seems well received. First time I ever built a CM ROM and it took a few days to get everything downloaded and built and figure out how to submit CM patches etc.
My response time to posts and emails has increased, and my responses are more brief, because I have decided to spend more time doing what needs to be done and less time talking about it.
WOW great news!!
Thank's very much :victory:
mikereidis said:
OK.
Last night I submitted the same patch for Xperia Z1 and it seems well received. First time I ever built a CM ROM and it took a few days to get everything downloaded and built and figure out how to submit CM patches etc.
My response time to posts and emails has increased, and my responses are more brief, because I have decided to spend more time doing what needs to be done and less time talking about it.
Click to expand...
Click to collapse
Great! I'm trying CM12 in my G3 and, despite some typical nightly bugs, it's working quite well. I only really miss FM radio! :fingers-crossed:
Any progress ?
ariek44 said:
Any progress ?
Click to expand...
Click to collapse
Is the needed FM driver in the CM12 kernel for LG G3 now ?
And is the remaining problem that the sound sounds horrible ?
See my posts 9001 and 9002 for info on the new March 6 beta release. 9002 has link to the free version to try: http://forum.xda-developers.com/showthread.php?t=1059296&page=901
will not start
mikereidis said:
Is the needed FM driver in the CM12 kernel for LG G3 now ?
And is the remaining problem that the sound sounds horrible ?
See my posts 9001 and 9002 for info on the new March 6 beta release. 9002 has link to the free version to try: http://forum.xda-developers.com/showthread.php?t=1059296&page=901
Click to expand...
Click to collapse
New beta app says no tuner in current cm12 nightly. Tried flashing a different kernel - resin - but same result.
Phenax said:
New beta app says no tuner in current cm12 nightly. Tried flashing a different kernel - resin - but same result.
Click to expand...
Click to collapse
If you have the T-Mobile variant, I do not think FM can ever work for you.
As with the LG G2, only the Sprint and International variants have the FM antenna pin connected as needed to the headset jack for the antenna.
Other variants are purposely and permanently "broken" by shorting the pin to ground.
There was rumor here and there that other variants might work, but I think that was based on Spirit not showing a specific error at one point.
So, AFAICT, only the International D855 and Sprint's model.
joergherzinger said:
Hi, I've read that support for LG G3 is in the works but is or will there be support for the G3 running CM12?
I've just tested this, even bought the version from Play store and for me it doesn't work. Is there a Kernel requirement for FM radio which CM12 may not have? I could supply any log data you request.
Thanks and great work so far.
Click to expand...
Click to collapse
I have built a CM12 based kernel that I think should work.
I do not have a G3 so I can not test it.
I can not make any guarantees that it will boot and won't harm anything.
This is a boot.img file. Anyone flashing it should understand how to flash such a file so I won't explain.
I will submit the patches to CM once someone can verify.
md5sum ~/mikes_boot_fm_12-20150307-UNOFFICIAL-d855.img
d8080528d3f37448e57a6da84162d4df
Thanks !
Genius, it works. Sound quality seems fine to me. Just send me the link to the patch you will send in and I can confirm the cm guys, that it is working if you want.
Edit: I just noticed that wake up by double tap does not work. I assume that just because you used a different kernel config to the stock cm one...
joergherzinger said:
Genius, it works. Sound quality seems fine to me. Just send me the link to the patch you will send in and I can confirm the cm guys, that it is working if you want.
Edit: I just noticed that wake up by double tap does not work. I assume that just because you used a different kernel config to the stock cm one...
Click to expand...
Click to collapse
Great !
I did not touch the kernel config at all. I used this one, stock as of this morning, AFAICT: https://github.com/CyanogenMod/andr...0/arch/arm/configs/cyanogenmod_d855_defconfig
The config has this, unchanged:
Code:
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=y
All I did to patch/fix was this:
Code:
cp kernel/motorola/msm8226/drivers/media/radio/radio-iris-transport.c kernel/lge/g3/drivers/media/radio/radio-iris-transport.c
cp kernel/motorola/msm8226/drivers/media/radio/radio-iris.c kernel/lge/g3/drivers/media/radio/radio-iris.c
This copied the Qualcomm fix from the MotoG kernel source that allows radio-iris-transport to work built into the kernel, instead of only as a module.
joergherzinger said:
Genius, it works. Sound quality seems fine to me. Just send me the link to the patch you will send in and I can confirm the cm guys, that it is working if you want.
Click to expand...
Click to collapse
Patch is here: http://review.cyanogenmod.org/#/c/90794/
I played around with it a bit more. FM worked like a charm, but several other things didn't work at all. Most importantly Settings crashed for me when I tried to open display settings. I assume that is because my CM is a little more than a week old while your build is just a few days old. I reverted by to my old boot.img but I will test the first nightly with your patch in it.
joergherzinger said:
I played around with it a bit more. FM worked like a charm, but several other things didn't work at all. Most importantly Settings crashed for me when I tried to open display settings. I assume that is because my CM is a little more than a week old while your build is just a few days old. I reverted by to my old boot.img but I will test the first nightly with your patch in it.
Click to expand...
Click to collapse
Maybe.
I've seen Settings crash on a few devices/ROMs.
Common AOSP Lollipop ROMs still have lots of problems.
They ALL have a nasty memory leak that gets bigger every time Spirit sends an RDS update to notification shade/remotes/lockscreen. I have to reboot my test phones every day or so to avoid unpredictable restarts when Android system_server fills its' internal table maxed at 51,200.
Stock Lollipop ROMs don't have this problem, so IMO must be some common bug in CM12 I think. (I could/should verify if Nexus/pure AOSP shares this.)
Well, it doesn't look too good. They seem to want this as a loadable module, which you explicitly stated different in your commit message. Any ideas an what to do next?
joergherzinger said:
Well, it doesn't look too good. They seem to want this as a loadable module, which you explicitly stated different in your commit message. Any ideas an what to do next?
Click to expand...
Click to collapse
Yes, I think so, it's just taking me a long time to do it.
The patches I provided WORK. The complaint was that IF they re-configure the kernel to use modules, then the kernel will not build and he did not like that.
Many kernels have removed modules now and it is rare to go back to modules, so I find this a bit strange, but I am not the one maintaining kernels.
The patches were not really "developed" by me. I just grabbed the very similar files from the MotoG CM12 kernel thinking they would not complain; it was just aligning the code between CM12 kernels.
My plan since the patches were rejected is to use the files from (I think) a Sony CM12 kernel that I think should work with or without modules.
But I have had a LOT of trouble getting d855 kernels and ROMs to build since my initial changes that worked AND it can take hours to build a new ROM and I still have not figured out how to build just the kernel, which is much faster.
This is the problem I had last night and the night before and I am not a ROM dev so it takes time for me to figure out what is wrong or how to fix (maybe a "make clean" or similar"):
creating userdata.img...
Running: mkf2fsuserimg.sh /tmp/tmpqdNGFw 12297699328
in mkf2fsuserimg.sh PATH=/home/m/android/system/out/host/linux-x86/bin:/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin:/home/m/android/system/out/host/linux-x86/bin:/home/m/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin:/home/m/android/system/prebuilts/gcc/linux-x86/:/home/m/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin:/home/m/android/system/development/scripts:/home/m/android/system/prebuilts/devtools/tools:/home/m/android/system/prebuilts/android-emulator/linux-x86_64:/home/m/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.8.0_25/bin:/home/m/b:/home/m/b/android-studio//bin/:/home/m/b/android-sdk//platform-tools/:/home/m/b/android-sdk//tools/:/home/m/b/android-sdk//build-tools/21.1.2/:/home/m/b/android-ndk-r10//build/tools/:/home/m/b/android-ndk-r10//
make_f2fs -l 12297699328 /tmp/tmpqdNGFw
/home/m/android/system/out/host/linux-x86/bin/mkf2fsuserimg.sh: line 31: 23180 Segmentation fault $MAKE_F2FS_CMD
Traceback (most recent call last):
File "./build/tools/releasetools/add_img_to_target_files", line 261, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/add_img_to_target_files", line 255, in main
AddImagesToTargetFiles(args[0])
File "./build/tools/releasetools/add_img_to_target_files", line 241, in AddImagesToTargetFiles
AddUserdata(output_zip)
File "./build/tools/releasetools/add_img_to_target_files", line 156, in AddUserdata
assert succ, "build userdata.img image failed"
AssertionError: build userdata.img image failed
make: *** [/home/m/android/system/out/target/product/d855/obj/PACKAGING/target_files_intermediates/cm_d855-target_files-079aa1bcfa.zip] Error 1
make: *** Deleting file `/home/m/android/system/out/target/product/d855/obj/PACKAGING/target_files_intermediates/cm_d855-target_files-079aa1bcfa.zip'
Click to expand...
Click to collapse
With troubles like these, and ROM builds taking hours and my lack of a G3 to test, this is moving slowly.
Add the fact that I am exhausted from the last few months of MORE major changes to Spirit2, some time spent with my family and looking into Android Auto and things move even more slowly.
...And the build guide for G3 seems to have disappeared too: http://wiki.cyanogenmod.org/w/Build_Guides#vendor=%22LG%22;
...And... any chance you know the OFFICIAL CM12 way of switching between module and non-module kernels ? I know the defconfig "CONFIG_MODULES=y" thing, but I'm not sure if other changes are needed. I can do a "make menuconfig" but I'm not sure if I should write .config to the defconfig. "make config" gives a million options; I tried that and produced a kernel that probably won't even boot on a G3.
Perhaps I should post in a G3 forum section asking for help.
I posted on that patch now: http://review.cyanogenmod.org/#/c/90794/
Hi, I don't understand half you are talking about
I'm just an user who wants CM12 and FmRadio.
That being said, I can read this changelog in 777 kernel thread (http://forum.xda-developers.com/lg-g3/development/kernel-777-kernel-t3003115). Did anyone try this "radio" builds?
02/08/15
- R6
- Fix Powersuspend
- CM kernel updates
- Synaptic touch firmware update
- Separate d855 builds with fm radio module
Click to expand...
Click to collapse
(EDIT: Tried by myself. Radio works with 777 kernel. However, audio quality is quite bad.)
Second, I would like to test any beta kernels, spirit app, or whatever in my G3 D855, in order to help making it work. Please tell me how can I do it.
Thank you very much!

How to build AOSP for Motorola devices?

I am having trouble finding decent instructions for getting the sources for a standard build for Motorola devices, specifically for athene.
I have built for Freescale products before and it usually involves some combination of repo init and patches, but that doesn't seem to be the case for Motorola.
I know the kernel and other sources are available on Github (https://github.com/MotorolaMobilityLL), but I don't see a manifest repository there. Nor can I find a device repo.
The closest thing to instructions I found was this readme (https://github.com/MotorolaMobilityLLC/readme/blob/master/MMI-MPJ24.139-23.4.txt) (xda wont let me post links, I'm too new a user here).
I am starting to suspect that Motorola is being as lazy as possible and only fulfilling the bare minimum of open source obligations, and thus doesn't provide a device repo, or manifest repo, etc.
Is that the case? I am new to running builds for standard phone manufacturers - are ROM developers around here forced to do legwork filling in what the manufacturers refuse to publish?
Or am I just missing the rest of the instructions from somewhere?
I have the same issue, did you ever manage to successfully complete a build? Thanks.
TheGreatCabbage said:
I have the same issue, did you ever manage to successfully complete a build? Thanks.
Click to expand...
Click to collapse
Nope, my impression of the situation remains the same, though I have not re-investigated. I would like if someone more knowledgeable confirmed though.
It is a shame, as I would really like a "known good" base to work off of and put in root support and remove unnecessary softwares in a legitimate way.
You *can* build LineageOS for athene: (https://wiki.lineageos.org/devices/athene/build)
I ran LineageOS for several months, but eventually switched back to stock. Has some strange issues in regards to texting (seems to only work when making a call).
Thanks for your reply. I've just managed to build Lineage OS for my device, and it seems to work ok.
I was previously using Resurrection Remix OS (which I didn't build, just downloaded a zip) and it worked very well, so if I have any issues with Lineage then I'll try to restore my TWRP backup of RR.
I wish I could use the AOSP codebase directly, though...

working FM tuner for AOSP (Lineage)?

Hi
Could anyone get a FM radio working under Lineage?
I installed SpiritF and I get:
SpriritF 2015_03_17_beta
ERROR: Tuner API did not start or stop.
This device may need a kernel with a working FM driver.
Click to expand...
Click to collapse
although I set Menu>Set>Service>Audio Plugin to LG2
I also found the original LG G5 radio but it closes on launch...
Should I use another app - which?
Thanks
(H870, NO google, no gapps - only F-Droid, Yalp and XDA Labs)
[BUMP] Can anyone please recommend a FM radio tuner apk that they use else could anyone please upload the apk from the OPEN EU LG-H870 11G ROM?
Thanks a lot!
Hey,
Its not that easy, maybe someone could help me to build this together,
I found so far in /system :
A library for fm services, .. /lib,lib64
Apk for fm services
Apk fm radio...
Dont know exactly in wich way the kernel is involved
All apks and librarys have to be deodexed... Which means that i have to complete pull the whole system deodexing and then make some trys,
I think this app could be installed when the lg framework is some kind of present
Working on stock rom... : Nextradio... In germany i have to download the app via browser as apk
Hi
Thanks @MartinIrrelevant
Would anyone with an H870 with working FM radio mind posting their build.prop from /system please?
Let me explain: I now have a H930DS / lineage 16 - although LG states it comes with FM radio, it would not work on mine and other people's phone; @xda_nz provided me with the solution:
https://forum.xda-developers.com/showpost.php?p=79977031&postcount=1457
basically, someone compared the build.prop of an H930 with working radio with the build.prop of an H930 without working radio and found out that the difference was a line:
HTML:
vendor.bluetooth.soc=cherokee
Adding the line to the non working radio build.prop solved the issue
so maybe it is worth doing the same comparison on an H870 so that I could get FM radio working on the H870 I passed down to my son.
Thanks in advance.
BenG7 said:
Would anyone with an H870 with working FM radio mind posting their build.prop from /system please?
Click to expand...
Click to collapse
Attached.
Build.prop is not a valid file to be uploaded, so I have posted it as build.prop.text.
Hey,
To get FM radio working on Lineage is not easy. The entire rom + kernel needs to be rebuilt with the proper driver for FM to work.
Currently, Lineage (on these LG phones) doesn't use a driver which supports FM radio. So any app or whatever will not have anything to communicate with. It's the same as if the hardware wasn't even there.
askermk2000 said:
Hey,
To get FM radio working on Lineage is not easy. The entire rom + kernel needs to be rebuilt with the proper driver for FM to work.
Currently, Lineage (on these LG phones) doesn't use a driver which supports FM radio. So any app or whatever will not have anything to communicate with. It's the same as if the hardware wasn't even there.
Click to expand...
Click to collapse
@xda_nz: Thanks! So you have an H870 Lineage too, but yours has FM radio working?
@askermk2000: well, when i added the entry in the build.prop of Lineage 16 for my H930DS, that did the trick - no kernel recompiling whatsoever!
[EDIT] @xda_nz: I think you posted the build.prop for the H930DS, without radio enabled:
Code:
ro.product.device=joan
BenG7 said:
@askermk2000: well, when i added the entry in the build.prop of Lineage 16 for my H930DS, that did the trick - no kernel recompiling whatsoever!
Click to expand...
Click to collapse
WOW isn't that brilliant. You go ahead and do that then, on your LG G6. It sure will work nicely, and I sure don't know what the **** I'm talking about
askermk2000 said:
WOW isn't that brilliant. You go ahead and do that then, on your LG G6. It sure will work nicely, and I sure don't know what the **** I'm talking about
Click to expand...
Click to collapse
@askermk2000: I did not mean to be offensive in any way - sorry if you felt I was not considering your reply, sorry also as I did not know who you are; I just found out you worked on an H870 kernel so indeed I would assume you known what you are talking about when it comes to kernels and I understand what you said about recompiling a kernel to include the required module.
What I was just saying is something i could see for myself as a fact: in the Lineage 16 that is currently installed on my H930DS, FM radio was not working:
the FM radio app provided in the Lineage 16 would not work without a headphone (requirement for all such apps) but when I plugged my headphones, i got
"FM operation failed"
Click to expand...
Click to collapse
the stock LG FM radio would just fail on launch
By following @xda_nz instructions, FM radio now plays, with headphones attached of course.
From this, I would deduct the kernel in the Lineage 16 for the H930DS does includes the FM module, unlike the kernel of the current Lineage 16 for H870 and merely adding the line to the build.prop won't do.
BenG7 said:
From this, I would deduct the kernel in the Lineage 16 for the H930DS does includes the FM module, unlike the kernel of the current Lineage 16 for H870 and merely adding the line to the build.prop won't do.
Click to expand...
Click to collapse
Yes, you could say that.
When I wrote "on these LG phones" above, I meant (since this is the G6 forum) these: G5/G6/V20 - since all these are based on msm8996 platform and shares the same Lineage source.
I guess it was construed as meaning all LG phones on LOS.
and I understand what you said about recompiling a kernel to include the required module.
Click to expand...
Click to collapse
It's a bit more complicated than that. Because there is no separate module one can simply enable and compile in. This need an entirely different driver than what is used now, a driver which also controls
bluetooth and gps, in addition to fm radio. It also interfaces with the wifi driver. And there are changes needed in android system, to tell it how to use this driver, which currently there seems to be no standard
way of doing. At least none that anyone has successfully implemented (for this specific platform).
I've been thinking of looking into this as part of my new LOS kernel effort. I need to compile the rom myself with appropriate changes to test it out, though I'm totally new to Rom stuff so it will take a while
to get into.
askermk2000 said:
Yes, you could say that.
When I wrote "on these LG phones" above, I meant (since this is the G6 forum) these: G5/G6/V20 - since all these are based on msm8996 platform and shares the same Lineage source.
I guess it was construed as meaning all LG phones on LOS.
It's a bit more complicated than that. Because there is no separate module one can simply enable and compile in. This need an entirely different driver than what is used now, a driver which also controls
bluetooth and gps, in addition to fm radio. It also interfaces with the wifi driver. And there are changes needed in android system, to tell it how to use this driver, which currently there seems to be no standard
way of doing. At least none that anyone has successfully implemented (for this specific platform).
I've been thinking of looking into this as part of my new LOS kernel effort. I need to compile the rom myself with appropriate changes to test it out, though I'm totally new to Rom stuff so it will take a while
to get into.
Click to expand...
Click to collapse
Hi @askermk2000
Maybe people who developped LOS for H930DS could help you / provide insight?

Categories

Resources