Git Product home page Git Product logo

Comments (26)

drksnw avatar drksnw commented on August 16, 2024 3

Thanks @phhusson, I managed to get the earpiece working in call, and Bluetooth audio working πŸ˜‰

Here are the files if someone else wants to do it (It's a quick and dirty fix, please apologise me...)

audio_policy_configuration.xml

primary_audio_policy_configuration.xml

a2dp_audio_policy_configuration.xml

In order to modify theses files, you'll need to have root and remount /vendor as read/write.
This is done with the following command :

# mount -o remount,rw /dev/block/platform/soc/1da4000.ufshc/by-name/vendor

(your device path might be different, check /proc/mounts to know yours.

And then modify the files with a cat <<EOF > file_name. Be sure to make backups before overwriting anything πŸ˜‰

Best regards,

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024 2

system/build.prop and vendor/build.prop are expected to be totally different

Ok, I'd forgotten what was the actual issue
So the issue is that stock ROM uses audio_policy.conf, which is deprecated as of Treble, it should be audio_policy_configuration.xml
HTC U11+'s vendor does contain one audio_policy_configuration.xml, but that's a dummy one.

So what needs to be done is to rewrite audio_policy.conf into a xml

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024 2

from treble_experimentations.

jinbolx avatar jinbolx commented on August 16, 2024

earphone also doesnt work

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024

Can you link me to a file dump of your system and vendor?

from treble_experimentations.

edwkmho avatar edwkmho commented on August 16, 2024

@phhusson do you mean the link to stock system and vendor files?

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024

yes

from treble_experimentations.

edwkmho avatar edwkmho commented on August 16, 2024

I will upload file boot, system, vendor partition of stock rom.
Vendor HTC U11+ 1.24.400.2
https://drive.google.com/open?id=1oVjQvMKxKhc46_FZ-Ljn89oJ3vPsbARj
RUU 1.24.400.2
https://androidfilehost.com/?fid=745849072291700125
system.img (1.24.400.3) .
https://drive.google.com/open?id=1gX75ZTPx5g_Esov9wyKhh4Rc9V24XG5G
Vendor 1.24.400.3
https://drive.google.com/open?id=1e_aCJAiE7Zq7jnu0sKK8TY3HtUE2jdG1
Boot 1.24.400.3
https://drive.google.com/open?id=1QDrWTdYNhR07X2IRzKRNL59BIx_y3Zjh

Tool for extract RUU htc
https://forum.xda-developers.com/chef-central/android/tool-universal-htc-ruu-rom-decryption-t3382928
cmd:RUU_Decrypt_Tool.exe name ruu.zip

Hope this help you to solve the in-call audio probblem.

Many thanks, PHH

from treble_experimentations.

edwkmho avatar edwkmho commented on August 16, 2024

I found this in the U11+ source file where the kernel config mentioned the audio amplifier hardware below :
#HTC_AUD_START
CONFIG_SND_SOC_TAS2557_STEREO=y
CONFIG_HTC_AUD_OCM=y
CONFIG_HTC_DEBUG_DSP=n
#HTC_AUD_END

I am please to attached the config file for your reference. Hope with this information you can help to solve the in-cal audio only direct to speaker instead to earphone.
htc_ocm_defconfig.zip

from treble_experimentations.

drksnw avatar drksnw commented on August 16, 2024

@phhusson I noticed that /system/build.prop differs a lot from /vendor/build.prop. Isn't that related ?

Sorry if this is unrelated, it has been a lot if time since I've touched at Android's core, and I don't really know how Treble works πŸ˜…

But it would be really nice if it helps to fix this issue, because other things, like data connection, are really working better in your AOSP rom than in stock.

Best regards.

from treble_experimentations.

drksnw avatar drksnw commented on August 16, 2024

Ok cool, need some help with that ?

from treble_experimentations.

drksnw avatar drksnw commented on August 16, 2024

In theory, you could just have all the files in audio_policy_configuration.xml. But as it already imports configuration from primary_audio_policy_configuration.xml, I thought that it was cleaner to put a2dp related configuration in a separated file (which does not exists...)

So the change in the global file was just to add the import line for a2dp configuration.

I'll try to work on DSD tonight, will keep you updated about that πŸ˜‰

from treble_experimentations.

edwkmho avatar edwkmho commented on August 16, 2024

thanks drksnw for your effort.

I have some audio config files grab from google Pixel 2 rom. I assumed that the audio setup in Pixel 2 similar to U11+. Hoping that those files can help.
Audio XML.zip

from treble_experimentations.

edwkmho avatar edwkmho commented on August 16, 2024

@phhusson
If you don't mind me asking how would you integrate. I want to tried build AOSP with different configuration files.

Those Audio configuration files attached was pulled from android latest factory image for Pixel 2.

from treble_experimentations.

RobertKoval avatar RobertKoval commented on August 16, 2024

Some news ?

from treble_experimentations.

tykoh764 avatar tykoh764 commented on August 16, 2024

Hi @phhusson,
is there any news on how to resolve this bug? Issue is still present in latest v25

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024

@drksnw I guess it's really time I include your patch. Did you do some updates?
Do I include those files as is?
Does it work on Pie as well?

from treble_experimentations.

tykoh764 avatar tykoh764 commented on August 16, 2024

@phhusson Once the files have been pushed into the /vendor, the bug will be resolved. I'm not sure whether it will work on Pie, as I am unable to boot into Pie at all. Sry, I'm not currently able to test the rom at the moment.

from treble_experimentations.

phhusson avatar phhusson commented on August 16, 2024

Ok i'll consider this one to be a vendor bug, and I won't fix it.

For users passing by, please refer to this message to fix this issue

from treble_experimentations.

7HE-W0R1D avatar 7HE-W0R1D commented on August 16, 2024

@drksnw
Thanks a lot for your scripts!!!! I wont have to bring another phone with me to listen to songs.
For the method, I tried yours but the "vendor" is neither a folder or an editable file, it has no extension so none of my apps can edit it.
I solved by copying those three files to /system/etc and reboot the phone, then everything is OK.
πŸ‘

from treble_experimentations.

jeanrivera avatar jeanrivera commented on August 16, 2024

@drksnw I am having a similar issue I can make calls and video calls on Bluetooth, but music and videos play only thru speakers on HTC U12+, I would like try your fix, but not sure it will work, what would be your recommendation?

from treble_experimentations.

drksnw avatar drksnw commented on August 16, 2024

Hi @jeanrivera, I don't really know the differences between the U11 and the U12, but as the modifications doesn't rely on specific hardware, I think it might work as is. Just make sure to backup your actual configuration before πŸ˜‰

from treble_experimentations.

jeanrivera avatar jeanrivera commented on August 16, 2024

@drksnw thanks for the reply, if I understand correctly I just need to replace those 3 files in my vendor partition inside the etc folder correct? also one last question, do I need to clean boot after replacing those files? or can I just replace and reboot on an already setup android?

from treble_experimentations.

drksnw avatar drksnw commented on August 16, 2024

@jeanrivera you should have these files (or at least audio_policy_configuration.xml) directly in the /vendor folder if I recall it correctly. The configuration should be applied after a reboot

from treble_experimentations.

usman0tahir avatar usman0tahir commented on August 16, 2024

@drksnw what about the other 2 files? do we copy them to /vendor or /vendor/etc/ ?

from treble_experimentations.

7HE-W0R1D avatar 7HE-W0R1D commented on August 16, 2024

@drksnw Hi! I'm still using my U11+ and I noticed some issues after I patched your files. Camera apps won't record sound when taking videos and the usb earphones are not working. Are they possible to fix? If so, I'm really happy to help out :)

from treble_experimentations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.