AndreiLux / Perseus-UNIVERSAL5410

This is a clean kernel glued together upon Samsung's last public branch of android-exynos-3.4 with sources provided by the OSRC releases. The OSRC release has been stripped clean of all non-i9500 related code and sourced, as much as possible through the original patches.
https://github.com/AndreiLux/Perseus-UNIVERSAL5410/wiki
Other
30 stars 19 forks source link

No external audio in Dock mode #8

Closed ahouston closed 11 years ago

ahouston commented 11 years ago

Problem: No external audio in Dock mode Kernel: Perseus alpha3.4

I've checked that the "Audio output mode - Use external speakers when device is docked" setting in the Dock settings is ticked.

This problem doesn't appear to be impacting the stock kernel - external sound works perfectly under stock UBMF3 kernel. I had this problem on earlier releases of the Perseus kernel too - only realized it was a kernel issue after replacing what I thought was a faulty dock cable.

I know you've stated before that you don't own a dock, which makes this difficult to test, but I thought I should raise it anyway.

AndreiLux commented 11 years ago

Yes, without having a dock, this sucks to debug.

First of all, earlier releases: how far back? If it didn't work before the audio stuff was introduced, then I have no idea.

Otherwise please install https://play.google.com/store/apps/details?id=com.skvalex.alsamixer&hl=en and run it on the stock kernel.

Now it's a bit complicated: You have to find out the input source on the line output for the dock. If I'm not mistaken, the output widgets for car dock are HPOUT2L Input 1 and HPOUT2R Input 1, select those in the app while you are playing back audio on the dock, and tell me the source. Should be something like "AIF1RX1".

Do the same on the kernel here and see if it differs in any way.

ahouston commented 11 years ago

Hi Andrei,

I've tried this with your 2.1 kernel and I get the same problem.

I've captured the outputs of alsa_amixer here for comparison:

Perseus 3.4: http://pastebin.com/zcZaBTBW Perseus 2.1: http://pastebin.com/DVacAYpU Stock UBMF3: http://pastebin.com/GnAzkf0u

Here is the diff on UBMF3 and Perseus 3.4: http://diffchecker.com/xleq7tkd

Hope that helps.

AndreiLux commented 11 years ago

How'd you generate those logs? Neat. Perfect actually.

Anyway, I see the problem: https://github.com/AndreiLux/Perseus-UNIVERSAL5410/commit/3fde91cc5f373269c08224b0e62fb06c0e4fea36 is missing from the stock kernel.

Can you try to edit out all instances of OUT2 into HPOUT2 in /system/etc/default_gain.conf and see if it then works?

If it doesn't, I'll revert that patch and that should hopefully fix it.

ahouston commented 11 years ago

I've changed the /system/etc/default_gain.conf as follows: http://diffchecker.com/06ozfzk7 , and rebooted.

It doesn't appear to have helped - did I change the file correctly?

I was getting the logs by SSH'ing into the phone and running the "alsa_amixer" command - if you need any further logs etc. I'll do my best to get them for you.

AndreiLux commented 11 years ago

No, the initial ALSA mixer output contains everything one needs.

Please try this version and tell me if it works: https://www.dropbox.com/s/g4qz12axuiq7z65/Perseus-alpha4rc1-i9500.tar

ahouston commented 11 years ago

Worked like a dream - thank you!

I'm going to be sticking on a UBMF8 based ROM now, will check everything is still OK once I've put your alpha4rc1 kernel back over the top of that.

I've not regressed my /system/etc/default_gain.conf file - would you recommend leaving it with the OUT2 to HPOUT2 changes?

AndreiLux commented 11 years ago

As you want, the only effect is that dock sound may be louder than default.

I'll try to just make aliases and keep both naming conventions in the kernel for the sake of compatibility.

AndreiLux commented 11 years ago

Fixed as of alpha4.