Commit graph

11495 commits

Author SHA1 Message Date
Lars-Peter Clausen
40216ce7aa ASoC: Move SigmaDSP firmware loader to ASoC
It has been pointed out previously, that the firmware subsystem is not the right
place for the SigmaDSP firmware loader. Furthermore the SigmaDSP is currently
only used in audio products and we are aiming for better integration into the
ASoC framework in the future, with support for ALSA controls for firmware
parameters and support dynamic power management as well. So the natural choice
for the SigmaDSP firmware loader is the ASoC subsystem.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 12:01:10 +00:00
Axel Lin
7b282cbbf3 ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt
What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits,
but current code clears BIT[2:0].

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 11:50:50 +00:00
Axel Lin
1175f71197 ASoC: Convert smdk_wm8994pcm to use module_platform_driver()
Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 11:34:05 +00:00
Mark Brown
fd8f2e496f Merge branch 'for-3.2' into for-3.3 2011-11-28 23:18:39 +00:00
Mark Brown
fc8e6e8668 ASoC: Supply dcs_codes for newer WM1811 revisions
Based on initial data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 23:18:38 +00:00
Mark Brown
49b72776f3 Merge branch 'for-3.2' into for-3.3 2011-11-28 22:13:14 +00:00
Brian Austin
cc0b401ad8 ASoC: Convert CS42L73 to devm_kzalloc()
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:12:25 +00:00
Axel Lin
af3c2621a9 ASoC: Convert tegra_spdif to use module_platform_driver()
Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:12:15 +00:00
Mark Brown
0a590b1de2 ASoC: Add basic 1277-EV1 Littlemill audio driver
The Littlemill audio card supports a number of pluggable miniboards,
normally for the WM8994 family of devices. As all these devices look
mostly the same from an external configuration point of view and are
runtime enumerable we can write a standard machine driver which will
work out of the box with any of them. Start doing that with the bare
bones of a driver, only supporting AIF1.

Future patches will flesh this out to be more fully featured.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:10:29 +00:00
Mark Brown
fc07ecd851 ASoC: Error out if we can't generate a LRCLK at all for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:10:05 +00:00
Lars-Peter Clausen
34cbe16833 ASoC: ad193x: Convert to direct regmap API usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:52 +00:00
Lars-Peter Clausen
b82ca578fd ASoC: ad193x: Use snd_soc_update_bits where appropriate
We can reduce the code size here a bit by using snd_soc_update_bits instead of
open-coding the read-modify-write cycle. The conversion done in this patch is
not completely straightforward and some minor code restructuring has been
incorporated to further reduce the code size.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:52 +00:00
Lars-Peter Clausen
0718fd2777 ASoC: ad193x: Add sysclk DAPM supply
Add a DAPM supply widget for the internal sysclk, so it can be disabled
automatically when not needed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:51 +00:00
Lars-Peter Clausen
b21990b47d ASoC: ad193x: Remove non-functional DAPM route controls
DAPM route controls only take effect on paths where the sink is a mixer or a
mux, furthermore the control must be a control assigned to the mixer or mux.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:47 +00:00
Lars-Peter Clausen
c4e7a4a276 ASoC: ad193x: Make enum items const char * const
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:46 +00:00
Lars-Peter Clausen
591c034a32 ASoC: ad193x: Provide dB ranges for the volume controls
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:41 +00:00
Lars-Peter Clausen
b90d4183f7 ASoC: ad193x: Use table based DAPM and controls setup
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:37 +00:00
Axel Lin
ba0a7e024d ASoC: Convert fsl directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:23:21 +00:00
Peter Ujfalusi
6524c8e3e6 ASoC: sdp4430: Add support for digital microphones
OMAP4 SDP/Blaze boards have digital microphones.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:21:45 +00:00
Peter Ujfalusi
fd26f94746 ASoC: OMAP4: omap-dmic: Initial support for OMAP DMIC
Add support for OMAP4 Digital Microphone interface.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:21:44 +00:00
Mark Brown
5032dc3429 ASoC: Convert WM8903 MICBIAS to a supply widget
Also rename it to MICBIAS to reflect the pin name and help any out of tree
users notice the change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
2011-11-28 17:02:07 +00:00
Mark Brown
5bbcc3c0d0 ASoC: Convert CODEC drivers to module_platform_driver
Factors out a bit of boilerplate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 11:33:29 +00:00
Mark Brown
be086aa8ca ASoC: Convert WM8962 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 22:02:44 +00:00
Mark Brown
a094b80bb6 ASoC: Log automatic pin disconnection per CODEC rather than per card
This makes the output a bit less confusing on multi-CODEC systems as the
same pin may appear in multiple CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 19:45:37 +00:00
Mark Brown
b05d8dc15f ASoC: Fix CODEC enumeration for auto_nc_codec_pins
We need to enumerate all the CODECs that are part of the card we're
instantiating, not all the CODECs that are in the system as the system
may have multiple cards.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 19:45:36 +00:00
Mark Brown
162b187e19 Merge branch 'for-3.2' into for-3.3 2011-11-27 16:04:45 +00:00
Mark Brown
a290986b2a ASoC: Convert wm8996 to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:04:08 +00:00
Mark Brown
897f7847e6 ASoC: Convert wm9081 driver to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:04:02 +00:00
Mark Brown
5fe803f56a ASoC: Convert wm1250-ev1 driver to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:03:59 +00:00
Mark Brown
5b895eec11 ASoC: Correct name of Speyside Main Speaker widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:03:51 +00:00
Mark Brown
997c2ea916 ASoC: Remove unneeded platform_device.h inclusions from CODECs
They've not been needed for a long time if they were ever required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 12:24:48 +00:00
Mark Brown
679acec1f2 ASoC: Remove driver versioning from ak4642
It's never been updated so it can't be that useful and it makes the
driver needlessly chatty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 12:23:46 +00:00
Axel Lin
beda5bf575 ASoC: Convert omap directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:31 +00:00
Axel Lin
f9b8a51493 ASoC: Convert davinci directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:31 +00:00
Axel Lin
33d316cd8b ASoC: Convert txx9 directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:30 +00:00
Axel Lin
cb5e87387c ASoC: Convert sh directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:29 +00:00
Axel Lin
2f702a1915 ASoC: Convert pxa directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:16 +00:00
Axel Lin
8a124f9cc9 ASoC: Convert au1x directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:16 +00:00
Axel Lin
b31c9056e4 ASoC: Convert atmel directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:15:01 +00:00
Mark Brown
a81b82c09e ASoC: Use devm_kzalloc() in wm5100
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:03:25 +00:00
Mark Brown
878042d19c ASoC: Staticise non-exported symbols in sta32x
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
2011-11-25 13:03:24 +00:00
Mark Brown
e00c3f555f ASoC: Convert Samsung directory to module_platform_driver
Saves some boilerplate code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-11-25 13:03:03 +00:00
Axel Lin
29515d62db ASoC: Convert mid-x86 directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:21 +00:00
Axel Lin
41b1022509 ASoC: Convert kirkwood directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:20 +00:00
Axel Lin
d0efa6a279 ASoC: Convert nuc900 directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:20 +00:00
Axel Lin
c32986e66b ASoC: Convert jz4740 directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:19 +00:00
Axel Lin
7a24b2ba59 ASoC: Convert imx directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:19 +00:00
Axel Lin
fb80297e43 ASoC: Convert blackfin directory to module_platform_driver
Factor out some boilerplate code.

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-11-24 10:45:18 +00:00
Axel Lin
85aa0960d8 ASoC: Convert mxs directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:18 +00:00
Axel Lin
880dd7210c ASoC: Convert s6000 directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:45:14 +00:00
Axel Lin
ee18f6314f ASoC: Convert ep93xx directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:43:59 +00:00
Kuninori Morimoto
45f3121615 ASoC: fsi-ak4642: modify specification method of FSI / ak464x
Current fsi-ak4642 was using id_entry name in order to specify
FSI port and ak464x codec.
But it was no sense, no flexibility.
Platform can specify FSI/ak464x pair by this patch.

Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24 10:31:26 +00:00
Mark Brown
39afd66cea ASoC: Add fully_routed flag to Speyside machines
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 21:41:03 +00:00
Stephen Warren
504855d171 ASoC: TrimSlice machine: Set the new fully_routed flag
Set card.fully_routed to request the ASoC core calculated unused codec
pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
calls.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 21:35:03 +00:00
Stephen Warren
6e5fdba9c9 ASoC: Tegra+WM903 machine: Set the new fully_routed flag
Set card.fully_routed to request the ASoC core calculated unused codec
pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
calls.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 21:34:59 +00:00
Stephen Warren
1633281b79 ASoC: Implement fully_routed card property
A card is fully routed if the DAPM route table describes all connections on
the board.

