05 Aug, 2013
1 commit
-
None of the delayed work the driver schedules has particularly short delays
and it is not performance sensitive so let the scheduler run it wherever
is most efficient rather than in a per CPU workqueue by using the system
power efficient workqueue.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham
02 Apr, 2013
15 commits
-
Signed-off-by: Mark Brown
-
Help mitigate against mechanical bounce during the initial detection by
allowing the configuration of an additional debounce on top of that the
hardware does during the initial phase of microphone detection operation.Signed-off-by: Mark Brown
-
If the user moves directly from one button to another then we won't get a
no buttons pressed event and will therefore end up reporting that two
buttons are simultaneously pressed which isn't supported by the hardware.
Make sure we clear any existing button reports before reporting any new
ones.Signed-off-by: Mark Brown
-
In pathological cases the microphone detection may fail to report, for
example due to a failure to get a stable measurement. Provide a timeout
to cover such cases.Signed-off-by: Mark Brown
-
Rather than measuring both HP channels we can simply directly measure the
microphone impedance and then rely on MICDET for final confirmation of the
presence of a suitable microphone. This improves the overall performance
of the identification process.Signed-off-by: Mark Brown
-
This extra check makes the procedure take longer and is of marginal use
in identification so do not execute it.Signed-off-by: Mark Brown
-
Sometimes we can trigger measurements early if contacts are shorted during
a slow insertion. As well as debouncing add further robustness by retrying
if we get a high impedance measurement for headphones as this can indicate
that the headphones were not yet connected.Signed-off-by: Mark Brown
-
Signed-off-by: Mark Brown
-
Occasionally we can trigger an interrupt before we have completed
impedance measurement, although the valid bit will still be set. This
patch spins reading the impedance value until a valid value is seen.Signed-off-by: Charles Keepax
Signed-off-by: Mark Brown -
In cases where we see a brief (dis)connection of the jack detection signals
we may see a noop jack insertion or removal where the jack has returned to
the original state by the time the interrupt is serviced. Suppress these
events in order to save work and avoid confusing the rest of the code.Signed-off-by: Mark Brown
-
Ensure greater reliability by increasing the minimum threashold for
identifying a microphone.Signed-off-by: Mark Brown
-
In some designs an external pull won't be needed.
Signed-off-by: Mark Brown
-
There is no need to do this as HPDET identification will cause MICBIAS to
be powered down again.Signed-off-by: Mark Brown
-
The Arizona button detection circuit is configurable, allowing the system
integrator to program a range of thresholds for the buttons supported on
the accessory but currently the driver uses the default button ranges and
does not provide any flexibility in how this is exposed to the application
layer.Provide platform data allowing the user to control this and to map
the buttons to keys in the input subsystem.Signed-off-by: Mark Brown
-
In some pathological use cases users may insert an accessory very slowly
causing multiple indeterminate measurements. Handle this by retrying many
measurements before we give up and declare a headphone.Signed-off-by: Mark Brown
26 Mar, 2013
2 commits
-
Running HPDET while the headphone outputs are enabled can disrupt the
operation of HPDET. In order to avoid this HPDET needs to disable the
headphone outputs and ASoC needs to not enable them while HPDET is
running.For extcon instead of checking if the headphone output is enabled when
doing magic application unconditionally disable the output and restore
the state which ASoC wants set when undoing the magic.Signed-off-by: Mark Brown
-
We have a very similar sequence doing magic writes in several places
(one of which missed an update to interlock with the CODEC driver) so
factor it out into a function.Signed-off-by: Mark Brown
12 Feb, 2013
6 commits
-
When using HPDET to identify the accessory still run MICDET before we
report a microphone in order to ensure that the accessory identified is
compatible with the MICDET detection ranges after having confirmed that
the device is not using a headphone.Signed-off-by: Mark Brown
-
This should always be the most accurate reading for supported accessory
configurations.Signed-off-by: Mark Brown
-
It is important to clear the wake trigger status bits otherwise DCVDD
will be held high independent of the state of the LDOENA line.Signed-off-by: Charles Keepax
Signed-off-by: Mark Brown -
The magic is already done as part of enabling the headphone output so
does not need to be done when the headphone outputs are enabled. We hold
the DAPM lock so the headphone status can't be changed underneath us.Signed-off-by: Mark Brown
-
The HPDET identification method does not have the same natural debounce
built into it that the standard MICDET method does so add some extra on
top of what the jack detection does in hardware to make sure we get a
robust result.Signed-off-by: Mark Brown
-
Signed-off-by: Charles Keepax
Signed-off-by: Mark Brown
08 Feb, 2013
2 commits
-
When starting microphone detection some headsets should be exposed to
the fully regulated microphone bias in order to ensure that they behave
in an optimal fashion.Signed-off-by: Mark Brown
-
Allow systems to tune detection rate and debounce suitably for their
mechanical parameters.Signed-off-by: Mark Brown
23 Jan, 2013
3 commits
-
Signed-off-by: Mark Brown
-
We now have mechanisms in place to allow retries so let's use them rather
than guessing.Signed-off-by: Mark Brown
-
Ensure we clamp as quickly as possible after removal by disabling the
debounce while there is an accessory present.Signed-off-by: Mark Brown
15 Jan, 2013
10 commits
-
With some GPIO control it is possible to detect microphones in a wider
range of configurations by directly measuring the microphone impedance
when the HPDET method cannot distinguish between the behaviour of the
two grounds. Allow a GPIO to be provided in platform data and use it to
implement this behaviour.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
The accessory detection functionality in Arizona devices is flexible and
supports several system designs in addition to the default one implemented
by the existing driver. One such design uses the HPDET feature to determine
what kind of accessory is present by comparing measurements taken with the
two headphone grounds available on the device, implement that if selected
by platform data.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Use the headphone detection to identify if the accessory is a headphone or
line load. There are two different revisions of the IP with different
register layouts, support both.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Some system designs provide an input on GPIO5 which in conjunction with
the jack detection feature indicates the presence of an accessory.
Support such systems, using the microphone clamp feature to minimise
wakeups of the processor.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Newer Arizona devices include a microphone clamp function which is tied to
jack detect. Activate this feature when present in order to ensure best
performance of the subsystem.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Allow configuration of the rise time for MICBIAS via platform data, the
delay required depends on things like the external component selection.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Acked-by: MyungJoo Ham -
The micd_pol GPIO is only requested if we've specified one greater than 0
so apply the same test before we set it.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Now this is configured by platform data remove the defualt configuration
the driver had.Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham -
Signed-off-by: Mark Brown
Signed-off-by: Chanwoo Choi
Signed-off-by: Myungjoo Ham
27 Nov, 2012
1 commit
-
…zx/extcon into char-misc-next
MyungJoo writes:
"extcon pull request targetting Linux 3.8 for Greg KH on 2012.11.22
This is based on Linux 3.7 rc6"