OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
> speakers out of phase?
zevv
post Jul 19 2018, 06:16 AM
Post #16





Group: Members
Posts: 47
Joined: 3-January 18
Member No.: 815,747



QUOTE(Anonymous_ @ Jul 19 2018, 09:48 AM) *
zevv: does this mean L and R channels get separated with your fix? As before L channel has been played in both speakers as well as R channel.


No, it merely corrects the phase of the speakers.

I must admit that I was not aware that only the left channel was played. The fact that I'm able to flip the phase of one output indicates that the hardware is actually able to play stereo, so if only one channel ends up in the driver there must be a software issue somewhere down the line. I'll see if I can find some time to investigate.
Go to the top of the page
 
+Quote Post
zevv
post Jul 19 2018, 11:32 AM
Post #17





Group: Members
Posts: 47
Joined: 3-January 18
Member No.: 815,747



No, still mono. It seems that at the driver and alsa level the device is perfectly capable of playing stereo sound. Both left and right channels are mixed to mono.

In logcat there are some messages coming up when switching from headphones to speaker indicating this is a deliberate action:

07-19 20:27:16.946 482 838 D AudioFlinger_Threads: SetStereoToMonoFlag, mSteroToMono 1

This is a likely leftover from the original design the Gemini is based on which probably had a single speaker, in which case mixing to mono makes sense.

(Note the typo in there, it says 'Stero' instead of 'Stereo', likely this happens somewhere in propriatary MT code)

There is nothing I can do about this on the kernel level I'm afraid. I found some audio configuration in /system/etc/audio_policy_configuration.xml where the various audio channels are configured, but everything seems to be setup ok here. I'm not sure where to go from here, I have no experience at all going deeper into Android...
Go to the top of the page
 
+Quote Post
speculatrix
post Jul 19 2018, 12:48 PM
Post #18





Group: Admin
Posts: 3,690
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



Thanks zevv for the analysis, very useful.

I was just pondering why we get crackling on headphones but not the speakers.
Surely Planet tested the headphone jack? Did they change the analogue design very late?
I'm sure they must have contemplated stereo speakers, did they switch to mono so you can use the G either way round?

This is when having a schematic circuit diagram would really help.
Go to the top of the page
 
+Quote Post
speculatrix
post Aug 23 2018, 01:34 PM
Post #19





Group: Admin
Posts: 3,690
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



given it's possible to build, and indeed people have, kernels for Debian, do you think we can at least have sound fixed when running linux and not using the Planet-built kernel?
Go to the top of the page
 
+Quote Post
zevv
post Aug 26 2018, 02:47 AM
Post #20





Group: Members
Posts: 47
Joined: 3-January 18
Member No.: 815,747



QUOTE(speculatrix @ Aug 23 2018, 10:34 PM) *
given it's possible to build, and indeed people have, kernels for Debian, do you think we can at least have sound fixed when running linux and not using the Planet-built kernel?


Here is an Android kernel: https://github.com/zevv/gemini-android-kern...nux_boot-v1.img

This is a build of the stock Gemini kernel from Planet with two fixes: audio phase and keyboard ghosting. You could ask the Gemini maintainers if they are willing to pull in the speaker fix patch into the Debian kernel as well?

I've been running this for about a month without problems.
Go to the top of the page
 
+Quote Post
speculatrix
post Aug 26 2018, 03:14 AM
Post #21





Group: Admin
Posts: 3,690
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



QUOTE(zevv @ Aug 26 2018, 11:47 AM) *
QUOTE(speculatrix @ Aug 23 2018, 10:34 PM) *
given it's possible to build, and indeed people have, kernels for Debian, do you think we can at least have sound fixed when running linux and not using the Planet-built kernel?


Here is an Android kernel: https://github.com/zevv/gemini-android-kern...nux_boot-v1.img

This is a build of the stock Gemini kernel from Planet with two fixes: audio phase and keyboard ghosting. You could ask the Gemini maintainers if they are willing to pull in the speaker fix patch into the Debian kernel as well?

I've been running this for about a month without problems.



cool! does it flip the phase only on speaker?
Go to the top of the page
 
+Quote Post
zevv
post Aug 27 2018, 04:45 AM
Post #22





Group: Members
Posts: 47
Joined: 3-January 18
Member No.: 815,747



QUOTE(speculatrix @ Aug 26 2018, 12:14 PM) *
cool! does it flip the phase only on speaker?


Yes, it peeks into the accessory state and only fixes the phase when no headset is attached.
Go to the top of the page
 
+Quote Post
speculatrix
post Sep 18 2018, 11:34 PM
Post #23





Group: Admin
Posts: 3,690
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



Is it possible to produce a similarly patched kernel for android?

Thanks!
Go to the top of the page
 
+Quote Post
mithrandir
post Sep 21 2018, 12:29 PM
Post #24





Group: Members
Posts: 119
Joined: 7-January 18
Member No.: 815,997



@zevv: Thanks for the fix. Would you mind to create a pull request for this fix like you did for the keyboard ghosting? For a short moment I have been thinking about creating the request myself, but then I have been unsure if this were "politically correct". I think it would be nice to see the fix upstream (debian+android). Or do you have any doubts why it should not get merged?

mith
Go to the top of the page
 
+Quote Post
gymbo
post Oct 5 2018, 09:39 AM
Post #25





Group: Members
Posts: 126
Joined: 21-January 18
From: Norway
Member No.: 816,769



QUOTE(zevv @ Aug 27 2018, 02:45 PM) *
QUOTE(speculatrix @ Aug 26 2018, 12:14 PM) *
cool! does it flip the phase only on speaker?


Yes, it peeks into the accessory state and only fixes the phase when no headset is attached.

Don't know if it could be any help (and I must admit I haven't figured out how to configure it either, don't really use the speakers on the Gemini a lot...), but apparently Neutron (a music player) has a gotten a setting for phase switching...

So could be possible to get the music to play "correctly"? But you would have to change it every time going from headphones to speaker-mode... (and vice-versa).
Go to the top of the page
 
+Quote Post
covex
post Oct 13 2018, 12:22 PM
Post #26





Group: Members
Posts: 22
Joined: 10-October 18
From: CZ
Member No.: 834,412



QUOTE(gymbo @ Oct 5 2018, 07:39 PM) *
QUOTE(zevv @ Aug 27 2018, 02:45 PM) *
QUOTE(speculatrix @ Aug 26 2018, 12:14 PM) *
cool! does it flip the phase only on speaker?


Yes, it peeks into the accessory state and only fixes the phase when no headset is attached.

Don't know if it could be any help (and I must admit I haven't figured out how to configure it either, don't really use the speakers on the Gemini a lot...), but apparently Neutron (a music player) has a gotten a setting for phase switching...

So could be possible to get the music to play "correctly"? But you would have to change it every time going from headphones to speaker-mode... (and vice-versa).


I am new to gemini having a unit build cca 05/2018 with latest android and the sound is for sure stereo - tested with some stereo test videos on youtube. Not sure about the phase.
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th September 2019 - 01:08 PM