When a card is fully routed, some operations can be automated by the ASoC
core. The first, and currently only, such operation is described below, and
implemented by this patch.

Codecs often have a large number of external pins, and not all of these pins
will be connected on all board designs. Some machine drivers therefore call
snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core
never to activate them.

However, when a card is fully routed, the information needed to derive the
set of unused pins is present in card->dapm_routes. In this case, have
the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused
codec pin.

This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 21:34:54 +00:00
Stephen Warren
d4a2eca781 ASoC: Tegra I2S: Remove dependency on pdev->id
When devices are instantiated from device-tree, pdev->id is set to -1.
Rework the driver so it doesn't depend on the ID.

Tegra I2S instantiated from board files are configured with pdev
name "tegra-i2s" and ID 0 or 1. The driver core then names the
device "tegra-i2s.0" or "tegra-i2s.1". This is not changing.

When a device is instantiated from device-tree, it will have
pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is
not something we can rely on.

This patch doesn't actually change any names though:

When a device is instantiated from device-tree, the overall device name
will be "${unit_address}.${node_name}". This causes issues such as
clk_get() failures due to lack of a device-name match. To solve that,
AUXDATA was invented, to force a specific device name, thus allowing
dev_name() to return the same as the non-device-tree case. Tegra
currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will
go away, most likely replaced by phandle-based references within the
device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 21:34:48 +00:00
Mark Brown
16c88583dc ASoC: Remove unused variable in wm8776 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 15:33:55 +00:00
Mark Brown
983a150a12 Merge branch 'for-3.2' into for-3.3 2011-11-23 14:58:37 +00:00
Eric Miao
5ff1ddf22b ASoC: skip resume of soc-audio devices without codecs
There are cases where there is no working codec on the soc-audio devices,
and snd_soc_suspend() will skip such device when suspending. Yet its
counterpart snd_soc_resume() does not check this, causing complaints
about spinlock lockup:

[  176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8
[  176.732539] [<80014a14>] (unwind_backtrace+0x0/0xec) from [<805b3fc8>] (dump_stack+0x20/0x24)
[  176.741082] [<805b3fc8>] (dump_stack+0x20/0x24) from [<80322208>] (do_raw_spin_lock+0x118/0x158)
[  176.749882] [<80322208>] (do_raw_spin_lock+0x118/0x158) from [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68)
[  176.759723] [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) from [<8002a020>] (__wake_up+0x2c/0x5c)
[  176.768781] [<8002a020>] (__wake_up+0x2c/0x5c) from [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0)
[  176.777666] [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) from [<8004ee20>] (process_one_work+0x2e8/0x50c)
[  176.787334] [<8004ee20>] (process_one_work+0x2e8/0x50c) from [<8004fd08>] (worker_thread+0x1c8/0x2e0)
[  176.796566] [<8004fd08>] (worker_thread+0x1c8/0x2e0) from [<80053ec8>] (kthread+0xa4/0xb0)
[  176.804843] [<80053ec8>] (kthread+0xa4/0xb0) from [<8000ea70>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 14:56:36 +00:00
Mark Brown
193b2f3f53 Merge branch 'for-3.2' into for-3.3 2011-11-23 13:12:38 +00:00
Lars-Peter Clausen
890754a878 ASoC: Cleanup duplicated const
Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally
introduced a few duplicated consts. This patch cleans it up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 13:11:50 +00:00
Axel Lin
b284362b6b ASoC: cs42l51: Fix off-by-one for reg_cache_size
Just checking the code in cs42l51_fill_cache():
The cache pointer points to codec->reg_cache + 1.
I think it is because CS42L51_FIRSTREG is 0x01,
so codec->reg_cache[0] is not used here.

Then we read CS42L51_NUMREGS bytes to cache.
So we need reg_cache_size to be CS42L51_NUMREGS + 1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:34:21 +00:00
Mark Brown
554671230b Merge branch 'for-3.2' into for-3.3 2011-11-23 11:18:32 +00:00
Stephen Warren
45c2609120 ASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driver
module_platform_driver saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:10:52 +00:00
Stephen Warren
e4e4c18a93 ASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driver
module_platform_driver saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:09:13 +00:00
Stephen Warren
186bcda6f6 ASoC: Tegra DAS: Add device tree binding
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:05:08 +00:00
Lars-Peter Clausen
85e7652d89 ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:40:46 +00:00
Paul Bolle
4ca8af579c ASoC: drop support for PlayPaq with WM8510
SoC Audio support for PlayPaq with WM8510 got added in commit 9aaca9683b
("[ALSA] Revised AT32 ASoC Patch"). That support depends on
BOARD_PLAYPAQ. That Kconfig symbol didn't exist when that support got
added in v2.6.27. It still doesn't. It has never been possible to even
build this driver. Drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:28:38 +00:00
Stephen Warren
bea0ed0825 ASoC: Tegra I2S: Use devm_ APIs and module_platform_driver
module_platform_drive saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:24:10 +00:00
Stephen Warren
65713ce844 ASoC: Tegra: Move DAS configuration into machine drivers
This removes potentially machine-specific routing knowledge from the
I2S driverinto the machine drivers, which is better equipped to know
what the appropriate routing configuration is.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:24:10 +00:00
Stephen Warren
f2296d7bf1 ASoC: Tegra DAS: Use devm_ APIs and module_platform_driver
module_platform_drive saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:24:10 +00:00
Stephen Warren
99c92ae4ff ASoC: Tegra PCM: Use module_platform_driver
This saves some boiler-plate code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:24:10 +00:00
Mark Brown
1db3c98e18 ASoC: Convert wm8776 to table based control and DAPM init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:00:34 +00:00
Mark Brown
404417e6b4 ASoC: Staticise and constify cs42l73_reg_defaults
It's not exported and doesn't need to change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 09:52:56 +00:00
Mark Brown
34c3a64a45 Merge branch 'for-3.2' into for-3.3 2011-11-22 23:07:23 +00:00
Timur Tabi
380c883038 ASoC: mpc8610: tell the CS4270 codec that it's the master
Commit ac601555 ("ASoC: Return early with -EINVAL if invalid dai format is
detected") requires the machine driver to tell the CS4270 codec driver
whether the CS4270 should be configured for master or slave operation.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 23:06:25 +00:00
Daniel Mack
d66b8537b3 ASoC: cs4720: use snd_soc_cache_sync()
Replace the manual register restore mechanism in cs4270.c and call the
generic snd_soc_cache_sync() handler instead.

This factors code out in favour of core facilities and also fixes a
bus confusion that is most probably caused by intermixing i2c-regmap
functions and i2c_smbus_* accessors.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 23:06:07 +00:00
Mark Brown
a5cf8060ab Merge branch 'for-3.2' into for-3.3 2011-11-22 19:40:47 +00:00
Boojin Kim
3d94a2a53a ASoC: SAMSUNG: Fix build error
This patch adds <linux/modules.h> to fix following build errors.

sound/soc/codecs/wm8994.c: In function 'wm8994_readable':
sound/soc/codecs/wm8994.c:58: warning: unused variable 'wm8994'
sound/soc/samsung/smdk_wm8994.c:176: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk_wm8994.c:176: warning: data definition has no type or storage class
sound/soc/samsung/smdk_wm8994.c:176: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
sound/soc/samsung/smdk_wm8994.c:176: warning: function declaration isn't a prototype
sound/soc/samsung/smdk_wm8994.c:177: error: expected declaration specifiers or '...' before string constant

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 19:40:29 +00:00
Mark Brown
e3470da9e6 Merge branch 'for-3.2' into for-3.3 2011-11-22 13:09:03 +00:00
Axel Lin
5c4b2aa3fd ASoC: max9877: Update register if either val or val2 is changed
In the case of ((max9877_regs[reg] >> shift) & mask) != val
but ((max9877_regs[reg2] >> shift) & mask) == val2,
current code does not update the registers.

Fix the logic to update registers if either val or val2 is changed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:06:21 +00:00
Axel Lin
72531c9434 ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET
According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.
        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

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>
Cc: stable@vger.kernel.org
2011-11-22 13:06:14 +00:00
Axel Lin
dbb1f51637 ASoC: cs42l73: Make inv and format to be unsigned int
Fix below smatch warning:

sound/soc/codecs/cs42l73.c +1030 cs42l73_set_dai_fmt(53) error: inv is never equal to 1024 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1032 cs42l73_set_dai_fmt(55) error: inv is never equal to 768 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1036 cs42l73_set_dai_fmt(59) error: inv is never equal to 1024 (wrong type 0 - 255).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:02:17 +00:00
Axel Lin
717b8fae38 ASoC: cs42l73: Unify the way to define bits of register
Current code defines some bits with left shift to the proper bit defined in
datasheet, but some don't.
Unify the definition with proper left shift and adjust the code accordingly.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:02:09 +00:00
Mark Brown
12a7a709a0 ASoC: Remove conditional I2C usage from tlv320aic3x driver
The driver only supports I2C so doesn't need to do things conditionally.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
2011-11-22 11:59:50 +00:00
Mark Brown
f733547aa3 ASoC: Remove WM5100 DSP memory windows from register default data
They're all volatile so shouldn't have defaults and as we've got pages
into the DSP memory the registers themselves aren't that useful - a
further patch adding support for the DSPs will provide direct diagnostic
access to the DSP memories.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 18:11:43 +00:00
Mark Brown
56a926dd72 ASoC: Convert WM8753 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 18:07:18 +00:00
Axel Lin
afe713089a ASoC: Remove redundant regcache_sync call in cs42l73_resume
It's done in cs42l73_set_bias_level when the dapm.bias_level is switching
from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:53 +00:00
Axel Lin
8421f620da ASoC: cs42l73: Show correct revision id
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:52 +00:00
Axel Lin
ea07561581 ASoC: cs42l73: Return proper error code if device id mismatch
Return -ENODEV instead of 0 if device id mismatch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:52 +00:00
Mark Brown
6413d542b0 Merge branch 'for-3.2' into for-3.3 2011-11-21 17:01:12 +00:00
Mark Brown
cb555318ca ASoC: Use table based init for wm8731_snd_controls
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:00:17 +00:00
Mark Brown
ed3e80c4c9 ASoC: Ensure WM8731 register cache is synced when resuming from disabled
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-21 16:58:46 +00:00
Mark Brown
70a28f841d Merge branch 'for-3.2' into for-3.3 2011-11-21 11:28:19 +00:00
Mark Brown
1d9a91db92 Merge branch 'DB_RANGE-size-fixes' of git://git.alsa-project.org/alsa-kprivate into for-3.2 2011-11-21 11:28:11 +00:00
Axel Lin
ef0cd47093 ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-20 20:58:21 +00:00
Clemens Ladisch
028aa634e1 ASoC: wm_hubs: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:52 +01:00
Clemens Ladisch
a1320fee27 ASoC: wm9090: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:51 +01:00
Clemens Ladisch
dac678f5c2 ASoC: wm8993: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:51 +01:00
Clemens Ladisch
43e9dc7bce ASoC: wm8962: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:50 +01:00
Clemens Ladisch
740fb9d512 ASoC: sgtl5000: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:50 +01:00
Clemens Ladisch
a19ea0b8ec ASoC: rt5631: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
the last entry from being omitted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:25 +01:00
Clemens Ladisch
0aed4a95ce ASoC: adau1373: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:24 +01:00
Linus Torvalds
fec6489f6d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs
  ALSA: hda - Update URLs in document
  ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()
  ALSA: hda - delayed ELD repoll
  ALSA: hda - fix ELD memory leak
  ALSA: hda/realtek: remove redundant semicolon
  ALSA: hda - pwr_nids cleanup for IDT codecs
2011-11-17 15:13:37 -02:00
Leon Romanovsky
2f534edc15 ASoC: alc5632: Remove volatile registers from regmap defaults
There is no need to provide defaults for the volatile
registers and doing so might cause confusion.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:49:39 +00:00
Mark Brown
4fbf4ad40f Merge branch 'for-3.2' into for-3.3 2011-11-17 16:48:57 +00:00
Timo Juhani Lindfors
2391a0e067 ASoC: wm8753: Skip noop reconfiguration of DAI mode
This patch makes it possible to set DAI mode to its currently applied
value even if codec is active. This is necessary to allow

aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom &
alsactl store -f backup.state
alsactl restore -f backup.state

to work without returning errors. This patch is based on a patch sent
by Klaus Kurzmann <mok@fluxnetz.de>.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-17 16:48:25 +00:00
Leon Romanovsky
277c01bb45 ASoC: alc5632: Update of i2c_probe function to use regmap API only
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:18 +00:00
Leon Romanovsky
9b4156cbe9 ASoC: alc5632: Added support of two undocumented registers
There are two undocumented registers in use in alc5632_i2c_probe
function. It must be added to support future rewrite of this
function to use regmap API completely.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:17 +00:00
Leon Romanovsky
43fa8e5337 ASoC: alc5632: Remove unrelevant registers and name the relevant
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:17 +00:00
Brian Austin
6d10c91493 ASoC: Add support for CS42L73 codec
This patch adds support for the Cirrus Logic CS42L73 low power stereo
codec.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Georgi Vlaev <joe@nucleusys.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:46:40 +00:00
Mark Brown
086834e2d2 ASoC: Say how long short WM8958 DSP2 firmwares are
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 17:33:58 +00:00
Takashi Iwai
05ee7964a4 ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs
spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although
the driver tries to select the connection at init time and at auto-mic
switch.  This results in the access to the widget NID 0, which is
obviously invalid, also a wrong capture source.

This patch fixes the issue by issuing the connect-select verb conditionally
at appropriate places.

Reported-and-tested-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 18:05:11 +01:00
Andrey Danin
1a083257eb ASoC: alc5632: rename volume/switch contols for master and speaker volumes.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:43:28 +00:00
Leon Romanovsky
bb39753c2b ASoC: Convert ALC5632 codec to use regmap API
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:41:56 +00:00
Leon Romanovsky
c9be8427b1 ASoC: alc5632: Fix compile without CONFIG_PM
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:41:55 +00:00
Wu Fengguang
2d1b439bdb ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()
It looks more natural and saves two lines of code.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:58 +01:00
Wu Fengguang
744626dada ALSA: hda - delayed ELD repoll
The Intel HDMI chips (ironlake at least) are found to have ~250ms delay
between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes
actually readable. During the time the ELD buffer is mysteriously all 0.

Fix it by scheduling a delayed work to re-read ELD buffer after 300ms.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:42 +01:00
Wu Fengguang
b95d68b817 ALSA: hda - fix ELD memory leak
memset(eld) clears eld->proc_entry which will leak the struct
snd_info_entry when unloading module.

Fix it by
- memset only the fields before eld->eld_buffer
- set eld->eld_valid to true _after_ all eld fields have been filled

Cc: <stable@kernel.org>
Cc: Pierre-louis Bossart <pierre-louis.bossart@intel.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:21 +01:00
Timur Tabi
0f768a7235 ASoC: fsl_ssi: properly initialize the sysfs attribute object
Commit 6992f533 ("sysfs: Use one lockdep class per sysfs attribute")
requires 'struct attribute' objects to be initialized with sysfs_attr_init().

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-15 11:59:09 +00:00
Axel Lin
6662ff5c3b ASoC: Remove unused control_data and mutex fields from struct alc5632_priv
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:43:30 +00:00
Johannes Stezenbach
3fb5eac50d ASoC: sta32x: add workaround for ESD reset issue
sta32x resets and loses all configuration during ESD test.
Work around by polling the CONFA register once a second
and restore all coeffcients and registers when CONFA
changes unexpectedly.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:36:43 +00:00
Johannes Stezenbach
e012ba2491 ASoC: sta32x: add platform data definition
Add a structure for platform specific configuration and use it,
thereby removing a few FIXMEs which marked hard-coded values.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:34:14 +00:00
Mark Brown
8f9aa2526b Merge branch 'for-3.2' into for-3.3 2011-11-14 21:33:17 +00:00
Johannes Stezenbach
54dc6cabe6 ASoC: sta32x: preserve coefficient RAM
The coefficient RAM must be saved in a shadow so it can
be restored when the codec is powered on using
regulator_bulk_enable().

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-14 21:32:12 +00:00
Jesper Juhl
e53de8f00c ALSA: hda/realtek: remove redundant semicolon
Having just one semicolon after a break statement is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 10:41:46 +01:00
Linus Torvalds
3455229fd6 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/kvm: Fix build failure with HV KVM and CBE
  powerpc/ps3: Fix lv1_gpu_attribute hcall
  powerpc/ps3: Fix PS3 repository build warnings
  powerpc/ps3: irq: Remove IRQF_DISABLED
  powerpc/irq: Remove IRQF_DISABLED
  powerpc/numa: NUMA topology support for PowerNV
  powerpc: Add System RAM to /proc/iomem
  powerpc: Add KVM as module to defconfigs
  powerpc/kvm: Fix build with older toolchains
  powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.
  powerpc/5200: add support for charon board
2011-11-12 00:01:51 -02:00
Kuninori Morimoto
a9317e8b6b ASoC: ak4642: add ak4648 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:05 +00:00
Kuninori Morimoto
e8c83dbfb7 ASoC: ak4642: add Line out support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:05 +00:00
Kuninori Morimoto
3c7035268c ASoC: ak4642: add headphone mute switch control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:04 +00:00
Kuninori Morimoto
24747daea5 ASoC: ak4642: add DAPM support for HeadPhone Output
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:03 +00:00
Kuninori Morimoto
ed2dd7da35 ASoC: ak4642: add ak4642_set_bias_level()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:03 +00:00
Leon Romanovsky
88c494b99a ASoC: Remove unnecessary backslash from alc5632 codec
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:00 +00:00
Leon Romanovsky
d8c29e7f78 ASoC: Remove unused defines in alc5632 codec
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:46:55 +00:00
Charles Chin
afef2cfa0e ALSA: hda - pwr_nids cleanup for IDT codecs
Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove
pwr_mapping which was incorrect.

The original pwr_nids support of 92HD83xxx was incorrect and never
actually worked before.  Now we should have things working correctly
without having to hack by DID anymore.

It is also not necessary to explicitly turn on all the pins near the
beginning of patch_stac92hd83xxx() now, the pins will go though
initialization properly.

Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-11 08:05:28 +01:00
Takashi Iwai
d938e66003 Merge branch 'fix/misc' into for-linus 2011-11-10 19:52:08 +01:00
Thomas Meyer
43df2a57b7 ALSA: usb-audio: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 19:51:45 +01:00
Mark Brown
c42da64293 ASoC: Convert WM8995 to direct regmap usage
Large code size increase due to the addition of readability information
and the reformatting of the defaults table.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 17:17:17 +00:00
Mark Brown
d9b5e9c6bc ASoC: Move WM5100 platform data based setup into I2C probe
Get things configured as early as possible, especially useful for the
GPIOs which might be useful anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 16:16:19 +00:00
Mark Brown
c9016a7937 ASoC: Remove LZO cache type
There are no current users and new drivers ought to be using the regmap
API and its cache implementation directly so just delete the ASoC copy.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 13:08:09 +00:00
Leon Romanovsky
94d5f7c025 ASoC: Add new Realtek ALC5632 CODEC driver
This driver implements basic functionality, using I²C for the control
channel.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 12:00:35 +00:00
Takashi Iwai
2f451d2a2a ALSA: hda - Re-enable the check NO_PRESENCE misc bit
We disabled the check of NO_PRESENCE bit of the default pin-config
in commit f4419172 temporarily.  One problem was that the first
implementation was wrong -- the bit after the shift must be checked.
However, this would still give many regressions on machines with broken
BIOS.  They set this bit wrongly even on active pins.

A workaround is to check whether all pins contain this bit.  As far as
I've checked, broken BIOSen set this bit on all pins, no matter whether
active or not.  In such a case, the driver should ignore this bit check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 12:36:46 +01:00
Takashi Iwai
9e226b4b7e ALSA: vmaster - Free slave-links when freeing the master element
When freeing the vmaster master element, we should release slave-links
properly, not only assumig that slaves will be freed soon later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 12:34:24 +01:00
Takashi Iwai
aeb4b88ec0 ALSA: hda - Don't add elements of other codecs to vmaster slave
When a virtual mater control is created, the driver looks for slave
elements from the assigned card instance.  But this may include the
elements of other codecs when multiple codecs are on the same HD-audio
bus.  This works at the first time, but it'll give Oops when it's once
freed and re-created via reconfig sysfs.

This patch changes the element-look-up strategy to limit only to the
mixer elements of the same codec.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 12:32:08 +01:00
Mark Brown
f403414725 ASoC: Fix duplicate const warnings in da7210.c
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 00:13:44 +00:00
Konstantin Ozerkov
7fb4f392bd ALSA: intel8x0: improve virtual environment detection
Detection code improved by PCI SSID usage. VM optimization
now enabled only for known devcices (skip host devices forwarded
to VM by VT-d or same kind of technology).
For debug/troubleshooting purposes optimization can be
forced (on/off) by module parameter: "inside_vm" (boolean).

Known devices (PCI SSID):
1af4:1100: Reserved for KVM devices. Note this is not yet
           implemented for KVM's ICH/AC'97 emulation.
1ab8:xxxx: Parallels ICH/AC'97 emulated sound.

[ fixed a minor coding-style issue by tiwai]

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 18:34:28 +01:00
Konstantin Ozerkov
65c397d6b5 ALSA: intel8x0: move virtual environment detection code into one place
This is refactoring patch: preparation for add improved detection code.
Now all detection code placed in one place.

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 18:33:07 +01:00
Mark Brown
9db16e4c1b ASoC: Convert WM5100 gpiolib support to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 17:29:47 +00:00
Mark Brown
abda5dfdd5 ASoC: Add Lowland machine driver
The Lowland platform is based on the Cragganmore system like Speyside but
uses the WM5100 audio CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:51:01 +00:00
Mark Brown
588ac5e0b6 ASoC: Move most WM5100 resource allocation to I2C probe
More standard Linuxish.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:26 +00:00
Mark Brown
d926b5a3d9 ASoC: Mark WM5100 MISC CONTROL as readable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:24 +00:00
Mark Brown
60bf5b0728 ASoC: Need to convert wm5100 cache sync to direct regmap usage too
ASoC knows nothing about the cache now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:23 +00:00
Axel Lin
b402735883 ASoC: wm9081: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 11:45:31 +00:00
Alexey Fisher
55c0008be6 ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384
Logitech HD Webcam c510 provide wrong mixer resolution.
Add it to "res = 384" quirk.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 12:22:38 +01:00
Mark Brown
7d6f6b0f39 ASoC: Convert wm8971 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 10:27:45 +00:00
Julian Wollrath
f7f9bdfadf ALSA: hda - fix internal mic on Dell Vostro 3500 laptop
Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the
new model dell-vostro-3500.

Signed-off-by: Julian Wollrath <jwollrath@web.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 11:03:29 +01:00
Takashi Iwai
bcca5fa6d7 Merge branch 'fix/asoc' into for-linus 2011-11-09 08:52:22 +01:00
David Henningsson
8d1c963a2e ALSA: HDA: Remove quirk for Toshiba T110
According to the bug reporter, model=auto is needed to make the
internal microphone work.

BugLink: https://bugs.launchpad.net/bugs/819699
Reported-by: Andrej (agno01)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 08:51:28 +01:00
Takashi Iwai
dcaaf9f2c1 ALSA: usb-audio - Fix the missing volume quirks at delayed init
In the recent usb-audio driver, the initialization of volume ranges
may be delayed when the device doesn't respond well at the probing time.
But the volume quirks for certain devices are applied only in
mixer_ctl_feature_info() thus only at the very first probe and will be
missing when the volume range is initialized later.

This patch moves the volume quirk code to be always called from the
volume-range extraction (get_min_max()), so that the quirks are properly
applied in the later init time.

Reported-and-tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 17:50:27 +01:00
Mark Brown
0469e7b98c ASoC: Disable debounce on some WM8962 interrupts
Allow them to work when the device is unclocked.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:54 +00:00
Mark Brown
620c36ae66 Merge branch 'for-3.2' into for-3.3 2011-11-08 15:39:44 +00:00
Axel Lin
adf463626a ASoC: wm9081: Don't write WM9081_BIAS_ENA bit to WM9081_VMID_CONTROL register
WM9081_BIAS_ENA is the bit[1] of WM9081_BIAS_CONTROL_1 register (05h).
Current code incorrectly write it to WM9081_VMID_CONTROL(04h) register.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:36 +00:00
Axel Lin
f1e10354fc ASoC: wm9081: Fix reading wrong register for setting VMID 2*240k
VMID Divider Enable and Select is controlled by BIT[2:1] of WM9081_VMID_CONTROL
register (04h).
Current code reads wrong register (WM9081_BIAS_CONTROL_1) for setting
VMID 2*240k.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:32 +00:00
Mark Brown
7cfa467b74 ASoC: Convert WM9081 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:14:02 +00:00
Mark Brown
bd132ec585 ASoC: Convert wm5100 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:50 +00:00
Mark Brown
7b16f56012 ASoC: Convert WM8962 to direct regmap usage
This initial conversion just moves the register init, regulator acquisition
and device verification out to the I2C probe(). Movement of other parts of
the driver like the GPIO and beep generation code will follow.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:41 +00:00
Mark Brown
b2d1e23373 ASoC: Convert WM8996 gpiolib to regmap
Actually pretty straightforward.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:25 +00:00
Mark Brown
ee5f387226 ASoC: Move most WM8996 resource acquisition to I2C probe
Now that the WM8996 driver is using the regmap API for register I/O we no
longer need the ASoC card to be active in order to interact with the chip.
In order to be more idiomatic for Linux move most of the existing probe()
function out into the I2C probe() function prior to registration with ASoC.

The IRQ and GPIO init will be moved separately as these are slightly more
involved.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:12 +00:00
Mark Brown
7917274682 ASoC: Convert WM8996 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:08:34 +00:00
Axel Lin
e94de1e864 ASoC: Avoid a redundant read in cs42l51_pdn_event
snd_soc_update_bits already does read-modify-write,
no need to read the register before calling snd_soc_update_bits.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 11:02:31 +00:00
Kuninori Morimoto
65ff03f462 ASoC: fsi: add valid data position control support
FSI2 can control valid data position, like
package in front/back or stream  mode (16bit x 2).
But current fsi driver is assuming it was in-back.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 11:02:00 +00:00
Kuninori Morimoto
202113912b ASoC: ak4642: ak4642 was tested
ak4642 was tested by ms7724se board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 10:52:24 +00:00
Kuninori Morimoto
8918b843af ASoC: fsi: fixup compile warning
This patch fixup below warning

${linux}/sound/soc/sh/fsi.c:442:3:\
 warning: passing argument 1 of '__fsi_reg_read' makes pointer\
 from integer without a cast
${linux}/sound/soc/sh/fsi.c:517:3: \
 warning: passing argument 1 of '__fsi_reg_write' makes pointer\
 from integer without a cast
${linux}/sound/soc/sh/fsi.c:663:3: \
 warning: passing argument 1 of '__fsi_reg_mask_set' makes pointer\
 from integer without a cast

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 10:52:24 +00:00
Mark Brown
41966710ab Merge branch 'for-3.2' into for-3.3 2011-11-08 10:47:46 +00:00
Mark Brown
1dd6c0770d Merge branch 'for-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-3.2 2011-11-08 10:37:41 +00:00
Takashi Iwai
dccc1810f4 ALSA: hda - Mute unused capture sources for Realtek codecs
When a Realtek codec has a matrix-style capture-source selection, we
need to scan all connections instead of only imux items.  Otherwise some
input might be kept unmuted.  Although the corresponding input must be
dead so there should be no input from it, it's still safer to mute the
route completely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 07:52:19 +01:00
Denis V. Lunev
5a9a51799b ALSA: intel8x0: Improve comments for VM optimization
The recently merged 228cf79376 looks a bit hackish while it is not.
The change was quite simple. In a virtualized environment the
patch unhacks old kludge introduced for old broken AC97 hardware.

This patch adds proper comment to "unkludge" code.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 07:51:21 +01:00
Geoff Levand
9fce85f7ff powerpc/ps3: Fix lv1_gpu_attribute hcall
The lv1_gpu_attribute hcall takes three, not five input
arguments.  Adjust the lv1 hcall table and all calls.

Signed-off-by: Geoff Levand <geoff@infradead.org>
CC: Takashi Iwai <tiwai@suse.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-08 14:51:59 +11:00
Mark Brown
4633fa48fb Merge branch 'for-3.2' into for-3.3
Conflicts:
	sound/soc/codecs/wm8940.c
2011-11-08 01:17:30 +00:00
Linus Torvalds
32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Linus Torvalds
9991357259 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Revert the check of NO_PRESENCE pincfg default bit
  ALSA: hda - Fix a regression for DMA-position check with CA0110
  ALSA: hda - Fix silent output regression with ALC861
  ALSA: control: remove compilation warning on 32-bit
  ALSA: ua101: fix crash when unplugging
2011-11-06 12:14:22 -08:00
Takashi Iwai
f441917256 ALSA: hda - Revert the check of NO_PRESENCE pincfg default bit
The implementation on commit [08a1f5eb: ALSA: hda - Check NO_PRESENCE
pincfg default bit] seems like a mis-interpretation of specification.
The spec gives the reversed bit definition.  But, following the spec
also causes to change so many existing device configurations, thus we
can't change it so easily for now.  For 3.2-rc1, it's safer to revert
this check (actually this patch comments out the code).

We may re-introduced the fixed version once after the wider test-case
coverages are done.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06 14:07:37 +01:00
Takashi Iwai
69f9ba9b0c ALSA: hda - Fix a regression for DMA-position check with CA0110
The regression-fix in 3.1 for the check of DMA-position validity caused
yet another regression for CA0110.  As usual, this hardware seems working
only with LPIB properly.  Adding the appropriate driver-caps bit to force
LPIB fixes the problem.

Reported-and-tested-by: Andres Freund <andres@anarazel.de>
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06 13:49:13 +01:00
Takashi Iwai
43dea228a3 ALSA: hda - Fix silent output regression with ALC861
The 3.1 kernel has a regression for ALC861 codec where no sound output
is heard with the default setup.  It's because the amps in DACs aren't
properly unmuted while the output mixers are assigned only to pins.

This patch fixes the missing initialization of DACs when no mixer is
assigned to them.

Tested-by: Andrea Iob <andrea_iob@yahoo.it>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06 11:25:34 +01:00
Olof Johansson
447c6f93ab ALSA: control: remove compilation warning on 32-bit
This was introduced by 'ALSA: control: add support for ENUMERATED user
space controls' which adds a u64 variable that gets cast to a pointer:

sound/core/control.c: In function 'snd_ctl_elem_init_enum_names':
sound/core/control.c:1089: warning: cast to pointer from integer of different size

Cast to uintptr_t before casting to pointer to avoid the warning.

Signed-off-by: Olof Johansson <olof@lixom.net>
[cl: replace long with uintptr_t]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06 11:22:15 +01:00
Clemens Ladisch
862a6244eb ALSA: ua101: fix crash when unplugging
If the device is unplugged while running, it is possible for a PCM
device to be closed after the disconnect callback has returned.  This
means that kill_stream_urb() and disable_iso_interface() would try to
access already-invalid or freed USB data structures.

The function free_usb_related_resources() was intended to prevent this,
but forgot to clear the affected variables.

Reported-and-tested-by: Olivier Courtay <olivier@courtay.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.33+ <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06 11:21:42 +01:00
Linus Torvalds
7abec10c62 Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc: (79 commits)
  ARM: SAMSUNG: Move fimc plat. device from board files to plat-samsung
  ARM: SAMSUNG: Cleanup resources by using macro
  ARM: SAMSUNG: Cleanup plat-samsung/devs.c and devs.h
  ARM: S5P: To merge devs.c files to one devs.c
  ARM: S3C64XX: To merge devs.c files to one devs.c
  ARM: S3C24XX: To merge s3c24xx devs.c files to one devs.c
  ARM: S5P64X0: Add Power Management support
  ARM: S5P: Make the sleep code common for S5P series SoCs
  ARM: S5P: Make the common S5P PM code conditionally compile
  ARM: SAMSUNG: Move S5P header files to plat-samsung
  ARM: SAMSUNG: Move S3C24XX header files to plat-samsung
  ARM: SAMSUNG: Moving each SoC support header files
  ARM: SAMSUNG: Consolidate plat/pll.h
  ARM: SAMSUNG: Consolidate plat/pwm-clock.h
  ARM: SAMSUNG: Cleanup mach/clkdev.h
  ARM: SAMSUNG: remove sdhci default configuration setup platform helper
  ARM: EXYNOS4: Add FIMC device on SMDKV310 board
  ARM: EXYNOS4: Add header file protection macros
  ARM: EXYNOS4: Add usb ehci device to the SMDKV310
  ARM: S3C2443: Add hsspi-clock from pclk and rename S3C2443 hsspi sclk
  ...

Fix up conflicts in
 - arch/arm/mach-exynos4/{Kconfig,clock.c}
	ARM_CPU_SUSPEND, various random device tables (gah!)
 - drivers/gpio/Makefile
	sa1100 gpio added, samsung gpio drivers merged
2011-11-05 18:18:05 -07:00
Linus Torvalds
fba9569924 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (63 commits)
  dmaengine: mid_dma: mask_peripheral_interrupt only when dmac is idle
  dmaengine/ep93xx_dma: add module.h include
  pch_dma: Reduce wasting memory
  pch_dma: Fix suspend issue
  dma/timberdale: free_irq() on an error path
  dma: shdma: transfer based runtime PM
  dmaengine: shdma: protect against the IRQ handler
  dmaengine i.MX DMA/SDMA: add missing include of linux/module.h
  dmaengine: delete redundant chan_id and chancnt initialization in dma drivers
  dmaengine/amba-pl08x: Check txd->llis_va before freeing dma_pool
  dmaengine/amba-pl08x: Add support for sg len greater than one for slave transfers
  serial: sh-sci: don't filter on DMA device, use only channel ID
  ARM: SAMSUNG: Remove Samsung specific enum type for dma direction
  ASoC: Samsung: Update DMA interface
  spi/s3c64xx: Merge dma control code
  spi/s3c64xx: Add support DMA engine API
  ARM: SAMSUNG: Remove S3C-PL330-DMA driver
  ARM: S5P64X0: Use generic DMA PL330 driver
  ARM: S5PC100: Use generic DMA PL330 driver
  ARM: S5PV210: Use generic DMA PL330 driver
  ...

Fix up fairly trivial conflicts in
 - arch/arm/mach-exynos4/{Kconfig,clock.c}
 - arch/arm/mach-s5p64x0/dma.c
2011-11-04 18:02:25 -07:00
Mark Brown
19940b3d55 ASoC: Ensure we get an impedence reported for WM8958 jack detect
Occasionally we may see an accessory reported before we have a stable
impedance for the accessory. If this happens then reread the status in
order to ensure that the handler can take the appropriate action for the
status change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:24:59 +00:00
Mark Brown
5a3ad6bd6a ASoC: Don't use wm8994->control_data when requesting IRQs
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:24:58 +00:00
Mark Brown
8eeea521d9 ASoC: Don't use wm8994->control_data in wm8994_readable_register()
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-04 23:24:58 +00:00
Mark Brown
03431972ac ASoC: Disable thermal shutdown when not using speakers in wm_hubs
The thermal shutdown support in wm_hubs devices is tied to the speaker
drivers (which are the only high power subsystems within the device).
Ensure minimal current usage when the thermal shutdown support is not
required by disabling the circuit when the speaker drivers are powered
down.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:08:08 +00:00
Mark Brown
94b88e647c ASoC: Manage thermal shutdown for WM8962
Disable the thermal shutdown circuits for headphone and speaker when the
relevant outputs are not enabled in order to save current in idle modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 22:47:55 +00:00
Mark Brown
a04e0c8680 ASoC: Only enable thermal shutdown when required on WM9081
The WM9081 thermal shutdown is only effective when the speaker output is
enabled so disable it when that is not in use for a small current saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 22:47:32 +00:00
Mark Brown
5b6247abc9 ASoC: Remove needless unlikely()
There's no point in adding unlikely() annotations outside of hot paths
and on systems using these features the annotation will always be wrong
(as opposed to being something that only comes up once in a while) so
the annotation may even be harmful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 17:19:40 +00:00
Linus Torvalds
b2409fb6a4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
  ALSA: hda/realtek - Skip invalid digital out pins
  ALSA: hda/sigmatel - Automatically retrieve digital I/O widgets
  ALSA: hda - Remove unused variables
  ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary
  ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs
  ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default
  ALSA: hda - Check NO_PRESENCE pincfg default bit
  ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
  ASoC: Ensure the WM8962 oscillator and PLLs start up disabled
  ASoC: Ensure WM8962 PLL registers are reset
  ALSA: intel8x0 - Fix inclusion of kvm_para.h
  ALSA: hda_hwdep: Fix possible buffer overflow
  ASoC: Fix return value of wm5100_gpio_direction_out()
  ASoC: WM8904: Set `invert' bit for Capture Switch
  ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
  ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
  ALSA: intel8x0: Improve performance in virtual environment
  ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards
  ALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detection
  ALSA: hdspm - Fix MADI channel format in the status ioctl
  ...
2011-11-04 07:51:43 -07:00
Linus Torvalds
d6748066ad Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (37 commits)
  MIPS: O32: Provide definition of registers ta0 .. ta3.
  MIPS: perf: Add Octeon support for hardware perf.
  MIPS: perf: Add support for 64-bit perf counters.
  MIPS: perf: Reorganize contents of perf support files.
  MIPS: perf: Cleanup formatting in arch/mips/kernel/perf_event.c
  MIPS: Add accessor macros for 64-bit performance counter registers.
  MIPS: Add probes for more Octeon II CPUs.
  MIPS: Add more CPU identifiers for Octeon II CPUs.
  MIPS: XLR, XLS: Add comment for smp setup
  MIPS: JZ4740: GPIO: Check correct IRQ in demux handler
  MIPS: JZ4740: GPIO: Simplify IRQ demuxer
  MIPS: JZ4740: Use generic irq chip
  MIPS: Alchemy: remove all CONFIG_SOC_AU1??? defines
  MIPS: Alchemy: kill au1xxx.h header
  MIPS: Alchemy: clean DMA code of CONFIG_SOC_AU1??? defines
  MIPS, IDE: Alchem, au1xxx-ide: Remove pb1200/db1200 header dep
  MIPS: Alchemy: Redo PCI as platform driver
  MIPS: Alchemy: more base address cleanup
  MIPS: Alchemy: rewrite USB platform setup.
  MIPS: Alchemy: abstract USB block control register access
  ...

Fix up trivial conflicts in:
	arch/mips/alchemy/devboards/db1x00/platform.c
	drivers/ide/Kconfig
	drivers/mmc/host/au1xmmc.c
	drivers/video/Kconfig
	sound/mips/Kconfig
2011-11-03 13:28:14 -07:00
Takashi Iwai
6bcbf64ace Merge branch 'fix/asoc' into for-linus 2011-11-03 18:20:53 +01:00
Takashi Iwai
51e4152a96 ALSA: hda/realtek - Skip invalid digital out pins
Some BIOS report invalid pins as digital output pins.  The driver checks
the connection but it doesn't do it fully correctly, and it leaves some
undefined value as the audio-out widget, which makes the driver spewing
warnings.  This patch fixes the issue.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-03 17:00:27 +01:00