So I use headphones a lot and I've gotten really sick of the way skyrocket handles the ringer while I've got headphones plugged in. In silent mode, nothing is played at all, and in ringer mode, the ringtone plays from the internal speaker instead of the headphones.
So I wrote up a simple Tasker script that forces the phone to play ringtone/notification sound from headphones if they're plugged in, and the speaker if headphones are not plugged in. This also pauses the music that's currently playing by spoofing a headset-pause button press.
Notes: %SANE is whatever you decide is a good volume for ringtone playing through headphones, don't want anyone to go deaf. Mine is usually set to 4.
Set the system ringtone/notification to 'silent' or 'none', and put your desired sounds into the ringtones folder (Ringtone.mp3 and Notification.mp3 or w/e). Tasker catches the phone call, and plays them like media files, forcing them to go through headphones if available.
Keeps track if headphones plugged in/out
Code:
Profile: Headphones In (3)
State: Headset Plugged [ Type:Any ]
Enter: Publish HP (4)
A1: Variable Set [Name:%HEADPHONES To:True Do Maths:Off Append:Off]
A2: Variable Set [Name:%VOLRSAVE To:%VOLR Do Maths:Off Append:Off]
A3: Ringer Volume [Level:0 Display:Off Sound:Off]
A4: Silent Mode [Mode:Vibrate]
A5: Profile Status [Name:Catch VolM 0 Set:On]
A6: Profile Status [Name:Catch VolR 0 Set:On]
Exit: Unpublish HP (6)
A1: Variable Set [Name:%HEADPHONES To:False Do Maths:Off Append:Off]
A2: Ringer Volume [Level:%VOLRSAVE Display:Off Sound:Off]
A3: Profile Status [Name:Catch VolM 0 Set:Off]
A4: Profile Status [Name:Catch VolR 0 Set:Off]
Catches phone call
Code:
Profile: Incoming Phone Call (14)
State: Incoming Call [ Caller:* ]
Enter: Ring (15)
A1: Variable Set [Name:%VOLMSAVE To:%VOLM Do Maths:Off Append:Off]
A2: Media Control [Cmd:Pause Simulate Media Button:On]
A3: Media Volume [Level:%SANE Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ True ]
A4: Media Volume [Level:%VOLR Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ False ]
A5: Music Play [File:Ringtones/Ringtone.m4a Start:30 Loop:Off]
Exit: Kill Ringer (17)
A1: Music Stop [Clear Dir:Off]
A2: Media Volume [Level:%VOLMSAVE Display:Off Sound:Off]
A3: Media Control [Cmd:Toggle Pause Simulate Media Button:On] Media Control [ %HEADPHONES ~ True ]
Catches SMS
Code:
Profile: SMS (19)
Event: Received Text [ Type:Any Sender:* Content:* ]
Enter: Beep (20)
A1: Variable Set [Name:%VOLMSAVE To:%VOLM Do Maths:Off Append:Off]
A2: Media Control [Cmd:Pause Simulate Media Button:On]
A3: Media Volume [Level:%SANE Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ True ]
A4: Media Volume [Level:%VOLR Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ False ]
A5: Music Play [File:Ringtones/Notification.mp3 Start:0 Loop:Off]
A6: Wait [MS:0 Seconds:3 Minutes:0 Hours:0 Days:0]
A7: Music Stop [Clear Dir:Off]
A8: Media Volume [Level:%VOLMSAVE Display:Off Sound:Off]
A9: Media Control [Cmd:Toggle Pause Simulate Media Button:On] Media Control [ %HEADPHONES ~ True ]
Works well on my phone. Automatically resumes music after ringer/sms if headphones are plugged in.
Comments, questions, suggestions welcome! Lemme know if this works on your phones.
Last thing that really pissed me off after switching from iPhone to Android and losing my Activator shortcuts, being able to pause/switch songs while screen is off.
Basically, while headphones are plugged in, turn volume all the way down to pause/unpause, or turn it all the way down and then back up to skip to the next song! Requires the headphone profile from above post.
Code: When music is not playing, turn ringer volume all the way down until phone vibrates, and music will start playing. Immediately after vibration, increase the volume and then music will play the NEXT track instead of just resuming.
Code:
Profile: Catch VolR 0 (23)
Priority: 5 CoolDown: 3
Event: Variable Set [ Variable:%VOLR Value:* ]
Enter: Unpause, Maybe Skip (24)
A1: Media Control [Cmd:Toggle Pause Simulate Media Button:On]
A2: Wait [MS:0 Seconds:1 Minutes:0 Hours:0 Days:0]
A3: Variable Set [Name:%SKIP To:M Do Maths:Off Append:Off] Variable Set [ %VOLR > 0 ]
A4: Vibrate [Time:200] Vibrate [ %SKIP Is Set ]
A5: Media Control [Cmd:Next Simulate Media Button:On] Media Control [ %SKIP Is Set ]
A6: Variable Clear [Name:%SKIP Pattern Matching:Off]
A7: Media Volume [Level:%SANE Display:Off Sound:Off]
A8: Ringer Volume [Level:0 Display:Off Sound:Off]
A9: Wait [MS:0 Seconds:3 Minutes:0 Hours:0 Days:0]
A10: Variable Set [Name:%SANE To:%VOLM Do Maths:Off Append:Off]
A11: Flash [Text:Default Volume: %SANE Long:Off]
Code: When music is playing, turn the media volume all the way down until phone vibrates, and music will pause. Immediately after vibration, increase the volume and then music will play the NEXT track instead of just pausing.
Code:
Profile: Catch VolM 0 (25)
Event: Variable Set [ Variable:%VOLM Value:0 ]
Enter: Pause Or Skip (26)
A1: Vibrate [Time:200]
A2: Wait [MS:0 Seconds:1 Minutes:0 Hours:0 Days:0]
A3: Variable Set [Name:%SKIP To:T Do Maths:Off Append:Off] Variable Set [ %VOLM > 0 ]
A4: Media Control [Cmd:Toggle Pause Simulate Media Button:On] Media Control [ %SKIP ! Set ]
A5: Media Control [Cmd:Next Simulate Media Button:On] Media Control [ %SKIP Is Set ]
A6: Media Volume [Level:%SANE Display:Off Sound:Off] Media Volume [ %SKIP Is Set ]
A7: Variable Clear [Name:%SKIP Pattern Matching:Off]
Can u let me know how do i use this script..iam clue less!..your help is appreciated.
thx
ajith
agentx3r said:
So I use headphones a lot and I've gotten really sick of the way skyrocket handles the ringer while I've got headphones plugged in. In silent mode, nothing is played at all, and in ringer mode, the ringtone plays from the internal speaker instead of the headphones.
So I wrote up a simple Tasker script that forces the phone to play ringtone/notification sound from headphones if they're plugged in, and the speaker if headphones are not plugged in. This also pauses the music that's currently playing by spoofing a headset-pause button press.
Notes: %SANE is whatever you decide is a good volume for ringtone playing through headphones, don't want anyone to go deaf. Mine is usually set to 4.
Set the system ringtone/notification to 'silent' or 'none', and put your desired sounds into the ringtones folder (Ringtone.mp3 and Notification.mp3 or w/e). Tasker catches the phone call, and plays them like media files, forcing them to go through headphones if available.
Keeps track if headphones plugged in/out
Code:
Profile: Headphones In (3)
State: Headset Plugged [ Type:Any ]
Enter: Publish HP (4)
A1: Variable Set [Name:%HEADPHONES To:True Do Maths:Off Append:Off]
A2: Variable Set [Name:%VOLRSAVE To:%VOLR Do Maths:Off Append:Off]
A3: Ringer Volume [Level:0 Display:Off Sound:Off]
A4: Silent Mode [Mode:Vibrate]
A5: Profile Status [Name:Catch VolM 0 Set:On]
A6: Profile Status [Name:Catch VolR 0 Set:On]
Exit: Unpublish HP (6)
A1: Variable Set [Name:%HEADPHONES To:False Do Maths:Off Append:Off]
A2: Ringer Volume [Level:%VOLRSAVE Display:Off Sound:Off]
A3: Profile Status [Name:Catch VolM 0 Set:Off]
A4: Profile Status [Name:Catch VolR 0 Set:Off]
Catches phone call
Code:
Profile: Incoming Phone Call (14)
State: Incoming Call [ Caller:* ]
Enter: Ring (15)
A1: Variable Set [Name:%VOLMSAVE To:%VOLM Do Maths:Off Append:Off]
A2: Media Control [Cmd:Pause Simulate Media Button:On]
A3: Media Volume [Level:%SANE Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ True ]
A4: Media Volume [Level:%VOLR Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ False ]
A5: Music Play [File:Ringtones/Ringtone.m4a Start:30 Loop:Off]
Exit: Kill Ringer (17)
A1: Music Stop [Clear Dir:Off]
A2: Media Volume [Level:%VOLMSAVE Display:Off Sound:Off]
A3: Media Control [Cmd:Toggle Pause Simulate Media Button:On] Media Control [ %HEADPHONES ~ True ]
Catches SMS
Code:
Profile: SMS (19)
Event: Received Text [ Type:Any Sender:* Content:* ]
Enter: Beep (20)
A1: Variable Set [Name:%VOLMSAVE To:%VOLM Do Maths:Off Append:Off]
A2: Media Control [Cmd:Pause Simulate Media Button:On]
A3: Media Volume [Level:%SANE Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ True ]
A4: Media Volume [Level:%VOLR Display:Off Sound:Off] Media Volume [ %HEADPHONES ~ False ]
A5: Music Play [File:Ringtones/Notification.mp3 Start:0 Loop:Off]
A6: Wait [MS:0 Seconds:3 Minutes:0 Hours:0 Days:0]
A7: Music Stop [Clear Dir:Off]
A8: Media Volume [Level:%VOLMSAVE Display:Off Sound:Off]
A9: Media Control [Cmd:Toggle Pause Simulate Media Button:On] Media Control [ %HEADPHONES ~ True ]
Works well on my phone. Automatically resumes music after ringer/sms if headphones are plugged in.
Comments, questions, suggestions welcome! Lemme know if this works on your phones.
Click to expand...
Click to collapse
small step
Thanks for posting this! I just installed tasker and wrote up your code, so I haven't had a chance to test it out yet.
For anyone else who's installing this app an immediately trying to add these profiles, you'll need to get out of "beginner mode" first. On the application's home-screen, go to menu > preferences and uncheck "Beginner Mode".
This may be a simple thing, but it initially caused me some confusion.
More help please... how do you use Tasker to enter these codes?
Try putting this in your /sdcard/ directory and then data-->restore in tasker.
I tried both putting the code in myself and doing the backup and can't get it to work. Any help?
HELP!!
agentx3r said:
so i use headphones a lot and i've gotten really sick of the way skyrocket handles the ringer while i've got headphones plugged in. In silent mode, nothing is played at all, and in ringer mode, the ringtone plays from the internal speaker instead of the headphones.
So i wrote up a simple tasker script that forces the phone to play ringtone/notification sound from headphones if they're plugged in, and the speaker if headphones are not plugged in. This also pauses the music that's currently playing by spoofing a headset-pause button press.
Notes: %sane is whatever you decide is a good volume for ringtone playing through headphones, don't want anyone to go deaf. Mine is usually set to 4.
Set the system ringtone/notification to 'silent' or 'none', and put your desired sounds into the ringtones folder (ringtone.mp3 and notification.mp3 or w/e). Tasker catches the phone call, and plays them like media files, forcing them to go through headphones if available.
Keeps track if headphones plugged in/out
Code:
profile: Headphones in (3)
state: Headset plugged [ type:any ]
enter: Publish hp (4)
a1: Variable set [name:%headphones to:true do maths:eek:ff append:eek:ff]
a2: Variable set [name:%volrsave to:%volr do maths:eek:ff append:eek:ff]
a3: Ringer volume [level:0 display:eek:ff sound:eek:ff]
a4: Silent mode [mode:vibrate]
a5: Profile status [name:catch volm 0 set:eek:n]
a6: Profile status [name:catch volr 0 set:eek:n]
exit: Unpublish hp (6)
a1: Variable set [name:%headphones to:false do maths:eek:ff append:eek:ff]
a2: Ringer volume [level:%volrsave display:eek:ff sound:eek:ff]
a3: Profile status [name:catch volm 0 set:eek:ff]
a4: Profile status [name:catch volr 0 set:eek:ff]
catches phone call
Code:
profile: Incoming phone call (14)
state: Incoming call [ caller:* ]
enter: Ring (15)
a1: Variable set [name:%volmsave to:%volm do maths:eek:ff append:eek:ff]
a2: Media control [cmd:pause simulate media button:eek:n]
a3: Media volume [level:%sane display:eek:ff sound:eek:ff] media volume [ %headphones ~ true ]
a4: Media volume [level:%volr display:eek:ff sound:eek:ff] media volume [ %headphones ~ false ]
a5: Music play [file:ringtones/ringtone.m4a start:30 loop:eek:ff]
exit: Kill ringer (17)
a1: Music stop [clear dir:eek:ff]
a2: Media volume [level:%volmsave display:eek:ff sound:eek:ff]
a3: Media control [cmd:toggle pause simulate media button:eek:n] media control [ %headphones ~ true ]
catches sms
Code:
profile: Sms (19)
event: Received text [ type:any sender:* content:* ]
enter: Beep (20)
a1: Variable set [name:%volmsave to:%volm do maths:eek:ff append:eek:ff]
a2: Media control [cmd:pause simulate media button:eek:n]
a3: Media volume [level:%sane display:eek:ff sound:eek:ff] media volume [ %headphones ~ true ]
a4: Media volume [level:%volr display:eek:ff sound:eek:ff] media volume [ %headphones ~ false ]
a5: Music play [file:ringtones/notification.mp3 start:0 loop:eek:ff]
a6: Wait [ms:0 seconds:3 minutes:0 hours:0 days:0]
a7: Music stop [clear dir:eek:ff]
a8: Media volume [level:%volmsave display:eek:ff sound:eek:ff]
a9: Media control [cmd:toggle pause simulate media button:eek:n] media control [ %headphones ~ true ]
works well on my phone. Automatically resumes music after ringer/sms if headphones are plugged in.
Comments, questions, suggestions welcome! Lemme know if this works on your phones.
Click to expand...
Click to collapse
please help, i have locked bootloader, a wt19a with xg! 2.3.7 rooted
how can i use that, anyone can explain me please!!!!
Can someone make an easier way to use this mod for those of us who have no idea how to use this?
Sent from my SGH-I727 using xda app-developers app
spitfire2425 said:
Can someone make an easier way to use this mod for those of us who have no idea how to use this?
Sent from my SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
Try downloading Tasker and working off what I laid out, would be the quickest way.
I don't know what rom you're running but this new Rogers rom plays ringtone in both speaker and headphones simultaneously.
lingowistico said:
I don't know what rom you're running but this new Rogers rom plays ringtone in both speaker and headphones simultaneously.
Click to expand...
Click to collapse
Cool. I haven't used this in a while, not since I switched to CM10.
agentx3r said:
Try downloading Tasker and working off what I laid out, would be the quickest way.
Click to expand...
Click to collapse
dont works. the terminal still ringing in loud speaker
agentx3r said:
Cool. I haven't used this in a while, not since I switched to CM10.
Click to expand...
Click to collapse
Oh yeah that has always annoyed the sh1t out of me with CM
It may be a bit late but could you export and upload the task and/or profiles for this tasker script? I tried implementing it myself but couldnt do it and I'm desperete to solve this problem once and for all. Thanks in advance.
For your headphone issue, you could try using Headset Button Controller from the play store. It enables you to use single/multiple/long presses to do different things. Works very well.
workaround for Bluetooth please
I'm using jabra wave Bluetooth headset,n it doesn't play phone ringtone, but a very low beep on every cal, can someone come up with a workaround,I don't even know if it's possible
sanghaviraj said:
I'm using jabra wave Bluetooth headset,n it doesn't play phone ringtone, but a very low beep on every cal, can someone come up with a workaround,I don't even know if it's possible
Click to expand...
Click to collapse
I haven't done much work with Tasker and bluetooth, but can you do a "notify sound" action when BT is connected? I don't know if it will route the "notify sound" to BT or play from the phone though. Or change the volume of your BT to max while ringing and low or something tolerable while on the call.
you know how can get in my earphones the caller name and in the same time, in speaker phone the ring ?
i can hear the caller name in my earphones only when my phone is in vibrate mode.
but i need to get caller name in earphones and ring in speaker phone.
no one?
Related
can someone explain to me exactly. have I flashed kernel but here I can not get further
Please note that listening to too high volume music over 1 hour can damage your ears.
Or makes your speaker/headset overload.
( 5.0+) Sound control has been enhanced.
( 5.1+) Sound control behaviours have been optimized.
Switch to sound control folder first:
cd /sys/mo*/snd_soc*/p*
* Use RootExplorer to view this folder,you will see a lot files.
Sound hacks wont take effects immediately.It depends on powering on/off ab8500 asoc.
Stop music for 5s to let ab8500 asoc shut down fully,then turn on music.
You need to enable XXXXX_con first,then tweak the XXXXX_bit.
After enabling XXXXX_con,it will be applied when codec powers on or it wont.
How do i check whether it has shuted down or not?
dmesg | grep codec
If you get "Disable ab850x",it has been powered off.
I will explain how to calculate the binay values below.
If we echo 0000 to something,system will consider it as 0.
But that doesnt matter.
'(default)' means that is my default setting in sound control.
[AnaGain3] (Headset audio path):
Ana stands for 'analong'.This is analong gain.
To enable control:
Quote:
echo 1 > anagain3_con
To tweak volume: [volume 0(default, +31dB) > 34 > 68(stock) > 85 > 87]
Quote:
echo 0 > anagain3_bit
* Most values(except 0,34,68,85) will make the volume lost balance.
* If you hear too much noise with 0,34 is recommended.
* It is nice to use 0 with large speakers(audio output)
[HsXDigGain] (Headset Digital Gain)
HsL means left channel.HsR is the right.
To enable control:
Quote:
echo 1 > hsldiggain_con
echo 1 > hsrdiggain_con
To tweak:
* 0000: +8 dB gain (default)
* 0001: +7 dB gain
* ....: -1 dB step
* 0111: +1 dB gain
* 1000: 0 dB gain
* 1001 to 1111: -inf dB gain (mute)
Quote:
echo 0000 > hsldiggain_bit
echo 0000 > hsrdiggain_bit
* If you use +31 dB AnaGain3 + +8 dB DigGain,the result will higher than +39dB!
* Be careful,when the volume is too high,codec will power off automatically.
* Experience the differences between digital gain and analong gain by yourself.
[HsLowPow] (Headset low power mode)
This lowpow mode is enabled by driver normally.
If you want high performance audio instead of LPA(low power audio),
You can disable it.
To enable control:
Quote:
echo 1 > hslowpow_con
To tweak:
* 0: Normal Operation (default)
* 1: Hs drivers in Low Power
Quote:
echo 0 > hslowpow_bit
[HsDacLowPow] (Headset DAC low power mode)
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by driver normally.
To enable control:
Quote:
echo 1 > hsdaclowpow_con
To tweak:
* 00: Normal Operation (default)
* 01: Hs DAC drivers in Low Power
* 10: Hs DAC in Low Power
* 11: Hs DAC and Hs DAC drivers in Low Power
Quote:
echo 00 > hsdaclowpow_bit
[HsHP] (Headset high pass filter)
This high pass filter is disabled by driver normally.
Enable this can reduce some sub-nosie of audio.
To enable control:
Quote:
echo 1 > hshp_con
To tweak:
* 0: Headset high pass filter disabled
* 1: Headset high pass filter enabled (offset cancellation enabled) (defualt)
Quote:
echo 1 > hshp_bit
[ClassDDithHPGain]
ClassD is a kind of amplifier.
According to the documents,our ClassDs only relate to Handsfree(speaker).
To enable control:
Quote:
echo 1 > classdhp_con
To tweak:
* Gain control for the high pass component of dithering filter
* 0000: Minimum gain
* ....:
* 1010: Maximum gain (default)
Quote:
echo 1010 > classdhp_bit
[ClassDDithWGain]
* Gain control for the white component of dithering filter
* 0000: Minimum gain
* ......:
* 1010: Maximum gain
Quote:
echo 1 > classdwg_con
echo 1010 > classdwg_con
[ClassDHiVol]
This is a gain of speaker.But +2dB only.
echo 1 > classdhivol_con
Say 1(default) to enable:
Quote:
echo 1 > classdhivolhfl_bit
echo 1 > classdhivolhfr_bit
* In fact,our speaker is right channel only!
[ADDigGain2]
This is the audio path of mic2
Quote:
echo 1 > addiggain2_con
Quote:
echo 9 > addiggain2_bit
* Default: about +20dB
* Max: Say 0 to addiggain2_bit to +31dB
[EarDigGainb]
This is the digtal gain of earpiece
Experimental still.But you can try.
Quote:
echo 1 > eardiggain_con
Quote:
echo 0 > eardiggain_bit
* The values of eardiggain_bit is the same as hsldiggain_bit
How to calculate the binary values?
We use HsXDigGain as example.
The gain step is "+1".
In binary: So the values will like these:
0+1 = 1 | 0001: +7 dB
1+1 = 10 | 0010: +6 dB
10+1 = 11 | 0011: +5 dB
11+1 = 100 | 0100: +4 dB
..... | ......
[Experts!]:
This method can work on any ab850x codec platform!
Quote:
cd /d/asoc/U*/ab*
Play music,reduce the volume.
Now we are going to edit the codec registers.
Quote:
echo REG VAL > codec_reg
E.G:
AnaGain3:
Quote:
echo 0x16 0x00 > codec_reg
HsDigGain: (left/right channel)
Quote:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg
Disable all lowpow mode:
Quote:
echo 0x04 0x00 > codec_reg
* These hacks will restore when codec power off.
Can you please highlight your Question in BOLD and use the
code for the rest of the quoted information...
and yeah, if you want to Increase your Stock Volume limit, then try the easy way, use this app instead... but it might be risky to use the mod to go beyond the limit - as it will affect your phone's speaker.. you will get hardware problems in the future...
Click to expand...
Click to collapse
When activating n7player BassBoost, it lowers the volume. Is there a fix?
Hi Folks,
The phone is rich in hardware and has great performance.
- At the top earphone is circle, if you hold the phone bit to the right or left side of the ear, you hear less sound on call.
[ certainly other phones have horizontal grill for the earphone, hence call quality is better ].
- Kitkat by default has an option to reduce the text size, why not the icon size[ too annoying ]
- SMS opens up in hangout[ users gets confused, to send an sms. ] could be made simpler by default sms app integrated with phone.
- OTG doesn't supports directly [ why not have the hardware to upgrade micro sdcard ]
- poor audio speaker [ ringer volume is very low even if set to full ]
https://play.google.com/store/apps/details?id=com.TEST.android.lvh
I found this old app still works great on my D802 QB2 with this (HEADSET) setting:
1. Audio Modifications = Enabled
2. Simple Volume Boost = Disable
3. Bass Boost = 8 (max)
4. Echo/Delay = 0
5. EQ Preset = Bass Boost (or others) just make sure to set "Volume Level" to 0
SPEAKER setting only work with this:
1 - 4 same as headset
5. EQ Preset = Flat & "Volume Level" set to 10
need to enable/disable eq preset till this work
BLUETOOTH setting: untested
Nice, but the phone already kills my ears on full volume! (Headphones)
That app was awesome back in the day. Before Viper4android
Is there a player that allows to set gap / pause length between audio tracks?
I listen to very short audio files for language learning and I want to set about 4-second gap between tracks to be able to repeat what I heard.