Commit graph

262974 commits

Author SHA1 Message Date
Mark Brown 44fdd43387 ASoC: Use dai_fmt in speyside_wm8962
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-28 13:22:33 +01:00
Mark Brown 75d9ac46b9 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>
2011-09-28 13:22:28 +01:00
Axel Lin 21326db156 ASoC: adau1701: Fix prototype for adau1701_set_sysclk
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-28 13:21:14 +01:00
Axel Lin 16b7a9aa9a 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>
2011-09-28 13:19:59 +01:00
Axel Lin 63de012f35 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>
2011-09-28 13:19:59 +01:00
Axel Lin 72a921da07 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>
2011-09-28 13:19:59 +01:00
Axel Lin 6d4f7097df 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>
2011-09-28 13:19:58 +01:00
Axel Lin 217069ea9a 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>
2011-09-28 13:19:58 +01:00
Axel Lin 44cb209d33 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>
2011-09-28 13:19:58 +01:00
Axel Lin 23d622b14b 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>
2011-09-28 09:58:06 +01:00
Axel Lin 458f6f6921 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>
2011-09-28 09:57:58 +01:00
Axel Lin 4addfd88ea 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>
2011-09-27 19:53:38 +01:00
Axel Lin b6ba8cc287 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>
2011-09-27 19:53:38 +01:00
Axel Lin 6e34216490 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>
2011-09-27 19:53:38 +01:00
Axel Lin 8c0c459ced 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>
2011-09-27 19:53:38 +01:00
Axel Lin ec61bde573 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>
2011-09-27 19:53:38 +01:00
Axel Lin c9241ec6af 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>
2011-09-27 19:53:38 +01:00
Mark Brown 644f1ff4ff 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>
2011-09-27 19:21:44 +01:00
Karl Tsou bcec267a17 ASoC: Add DRC control for WM8996
Signed-off-by: Karl Tsou <karl@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-27 19:02:45 +01:00
Lars-Peter Clausen 0289053526 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>
2011-09-27 13:30:48 +01:00
Lars-Peter Clausen a9d1974ea1 ASoC: ssm2602: Set initial bias level to standby
Set the initial bias level to standby during CODEC probe instead of leaving the
CODEC powered off.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-27 11:21:40 +01:00
Axel Lin d1b73287c2 ASoC: Staticise sst_platform_dai
It is not used outside this driver so no need to make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-27 11:21:40 +01:00
Axel Lin fe0cc75193 ASoC: Remove unused fields in struct mfld_mc_private
Both *socdev and *codec of struct mfld_mc_private are not being used
in this driver, remove it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-27 11:21:40 +01:00
Mark Brown 60c9e3178f Merge branch 'for-3.1' into for-3.2 2011-09-27 11:21:11 +01:00
Lars-Peter Clausen 9058020cd9 ASoC: ssm2602: Re-enable oscillator after suspend
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
2011-09-27 11:20:38 +01:00
Peter Ujfalusi 4d64bdca44 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>
2011-09-26 22:33:31 +01:00
Peter Ujfalusi 8ff1e17098 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>
2011-09-26 22:33:31 +01:00
Peter Ujfalusi 46dd0b93a0 ASoC: twl6040: Move the delayed_work for HS detection under twl6040_jack_data
The delayed_work named 'delayed_work' is for the headset detection,
so move it to the twl6040_jack_data struct.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:24:18 +01:00
Peter Ujfalusi e71a5e5af6 ASoC: twl6040: Move delayed_work struct inside twl6040_output for HS/HF
The delayed works for the output can be moved within the
twl6040_output struct (from the twl6040_data) to be better
organized.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:33 +01:00
Peter Ujfalusi a8cc7189cd 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>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi eb6b71e7d9 ASoC: twl6040: Rename pga_event to out_drv_event
This event handler is used with the OUT_DRV widgets.
The name pga_event was misleading.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi 7bf3d92cdd ASoC: sdp4430: Configure McPDM offset cancellation
Based on the values from twl6040 codec (HSOTRIM L/R) we can configure
the McPDM offset cancellation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi 89b0d550a6 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>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi db4aabcc1f ASoC: twl6040: Function to fetch the TRIM values
Provide API to fetch the TRIM values (for machine drivers)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi f97217f18e ASoC: twl6040: Read the TRIM values from the chip
Update the reg_cache with values from chip regarding to TRIM.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Axel Lin c0fd9c9c42 ASoC: Drop exporting ad1980_dai
ad1980_dai is not used outside this driver,
thus drop exporting it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 09:58:23 +01:00
Axel Lin 575e498ae1 ASoC: Drop exporting sn95031_get_mic_bias
sn95031_get_mic_bias() is not used outside this driver
and it is a static function now.
Thus drop exporting sn95031_get_mic_bias.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 09:58:23 +01:00
Peter Ujfalusi 141947e6ce 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>
2011-09-26 09:57:35 +01:00
Mark Brown a850260e47 ASoC: Set idle_bias_off for WM1250 EV1
The WM1250 EV1 is functionally digital in a system (the analogue I/O
is either ground referenced or always powered) so flag it as idle_bias_off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 17:05:44 +01:00
Mark Brown 213eb0fb1e 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>
2011-09-23 17:05:38 +01:00
Mark Brown 85a843c50f 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>
2011-09-23 17:04:36 +01:00
Mark Brown 8c75615834 ASoC: Add DMIC control to Speyside WM8962 board
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 16:59:55 +01:00
Mark Brown 7564463c64 ASoC: Add support for on-board analogue microphones on Speyside WM8962
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 16:59:49 +01:00
Mark Brown 086d7f804e 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>
2011-09-23 16:59:43 +01:00
Mark Brown 3f7d55a19a ASoC: Rename WM8962 DMIC widget to DMIC_ENA
Matches the register name and avoids confusion with board widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 16:59:38 +01:00
Mark Brown ef473fee67 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>
2011-09-23 16:59:37 +01:00
Axel Lin 0a742681e6 ASoC: Add missed free_irq in wm5100_remove and wm5100_probe error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 11:54:24 +01:00
Axel Lin 0010bcc226 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>
2011-09-23 11:54:24 +01:00
Axel Lin a436089b77 ASoC: Staticize sn95031_dais
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 11:54:24 +01:00
Axel Lin 51e19fb385 ASoC: Staticize rt5631_dai
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 11:54:24 +01:00