[KB-Article] Troubleshooting Bluetooth Issues on LineageOS 14 devices - LineageOS News & Discussion

Note: This post summarizes the experiences I had when fixing Bluetooth on the sltexx device.
Even though parts of the following are device specific some fixes may also be ported to other device overlays after testing.
Also the shared audio HAL in android_harware_samsung might be used by other devices.
Please do not use this thread to report any issues you are having on your device. This is an advisory for fellow developers only!!
Short description of known Bug Reports:
1) Some BT features are not working, such as: Receiving files, Bluetooth tethering, OBEX, etc.
Reported as: BUGBASH-653
Affects: Bluetooth.apk
Devices: Possibly all, but caused by a rare condition, port to your device if neccesary​2) The phone does not connect to cars / bt-headsets using the hands-free profile for calling
Reported as: BUGBASH-308
Affects: Bluetooth.default.so
Devices: Possibly all Devices with WBS=off in combination with bt-device relying on WBS​3) The phone connects, media working, but in-call sound is completely garbled or muted on both ends
Reported as: BUGBASH-302 / BUGBASH-264
Affects: build.prop, libbt-vendor.so, Bluetooth.default.so, audio.primary.universal5430.so
Devices:
a) Samsung devices using qualcomm HAL msm8974 (klte)
b) Samsung devices using android_hardware_samsung audio HAL (sltexx, and devices with: TARGET_AUDIOHAL_VARIANT := samsung, see list in 3rd post)
c) Samsung devices using qualcomm HAL msm89** (jfltexx)​
4) While connected to bt-headset systems sound such as volume change and ringtone are played on speaker and headset simultaneously.
Reported as: none, fixed internally
Affects: mixer_paths_0.xml
Devices: sltexx specific, maybe other Samsung behave similar​
Detailed background description and fixes in next post….

1) Description: https://jira.lineageos.org/browse/BUGBASH-653
Background: The registration of the "EMAIL Message Access" Service seems to be faulty.
The MAP: MSE MAS Email Instance Support was added to CM14.1 but not CM13!
https://github.com/LineageOS/androi...mmit/819847bb7f72a69a7d7fc662bcd37625247fceec
There is also a switch to disable all new non-aosp bt data features:
https://github.com/LineageOS/androi...mmit/96a55efb0edac3c2af523f938b338dd16d4f8ac4
However it might be useful to fix the originating issue which I assume is the SDP registration of those features: -> No one has checked this until now..
Fix: https://review.lineageos.org/#/c/177998/
2) Description: https://jira.lineageos.org/browse/BUGBASH-308
Background: The BMWs (and probably other cars also) check the available codecs first:
Code:
BTA_AG_AT_BAC_EVT /* avablable codec */
and expect the wide-band speech [WBS] profile. Because that is not enabled on compile level the BMW sends a BTA_AG_CLOSE_EVT.
The connection is terminated and phone_state_change tries to continue with an invalid idx because the SLC connection is already down.
If you look at the logcat of the motog closely, you can find the following:
Code:
bt_btif : btif_hf_upstreams_evt: event=BTA_AG_WBS_EVT
audio_hw_primary: adev_set_parameters: enter: bt_wbs=on
Therefore the build must have been compiled with: BTM_WBS_INCLUDED
Code:
#if (BTM_WBS_INCLUDED == TRUE )
#define BTA_AG_WBS_EVT 31 /* SCO codec info */
#endif
Fix: https://review.lineageos.org/#/c/177996/
NOTE: If you are experiencing mute calls or garbled incall sound after this, continue with 3a/3b depending on your device
3a) Description: Garbled /mute incall sounds on bluetooth (msm8974)
Background:
The sample rate for calls is usually 8k, however for wide-band speech it is 16k. It seems that some devices cannot handle this sample rate and will only work on WBS with 8k.
This behavior was confirmed on the klte. The fix might be ported to other devices:
Fix: https://review.lineageos.org/#/c/178371/
3b) Description: Garbled /mute incall sounds (Universal HAL)
Background: Unlike the klte, many Exynos devices have a shared audio HAL that supports 16k WBS however there was a small misuse of the sample rate constant resulting in garbled sound.
The usage of audio_hal.force_voice_config = (wide or narrow) is usually not required (add if needed)
If the fix from 3a has been applied or was previously set, remove any definitions of SCO_WBS_SAMPLERATE in the vendor config.
Fix: https://review.lineageos.org/#/c/182054/
Right now this in in testing. We are looking for more affected devices that are using android_hardware_samsung as audio HAL.
Update: See the detailed list of possible affected devices below, as far as I see all of them have not yet enabled WBS yet.
3c) Description: Garbled /mute incall sounds on bluetooth (msm89** / jfltexx)
 @jorgemiguel4 Found out what fixes the mute calls: Thanks to you!
#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED FALSE //With this set to TRUE there is no sound on my side.
Click to expand...
Click to collapse
This will enable WBS (for the car support) but it will use the default codec instead which does not have the WBS samplerate issue.
Therefore audio quality might not be perfect but at least it works.
4) Description: Ringer & notification sounds through headset and speaker
Background:
When pressing volume up/down buttons or on incoming calls the sound is played on both headset and speaker which seems to be an odd behaviour. This is not only for bluetooth, also for wired headsets and headphones. The issue seems to be quite old and some might say it works as designed: https://forum.xda-developers.com/showthread.php?t=2320446
However as this is a custom firmware we can change the corresponding audio routes!
Fix: https://github.com/Harinus/android_...mmit/f104a3d9775e6c6cfdfbb6e61f16b036d207c18b (will need modification for other devices)
Wrote this with my best knowledge and belief. If there is any incorrect information, please let me know.
Special thanks to @akk29, @side and everyone on webchat, gerrit and jira who provided help/logs

Collection of all TARGET_AUDIOHAL_VARIANT := samsung Devices I could find on github!
sltexx ...........Samsung Galaxy Alpha / SM-G850F....... [exynos5430]
#LineageOS/
noblelte-common ..Samsung Galaxy Note 5................. [exynos7420]
zero-common ......Samsung Galaxy S6..................... [exynos7420]
k3gxx ............Samsung Galaxy S5 / SM-G900H.......... [exynos5422]
hero-common ......Samsung Galaxy S7 Edge................ [exynos8890]
gts2-common ......Samsung Galaxy Tab S2................. [exynos5433]
#others/
klimtlte .........Samsung Galaxy Tab S 8.4 / SM-T705.... [exynos5420]
ja3gxx ...........Samsung Galaxy S4 Exynos / GT-I9500... [exynos5410]
lt033g ...........Samsung Galaxy Note 10.1 3g / SM-P601. [exynos5420]
on5xelte .........Samsung Galaxy J5 Prime....... ....... [exynos7570]
zenlte-common ....Samsung Galaxy S6 Edge +.............. [exynos7420]
chagalllte .......Samsung Galaxy Tab S 10.5 / SM-T805... [exynos5420]
chagallltetmo ....Samsung Galaxy Tab S 10.5 / SM-T807T.. [exynos5420]
j7elte ...........Samsung Galaxy J7 / SM-J700........... [exynos7580]

