Axel Lin [Sun, 2 Oct 2011 01:18:17 +0000 (09:18 +0800)]
ASoC: kirkwood-i2s: Add __devexit_p at necessary place
According to the comments in include/linux/init.h:
"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."
We have __devexit annotation for kirkwood_i2s_dev_remove(), thus add __devexit_p
at necessary place.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sun, 2 Oct 2011 00:55:02 +0000 (08:55 +0800)]
ASoC: wm8782: Add __devexit_p at necessary place
According to the comments in include/linux/init.h:
"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."
We have __devexit annotation for wm8782_remove(), thus add __devexit_p at
necessary place.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 30 Sep 2011 13:07:46 +0000 (16:07 +0300)]
ASoC: omap: Use single hw_params callback in sdp3430 and zoom2
There is no need to use two hw_params callbacks in sdp3430 and zoom2 as
thet are now identical. Use instead the same snd_soc_ops structure and
hw_params callback for both DAI links.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 30 Sep 2011 13:07:45 +0000 (16:07 +0300)]
ASoC: omap: Convert bunch of machine drivers to use init time DAI format
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 30 Sep 2011 13:07:44 +0000 (16:07 +0300)]
ASoC: omap-mcbsp: Prepare for init time DAI format setting
Before commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the
dai_link") expectation for omap-mcbsp was that snd_soc_dai_set_fmt is to be
called first in machine hw_params callback before other CPU DAI functions.
Thus it was enough that only omap_mcbsp_dai_set_dai_fmt cleared the
mcbsp->regs structure. [Note that this was pure convention, it's always
been OK to set things on init -- broonie]
Now this doesn't hold anymore since machine drivers can set the DAI format
only once on init time and thus mcbsp->regs may get out of sync when other
CPU DAI functions are modifying them dynamically with different values
between the calls. Therefore clear the accessed mcbsp->regs bits and
bitfields in other functions too.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 29 Sep 2011 12:22:37 +0000 (15:22 +0300)]
ASoC: twl6040: Simplify code in out_drv_event for pending work check
Instead of checking, if the work is pending, it is safer to cancel
the pending work, or wait till the scheduled work finishes.
This way we can avoid modifying the variables used by the work
function.
Since we know that no work is pending, we can remove the two additional
checks in POST_PMU, and PRE_PMD for non pending works.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 30 Sep 2011 07:55:32 +0000 (10:55 +0300)]
ASoC: omap-mcbsp: Fix FS polarity for LEFT_J, DSP_A and DSP_B formats
Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
changed DAI format flag values and we cannot simply invert anymore e.g.
frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
is no anymore fixed bit position for bit-clock or frame-sync inversion.
Fix this by relying only on DAI format flag values passed to us and by not
making any assumption on individual bit positions.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 30 Sep 2011 02:32:37 +0000 (10:32 +0800)]
ASoC: Remove unused "control_data" field of struct aic3x_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ujfalusi, Peter [Fri, 30 Sep 2011 08:39:50 +0000 (11:39 +0300)]
ASoC: sdp4430: Fix string for FM input name
The name contains invalid valid character (/), which
causes problems when trying to create the debugfs
directory structure:
ASoC: Failed to create Aux/FM Stereo In debugfs file
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 30 Sep 2011 07:55:33 +0000 (10:55 +0300)]
ASoC: Davinci: Fix FS polarity for I2S format
Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
changed DAI format flag values and we cannot simply invert anymore e.g.
frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
is no anymore fixed bit position for bit-clock or frame-sync inversion.
Fix this by relying only on DAI format flag values passed to us and by not
making any assumption on individual bit positions
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Vaibhav Bedia <vaibhav.bedia@ti.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 30 Sep 2011 02:31:10 +0000 (10:31 +0800)]
ASoC: Remove unused "control_data" field of struct cs4271_private
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 29 Sep 2011 04:09:57 +0000 (12:09 +0800)]
ASoC: tlv320dac33: Add guarding parentheses to macros
Put parentheses around macro argument uses. This avoids pitfalls
for the programmer, where the argument expansion does not give the
expected result, for example:
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 27 Sep 2011 15:41:01 +0000 (16:41 +0100)]
ASoC: Allow DAI formats to be specified in the dai_link
For almost all machines the DAI format is a constant, always set to the
same thing. This means that not only should we normally set it on init
rather than in hw_params() (where it has been for historical reasons) we
should also allow users to configure this by setting a variable in the
dai_link structure. The combination of these two will make many machine
drivers even more data driven.
Implement a new dai_fmt field in the dai_link doing just that. Since 0 is
a valid value for many format flags and we need to be able to tell if the
field is actually set also add one to all the values used to configure
formats.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:00:18 +0000 (10:00 +0800)]
ASoC: Remove unused "control_data" field of struct ak4671_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:14:05 +0000 (10:14 +0800)]
ASoC: Remove unused "control_data" field of struct max98095_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:12:48 +0000 (10:12 +0800)]
ASoC: Remove unused "control_data" field of struct max98088_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:11:54 +0000 (10:11 +0800)]
ASoC: Remove unused "control_data" field of struct cs42l51_private
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:10:38 +0000 (10:10 +0800)]
ASoC: Remove unused "control_data" field of struct cs4270_private
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 02:01:26 +0000 (10:01 +0800)]
ASoC: Remove unused "control_data" field of struct alc5623_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 07:21:28 +0000 (15:21 +0800)]
ASoC: adau1701: Initialize codec->control_data before using it
Currently codec->control_data is not initialized before calling
process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 28 Sep 2011 07:14:56 +0000 (15:14 +0800)]
ASoC: Fix setting adau1373_dai->master for SND_SOC_DAIFMT_CBS_CFS
In the case of SND_SOC_DAIFMT_CBS_CFS, adau1373_dai->master should be false.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:40:22 +0000 (20:40 +0800)]
ASoC: Remove unused "control_data" field of struct wm8904_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:45:17 +0000 (20:45 +0800)]
ASoC: Remove unused "control_data" field of struct wm9090_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:44:13 +0000 (20:44 +0800)]
ASoC: Remove unused "control_data" field of struct wm9081_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:43:24 +0000 (20:43 +0800)]
ASoC: Remove unused "control_data" field of struct wm8978_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:42:34 +0000 (20:42 +0800)]
ASoC: Remove unused "control_data" field of struct wm8960_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 27 Sep 2011 12:41:36 +0000 (20:41 +0800)]
ASoC: Remove unused "control_data" field of struct wm8940_priv
The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 27 Sep 2011 18:19:41 +0000 (19:19 +0100)]
ASoC: Add device ID for WM9093 to WM9090 driver
The WM9093 is an enhanced version of the WM9093. Add the device ID to
the driver, further patches will add support for the additional features
in the WM9093.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: ssm2602: Support setting the oscillator and the clock output state
Currently the oscillator is always enabled and the clock output is always
disabled. This patch adds support for controlling the oscillator and clock
output state through snd_soc_dai_set_sysclk. Which makes it possible to
disable or enable them dynamically according to the requirements of the board
on which the CODEC is used.
This patch also slightly modifies the behavior as to when the oscillator is
going to be disabled in low-power states. Previously it would only be disabled
in BIAS_OFF, now it is also going to be disabled in BIAS_STANDBY, since no
components which depend on it should be active in this state.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently the the internal oscillator is powered down when entering BIAS_OFF
state, but not re-enabled when going back to BIAS_STANDBY. As a result the
CODEC will stop working after suspend if the internal oscillator is used to
generate the sysclock signal. This patch fixes it by clearing the appropriate
bit in the power down register when the CODEC is re-enabled.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:31 +0000 (16:26 +0300)]
ASoC: twl6040: No need to change delay during HF ramp
The Handsfree gain have 2dB steps all the way, so there is no
reason to have different delays as we approaching to the
end of the scale.
The comment was also wrong, since we have 0dB at 0x3 raw, at 16 the gain
is -26dB.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:30 +0000 (16:26 +0300)]
ASoC: twl6040: No need to change delay during HS ramp
The Headset gain have 2dB steps all the way, so there is no
reason to have different delays as we approaching to the
end of the scale.
The comment was also wrong, since we have 0dB at 0x0 raw at
one end of the range, and not in the middle.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:25 +0000 (16:26 +0300)]
ASoC: twl6040: Combine the custom volsw get, and put functions
We can manage with one set of get, and put function for the gain
controls we need to handle with custom code due to the shadowing
of the register.
For both get, and put function we can call decide based on the
mc->rreg value, if we need to call the volsw, or the vlosw_2r
variant (in 2r case rreg is not 0).
Handling of the shadow values are the same for both type of
controls.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 26 Sep 2011 13:05:58 +0000 (16:05 +0300)]
ASoC: omap-mcpdm: API to configure offset cancellation
The offset cancellation values can be different from board to board, even
on the same HW platform.
Provide a way for the machine drivers to configure the McPDM offset
cancellation.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 26 Sep 2011 07:56:42 +0000 (10:56 +0300)]
ASoC: omap-mcbsp: Fix compile time warning about ambiguous ‘else’
Fixes the following compile time warning:
omap-mcbsp.c:519: warning: suggest explicit braces to avoid ambiguous ‘else’
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 21 Sep 2011 19:54:47 +0000 (20:54 +0100)]
ASoC: Add platform data for WM1250 EV1 GPIOs
The WM1250 EV1 has some GPIOs which can be used to control the behaviour
at runtime. Request them all if supplied and add a set_bias_level()
function to start and stop the clocks.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 21 Sep 2011 20:29:47 +0000 (21:29 +0100)]
ASoC: Don't force bias on ground referenced devices
Currently we force all devices in the system to be at the same bias level.
This is due to concerns about power or pop/click impacts from either
ramping VMID or mismatching VMID on the analogue I/O lines between
connected devices but does mean we power devices up more often than we
really need to.
If a device flags idle_bias_off this will usually mean that it's either
all digital or ground referenced (in which case the idle and powered bias
levels are identical) so this concern does not apply and we can save some
power by leaving it off when not needed itself.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 23 Sep 2011 15:22:48 +0000 (16:22 +0100)]
ASoC: Convert WM8962 MICBIAS to a supply widget
A supply widget is generally clearer than a MICBIAS widget and a mic bias
is just a type of supply so use a supply widget for the MICBIAS. This also
avoids confusion with the routing when connected to multiple inputs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 23 Sep 2011 15:05:00 +0000 (16:05 +0100)]
ASoC: Support a wider range of sample rates on Speyside WM8962
As we've only got one audio interface and it is symmetric we can just set
SYSCLK based on the sample rate requested by the application layer. Provide
a default so bypass paths work before audio playback.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 23 Sep 2011 05:10:57 +0000 (13:10 +0800)]
ASoC: Remove unneeded mutex_init in wl1273_probe()
Since f0fba2ad "ASoC: multi-component - ASoC Multi-Component Support",
snd_soc_register_codec() now does all the codec list and mutex init.
Thus don't need to call mutex_init(&codec->mutex) in wl1273_probe() any more.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Fri, 23 Sep 2011 06:52:02 +0000 (09:52 +0300)]
ASoC: twl6040: No need to read the INTID register
Since our irq handler has been called, it is granted, that
the reason was either PLUGINT, or UNPLUGINT.
The INTID register has been checked in the MFD part of
twl6040 driver (twl6040-irq.c).
We have no reason to read from chip again here.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 23 Sep 2011 08:19:13 +0000 (11:19 +0300)]
ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
Attempt to change McBSP CLKS source while another stream is active is not
safe after commit d135865 ("OMAP: McBSP: implement functional clock
switching via clock framework") in 2.6.37.
CLKS parent clock switching using clock framework have to idle the McBSP
before switching and then activate it again. This short break can cause a
DMA transaction error to already running stream which halts and recovers
only by closing and restarting the stream.
This goes more fatal after commit e2fa61d ("OMAP3: l3: Introduce
l3-interconnect error handling driver") in 2.6.39 where l3 driver detects a
severe timeout error and does BUG_ON().
Fix this by not changing any configuration in omap_mcbsp_dai_set_dai_sysclk
if the McBSP is already active. This test should have been here just from
the beginning anyway.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Mark Brown [Wed, 21 Sep 2011 17:19:14 +0000 (18:19 +0100)]
ASoC: Add another DAPM stat for neighbour checks
The number of times we look at a potentially connected neighbour is just
as important as the number of times we actually recurse into looking at
that neighbour so also collect that statistic.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:54 +0000 (11:05 +0300)]
ASoC/MFD: twl6040: Combine bit definitions for Headset control registers
Use one set of defines for the HS bits, since they are identical in both
control register.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:53 +0000 (11:05 +0300)]
ASoC: twl6040/sdp4430: Change legacy DAI name
Change the legacy DAI name from "twl6040-hifi" to "twl6040-legacy" to
be more intuitive.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:52 +0000 (11:05 +0300)]
ASoC: twl6040: Support for AUX L/R output
AUX L/R outputs can be driver from the Handsfree PGA output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:51 +0000 (11:05 +0300)]
ASoC: twl6040: Use consistent names for Headset path
Use "Headset XYZ" for user visible controls, while the internal DAPM
widgets can use "HS XYZ".
In this way we can group the Headset related controls in UI
(alsamixer for example).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:50 +0000 (11:05 +0300)]
ASoC: twl6040: Use consistent names for Handsfree path
Use "Handsfree XYZ" for user visible controls, while the internal DAPM
widgets can use "HF XYZ".
In this way we can group the Handsfree related controls in UI
(alsamixer for example).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:49 +0000 (11:05 +0300)]
ASoC: twl6040: Earphone path correction
Fix the DAPM routing for the earphone path.
Convert the DAPM_SWITCH_E to DAPM_OUT_DRV_E, so we can have correct
power up, and down sequence for EP.
Introduce mute control (Earphone Playback Switch) for users to
enable/disable the EP path.
Note: the EP does not have it's own dedicated DAC. EP is connected to
HSL DAC.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:48 +0000 (11:05 +0300)]
ASoC: twl6040: Introduce SW only shadow register
Software only shadow register to be used by the driver.
For example Earpiece path will need this shadow register.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:47 +0000 (11:05 +0300)]
ASoC: twl6040: Remove strings "NULL" from DAPM route
Replace the string with plain NULL.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:46 +0000 (11:05 +0300)]
ASoC: twl6040: Fix comments for register names
Change the register name strings in the comments for the
twl6040_reg table, so it is easier to search for specific
register.
This is cosmetic change.
Before we had for example:
TWL6040_REG_HSLCTL as register definition.
At the register table we had:
TWL6040_HSLCTL
Searching for TWL6040_HSLCTL resulted no hits.
While if we look for REG_HSLCTL, we can find the places
the register has been used.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:45 +0000 (11:05 +0300)]
ASoC: twl6040: Lower the power on gain values at startup
The default gains on outputs/inputs are set to 0dB.
This is fixing the pop noise issue at the first playback, which
caused by the wrong starting point of the ramp code.
The ramp code for the outputs expects the gains to be in
their lowest configuration in order to be effective.
After the playback stops, the ramp code takes care of
ramping down the gains to their minimum.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reasons for the replacement:
The current driver for McPDM was developed to support the legacy mode only.
In preparation for the ABE support the current driver stack need the be
replaced.
The new driver is much simpler, easier to extend, and it also fixes some of the
issues with the old stack.
Main changes:
- single file for omap-mcpdm (mcpdm.c/h removed)
- Define names for registers, bits cleaned up, prefixed
- Full-duplex audio operation (arecord | aplay) has been fixed
- Less code
McPDM need to be turned off after all streams has been stopped.
This might cause pop noise on the output, if the codec's DAC is
still powered at this time.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Tue, 2 Aug 2011 11:04:26 +0000 (14:04 +0300)]
ASoC: OMAP4: McPDM: Convert to hwmod/omap_device
In order to probe, and operate correctly, the OMAP McPDM driver needs to
be converted to use hwmod.
The device name has been changed to probe the driver.
Replace the clk_* with pm_runtime_* calls to manage the clocks correctly.
Missing request_mem_region/release_mem_region added.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Peter Ujfalusi [Tue, 2 Aug 2011 10:35:30 +0000 (13:35 +0300)]
ASoC: omap-mcpdm: Fix threshold and dma configuration
DMA packet_size must be configured based on the McPDM FIFO threshold
value, number of channels.
Due to the FIFO operation the DMA muse be configured differently for
playback, and capture.
At the same time fix the McPDM threshold values used for playback, and
capture to avoid broken code.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>