Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voicecall volume is stuck at max #2

Closed
kimmoli opened this issue May 3, 2016 · 30 comments
Closed

Voicecall volume is stuck at max #2

kimmoli opened this issue May 3, 2016 · 30 comments

Comments

@kimmoli
Copy link
Owner

kimmoli commented May 3, 2016

The volume bar moves (on screen) but the actual volume is not adjusting

@kimmoli kimmoli added the bug label May 3, 2016
@kimmoli
Copy link
Owner Author

kimmoli commented May 9, 2016

May 09 17:01:51 localhost pulseaudio[11900]: Synced.
May 09 17:01:51 localhost pulseaudio[11900]: Changed port of sink 1 "sink.primary" to output-parking
May 09 17:01:51 localhost pulseaudio[11900]: Changed port of source 2 "source.primary" to input-parking
May 09 17:01:51 localhost pulseaudio[11900]: Changed profile of card 0 "droid_card.primary" to voicecall
May 09 17:01:52 localhost pulseaudio[11900]: Changed port of sink 1 "sink.primary" to output-earpiece
May 09 17:01:52 localhost pulseaudio[11900]: Changed port of source 2 "source.primary" to input-builtin_mic
May 09 17:01:52 localhost pulseaudio[11900]: Broadcast mode 'hp' to sink 'sink.primary'
May 09 17:01:52 localhost pulseaudio[11900]: Updating route hp volume/mute/device for stream sink-input-by-media-role:phone.
May 09 17:01:52 localhost pulseaudio[11900]: Updating route hp volume/mute/device for stream sink-input-by-media-role:x-maemo.
May 09 17:01:52 localhost pulseaudio[11900]: Trying to change sample rate
May 09 17:01:52 localhost pulseaudio[11900]: Restoring volume for sink input sink-input-by-media-role:phone.
May 09 17:01:52 localhost pulseaudio[11900]: Restored volume: 0: 100% 1: 100%
May 09 17:01:52 localhost pulseaudio[11900]: Resuming...
May 09 17:01:52 localhost pulseaudio[11900]: Start keepalive heartbeat with interval 55 seconds.
May 09 17:01:52 localhost pulseaudio[11900]: Choosing speex quality setting 2.
May 09 17:01:52 localhost pulseaudio[11900]: Created input 3 "Virtual Stream for MainVolume Volume Control" on sink.primary with sample spec s16le 2 kan. 44100Hz and channel map front-left,front-right
May 09 17:01:52 localhost pulseaudio[11900]:     media.name = "Virtual Stream for MainVolume Volume Control"
May 09 17:01:52 localhost pulseaudio[11900]:     media.role = "phone"
May 09 17:01:52 localhost pulseaudio[11900]:     policy.group = "internal"
May 09 17:01:52 localhost pulseaudio[11900]:     policy.stream_flags = hex:00000000
May 09 17:01:52 localhost pulseaudio[11900]:     module-stream-restore.id = "sink-input-by-media-role:phone"
May 09 17:01:53 localhost pulseaudio[11900]: Sink sink.primary idle for too long, suspending ...
May 09 17:01:53 localhost pulseaudio[11900]: Device suspended.
May 09 17:01:53 localhost pulseaudio[11900]: All sinks and sources are suspended, vacuuming memory
May 09 17:02:02 localhost pulseaudio[11900]: Changed port of sink 1 "sink.primary" to output-parking
May 09 17:02:02 localhost pulseaudio[11900]: Changed port of source 2 "source.primary" to input-parking
May 09 17:02:02 localhost pulseaudio[11900]: Changed profile of card 0 "droid_card.primary" to primary-primary
May 09 17:02:02 localhost pulseaudio[11900]: Changed port of sink 1 "sink.primary" to output-speaker
May 09 17:02:02 localhost pulseaudio[11900]: Changed port of source 2 "source.primary" to input-builtin_mic
May 09 17:02:02 localhost pulseaudio[11900]: Broadcast mode 'ihf' to sink 'sink.primary'
May 09 17:02:02 localhost pulseaudio[11900]: Updating route ihf volume/mute/device for stream sink-input-by-media-role:phone.
May 09 17:02:02 localhost pulseaudio[11900]: Restoring volume for sink input sink-input-by-media-role:phone. c 1 vol 36854
May 09 17:02:02 localhost pulseaudio[11900]: Updating route ihf volume/mute/device for stream sink-input-by-media-role:x-maemo.
May 09 17:02:02 localhost pulseaudio[11900]: invalid (<null>) target sink for mute-by-route
May 09 17:02:02 localhost pulseaudio[11900]: Freeing input 3 "Virtual Stream for MainVolume Volume Control"
May 09 17:02:03 localhost pulseaudio[11900]: Synced.