. The usage of audio_hal.force_voice_config = (wide or narrow) is usually not required (add if needed)
If the fix from 3a has been applied or was previously set, remove any definitions of SCO_WBS_SAMPLERATE in the vendor config.
Click to expand...
Click to collapse
On code review I read ur the discussion with shevt regarding using "audio_half.force_voice_config". So using this line in build.prop will always force hal to use wideband or narrow whichever specified OR
But removing this line I believe will allow audio hal to decide wide band or narrow based on network. I may be wrong.
When shevt removed force.voice.config I assume audio hal may be using "pcm_config_voice_sco" and not "pcm_config_voice_sco_wb" in which has been defined .rate 8000 which may be causing the problem for shevt.
I just want to understand. I have seen in pcm_config_voice_sco_wb rate defined as "SCO_WB_SAMPLING_RATE". what is value passed when you define this. Is it .rate=16000 or .rate=0?

@Harinus hope you can help me
i have same issue on BUGBASH-96 but WPS didn't fix it
i have this lines on logcat :
Code:
08-12 13:40:24.866 6824 6861 D bt_btif : A2DP-CTRL-CHANNEL EVENT UIPC_RX_DATA_READY_EVT
08-12 13:40:24.866 6824 6861 D bt_btif : a2dp-ctrl-cmd : A2DP_CTRL_CMD_START
08-12 13:40:24.866 6824 6861 W bt_btif : btif_recv_ctrl_data: A2DP command A2DP_CTRL_CMD_START while AV stream is not ready
08-12 13:40:24.866 6824 6861 D bt_btif : ## a2dp ack : A2DP_CTRL_CMD_START, status 1 ##
08-12 13:40:24.866 6824 6861 D bt_btif : a2dp-ctrl-cmd : A2DP_CTRL_CMD_START DONE
08-12 13:40:24.866 371 6892 I bt_a2dp_hw: a2dp_command: A2DP COMMAND A2DP_CTRL_CMD_START DONE STATUS 1
08-12 13:40:24.866 371 6892 E bt_a2dp_hw: a2dp_command: A2DP COMMAND A2DP_CTRL_CMD_START error 1
08-12 13:40:24.866 371 6892 E bt_a2dp_hw: start_audio_datapath: Audiopath start failed (status -1)
08-12 13:40:24.877 371 6892 I bt_a2dp_hw: start_audio_datapath: state 3
08-12 13:40:24.878 371 6892 I bt_a2dp_hw: start_audio_datapath: state AUDIO_A2DP_STATE_STOPPED
08-12 13:40:24.878 371 6892 I bt_a2dp_hw: a2dp_command: A2DP COMMAND A2DP_CTRL_CMD_START
my device tree links : https://github.com/LG-K10

@macs18max
You basically got it right.
The HAL consists of 2 parts:
android_hardware_samsung (1, audio HAL)
android_hardware_broadcom_libbt (2, bluetooth RIL)
Both must handle the sampling rate of the incoming and outgoing audio streams.
For the WBS codec both 8k and 16k are valid by specification. Other codecs may use only 8k.
1) PCM Config / force_voice_config
The audio HAL (pcm config) uses 16k for WBS (after my fix) and 8k for the other codecs.
It decides which sample rate based on the wb_amr_type that it gets from the RIL.
When setting "audio_hal.force_voice_config" it overrides the wb_amr_type and therefore the samplerate of the pcm config.
(pcm_config_voice_sco_wb or pcm_config_voice_sco)
voice_session_init registers a RIL callback for WB. That wont be registered when "audio_hal.force_voice_config" is set at all. https://github.com/LineageOS/android_hardware_samsung/blob/cm-14.1/audio/voice.c#L444
2) SCO_WBS_SAMPLE_RATE
The value is used in hw_sco_i2spcm_config https://github.com/LineageOS/android_hardware_broadcom_libbt/blob/cm-14.1/src/hardware.c#L1516 and defines the sample rate on hw layer.
The values 0 and 1 are used. -> SCO_WBS_SAMPLE_RATE is a macro, documented here: https://github.com/LineageOS/androi...bt/blob/cm-14.1/include/bt_vendor_brcm.h#L262
3) Conclusion.
From what I experienced both values on RIL and HAL must be equal. Otherwise the audio will be garbled.
However some HALs (e.g. klte) seem to not support 16k, so we force 8k there.
Maybe it does not work for @ShevT without the line in build.prop because the wb-amr callback is not working properly on that device.
Can not answer that without a device for testing.
@erfanoabdi
The issue looks like something not related to WBS. Do you have a full log?

Harinus said:
@erfanoabdi
The issue looks like something not related to WBS. Do you have a full log?
Click to expand...
Click to collapse
tnx for reply
yeah, logcat attached
interested thing is i can see this error is passed by using prebuilt audio hals but still no sound :
Code:
A2DP COMMAND A2DP_CTRL_CMD_START DONE STATUS 0
i don't want to use prebuilt hals, need to find way for fixing this.

