This is the default state that the runtime PM infrastructure expects so
instead just kick the runtime PM core to suspend us if we're not doing
anything (as is default).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix build breakage by using the correct API call to add kcontrols.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Looks like nobody is or will be using this code.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix some spelling mistakes in the header and remove the todo items. Most
todo items are now available as kcontrol options now anyway.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Allow for the operation of custom mixer and mux DAPM widgets that can call
snd_soc_dapm_mixer_update_power() and snd_soc_dapm_mux_update_power() directly
after updating their status. This is useful with complex DAPM Mixer operations
where we need to do additional work in addition to setting a few mixer register
bits.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In cases where we should enter STANDBY DAPM will power us up, otherwise
there is no need to power up and we can remain in OFF.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8994 has a different accessory detect architecture, call its setup
function too. We ignore the errors and the driver will check for chip type
so it's safe to call the setup functions for both architectures.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.
This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-
snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()
This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().
It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().
Finally, it updates the existing machine drivers that register controls to either :-
1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.
In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current FSI got each PortA/B parameter by porta_flags/portb_flags from platform.
And .set_rate function was shared for PortA/B.
This structure was not readable and not flexible.
This patch adds sh_fsi_port_info, and its own settings was added on each platform.
it is preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
is_play should be kept as local valuable.
it prepare cleanup for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds struct fsi_stream_handler and defined fsi_pio_push/pop_handler.
these are controled by fsi_steam_xxx() function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
fsi_get_current_fifo_samples() uses fsi_stream instead of is_play.
This is just prepare cleanup for DMAEngine support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch re-define fsi_is_play() and fsi_stream_is_play().
fsi_data_pop/push() function keeps direct value of "is_play" at this point,
but it will be removed soon.
This is just prepare cleanup for DMAEngine support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch modify fsi_pio_get_area() parameter to use
struct fsi_stream, and used it on fsi_fifo_data_ctrl().
This is just prepare cleanup for DMAEngine support.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
fsi_fifo_init() is called only from fsi_hw_startup()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is preparation for DMAEngine support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Next transfer data size of "push" and "pop" had calculated on shared function.
But it was not readable code.
This patch divided it into for push, and for pop.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch gathered fsi_stream_xxx() functions in order to make it readable.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
All DAPM routes are configured via device tree, and there is no need in
DAPM route structures in board file.
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch is adding device tree support of headset autodetection on PAZ00 board.
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use the standard logging macros and use dev_ variants where we can, also
reporting error codes whenever we report an error. These changes (the
error codes in particular) make it noticeably easier to figure out what
went wrong just from the basic dmesg output.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Use the dai_link's dai_fmt attribute to setup the DAI format instead of doing
this manually.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
.. several days delayed. No reason, I just didn't think of it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQEcBAABAgAGBQJPKF4KAAoJEHm+PkMAQRiGw/YH+wXg2DpZUuHeBK52zMGlJBPc
DzX11/Uan3Y07gM0JbDzuVxwjX4vdxR2bV6r1qsLP8JEUnE8jyFC32DBGi5WAht7
F4KU/Uov2Ds5/wzvY4Iuo01C+JftQHXuy/Sbhck1d0LI0yjLejRaw+zuJv0x2/eS
7YqV+KTGE1lDuJs/Gyq1Vqr1g9831AuS1tv/g3gaqBuN6TcPBFCocaVxzwrUc+y6
94h26XbbOhQRIz38oqUkiqAGnvYS61ocyBcEiRHf0dXkNSDIINqlgukvd7YTXouA
jj/w/DWpMRcQuYAgqkrurr9+yWC9hVQcsvvQ5sAQnIPcxoR868sg1pO8Oheq+1g=
=kUzV
-----END PGP SIGNATURE-----
Merge tag 'v3.3-rc2' into for-3.4
A reasonable amount of new development is causing fiddly merge conflicts
between different resource management changes (mostly fixing bugs in
resource management due to noticing things while doing enhancements in
the same area).
Linux 3.3-rc2
.. several days delayed. No reason, I just didn't think of it.
This patch implements device tree support for Tegra boards with ALC5632
codec.
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
For later wm_hubs devices we have much less need to keep the biases up
even when using single ended line outputs so flag idle_bias_off for
everything except the WM8993 and WM8994.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use the same pm_ops for all system suspend and resume paths. This isn't
ideal for suspend to disk with older CODECs as we'll suspend and then
resume the CODEC before powering off all of which takes a long time due
to VMID ramps but it's very simple to implement and for modern CODECs the
overhead should be minimal.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
The runtime PM core no longer requires any callbacks so don't provide
empty ones for it any more.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The Mute Switch should be called Playback Switch to match the volume
and the regmap core has been updated so we don't need to mark all the
registers as non-volatile.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Add a driver supporting the volume control and the mute pin. Shdn pin
and DAPM are not taken care of yet.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8962 has ground referenced and class D outputs so can happily go
down to BIAS_OFF without a large startup time.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix silent output on Haier W18 laptop
ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID
ALSA: hda - Fix silent output on ASUS A6Rp
ALSA: Fix memory leak on error in snd_compr_set_params()
ALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't support
Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Report any accessory with a low impedance as a headphone, previously
anything other than a short or microphone would not be reported at all.
The most likely reason is a microphone with incorrect polarity.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>