@kimmoli
Copy link
Owner Author

kimmoli commented May 23, 2016

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 6, 2016

http://forum.xda-developers.com/showpost.php?p=69476311&postcount=550

ro.qc.sdk.audio.ssr=false
ro.qc.sdk.audio.fluencetype=fluence
persist.audio.fluence.mode=endfire
persist.audio.handset.mic=digital
persist.audio.voicecall.mic=0

This is told to enhance voicecall audio transmit quality, but it seems also to fix this issue. Dunno then which of above affects it.

@rinigus
Copy link

rinigus commented Nov 12, 2016

Hi @kimmoli : have you had a chance to check whether these settings make any difference for voice calls for you? Do you plan to incorporate them into future releases?

cheers,

rinigus

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 12, 2016

No feedback on quality, but at least no-one hasn't complained after this change.
And yes, these will be on next release, whenever it comes out.

@rinigus
Copy link

rinigus commented Nov 12, 2016

I see :) . Maybe the best is to try to boot with and without the settings, give the phone to a helping friend and ask them to talk to you while you listen with their phone :) . That way you could check the difference yourself. Although, maybe in your case, its all OK with the both settings.

No decline in quality is also a good news, I presume...

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 12, 2016

handsfree echo got some complaints just

@kimmoli kimmoli closed this as completed Nov 12, 2016
@kimmoli kimmoli reopened this Nov 12, 2016
@rinigus
Copy link

rinigus commented Nov 12, 2016

Is it the first time and do you think its related to new settings?

I guess we have to get to the bottom of what do these settings do. I presume that

persist.audio.handset.mic=digital

touch normal mic settings, not hands-free mode. You told on IRC that, with the default settings, hands-free was loading digital mic already, right? So, maybe some of these settings interfere with hands-free mode... [assuming that the echo appeared with new settings only]

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 12, 2016

@rinigus
Copy link

rinigus commented Nov 12, 2016

I tested for minimal set and this seems to be it:

ro.qc.sdk.audio.fluencetype=fluence
persist.audio.fluence.mode=endfire
persist.audio.handset.mic=digital

When booting with these settings, ro.qc.sdk.audio.ssr=false by default and persist.audio.voicecall.mic is not set.

@rinigus
Copy link

rinigus commented Nov 12, 2016

From the diff, I guess lines 24-26 are the critical and that's not what we want right? If I understood correctly, you haven't had any echo complains earlier, right?

@rinigus
Copy link

rinigus commented Nov 13, 2016

It seems that the microphone loading is done here:

https://github.com/CyanogenMod/android_hardware_qcom_audio/blob/stable/cm-12.1-caf-8974-YOG7D/hal/msm8974/platform.c#L904

I hope that I am reading the right source (platform and version)...

@rinigus
Copy link

rinigus commented Nov 13, 2016

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 13, 2016

i just tested and echo is horrible in HF.
Trying to revert changes...

@rinigus
Copy link

rinigus commented Nov 13, 2016

that's with new settings - right?

ro.qc.sdk.audio.fluencetype=fluence
persist.audio.fluence.mode=endfire
persist.audio.handset.mic=digital

What about normal call?

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 13, 2016

adding

persist.audio.fluence.speaker=false

Seems to fix the HF echo

Settings now

[ro.qc.sdk.audio.fluencetype]: [fluence]
[persist.audio.fluence.mode]: [endfire]
[persist.audio.fluence.speaker]: [false]
[persist.audio.fluence.voicerec]: [false]
[persist.audio.fluence.voicecall]: [true]
[persist.audio.handset.mic]: [digital]

Complains about fuggy voice during normal call. no echo on HF.
Reverted, removed this:

[persist.audio.handset.mic]: [digital]

So now settings are like

[ro.qc.sdk.audio.fluencetype]: [fluence]
[persist.audio.fluence.mode]: [endfire]
[persist.audio.fluence.speaker]: [false]
[persist.audio.fluence.voicerec]: [false]
[persist.audio.fluence.voicecall]: [true]

and no complains. Voice quality good on HF and normal call. (For comparison, as good as without any changes to these settings)

@rinigus
Copy link

rinigus commented Nov 13, 2016

Nice! Have you checked the logcat as well?

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 13, 2016

Logcat diff to the original. Right-side of diff is new:

https://gist.github.com/kimmoli/3fee3a3f2b080530aad3349d481cd203/revisions?diff=split

@rinigus
Copy link

rinigus commented Nov 13, 2016