erfanoabdi said:
tnx for reply
yeah, logcat attached
interested thing is i can see this error is passed by using prebuilt audio hals but still no sound :
Code:
A2DP COMMAND A2DP_CTRL_CMD_START DONE STATUS 0
i don't want to use prebuilt hals, need to find way for fixing this.
Click to expand...
Click to collapse
The origin of the error is: https://github.com/LineageOS/android_system_bt/blob/cm-14.1/audio_a2dp_hw/audio_a2dp_hw.c#L569. android_hardware_bt is the bluetooth stack that has changed quite a lot for the last versions of android.
Your build config of the stack(https://github.com/LG-K10/android_device_lge_m216/blob/cm-14.1/bluetooth/bdroid_buildcfg.h) is using definitions that seem to be obsolete since Android M (and also Nougat)
Check the related motorola https://github.com/LineageOS/androi...mmit/69feab615584f2b8bf7f51c0fd12817181453e02 repository!
Some parameters were renamed:
Code:
BLUETOOTH_QCOM_SW -> BLUETOOTH_QTI_SW
BTC_INCLUDED -> BLE_VND_INCLUDED
The currently missing "BLE_VND_INCLUDED" enables several CTRL feature callbacks that seem to be related to: "A2DP_CTRL_CMD_START"
I suggest porting the current version from motorola with all its defines:
Code:
#define BLUETOOTH_QTI_SW TRUE
#define MAX_ACL_CONNECTIONS 7
#define MAX_L2CAP_CHANNELS 16
#define BLE_VND_INCLUDED TRUE
#define BT_CLEAN_TURN_ON_DISABLED TRUE
plus the WBS enabling..
Code:
#define BTM_WBS_INCLUDED TRUE /* Enable WBS */
#define BTIF_HF_WBS_PREFERRED TRUE /* Use WBS */
I can not guarantee that this will fix the issue, but it is surely a good idea to fix the parameters.

I posted a AOSP Bluetooth patch to the jira bugtracker under issue
https://jira.lineageos.org/browse/BUGBASH-717
And here is the xda thread where the dev built this patch...
https://forum.xda-developers.com/go...m-dark-rom-t3492150/post73199372#post73199372
...maybe helpful !?!

lulli1 said:
I posted a AOSP Bluetooth patch to the jira bugtracker under issue
https://jira.lineageos.org/browse/BUGBASH-717
And here is the xda thread where the dev built this patch...
https://forum.xda-developers.com/go...m-dark-rom-t3492150/post73199372#post73199372
...maybe helpful !?!
Click to expand...
Click to collapse
See my comment on jira.. For axon7 its clearly the WBS issue that has been described above.

On jfltexx got it working in my car with the following, hope it helps somebody
#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED FALSE //With this set to TRUE there is no sound on my side.
and
SCO_WBS_SAMPLE_RATE = 0 or SCO_WBS_SAMPLE_RATE = 1 //worked fine with both. 0=8Hhz and 1=16kHz

Harinus said:
See my comment on jira.. For axon7 its clearly the WBS issue that has been described above.
Click to expand...
Click to collapse
Yes you were right. Thanks a lot. We solved the issue on the Nexus 5 by setting
BTIF_HF_WBS_PREFERRED to FALSE

Using HFP several users of the herolte got distorted sound when calling. See regression 1194. The problem occurred after enabling WBS in LOS nightly. What has to be done to apply a workaround? Is it sufficient to change the build.prop? Issue is really annoying.

nostromo12 said:
Using HFP several users of the herolte got distorted sound when calling. See regression 1194. The problem occurred after enabling WBS in LOS nightly. What has to be done to apply a workaround? Is it sufficient to change the build.prop? Issue is really annoying.
Click to expand...
Click to collapse
LOS Version: lineage-14.1-20171018-nightly-herolte-signed
Baseband: G930FXXU1DQF1
Kernel version: 3.18.14-gadb2bc5
I have Samsung Galaxy S7 G930F running latest nightly and have the voice distortion issue.
audio_hal.force_voice_config = wide [This is default, I didn't change this]
---------- Post added at 01:30 PM ---------- Previous post was at 12:33 PM ----------
padraigdoran said:
LOS Version: lineage-14.1-20171018-nightly-herolte-signed
Baseband: G930FXXU1DQF1
Kernel version: 3.18.14-gadb2bc5
I have Samsung Galaxy S7 G930F running latest nightly and have the voice distortion issue.
audio_hal.force_voice_config = wide [This is default, I didn't change this]
Click to expand...
Click to collapse
I got it working on my S7 by changing to the following:
audio_hal.force_voice_config = narrow
The audio person on the other end says they can hear me fine, but I think the audio quality of the incoming voice isn't that great. The voice is very understandable, just not super clear.

I tested
audio_hal.force_voice_config = narrow
on herolte with same nightly , but older baseband G930FXXU1BPJG. But it did not work. There is absolutely silence. No dial tone. No partner voice. Nothing. I have sadly to go back to nightly 20170919.

I've got a problem with Bluetooth on my Note 4 with Lineage OS 14.1. I've paired my android wear watch with my phone and can receive notifications and data from apps on the phone, but the watch can't access the internet through the Bluetooth connection. It worked fine on my old Touchwiz ROM. Is this related to problem 1 or something else?

none of these are the problem I have, my problem is that bluetooth doesn't even turn on

@Harinus
I have got issues with Call Audio on zerofltexx (S6). We are using the common audio HAL. Well the issue is I have got a pair of Beats Solo 3 Wireless Headphones which require WBS for Calls. Media audio works great. However there is no call audio whatsoever. Now I have tried many of the fixes you mentioned in your previous posts and non have solved this issue. I have tried the prebuilt audio HAL on LineageOS and it works fine with these headphones. Even the one by @macs18max for the same device works. I will attach a log when making a call. I have BT WBS as ON but PREFERRED to FALSE when this log was taken.

LG G6
this is what bluetooth does on my LG G6: The phone connects, media working, but in-call sound is completely garbled or muted on the other end
No idea on how to fix this. Phone is rooted and has the nightly from 20180206 with the microG-Patch. Same issue with previous versions.
any help would be appreciated
thnx lemonskater

I have this exact problem...
I'm now looking for the "How To" push code or config changes to my device? In the thread, there are a couple of fixes to try, and some files... but I don't have a single clue about what to do with them, how to "install" those fixes on my LOS 15.1 Galaxy S7. Im guessing I need an app on my phone to run and apply the changes... but I didn't find exactly how to.
I'm an experienced Windows sys admin, but I'm a total N00b as when it comes to Android. I want to learn to exploit the maximum of my phone, but I gotta start by making it work normal again. Can you help me with this? I'm totally lost as how I can solve my Bluetooth problem with the thread linked a little earlier!
Thank you SOOOOO much for every bit of help you could provide me.

Related

[DEV] Android 4.0.1 Audio problems

HD2 audio dev.
Good news - Nexus1:
<rapmv78> I got audio partially working on nexus one
<cruonit> @rapmv78 how did you do it... outline
<cruonit> need it for hd2 :|
<rapmv78> The issue seems to be that the audio legacymode driver which we have does not expect multiple threads of audiopolicy services especially when there is request from each thread to set format/channels/sampling rate etc. There is code in openOutputStream in AudioHardware.cpp, which seems to be the issue. I have a hack which just ignores different set requests. Only first one sticks. The following code modification seems to
<rapmv78> if (mOutput) { if (status) { if (0) { *status = INVALID_OPERATION; } else { LOGD("Output stream already exists, using existing channels and format"); *status = NO_ERROR; } } return mOutput; }
<rapmv78> I tried it with the music app and was able to play mp3s. However there is a small issue with the audio switching from speaker to headset randomly. There are still some issues.
<rapmv78> just build audio.primary.qsd8k.so with the hack and drop it in /system/lib/hw and restart android
other discussion references:
http://forum.xda-developers.com/showthread.php?t=1348670&page=6
http://forum.xda-developers.com/showthread.php?t=1348479&page=3
already started topics:
http://forum.xda-developers.com/showthread.php?t=793353
now does this hack work as far as the incall audio, voice output and, Phone sounds ECT.? Or just for what you have stated?
some ringtones work some not :|
Cruonit said:
HD2 audio dev.
Good news - Nexus1:
<rapmv78> I got audio partially working on nexus one
<cruonit> @rapmv78 how did you do it... outline
<cruonit> need it for hd2 :|
<rapmv78> The issue seems to be that the audio legacymode driver which we have does not expect multiple threads of audiopolicy services especially when there is request from each thread to set format/channels/sampling rate etc. There is code in openOutputStream in AudioHardware.cpp, which seems to be the issue. I have a hack which just ignores different set requests. Only first one sticks. The following code modification seems to
<rapmv78> if (mOutput) { if (status) { if (0) { *status = INVALID_OPERATION; } else { LOGD("Output stream already exists, using existing channels and format"); *status = NO_ERROR; } } return mOutput; }
<rapmv78> I tried it with the music app and was able to play mp3s. However there is a small issue with the audio switching from speaker to headset randomly. There are still some issues.
<rapmv78> just build audio.primary.qsd8k.so with the hack and drop it in /system/lib/hw and restart android
other discussion references:
http://forum.xda-developers.com/showthread.php?t=1348670&page=6
http://forum.xda-developers.com/showthread.php?t=1348479&page=3
already started topics:
http://forum.xda-developers.com/showthread.php?t=793353
Click to expand...
Click to collapse
Post this in the Dev section I think, this is definitely worthy of more attention. Note that Tytung has thanked your post

ALSA on the Nexus 4 (temporary volume control)

Please remember to make a backup image of your phone before experimenting.
============ WARNING!! =============
The highest setting is VERY loud (as I found out) and could potentially rip apart the speaker on your phone!
Exercise extreme caution when using this. You risk permanent damage to your phone and your ears.​
2013-Jan-20
-----------------
Thanks xda-developers members "skvalex" who wrote ALSAMixer and "chdlock" who is helping me figure out
how ALSA is mapping the audio chipset, we can now temporarily adjust the Digital Volume on the Nexus 4.
Unfortunately, the selected volume doesn't "stick" because the audio driver re-writes it every time it re-opens an audio stream.
A stream is usually opened when a music track begins to play so then the digital volume will reset back to default.
We need a kernel developer to modify the audio driver so it opens an audio stream using a user-selected Volume level.
***
If you don't mind setting the volume frequently or just want to try this out here's what you need:
1) Get ALSAMixer from the Play Store. It was updated recently and you need the latest version.
Please consider a donation to the author.
2) You can re-program the audio chipset by editing fields in ALSAMixer. Here is a list of what we can control so far.
Headphones volume:
Left: RX1 Digital Volume (numid=27)
Right: RX2 Digital Volume (numid=28)
Speaker volume:
RX3 Digital volume (numid=29)
Camcorder volume:
DEC6 Volume (numid=39)
Microphone volume:
DEC7 Volume (numid=40)
-----------------------------------------------
old OPs
-----------------------------------------------
2013-Jan-15
----------------
The creator of ALSAMixer updated it to correctly install for Nexus4. (Uninstall removes the app but the ALSA libraries remain on the phone.)
https://play.google.com/store/apps/details?id=com.skvalex.alsamixer&hl=en
Thank you so much!
--------
http://forum.xda-developers.com/attachment.php?attachmentid=1653124&d=1358438577
This is a piped output of "alsa_amixer -c 0 contents" from a stock Nexus 4 (4.2.1)
2013-Jan-13
-----------------
Is anyone successfully running ALSA on their Nexus 4?
If you do please share instructions to do so.
I am on stock 4.2.1(rooted/busybox) and I ran the AlsaMixer from
the Play Store but it doesn't seem to complete the installation.
http://forum.xda-developers.com/sho...ited Edition Kit★☆★ | aokp,minco,pa,rasbean |
Shameless promotion
Sent from my Nexus 4
Next you're going to tell me that you want systemd and PulseAudio on your device too, right?
I wiped to stock,
I installed AOKP-jb-mr1-build1,
then Nocturnal 1.4 LE for AOKP
and the ALSAMixer still doesn't work. It installs but I get the same blank screen with no settings.
What am I doing wrong?
I'm not sure what that app is, I just meant that some of the audio mods in the kit ROM referred to ALSA audio libs.
As you can tell I'm not the expert, sorry if that's not what you were referring too
Sent from my Nexus 4
I am looking for a way to control the audio stream parameters in particular the gain of the microphone.
Somebody suggested using ALSA and I'm trying get it going.
-Mindroid- said:
I am looking for a way to control the audio stream parameters in particular the gain of the microphone.
Somebody suggested using ALSA and I'm trying get it going.
Click to expand...
Click to collapse
I have only a Nexus 7, and the SoC is different from the Nexus 4, but look for alsa_amixer (installed by AlsaMixer) from within a console and execute
"alsa_amixer -c X contents" (without the quotes)
where X is one of the card numbers shown in your /proc/asound directory (e.g. card0 [X=0], card1 [X=1], etc). In my case, X=1 is the actual card where (a lot of) values can be set. One of those values is called "ADC Boost Gain"(I guess a programmable analog gain?).
I established a call with CSipSimple and successfully raised that parameter by 24dB in mid-call by executing "alsa_amixer -c 1 cset numid=20 2" [the default value was 0 and each step increases the level by 12dB]
You can query individual parameters by executing alsa_amixer -c X cget numid=Y
YMMV with the Nexus 4. Good luck!
Thank you! This looks really promising.
I only have "card0" aka [apq8064tablasnd].
When trying to execute "alsa_mixer -c 0 contents" I get an error stating that I'm missing
library "libasound.so". Any ideas what could be wrong?
I'm not sure whether libasound.so came with the AlsaMixer app. If it did you may need to copy the library into a system library path, e.g. /system/lib. If not, I could send you the library that I have. I actually forgot whether I found the library somewhere online or whether I cross-compiled it myself...
Sent from my Nexus 7 using xda app-developers app
ALSA on Nexus 4 sound capabilities
ALSAMixer in the Play Store was updated to support Nexus 4. See OP.
---------------------------------------------------------------
The attached file is the output of running
alsa_amixer -c 0
I'm new to ALSA and have trouble figuring out which one is the microphone gain control.
I have installed this app but unfortunately I don't know how to completely uninstall it help please?:thumbup:
..sent from space.
amarb70 said:
I have installed this app but unfortunately I don't know how to completely uninstall it help please?:thumbup:
..sent from space.
Click to expand...
Click to collapse
If I understand correctly the app is just an installer that puts the ALSA libraries on your system.
If you are not using them it probably doesn't matter if they are there or not. You can contact the app creator about it.
-Mindroid- said:
ALSAMixer in the Play Store was updated to support Nexus 4. See OP.
---------------------------------------------------------------
The attached file is the output of running
alsa_amixer -c 0
I'm new to ALSA and have trouble figuring out which one is the microphone gain control.
Click to expand...
Click to collapse
Post the output of
alsa_amixer -c 0 contents
Any labels containing "ADC gain" or "Boost" would be prime candiates
amarb70 said:
I have installed this app but unfortunately I don't know how to completely uninstall it help please?:thumbup:
..sent from space.
Click to expand...
Click to collapse
Restore your back up
Sent from my Nexus 4 using xda premium
alsa_amixer c- 0 contents
chdloc said:
Post the output of
alsa_amixer -c 0 contents
Any labels containing "ADC gain" or "Boost" would be prime candiates
Click to expand...
Click to collapse
Thank you for being so patient with me!
I'm such a Linux noob. It took me forever to figure out that I need 'su' to do anything.
I will update the OP to link to this file.
-Mindroid- said:
Thank you for being so patient with me!
I'm such a Linux noob. It took me forever to figure out that I need 'su' to do anything.
I will update the OP to link to this file.
Click to expand...
Click to collapse
Holy smokes! This is one complicated mixer! And I've seen many.
It may help in narrowing choices down by you capturing another
alsa_amixer -c 0 contents
while you are on a call and look at the diffs. While you do that (being on a call, but don't run anything else that may use audio such as music playback apps) also report the output of
cat /proc/asound/card0/pcm0p/sub0/status
to make sure that phone calls are actually routed through ALSA. Anything but "CLOSED" is good.
I do not have a Nexus 4 so I cannot help trying to find the best parameters for a given application. The app ALSAMixer should help I would think.
Does this program now actually display anything?
chdloc said:
Holy smokes! This is one complicated mixer! And I've seen many.
It may help in narrowing choices down by you capturing another
alsa_amixer -c 0 contents
while you are on a call and look at the diffs. While you do that (being on a call, but don't run anything else that may use audio such as music playback apps) also report the output of
cat /proc/asound/card0/pcm0p/sub0/status
to make sure that phone calls are actually routed through ALSA. Anything but "CLOSED" is good.
I do not have a Nexus 4 so I cannot help trying to find the best parameters for a given application. The app ALSAMixer should help I would think.
Does this program now actually display anything?
Click to expand...
Click to collapse
It's a long shot but if you are in the New York tri-state area I wouldn't mind meeting up and letting you mess around with the Nexus4.
The invitation is open to anyone with ALSA experience. I would love to learn more about it first-hand.
As far as I can tell:
- ALSAMixer installs the ALSA libraries and displays the control set. I tried modifying a value with it and it didn't work.
It's a matter of wrong syntax I think, I will contact the app creator about it.
- Terminal Emulator works. I was able to change the value of "AUX_PGA_LEFT Volume" with the following command:
alsa_amixer cset numid=54 39
I'm not sure what this one does yet but I will investigate later today.
- unfortunately, during a phone call "proc/asound/card0/pcm0p/sub0/status" (playback) as well as
"proc/asound/card0/pcm0c/sub0/status" (capture) report "closed". Earlier I tried recording a voice call from an app
and trying to prepare an audio stream with MediaRecorder.AudioSource.VOICE_CALL throws an exception.
- when recording an audio stream with MediaRecorder.AudioSource.MIC and CAMCORDER
"proc/asound/card0/pcm0c/sub0/status" reports audio stream parameters. I'm attaching the piped output of
"alsa_amixer -c 0 contents" during a voice call, recording with mic and recording with camcorder.
-Mindroid- said:
[...]
- when recording an audio stream with MediaRecorder.AudioSource.MIC and CAMCORDER
"proc/asound/card0/pcm0c/sub0/status" reports audio stream parameters. I'm attaching the piped output of
"alsa_amixer -c 0 contents" during a voice call, recording with mic and recording with camcorder.
Click to expand...
Click to collapse
This is fun...
There is certainly a difference between the "idle" set of parameters you had posted earlier and the ones that you took during a voice call.
I found some good information that explains the parameters here
https://github.com/psykick5/android_device_lge_mako/blob/master/snd_soc_msm_2x_Fusion3
Try to change numid=48 (i.e. 'ADC1 Volume') and numid=40 (i.e. 'DEC7 Volume'); these two parameters should change the microphone level, provided automatic gain control does not compensate for the changes.
(It bothers me, though, that the range of values shown by alsa_amixer and the ones shown in the above link don't match)
Make sure that the changes stick by issuing
alsa_amixer cget numid=X
For phone calls I would certainly change numid=65 (i.e. 'TX6 HPF cut off') from 0 (apparently really only a DC offset filter) to 2 (apparently a high-pass filter with a cutoff frequency of 150Hz), which would be good enough for HD voice.
chdloc said:
This is fun...
There is certainly a difference between the "idle" set of parameters you had posted earlier and the ones that you took during a voice call.
I found some good information that explains the parameters here
https://github.com/psykick5/android_device_lge_mako/blob/master/snd_soc_msm_2x_Fusion3
Click to expand...
Click to collapse
Great find! This seems to be exactly what we need.
Most intriguing there are also facilities for Voice Call and FM Radio audio streams. Those are not currently working on
the Nexus4 at the moment and this might shed some light on a possible solution.
I find some of their nomenclature confusing. They use "TX" for recording and "RX" for playback.
Also they seem to set values twice - :1:0 for turn off and :1:1 for turn on. Do I have to issue commands twice?
I confirmed with 'cget' that I am indeed setting values with 'cset'.
chdloc said:
Try to change numid=48 (i.e. 'ADC1 Volume') and numid=40 (i.e. 'DEC7 Volume'); these two parameters should change the microphone level, provided automatic gain control does not compensate for the changes.
(It bothers me, though, that the range of values shown by alsa_amixer and the ones shown in the above link don't match)
Make sure that the changes stick by issuing
alsa_amixer cget numid=X
Click to expand...
Click to collapse
It seems that DEC7 controls to the MICROPHONE stream and DEC6 the CAMCORDER.
I will focus my attention on these.
chdloc said:
For phone calls I would certainly change numid=65 (i.e. 'TX6 HPF cut off') from 0 (apparently really only a DC offset filter) to 2 (apparently a high-pass filter with a cutoff frequency of 150Hz), which would be good enough for HD voice.
Click to expand...
Click to collapse
I was wondering about that myself. There is very bad low frequency noise on video recordings so I will
definetly look into this.
-Mindroid- said:
I find some of their nomenclature confusing. They use "TX" for recording and "RX" for playback.
Click to expand...
Click to collapse
Actually, the nomenclature is quite common, TX, i.e. transmit [to the network] denotes the signal to be transmitted (taken from from microphone)
while RX is the receive signal [from the network] to be played back through a loudspeaker.
-Mindroid- said:
Also they seem to set values twice - :1:0 for turn off and :1:1 for turn on. Do I have to issue commands twice?
Click to expand...
Click to collapse
No, you will have to issue the command only once. Without having looked at the underlying code I tend to think that the first number denotes the type, i.e. integer vs string, and the second number the actual value.
Another interesting observation is that the SoC of the Nexus 4 seems to support SRS TruMedia via an effects mixer, which reportedly has potential to improve audio considerably (http://www.srstechnologies.com/content.aspx?id=1269 , I believe).

ALSA from chroot -- Audio for the other side

First, a short story
After installing a chroot debian on my s2 I noticed that vlc player isn't working.
Sadly it took me several weeks to notice that sound in general wasn't working at all.
Problem: There was simply nowhere to output the sound.
So I tried to get alsa working from chroot to get some form of audio output.
and here it is.
ALSA ON CHROOT LINUX
The bumpy road to half broken (and therefore other half working) linux audio​
Once you have a working chroot (with correct mounts that is), download and install the following packages:
Code:
alsa-base alsa-oss alsa-utils
Now run
Code:
alsamixer
to open the alsa sound mixer.
There you should unmute
Code:
DL1 MM_EXT DL1 Mixer Multimedia DL1 PDM
Then set
Code:
HS Left
and
Code:
HS Right
to
Code:
HS DAC
This should enable headset output
ALso unmute
Code:
Earphone
to well....use the Earphone speaker.
To enable the Main speaker, unmute
Code:
DL2 Mixer Multimedia DL2 Mono
And set
Code:
HF Right
and
Code:
HF Left
to
Code:
HF DAC
For other devices, this section will be different. Just look through alsamixer and try to make sense of the countless options there.
Finished more or less.
Now you can play audio from chroot.:victory:
Notice: If you run any sound from android or plug the headset in/out, you need to reapply these settings.
To avoid that I run a script that continously re-enables the mentioned settings. (mainly the headset)
It looks something like this
Code:
#!/bin/bash
while true; do
[INDENT]
amixer -c 0 csent numid=74 1
amixer -c 0 csent numid=73 1
amixer -c 0 csent numid=35 1
amixer -c 0 csent numid=52 1
amixer -c 0 csent numid=33 1
sleep 0.5
[/INDENT]
done
This probably isn't the best way of doing it (it might actually be the worst), but it works.
It might put load on the cpu or it might not, but for me, running this decreases my SoD frequency. (idek why)
Also the best way to run the script is a few seconds after the system started using the "nohup" command. That way you can run it and close the terminal and it will still be active. To kill it, search its pid using
Code:
ps -x
and kill it with
Code:
kill (insert pid here)
If you want you can also run it as a start up script.
Though if you do that, you might see that it runs but doesn't do anything.
Don't panic. Or do if you want to.
But just restart the script anyways.
OPTIONAL: (because I force you to use the stuff above)
We can play no more than ONE audio source at a time
Soloution: PulseAudio
(I will fill this shortly....)
(there is also MPD which works...)
So for now we have
Solution 2: Dmixer
Dmixer is what it name sounds like. It downmixes multiple sources into a single audio stream.
And it works (sometimes).
So here is how to.
Simply copy the content of the file below into a new file called .asoundrc in /home/username
Code:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
This one is mainly pulled directly from the alsa project site and should work most of the time.
hw:0,0 might need changing on different devices. Same with card 0.
run
Code:
aplay -l
and use that to find the correct card and device.
???
The standard: I am not responsible for anything that happens to you, your phone or anything else.
Also I didn't invent any of this stuff myself. All credit goes to the original developers.
I just wrote this guide (if you can call it that)
Oh...and if you can't understand my english, well.... I'm sorry but i can't do better.
ruleh said:
First, a short story
After installing a chroot debian on my s2 I noticed that vlc player isn't working.
Sadly it took me several weeks to notice that sound in general wasn't working at all.
Problem: There was simply nowhere to output the sound.
So I tried to get alsa working from chroot to get some form of audio output.
and here it is.
ALSA ON CHROOT LINUX
The bumpy road to half broken (and therefore other half working) linux audio​
Once you have a working chroot (with correct mounts that is), download and install the following packages:
Code:
alsa-base alsa-oss alsa-utils
Now run
Code:
alsamixer
to open the alsa sound mixer.
There you should unmute
Code:
DL1 MM_EXT DL1 Mixer Multimedia DL1 PDM
Then set
Code:
HS Left
and
Code:
HS Right
to
Code:
HS DAC
This should enable headset output
ALso unmute
Code:
Earphone
to well....use the Earphone speaker.
To enable the Main speaker, unmute
Code:
DL2 Mixer Multimedia DL2 Mono
And set
Code:
HF Right
and
Code:
HF Left
to
Code:
HF DAC
For other devices, this section will be different. Just look through alsamixer and try to make sense of the countless options there.
Finished more or less.
Now you can play audio from chroot.:victory:
Notice: If you run any sound from android or plug the headset in/out, you need to reapply these settings.
To avoid that I run a script that continously re-enables the mentioned settings. (mainly the headset)
It looks something like this
Code:
#!/bin/bash
while true; do
[INDENT]
amixer -c 0 csent numid=74 1
amixer -c 0 csent numid=73 1
amixer -c 0 csent numid=35 1
amixer -c 0 csent numid=52 1
amixer -c 0 csent numid=33 1
sleep 0.5
[/INDENT]
done
This probably isn't the best way of doing it (it might actually be the worst), but it works.
It might put load on the cpu or it might not, but for me, running this decreases my SoD frequency. (idek why)
Also the best way to run the script is a few seconds after the system started using the "nohup" command. That way you can run it and close the terminal and it will still be active. To kill it, search its pid using
Code:
ps -x
and kill it with
Code:
kill (insert pid here)
If you want you can also run it as a start up script.
Though if you do that, you might see that it runs but doesn't do anything.
Don't panic. Or do if you want to.
But just restart the script anyways.
OPTIONAL: (because I force you to use the stuff above)
We can play no more than ONE audio source at a time
Soloution: PulseAudio
Or so I thought... I can't seem to get it working. If someone can, please tell me how to.
So instead we have
Solution 2: Dmixer
Dmixer is what it name sounds like. It downmixes multiple sources into a single audio stream.
And it works (sometimes).
So here is how to.
Simply copy the content of the file below into a new file called .asoundrc in /home/username
Code:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
This one is mainly pulled directly from the alsa project site and should work most of the time.
hw:0,0 might need changing on different devices. Same with card 0.
run
Code:
aplay -l
and use that to find the correct card and device.
???
The standard: I am not responsible for anything that happens to you, your phone or anything else.
Also I didn't invent any of this stuff myself. All credit goes to the original developers.
I just wrote this guide (if you can call it that)
Oh...and if you can't understand my english, well.... I'm sorry but i can't do better.
Click to expand...
Click to collapse
To use Pulseaudio, I found someone who used the Simple Protocol module to get sound and I'm now able to use MPD + MPDroid to play music from my Arch Linux chroot. Unfortunately, the playback get choppy when I open a on a single core phone with less that 1GB of RAM so if you have a better device, I'm sure the playback will be way better!
The phone I'm using is a Samsung Galaxy Ace II X (GT-S7560M) with LinuxDeploy (and CM11)
http://kaytat.com/blog/?page_id=301
TheST4RL said:
To use Pulseaudio, I found someone you used the Simple Protocol module to get sound and I'm now able to use MPD + MPDroid to play music from my Arch Linux chroot. Unfortunately, the playback get choppy when I open a on a single core phone with less that 1GB of RAM so if you have a better device, I'm sure the playback will be way better!
The phone I'm using is a Samsung Galaxy Ace II X (GT-S7560M) with LinuxDeploy (and CM11)
http://kaytat.com/blog/?page_id=301
Click to expand...
Click to collapse
I wish you would have told me this yesterday.
I spend all of yesterday doing the simple protocol player method. (It works on a quadcore 4gb phone.)
However I still prefer the alsa method on low performance phones because it has nearly no latency and is very smooth.
I will try the MPD method and see how it goes.
ruleh said:
I wish you would have told me this yesterday.
I spend all of yesterday doing the simple protocol player method. (It works on a quadcore 4gb phone.)
However I still prefer the alsa method on low performance phones because it has nearly no latency and is very smooth.
I will try the MPD method and see how it goes.
Click to expand...
Click to collapse
I tried ALSA today and it's working but the playback is super choppy and when I listen to music the audio is slower when compared to the real one. Pulseaudio may have some latency but if you're listening to music, it doesn't really matters.

Need help --> Squelch function

I found this post here: http://forum.xda-developers.com/showpost.php?p=34644359&postcount=4899
- Squelch function, mostly intended for listening to sporadic emergency service broadcasts (Japan band in Germany), but may also be useful for anyone who wants audio muted when RSSI is low.
Set Menu-> Settings-> Alternate Frequency/Squelch-> AF Mode to "Squelch". Ensure Alt Freq = 0 and set AF RSSI Threshold to desired RSSI value. Default 16 seems OK on most FM chips.
Now, the RSSI will be checked every 0.5 seconds by default. Set AF Period to desired period in milliseconds to set. If RSSI is low, audio is muted, if high, un-muted.
Click to expand...
Click to collapse
I can't find that options in my Spirit2 App. Is there a way to get this working on Spirit2 or is this just a feature of Spirit1?
kl2e said:
I found this post here: http://forum.xda-developers.com/showpost.php?p=34644359&postcount=4899
I can't find that options in my Spirit2 App. Is there a way to get this working on Spirit2 or is this just a feature of Spirit1?
Click to expand...
Click to collapse
No, it's just a Spirit1 feature.
Spirit1 pretty much has all features of Spirit2, except the new UI, BTW.
mikereidis said:
No, it's just a Spirit1 feature.
Spirit1 pretty much has all features of Spirit2, except the new UI, BTW.
Click to expand...
Click to collapse
Is Spirit1 running on a LG G3 D855 with CM 12 ?!?
kl2e said:
Is Spirit1 running on a LG G3 D855 with CM 12 ?!?
Click to expand...
Click to collapse
I'm getting this Error on Spirit UL:
Error: NO FM accessible
SU: 2 Fm: ?? Su:1 Bt:0 Ht:0
Click to expand...
Click to collapse
Which Audio Method or FM-Chip do I have to configure to get this working... ???
kl2e said:
I'm getting this Error on Spirit UL:
Which Audio Method or FM-Chip do I have to configure to get this working... ???
Click to expand...
Click to collapse
I sent you a beta of Spirit1 that is needed for Lollipop Android 5+, and instructions to enable Squelch. But it may not work on all ROMs, and on some, SELinux may need to be disabled.
LG G3 is Qualcomm I think, But I've had little feedback about it.
Default audio is "Non-Digital" (actually, it is, but can't use EQ/BT etc.) If you want full digital audio like on Spirit2, set Audio-> Method to Digital Auto or Digital QCom near end of list.
Default settings are usually fine, but FM Chip is called "QC V4L (HTC)" on Spirit1.

[PSA] You can output Hi-Res audio via internal DAC

I've found recently that in last alphas of Poweramp player you can output hi-res audio (up to 24bit/192khz supported by our chip ) directly via Snapdragon's DAC (to heaphones ). And it works! BUT!
It only works with stock Roms apparently, I've checked few Nougats, Sultan's cm13 and only stock cm13 worked....
If someone knows of any other Rom which works with this please let me know!
{
"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"
}
Most of my audio is high def, plus I have pair of so called "hi-res" heaphones , one of them are cheapo Xiaomi Hybrids Pro, and this stack really does make difference. I've left Viper and Co. for good when it comes to my music.
Small update, it works wih CM13 from jgcap So that's what I'm staying on for the time being
You have hi-res headphones...
Would you consider the Sony MDR-1000X NC Headphones as "hi-res" headphones?
I have those, would I notice a difference?
It's a known Poweramp bug that should be fixed in Poweramp's next update. Currently it doesn't support hires audio on any Nougat device.
To force it to use high res on nougat, install arise, then go to /etc/init.d/ and rename arisesound_disabled_setprop to arisesound_setprop. Install version 704 alpha of Poweramp (if you haven't already), and reboot. It should now work. If that doesn't work, make sure your rom supports init.d.
r0tati0n said:
You have hi-res headphones...
Would you consider the Sony MDR-1000X NC Headphones as "hi-res" headphones?
I have those, would I notice a difference?
Click to expand...
Click to collapse
They are indeed Hi-Res certified, and have specs to follow. With decent quality recordings you might, it depends on how good is your hearing too
f41lbl0g said:
To force it to use high res on nougat, install arise, then go to /etc/init.d/ and rename arisesound_disabled_setprop to arisesound_setprop. Install version 704 alpha of Poweramp (if you haven't already), and reboot. It should now work. If that doesn't work, make sure your rom supports init.d.
Click to expand...
Click to collapse
I'm systemless ( for Android Pay ) is there systemless Arise?
Edit. Seems that, there is. Now gotta figure whatt is it about and how to install, never used it before.
Edit2. Done [just core], it sorta works now? Outputs hires to Lenovo Hi-Fi which is what you meant I guess? Won't give me peace of mind though as it outputs only in 16 bit (coverting my 24 bit audio midway).
Edit3. Sound seems actually better with that solution, it's especially noticeable with bass , it seems to truly output to DAC, latencies are even shorter than with poweramp's qualcom mode, and it seems to enable FLT_EXTENDED_DYN_RANGE in DAC, which I'm all about obviously, and that's what would result in improved bass
( I can set my bass to brain drilling now and it stays stable/without any distortions, just ...wow )
Update, probably final. Although the ARISE trick allows for forcing Hi-res option, and output, from poweramp. (resulting in pleasant sound) it doesn't use DAC directly and goes through software chain resulting in 16/48 audio in the end.
It's easy to check through adb with "adb shell dumpsys media.audio_flinger"
Native DAC output on jgcap's CM
Code:
Output thread 0xac4fe000 type 4 (OFFLOAD):
Thread name: AudioOut_17
I/O handle: 23
TID: 6203
Standby: no
Sample rate: 96000 Hz
HAL frame count: 30720
HAL format: 0x1a000004 (pcm-24bit-offload)
HAL buffer size: 30720 bytes
Channel count: 2
Channel mask: 0x00000003 (front-left, front-right)
Format: 0x1a000004 (pcm-24bit-offload)
Frame size: 1 bytes
Pending config events: none
Output device: 0x8 (WIRED_HEADPHONE)
Input device: 0 (NONE)
Audio source: 0 (default)
Normal frame count: 30720
Last write occurred (msecs): 3
Total writes: 196
Delayed writes: 0
Blocked in write: yes
Suspend count: 0
Sink buffer : 0xae0bd000
Mixer buffer: 0xae203000
Effect buffer: 0xae083000
Fast track availMask=0xfe
Standby delay ns=1000000000
AudioStreamOut: 0xae122540 flags 0x31 (DIRECT|COMPRESS_OFFLOAD|NON_BLOCKING)
Stream volumes in dB: 0:-10, 1:-27, 2:-20, 3:-17, 4:-13, 5:-20, 6:0, 7:-27, 8:-21, 9:-96, 10:-17, 11:0, 12:0
Normal mixer raw underrun counters: partial=0 empty=0
1 Tracks of which 1 are active
Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
none yes 6160 6 1A000004 00000003 22 61440 A 3 96000 0 0 005BA520 0xae0bd000 0x0 0x000 45792
0 Effect Chains
And on Nougat with ARISE
Code:
Output thread 0xb6179000 type 0 (MIXER):
Thread name: AudioOut_15
I/O handle: 21
TID: 671
Standby: no
Sample rate: 48000 Hz
HAL frame count: 1920
HAL format: 0x1 (pcm16)
HAL buffer size: 7680 bytes
Channel count: 2
Channel mask: 0x00000003 (front-left, front-right)
Processing format: 0x1 (pcm16)
Processing frame size: 4 bytes
Pending config events: none
Output device: 0x8 (WIRED_HEADPHONE)
Input device: 0 (NONE)
Audio source: 0 (default)
Normal frame count: 1920
Last write occurred (msecs): 16
Total writes: 30172
Delayed writes: 0
Blocked in write: yes
Suspend count: 0
Sink buffer : 0xb617b000
Mixer buffer: 0xb5311000
Effect buffer: 0xb617d000
Fast track availMask=0xfe
Standby delay ns=3000000000
AudioStreamOut: 0xb6149348 flags 0x8 (DEEP_BUFFER)
Frames written: 57930240
Suspended frames: 0
Hal stream dump:
Thread throttle time (msecs): 1228
AudioMixer tracks: 0x00000003
Master mono: off
FastMixer not initialized
Stream volumes in dB: 0:-10, 1:-31, 2:-35, 3:-28, 4:-28, 5:-35, 6:0, 7:-31, 8:-25, 9:-96, 10:-28, 11:0, 12:0
Normal mixer raw underrun counters: partial=0 empty=0
2 Tracks of which 1 are active
Name Active Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt
1 yes 29842 3 00000005 00000003 497 7688 A 3 96000 0 0 010FE000 0xb617b000 0x0 0x001 3844
0 no 29842 3 00000001 00000003 497 7688 I 0 96000 0 0 00000000 0xb617b000 0x0 0x000 0
0 Effect Chains
In the result I'll stay with the CM13 till next poweramp update. With direct DAC output battery lasts forever, and sound quality is impossible to beat with any current software tricks.
Better bass was only due to limiter in the chain, turning it on in poweramp results in same bass improvemnt.
WilderSu said:
I've found recently that in last alphas of Poweramp player you can output hi-res audio (up to 24bit/192khz supported by our chip ) directly via Snapdragon's DAC (to heaphones ). And it works! BUT!
It only works with stock Roms apparently, I've checked few Nougats, Sultan's cm13 and only stock cm13 worked....
If someone knows of any other Rom which works with this please let me know!
Most of my audio is high def, plus I have pair of so called "hi-res" heaphones , one of them are cheapo Xiaomi Hybrids Pro, and this stack really does make difference. I've left Viper and Co. for good when it comes to my music.
Click to expand...
Click to collapse
Hi Wilder,
Can you please tell me, in the latest build (Build 798, which JUST came out I'm told), is there an option to BYPASS Snapdragon/Android audio processing if there is a separate (and superior) DAC detected (either internal or external via cable or BT)?? USB Audio Player Pro has this feature, and I'm wondering if Poweramp does as well.
This option you're speaking of appears to only be for the Snapdragon DACs.
Thank you!!
RockStar2005 said:
Hi Wilder,
Can you please tell me, in the latest build (Build 798, which JUST came out I'm told), is there an option to BYPASS Snapdragon/Android audio processing if there is a separate (and superior) DAC detected (either internal or external via cable or BT)?? USB Audio Player Pro has this feature, and I'm wondering if Poweramp does as well.
This option you're speaking of appears to only be for the Snapdragon DACs.
Thank you!!
Click to expand...
Click to collapse
Just tested it, I'm on Lineage 15.1 and not only it doesn't offer DAC but under LOS it doesn't ever offer the new Hi-Res OpenSL option. So it's a massive regression. I'm not going to test it on old CM stock, it's just not worth it. If I remember correctly latets DU offered HI-Res OpenSL [no dac though] .
Dissapointing.
WilderSu said:
Just tested it, I'm on Lineage 15.1 and not only it doesn't offer DAC but under LOS it doesn't ever offer the new Hi-Res OpenSL option. So it's a massive regression. I'm not going to test it on old CM stock, it's just not worth it. If I remember correctly latets DU offered HI-Res OpenSL [no dac though] .
Dissapointing.
Click to expand...
Click to collapse
Hey Wilder,
Thanks for starting this thread.
Which version are you testing though? The official V2 of Poweramp does NOT have any of the features I mentioned, but the last V3 "Beta/Preview" version does.
They just THIS MORNING released the Beta Build 799 version, which eliminated ALL the bugs found on previous versions from what I understood. I feel V3 is coming VERY VERY soon based on these recent updates which have come faster than usual. (V2 came out April 2013 FYI lol). I would recommend going to Play Store, signing up for Beta on the Poweramp trial page in Play Store, and then when the update appears update it, and enjoy.
IF you do this, please try both the OpenSL ES Output and HI-Res Output options and see if you can determine which one actually DOES the bypassing in question (if either do). I think we both would like to know. lol
If not, that's fine too.
Also, this article (below) from 2 months ago that I found earlier today claims ALL the apps listed in it offer bypassing of Android audio, at least that's how I'm interpreting. It mentions an earlier build of the V3 Beta Poweramp, so the 799 will definitely be a stable version of it to try out. Check it out and let me know what you think too.
https://www.google.com/search?q=The...=chrome..69i57j69i65&sourceid=chrome&ie=UTF-8 (CHOOSE THE FIRST ONE TO SEE ARTICLE!)
Thanks either way!!
RockStar2005 said:
Hey Wilder,
Thanks for starting this thread.
Which version are you testing though? The official V2 of Poweramp does NOT have any of the features I mentioned, but the last V3 "Beta/Preview" version does.
They just THIS MORNING released the Beta Build 799 version, which eliminated ALL the bugs found on previous versions from what I understood. I feel V3 is coming VERY VERY soon based on these recent updates which have come faster than usual. (V2 came out April 2013 FYI lol). I would recommend going to Play Store, signing up for Beta on the Poweramp trial page in Play Store, and then when the update appears update it, and enjoy.
IF you do this, please try both the OpenSL ES Output and HI-Res Output options and see if you can determine which one actually DOES the bypassing in question (if either do). I think we both would like to know. lol
If not, that's fine too.
Also, this article (below) from 2 months ago that I found earlier today claims ALL the apps listed in it offer bypassing of Android audio, at least that's how I'm interpreting. It mentions an earlier build of the V3 Beta Poweramp, so the 799 will definitely be a stable version of it to try out. Check it out and let me know what you think too.
https://www.google.com/search?q=The...=chrome..69i57j69i65&sourceid=chrome&ie=UTF-8 (CHOOSE THE FIRST ONE TO SEE ARTICLE!)
Thanks either way!!
Click to expand...
Click to collapse
I'm on latest v3 and it doesn't work, checked 12.5 DU and RR 6 ROMs and it doesn't work there either, seems the dev just checks it against latest official stock which was 5.1.1 CM which sucks majorly.
WilderSu said:
I'm on latest v3 and it doesn't work, checked 12.5 DU and RR 6 ROMs and it doesn't work there either, seems the dev just checks it against latest official stock which was 5.1.1 CM which sucks majorly.
Click to expand...
Click to collapse
Ok I didn't understand like 90% of that. LOL But thanks anyway.
So you think it'll work on the official V3 then??
Uggh this means if I notice a difference (with bypass on vs. off) I'd have to use UAPP. But I like Poweramp more, damm*t!!!!!! LOL
RockStar2005 said:
Ok I didn't understand like 90% of that. LOL But thanks anyway.
So you think it'll work on the official V3 then??
Uggh this means if I notice a difference (with bypass on vs. off) I'd have to use UAPP. But I like Poweramp more, damm*t!!!!!! LOL
Click to expand...
Click to collapse
Don't think it will, unless enough users will spam their forum about this phone. It's just too old, no one cares anymore.
WilderSu said:
Don't think it will, unless enough users will spam their forum about this phone. It's just too old, no one cares anymore.
Click to expand...
Click to collapse
Hmm ok.
What about that article? It claims it can do it though?
Wasn't there a DAC enabler for Snapdragon Chipsets in Magisk Manager?
There is aptX HD available through Bluetooth on Oreo ROMS and newer.
I don't know if it works on Nougat or below though as I'm not an audiophile.
Deleted

Categories

Resources