We have moved to a new Sailfish OS Forum. Please start new discussions there.
23

3.5mm Audio Connector not working on XA2

Tracked by Jolla (In release)

asked 2019-01-22 13:28:21 +0300

tomas3000 gravatar image

updated 2019-01-25 22:44:08 +0300

deloptes gravatar image

I am not sure if it is because of 3.0.1 or a problem of the device XA2 itself. I did not have tested it before on Android...

But when I insert now my headphones connector, they are not recognised by the phone. Not while playing music and not while calling.

Anybodz has the same problem or even a solution?

edit retag flag offensive close delete

Comments

1

Hey Same here with my Xperia X, since 2.8 update. Still not working with 3.0.1. To be able to use a headset, i bought a (very cheap) DAC and by the miracle of USB OTG, it works. Almost: it works with music, but it is not known when passing calls. And doesn't ring (ring is only on the loudspeaker).

Would love to be able to use my headset when passing calls !

Chap ( 2019-01-25 16:20:56 +0300 )edit
1

Similar problem on Sailfish X and it is reproducible. It actually started on previous Sailfish X 2 - I was thinking first the audio jack is broken. In the meanwhile I upgraded to X3 but it was still not working. Only few days ago I wanted to see something in youtube - which I usually do not use on the phone. I noticed there is no sound, which was strange. After rebooting sound was there. I checked with headphone and it worked.

Few days later I wanted to use HERE. After I finished, sound was missing again. After 2nd reboot it worked.

I will check solution by @tanakian and report/edit here if it works.

deloptes ( 2019-01-25 21:01:15 +0300 )edit

This issue persists in v 3.0.2.8 Oulanka

g ( 2019-03-20 21:47:15 +0300 )edit

I have the same problem in 3.0.2.8

xbt123ufo ( 2019-04-06 04:54:27 +0300 )edit

Same here, 3.1.0.11, on my XA2 when connecting on my car audio with jack stereo cable.

Luca ( 2019-09-16 17:13:18 +0300 )edit

6 Answers

Sort by » oldest newest most voted
8

answered 2019-01-22 13:55:32 +0300

jiit gravatar image

updated 2019-01-22 13:58:30 +0300

This is now reported, thank you. Meanwhile could you try with another wired headset as well? If the headphones are detected as lineout, we don't support it at the moment; but it's known issue and will be fixed at some point.

edit flag offensive delete publish link more

Comments

Tested my Xperia XA2 (latest update 3.0.1.11) right now together with the headphones that came with my Lumia 950. Sound is there, controls (play, pause, skipping forward and backwards) also work as expected. I just wondered that if I skip while playback is paused the phone continues playing, while on other systems playback stays paused after skipping.

Cryx ( 2019-01-22 14:17:16 +0300 )edit

I tested the same headphones with Jolla 1 (also on 3.0.1.11) and they are also not working. But they are working on an Android phone. Unfortunately I do not have other headphones here...

tomas3000 ( 2019-01-22 14:27:30 +0300 )edit

I tested with different headphones today and they worked on Jollas (XA2 and J1) as well as on Android. So it seems like there are only some special headphones which only work on Android and not on Jolla. They seem to be very basic, there is not even a company name printed on them. Only maybe relevant thing: One of the earspeakers is broken (maybe the cord to the earspeaker)?

tomas3000 ( 2019-01-23 09:14:38 +0300 )edit
1

I have the same problem with XA2. All my headphones work but line out cables to speakers/amplifiers do not. Unfortunately I did not test it with Android before flashing. Edit: Just read through the whole answer, that line out is a known problem..

speactra ( 2019-01-23 10:58:54 +0300 )edit

Could there be a link with the fact that my headset microphone is not working ? Sound, Volume and play/pause button works though. Everything worked on my Jolla 1 and Jolla tablet but not on XA2 Sailfish X (worked on Android). Thanks.

Jef ( 2019-03-27 16:36:22 +0300 )edit
0

answered 2019-01-23 13:19:50 +0300

tanakian gravatar image

there should be some way to tell sailfish to recognize it in different way, right? by writing something to /proc or /sys files?

edit flag offensive delete publish link more

Comments

There is a sense key in the female and it is working. I think the problem is within pulseaudio (PA). I heard PA got rid of many bugs in 12.2 and asked for someone to compile, but nothing happened and we got some patched version of 11.1 (AFAIR).

deloptes ( 2019-01-25 22:25:40 +0300 )edit
4

answered 2019-01-23 17:43:19 +0300

tanakian gravatar image

this solves my problem:

pacmd list-sinks

to get list of outputs

then

pacmd set-sink-port sink.primary_output output-wired_headphone

routes audio via jack, and

pacmd set-sink-port sink.primary_output output-line

also routes audio via jack, but the volume is a bit lower.

i guess this is a correct setting.

pacmd set-sink-port sink.primary_output output-speaker

routes back to speaker.

found it by following hints of someone helpful from telegram sailfish chat.

edit flag offensive delete publish link more

Comments

Thank you for your solution. But in order to be able to use it, can you explain the previous steps ? IE: Developer mode ? console ? and then the command pacmd list-sinks ?

Thank you for your help.

Chap ( 2019-01-25 16:25:38 +0300 )edit

I tried today. It told me :

No sink found by this name or index
deloptes ( 2019-01-26 23:36:58 +0300 )edit

Confirmed working on XA2 Plus under 3.0.2.8, thanks!