It looks that it fixed the device number... Now, when I add persist.audio.fluence.speaker=false to my /default.prop , reboot, I still get the persist.audio.fluence.speaker [true] . Probably a typo somewhere, just cannot figure out where :(

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 13, 2016

you have made it through setprop too? it creates a file, which overrides default.prop

rm /data/property/persist.audio.fluence.speaker

@rinigus
Copy link

rinigus commented Nov 13, 2016

Nope, didn't use setprop. There is no such file. The files that are there are related to persist.radio ...

@rinigus
Copy link

rinigus commented Nov 13, 2016

...adding the property by setprop fixes it though. I think I can live with that then :)

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 26, 2016

default.prop has now been changed, but...

....
ro.qc.sdk.audio.fluencetype=fluence
persist.audio.fluence.mode=endfire
persist.audio.fluence.speaker=false
persist.audio.fluence.voicerec=false
persist.audio.fluence.voicecall=true
....

but still

[nemo@Sailfish ~]$ getprop | grep fluence
[ro.qc.sdk.audio.fluencetype]: [fluence]
[persist.audio.fluence.mode]: [endfire]
[persist.audio.fluence.speaker]: [true]
[persist.audio.fluence.voicerec]: [false]
[persist.audio.fluence.voicecall]: [true]

As it happened to you earlier. Need to dig what overrides that.

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 26, 2016

It is from /system/build.prop

Seems that ro. properties are overwritten from default.prop, but not persist. ones (?)

[nemo@Sailfish ~]$ grep fluence /system/build.prop
persist.audio.fluence.speaker=true
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicerec=false
ro.qc.sdk.audio.fluencetype=none

@rinigus
Copy link

rinigus commented Nov 26, 2016

Did you also add

persist.audio.handset.mic=digital

But this one seems to be missing in /system/build.prop . Maybe that's why it works?

@rinigus
Copy link

rinigus commented Nov 26, 2016

From our earlier checks - we just have to ensure

persist.audio.fluence.speaker=false

Why not use /data/property/persist.audio.fluence.speaker for our advantage?

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 26, 2016

  1. No, i didn't add persist.audio.handset.mic=digital as per my tests it made call audio worse.
  2. Adding files in /data/property/ via sparse files does not work. I can see the file in /.stowaways/sailfishos/data/property/persist.audio.fluence.speaker but not in /data/property/

@rinigus
Copy link

rinigus commented Nov 26, 2016

OK, I see. I missed your comment regarding foggy voice. Its opposite to what I experienced, which is a bit odd. But OK, its easy to setup for each handset as we please.

I am not sure whether any other settings would have an effect without persist.audio.handset.mic=digital. To my understanding, you can use fluence only on digital mics and right now we are trying to figure out how to disable it on loudspeaker. Or did you hear/noticed any improvement?

@kimmoli
Copy link
Owner Author

kimmoli commented Nov 26, 2016

I'm not really sure. These settings give me ability to control voicecall volume (what is the topic here). Adding digital mic will make audio worse, thus not adding it (atleast for now).
Retaining fluence in speaker causes horrible echo, and it needs to be get to false.

Adding that property file with oneshot systemd service. (building test image as we speak)

@kimmoli kimmoli added PR and removed in progress labels Nov 27, 2016
@kimmoli
Copy link
Owner Author

kimmoli commented Nov 27, 2016

@kimmoli kimmoli added the merged label Dec 17, 2016
@kimmoli kimmoli closed this as completed Dec 17, 2016
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 26, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 27, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Thatisjigen added a commit to Thatisjigen/android_device_realme_RMX1921 that referenced this issue Sep 27, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
Dhruvesh16 pushed a commit to Dhruvesh16/device_nothing_Spacewar-1 that referenced this issue Nov 23, 2022
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing
IGaganpreetSingh pushed a commit to IGaganpreetSingh/android_device_realme_sm8250-common that referenced this issue Jan 15, 2023
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing

Signed-off-by: IGaganpreetSingh <gaganpannu83@gmail.com>
IGaganpreetSingh pushed a commit to IGaganpreetSingh/android_device_realme_sm8250-common that referenced this issue Jan 15, 2023
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing

Signed-off-by: IGaganpreetSingh <gaganpannu83@gmail.com>
IGaganpreetSingh pushed a commit to IGaganpreetSingh/android_device_realme_sm8250-common that referenced this issue Jan 15, 2023
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing

Signed-off-by: IGaganpreetSingh <gaganpannu83@gmail.com>
IGaganpreetSingh pushed a commit to IGaganpreetSingh/android_device_realme_sm8250-common that referenced this issue Jan 15, 2023
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing

Signed-off-by: IGaganpreetSingh <gaganpannu83@gmail.com>
IGaganpreetSingh pushed a commit to IGaganpreetSingh/android_device_realme_sm8250-common that referenced this issue Jan 21, 2023
* ref: kimmoli/sfos-onyx-issues#2
* fixes incall audio not changing

Signed-off-by: IGaganpreetSingh <gaganpannu83@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants