Ticket #1172 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

cannot hear any sound from dialer in GTA02

Reported by: erin_yueh@… Owned by: openmoko-kernel
Priority: high Milestone:
Component: openmoko-dialer Version: 2007.2
Severity: blocker Keywords:
Cc: buglog@…, graeme@…, erin_yueh@…, sean_chiang@…, michael@…, ahvenas@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

  1. make a phone call from NEO
  2. build the chatting connection
  3. cannot hear/speak sounds

Attachments

wm8753-bandaid.patch (590 bytes) - added by graeme@… 6 years ago.
A possible bandaid for the quiet sound problem

Change History

comment:1 Changed 6 years ago by sean_chiang@…

  • Status changed from new to assigned

comment:2 Changed 6 years ago by sean_chiang@…

  • Cc michael@… added

comment:3 Changed 6 years ago by sean_chiang@…

HI! Mickey,

After remove all files in ./tmp in oe, rebuild the root filesystem with current
audio state files, It works.

When I told you that sometimes I could hear the sound and sometimes I couldn't
even the puluseaudio is still running last night. I'm wrong, actually it should
be "sometimes the volume is loud enough and sometimes the volume is too low to
hear. I didn't change anything and have no idea what cause it different at
reboot each time. What do you think?

comment:4 Changed 6 years ago by sean_chiang@…

  • Cc sean_chiang@… added

comment:5 Changed 6 years ago by graeme@…

I have been trying to chase this down and I have got to the point I need a
hardware guy to verify that the Power, and GPIO inputs to the Amp are in the
correct state when the phone is stuck in this "quiet" mode.

I think the fault is after the codec as if you turn on the handset speaker it
has the correct loudness.

comment:6 Changed 6 years ago by sean_chiang@…

Graeme, so now this problem was happened to you?

comment:7 Changed 6 years ago by graeme@…

Yes it happens to me at random, some kernels suffer the problem, some don't

And some dont even always suffer the problem.

comment:8 Changed 6 years ago by mickey@…

  • Owner changed from sean_chiang@… to openmoko-kernel@…
  • Status changed from assigned to new
  • Severity changed from major to blocker
  • Cc graeme@… added

I have verified this problem. Changing to "blocker" and reassigning to kernel.
The amp for the mono speaker does not work unless the handset speaker has power.

comment:9 Changed 6 years ago by graeme@…

  • Severity changed from blocker to major

I dont think enabling the Handset Speaker is actually powering up the Amp/Mono?
Speaker its just a lot louder than the Amp/Mono? Speaker.

comment:10 Changed 6 years ago by mickey@…

  • Severity changed from major to blocker

Correct. It's very hard to confirm without opening the device, but I think
you're right.

comment:11 Changed 6 years ago by graeme@…

Ok, this looks more and more like a software bug. Builds from mickeyl and
buildhost fail. DAMP Handset Spk is controlling Stereo Out for some reason.

Amp is working correctly as I can turn it on/off and note the difference.

I have objdump -d both mickeyl modules and mine and they are identical so its
not a difference in building the main driver module.

I don't understand why my builds work and other peoples fail.

comment:12 Changed 6 years ago by ahvenas@…

  • Cc ahvenas@… added

comment:13 Changed 6 years ago by graeme@…

Definate Heisenbug here and Im running out of ideas.

Booting a failing image will occasionally give working sound. I used objdump to
dissassemble the modules on working and non working images and found no
difference. Examined the driver code and can't see any obvious uninitialised
variables.

comment:14 Changed 6 years ago by graeme@…

Ok, I would love to see the contents of
/sys/bus/platform/devices/soc-audio/codec_reg for both working and non working
situations from people.

After that please try the attached patch on your kernels and see if that makes a
difference.

Changed 6 years ago by graeme@…

A possible bandaid for the quiet sound problem

comment:15 Changed 6 years ago by tony@…

  • Status changed from new to closed
  • Resolution set to fixed

solve by Sean_Chiang's alsa file and greame's driver, both function and quality

comment:16 Changed 6 years ago by sean_chiang@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

Sorry, two different bug. I just fine tune the sound quality, not for this
problem. Sometimes we still could not hear ringtone.

comment:17 Changed 6 years ago by andy@…

Guys is there a way I can reproduce the effect of this bug without making a
call? So if it comes up a "bad" kernel, can we see the bad behaviour in a
simpler way by using aplay from the shell, simplifying the number of things
involved in this issue?

comment:18 Changed 6 years ago by graeme@…

The bug isnt actually about calls, its a general problem. Basically boot the
phone if the startup sound is really quiet or doesnt play at all you triggered
the problem.

Images from buildhost seem to trigger the problem more than other images.

Its not related to pulse as you can shut that down and use aplay and get same
results.

comment:19 Changed 6 years ago by andy@…

Thanks for the clarification... comment #1 says to make a call to reproduce.

I never heard a quiet startup sound in the few times I booted on recent rootfs
with the sound.

There is a class of known problems hiding in the kernel that are driver
startup races. For example a driver wants to change a PMU setting, but maybe
the PMU device does not exist yet, since it only exists after the I2C driver
comes up and I2C is probed. This class of problems makes particular havoc
during suspend / resume due to ordering issues. I mention it because these
races are sensitive to the kernel .config.

Can it be something along those lines? Did you manage to find any difference
from dumping the codec/mixer registers down I2C when it was happy or sad?

Are we talking about the simple transducer on L/ROUT2 of the WM8753L or
L/ROUT1 which has a lot of other circuitry on it?

comment:20 Changed 6 years ago by graeme@…

It seems that L/ROUT2 is working fine, its something in the L/ROUT1 system thats
the problem. My first thought was the Amp was under voltaged or some such failure.

comment:21 Changed 6 years ago by andy@…

There is no shortage of things to go wrong on L/ROUT1 because it is overloaded
several different ways that already make unsolved troubles.

AMP_3V3 for the amp is connected direct to IO_3V3 which is "always on". So it
shouldn't be an issue with amp power otherwise we would see worse behaviours.
Likewise the codec / mixer is powered quite directly from IO_3V3 itself.

Here are some ways we could possibly make that symptom with that path:

There is an AMP_SHUT net that comes from CPU GPJ01, if this was asserted
(HIGH) then the amp would be in a low current standby mode. What it would do
then if audio arrived at the input is unknown, it could conceivably come out
at a low level. So this can be implicated.

Does your version of the kernel still make these ticking noises during boot?
If so then the DL_GSM (CPU GPIO GPJ6) net can be asserted (low), that can
create the trouble by driving a logic level on to the ROUT1 (but not LOUT1)
that would conflict with the amplified audio analogue levels.

Is the headphone socket occupied during this? If somehow JACK_INSERT (CPU
GPIO GPF4) and or nHOLD (CPU GPIO GPF7) were driven by the CPU that could
again conflict with the amplified audio.

Did we confirm there is nothing different with the mixer / codec I2C registers
when it is happy or sad?

Is there no way we can be doing software scaling at the CPU before sending
out?

comment:22 Changed 6 years ago by graeme@…

Julian reports that the bandaid patch fixes the problem for him. Werner could
you apply this as a bandaid until I track down the real cause.

I also spoke to Liam and if this register is misset then it would account for
the too quiet sound.

comment:23 Changed 6 years ago by roh

  • Owner changed from openmoko-kernel@… to openmoko-kernel

comment:24 Changed 5 years ago by john_lee

  • Status changed from reopened to closed
  • HasPatchForReview unset
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.