HansRoulade ( 2019-04-12 22:06:01 +0300 )edit
2

answered 2019-01-27 00:15:43 +0300

deloptes gravatar image

updated 2019-01-27 00:16:02 +0300

on Xperia X 3.0.1.11 following works. (saved in two files, made executable)

 pacmd set-sink-port sink.primary output-speaker

 pacmd set-sink-port sink.primary output-wired_headphone

based on @tanakian answer

edit flag offensive delete publish link more

Comments

I wish we could have a switch - the headphone option gives even better sound quality (might be because phones have high ohm/resistance) in my wifes car audio.

I saw recently there is PA manager for Qt in KDE ... can this be somehow ported?

deloptes ( 2019-01-29 10:20:49 +0300 )edit

The above suggestion by deloptes works, but on 3.0.1.14, change sink.primary to sink.primary_output as suggested previously by tanakian

TCJ ( 2019-02-12 20:53:34 +0300 )edit

Could someone make a patch for it in 3.0.1.14? (I don't know how to edit the file for instance)

nerip ( 2019-03-11 13:14:09 +0300 )edit
6

answered 2019-02-12 22:45:39 +0300

TCJ gravatar image

Hello Sailors!

I've done a little more digging and have found a more permanent solution to this headphone problem. It looks like a particular module, module-switch-on-port-available, is not loaded by the Pulse Audio (PA) server on start-up. This particular module enables the port switching ability inside the PA server when a headphone is attached or detached.

I'm using a Sony Xperia XA2 with SFOS 3.0.1.14. So far it is working with my test headset (Plantronics Blackwire 300 DA), YMMV though.

I've enabled Developer Mode on my phone. You'll need to be root to edit some of these files. Open up the Terminal application (or connect remotely) to perform the following:

Find which config file PA is reading on startup

[nemo@Sailfish ~]$ cat /etc/sysconfig/pulseaudio
CONFIG="-n --file=/etc/pulse/arm_droid_default.pa"

Switch to root, so we can edit /etc/pulse/arm_droid_default.pa (Note: Password is the one set when enabling Remote Connection in the Developer Tools menu under Settings)

[nemo@Sailfish ~]$ devel-su
Password:
[root@Sailfish nemo]#

Use your editor of choice to add the following line to the end of /etc/pulse/arm_droid_default.pa

### module to enable sensing of headphone jack
load-module module-switch-on-port-available

Now, reboot your phone

[root@Sailfish nemo]# reboot

After the phone has rebooted, open the Terminal app (or connect remotely) to check that the module has loaded properly.

[nemo@Sailfish ~]$ pactl list short modules | grep switch
25      module-switch-on-port-available
[nemo@Sailfish ~]$

The module-switch-on-port-available module has been loaded (remove the grep command to see all the loaded PA modules), hopefully allowing you to use your headset jack with minimal fuss.

Hope this helps!

TCJ

edit flag offensive delete publish link more

Comments

Tested on a mic+headphone (trrs) that sometimes was picked up and sometimes wasn't. With fix, it works everytime. Although, it does not help connecting to amp or car fm (both trs).

Sé Zuo ( 2019-02-13 18:58:08 +0300 )edit

Unfortunately, enabling module-switch-on-port-available made me unable to use the phone; the calls get connected but neither one can hear the other. I tried to reboot, same thing. Then I reverted the change and after another reboot I was able to use my XA Ultra as a phone again.

Direc ( 2019-02-20 19:02:28 +0300 )edit

After makeing the changes, I get an error, when checking for the new module:

pactl list short modules              
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

even deleting these lines again and rebooting does not help!! Bevore I changed, pactl list short modules worked?! Luckily I see no problems using the phone so far.

triessner ( 2019-03-21 11:31:32 +0300 )edit
0

answered 2019-03-24 21:01:33 +0300

Direc gravatar image

I just installed SFOS 3.0.2 EA (XA2 Ultra), and audio was routed out through 3,5mm correctly. Could anyone test and confirm this?

edit flag offensive delete publish link more

Comments

On the XA2 Ultra(h4233) player controls are not working. I do have JC-952B headphones that can be used either via bluetooth or wired. both works fine. However i noticed that player controls of wired or bluetooth headsets in general do not work on XA2 devices because mpris-proxy is missing there. I also checked with my JP1 and i don't have problems with wired or bluetooth mode either. The headset does not have wired advanced player controls. Only one button and that does work on the JP1. Also, the bluetooth player controls still work with 3.0.2.8 on my JP1 but not on the XA2 Ultra also running 3.0.2.8.

Shoppinguin ( 2019-03-24 22:39:41 +0300 )edit

Interesting! On my linux trinity desktop I implemented bluetooth applet and according bluetooth documentation, there are two ways to handle controls:

  1. org.bluez.MediaControl1 (depreciated)
  2. org.bluez.MediaPlayer1

[https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/media-api.txt]

Could be that in Sailfish we have only 2., because on Nokia N9 1. works and on Sailfish 1. does not work. Could be that your phones do not support 2.

IMO for convenience both should be supported on Sailfish, so that also clients that use the 1. interface also work.

deloptes ( 2019-04-13 10:01:35 +0300 )edit
Login/Signup to Answer

Question tools

Follow
19 followers

Stats

Asked: 2019-01-22 13:28:21 +0300

Seen: 3,678 times

Last updated: Mar 24 '19