Commit graph

399 commits

Author SHA1 Message Date
Mark Brown 0c5dacf2ca Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-next 2014-05-22 00:23:49 +01:00
Tushar Behera 1d55417e12 ASoC: samsung: Add devm_clk_get to pcm.c
clk_get in probe function can be safely replaced with devm_clk_get.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22 00:20:11 +01:00
Tushar Behera 7253e354e7 ASoC: samsung: Use devm_snd_soc_register_component
Replaced snd_soc_register_component with its devres equivalent,
devm_snd_soc_register_component.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22 00:20:11 +01:00
Tushar Behera 55313bd3b0 ASoC: samsung: Use devm_snd_soc_register_platform
Replaced snd_soc_register_platform with devm_snd_soc_register_platform
in samsung_asoc_dma_platform_register(). This makes the function
samsung_asoc_dma_platform_unregister() redundant. This is removed and
all its users are updated.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22 00:20:11 +01:00
Tushar Behera c583883ecd ASoC: samsung: Use devm_snd_soc_register_card
Replace snd_soc_register_card with devm_snd_soc_register_card.
With this change, we can delete the empty remove functions.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22 00:20:11 +01:00
Lars-Peter Clausen fbfad49076 ASoC: neo1973_wm8753: Automatically disconnected non-connected pins
The DAPM routes for this board are complete, hence we can let the core take care
of disconnecting non-connected pins rather than doing it manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:29:22 +01:00
Sylwester Nawrocki c86d50f9dc ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface
This patch adds support for setting source clock of the "Core CLK"
of the IIS Multi Audio Interface.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:20:57 +01:00
Jarkko Nikula d77a14b579 ASoC: Remove needless snd_soc_dapm_enable_pin() from machine driver inits
ALSA SoC core marks widgets as connected by default when they are
initialized in snd_soc_dapm_new_control() so there is no need to call
snd_soc_dapm_enable_pin() from machine driver init functions.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19 17:19:18 +01:00
Tushar Behera deeaa686b9 ASoC: samsung: Add missing pm ops for Snow sound card driver
Adding missing pm ops so that audio playback works across
suspend and resume cycle.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-14 12:34:50 +01:00
Arnd Bergmann 7ec91cd017 ASoC: samsung: TLV320AIC23 and Simtec Hermes audio need I2C
This codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:28:26 -07:00
Arnd Bergmann 654da9f522 ASoC: samsung: UDA1380 needs I2C
The UDA1380 driver needs I2C to be enabled, so
SND_SOC_SAMSUNG_H1940_UDA1380 and
SND_SOC_SAMSUNG_RX1950_UDA1380 also
require this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:59:40 -07:00
Arnd Bergmann 1aa91b6dd4 ASoC: samsung-idma: avoid 64-bit division
dma_addr_t may be 64 bit wide, which causes a build failure
when doing a division on it. Here it is safe to cast to an
u32 type, which avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Tested-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:31:13 -07:00
Arnd Bergmann 01c2cb67ea ASoC: samsung: SMDK_WM8580_PCM needs REGMAP_I2C
This adds a missing dependency for SND_SOC_SMDK_WM8580_PCM to
require REGMAP_I2C to be enabled, avoiding possible build
erorrs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:30:43 -07:00
Arnd Bergmann a2915d4fef ASoC: CS42L51 and WM8962 codecs depend on INPUT
Building ARM randconfig got into a situation where CONFIG_INPUT
is turned off and SND_SOC_ALL_CODECS is turned on, which failed
for two codecs trying to use the input subsystem. Some other
drivers also select one of these codecs and consequently need an
explicit dependency added.

Appending to the dependency list seems the easiest way out,
since this is not a practical limitation. If anyone really
needs to build these codecs for a kernel with no input support,
a more sophisticated solution can be implemented.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 18:29:33 -07:00
Tushar Behera 31c26a6a84 ASoC: samsung: Add sound card driver for Snow board
Added machine driver to instantiate I2S based sound card on Snow
board. It has MAX98095 audio codec on board.

There are some other variants for Snow board which have MAX98090
audio codec. Hence support for MAX98090 is also added to this
driver.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:09:38 -07:00
Tushar Behera d66eac3e2b ASoC: samsung: Don't clear clock setting during i2s_startup
In exiting kernel, if DAIFMT flags are set in dai_link and I2S is
set to run in master mode, the I2S clocks are not getting configured
resulting in no output.

Existing code clears the current I2S clock settings during i2s_startup
and requires that the clocks are reconfigured. It then assumes that
sound-card driver would call snd_soc_dai_{set_sysclk/set_fmt} to
configure the root clock.

1. Since I2S clock settings remain fixed for a board, it would be better
to set the clocks once during sound-card probe.

2. Also if the DAIFMT flags are set in dai_link, snd_soc_dai_set_fmt is
called during DAI probe.

If both these conditions are true, then I2S clock remains unconfigured
during audio playback. Fix this by removing the code to clear
rclk_srcrate in i2s_startup. Instead, reset this during DAI probe.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:30:12 +01:00
Sachin Kamat 71e5222cbe ASoC: samsung: Fix build on multiplatform
PCM and S/PDIF drivers referenced mach headers for a trivial
data structure. This caused build errors on multiplatform builds
as machine headers are not accessible from driver files. Move the data
structure definition to the driver header and remove the dependency.
While at it rename the structure to avoid multiple definition errors
as the same structure is also used by the platform code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-08 12:51:57 +01:00
Mark Brown 7cc6417208 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sn95031', 'asoc/topic/ssm2602' and 'asoc/topic/stac9766' into asoc-next 2014-03-12 23:04:42 +00:00
Mark Brown 84f6965e2b Merge remote-tracking branches 'asoc/topic/da7213', 'asoc/topic/da732x', 'asoc/topic/da9055', 'asoc/topic/davinci', 'asoc/topic/fsl', 'asoc/topic/fsl-esai', 'asoc/topic/fsl-sai' and 'asoc/topic/fsl-spdif' into asoc-next 2014-03-12 23:04:22 +00:00
Mark Brown 8b621d0fae Merge branch 'topic/tlv320aic23' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung 2014-03-07 10:59:36 +08:00
Max Filippov cc1bc54aa7 ASoC: update Kconfig of AIC23 users to select I2C variant
Now that AIC23 supports two control interfaces all existing I2C users
should select I2C variant.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07 10:55:33 +08:00
Lars-Peter Clausen 4f07c9ccdf ASoC: neo1973_wm8753: Convert to table based setup
Use table based setup to register the controls and DAPM widgets and routes.
This on one hand makes the code a bit shorter and cleaner and on the other hand
the board level DAPM elements get registered in the card's DAPM context rather
than in the CODEC's DAPM context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:35:04 +09:00
Lars-Peter Clausen 61e7fe2577 ASoC: neo1973_wm8753: Post gta01 support removal cleanup
With GTA01 support gone from the driver there is no need to keep a separate
initilization routine for the GTA02 specific bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:35:04 +09:00
Paul Bolle 0b166d8ef6 ASoC: smdk_wm8994: Fix typo "wm8894"
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11 16:39:36 +00:00
Mark Brown 631f8e9470 ASoC: tobermory: Stop the FLL if we fail to switch SYSCLK to it
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11 16:39:32 +00:00
Lars-Peter Clausen 4f6136fa0d ASoC: rx1950_uda1380: Don't modify runtime->hw
Individual components are not supposed to modify the runtime->hw struct itself
as it is manged by the ASoC core. If a component wants to limit the list of
supported rates it should set a rate constraint. The rx1950_uda1380 already does
this, so it is safe to just remove the code that modifies runtime->hw.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 18:42:02 +00:00
Lars-Peter Clausen 1659b84312 ASoC: h1940_uda1380: Don't modify runtime->hw
Individual components are not supposed to modify the runtime->hw struct itself
as it is manged by the ASoC core. If a component wants to limit the list of
supported rates it should set a rate constraint. The h1940_uda1380 already does
this, so it is safe to just remove the code that modifies runtime->hw.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 18:41:59 +00:00
Sachin Kamat d92bba83c7 ASoC: samsung: rx1950_uda1380: Remove unused variable
Fixes the following warning:
sound/soc/samsung/rx1950_uda1380.c:228:6: warning: unused variable ‘err’ [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 12:44:09 +00:00
Sachin Kamat 2046d45371 ASoC: samsung: h1940_uda1380: Fix build warning
Fixes the following warning:
sound/soc/samsung/h1940_uda1380.c:98:4: warning: passing argument 1 of ‘dev_err’ from incompatible pointer type [enabled by default]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 12:44:09 +00:00
Sachin Kamat 3bba4a7889 ASoC: samsung: h1940_uda1380: Remove unused variable
Fixes the following warning:
sound/soc/samsung/h1940_uda1380.c:183:6: warning: unused variable ‘err’ [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 12:44:09 +00:00
Sachin Kamat 25e7e34805 ASoC: samsung: Fix trivial typo
Changed Sat -> Say.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-30 11:42:36 +00:00
Sachin Kamat eaff64705d ASoC: samsung: Remove invalid dependencies
These symbols got eliminated when non-DT support for Exynos was
removed. Remove them.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-30 11:42:34 +00:00
Sachin Kamat 4c021cc5a4 ASoC: samsung: Remove dma.h inclusion
mach/dma.h is not referenced by this file. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:18:06 +00:00
Sachin Kamat 57e33781ce ASoC: samsung: Add NULL check in i2s.c
'res' could be NULL from one of the operations above (line 1243). Thus
check 'res' for NULL before releasing the region to avoid null pointer
dereference.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:18:03 +00:00
Sachin Kamat 9b35a7b65f ASoC: Samsung: Fix build error due to missing dependency
Depend on MFD_ARIZONA to avoid the following build errors:

sound/soc/codecs/arizona.c:218: undefined reference to `arizona_request_irq'
sound/soc/codecs/arizona.c:226: undefined reference to `arizona_request_irq'
sound/soc/codecs/arizona.c:1719: undefined reference to `arizona_request_irq'

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:16:53 +00:00
Sachin Kamat 4a9eee01b8 ASoC: samsung: Fix Kconfig dependency
Select S3C24XX_DMA instead of S3C2410_DMA to avoid following dependency issues
and build errors:

warning: (CPU_S3C2410 && CPU_S3C2442 && SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S && SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650) selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX && S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))
warning: (CPU_S3C2410 && CPU_S3C2442 && SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S && SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650) selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX && S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))

arch/arm/mach-s3c24xx/built-in.o: In function `s3c2410_dma_add':
arch/arm/mach-s3c24xx/dma-s3c2410.c:134: undefined reference to `s3c2410_dma_init'
arch/arm/mach-s3c24xx/dma-s3c2410.c:135: undefined reference to `s3c24xx_dma_order_set'
arch/arm/mach-s3c24xx/dma-s3c2410.c:136: undefined reference to `s3c24xx_dma_init_map'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
sound/soc/samsung/s3c24xx-i2s.c:293: undefined reference to `s3c2410_dma_ctrl'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
sound/built-in.o: In function `s3c2412_i2s_trigger':
sound/soc/samsung/s3c-i2s-v2.c:432: undefined reference to `s3c2410_dma_ctrl'

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-23 12:23:02 +00:00
Sachin Kamat f83183ca3c ASoC: samsung: smdk_wm8994: Fix build error
Fixes the following build error and warning when OF is not defined:
sound/soc/samsung/smdk_wm8994.c:191:23: error: ‘samsung_wm8994_of_match’ undeclared (first use in this function)
sound/soc/samsung/smdk_wm8994.c:47:32: warning: ‘smdk_board_data’ defined but not used [-Wunused-variable]

of_match_ptr() is used so that samsung_wm8994_of_match gets dropped (as unused)
by the compiler when OF is not defined.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Sachin Kamat 9eeb95727c ASoC: Samsung: s3c-i2s-v2: Fix build error
Fixes the following error introduced by commit eca3b01d08
("ASoC: switch over to use snd_soc_register_component() on s3c i2s"):
sound/soc/samsung/s3c-i2s-v2.c:732:32: error: ‘drv’ undeclared (first use in this function)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Sachin Kamat abffae647e ASoC: samsung: Fix build regressions due to gpio re-org
Recent changes through commits c67d0f2926 ("ARM: s3c24xx: get rid
of custom <mach/gpio.h>"), b0161caa72 ("ARM: S3C[24|64]xx: move includes
back under <mach/> scope"), 364374121b ("ARM: s3c24xx: explicit
dependency on <plat/gpio-cfg.h>") and 41c3548e6d ("ARM: s3c64xx: get rid
of custom <mach/gpio.h>") caused build regressions due to broken
dependencies. Fix the following errors by including the necessary header
files explicitly:

sound/soc/samsung/h1940_uda1380.c:56:3: error: implicit declaration of function ‘S3C2410_GPG’
sound/soc/samsung/h1940_uda1380.c:149:18: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/h1940_uda1380.c:234:21: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/h1940_uda1380.c:270:12: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/neo1973_wm8753.c:239:2: error: implicit declaration of function ‘S3C2410_GPJ’
sound/soc/samsung/rx1950_uda1380.c:67:3: error: implicit declaration of function ‘S3C2410_GPG’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C2410_GPE’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C_GPIO_SFN’
sound/soc/samsung/s3c2412-i2s.c:87:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C2410_GPE’
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C_GPIO_SFN’
sound/soc/samsung/s3c24xx-i2s.c:395:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared
sound/soc/samsung/smartq_wm8987.c:112:3: error: implicit declaration of function ‘S3C64XX_GPL’

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Lars-Peter Clausen d70e861a31 ASoC: samsung: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
The Samsung dmaengine ASoC driver is used with two different dmaengine drivers.
The pl80x, which properly supports residue reporting and the pl330, which
reports that it does not support residue reporting. So there is no need to
manually set the NO_RESIDUE flag. This has the advantage that a proper (race
condition free) PCM pointer() implementation is used when the pl80x driver is
used. Also once the pl330 driver supports residue reporting the ASoC PCM driver
will automatically start using it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 328089a471 ASoC: samsung: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 13:57:17 +00:00
Sachin Kamat 61c66c60c7 ASoC: samsung: Trivial cleanups in header files
commit 5d229ce569 ("ASoC: samsung: move plat/ headers to local directory")
moved the header files but forgot to clean the pointers to their old locaton.
Remove them now.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 12:05:56 +00:00
Mark Brown d37bdf736d ASoC: samsung: Use ASoC dmaengine code where possible
Since all Exynos platforms have been converted to dmaengine and many of
the older platforms are in the process of conversion they do not need to
use the legacy s3c-dma APIs for DMA but can instead use the standard ASoC
dmaengine helpers. This both allows them to benefit from improvements
implemented in the generic code and supports multiplatform.

This patch includes some fixes from Padma for Exynos SoCs, her testing
was on a slightly earlier version of the patch due to unrelated breakage
preventing testing.

Signed-off-by: Mark Brown <broonie@linaro.org>
Tested By: Padmavathi Venna <padma.v@samsung.com>
2013-12-12 00:29:00 +00:00
Mark Brown 3688569e81 ASoC: samsung: Provide helper for DMA init
In preparation for using the dmaengine helpers in ASoC rather than the
dmaengine wrappers for the Samsung API wrap the configuration of dma_data.
The dmaengine code expects different data to that used by the legacy API.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-12 00:28:57 +00:00
Wolfram Sang 16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Linus Torvalds 8ceafbfa91 Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm
Pull DMA mask updates from Russell King:
 "This series cleans up the handling of DMA masks in a lot of drivers,
  fixing some bugs as we go.

  Some of the more serious errors include:
   - drivers which only set their coherent DMA mask if the attempt to
     set the streaming mask fails.
   - drivers which test for a NULL dma mask pointer, and then set the
     dma mask pointer to a location in their module .data section -
     which will cause problems if the module is reloaded.

  To counter these, I have introduced two helper functions:
   - dma_set_mask_and_coherent() takes care of setting both the
     streaming and coherent masks at the same time, with the correct
     error handling as specified by the API.
   - dma_coerce_mask_and_coherent() which resolves the problem of
     drivers forcefully setting DMA masks.  This is more a marker for
     future work to further clean these locations up - the code which
     creates the devices really should be initialising these, but to fix
     that in one go along with this change could potentially be very
     disruptive.

  The last thing this series does is prise away some of Linux's addition
  to "DMA addresses are physical addresses and RAM always starts at
  zero".  We have ARM LPAE systems where all system memory is above 4GB
  physical, hence having DMA masks interpreted by (eg) the block layers
  as describing physical addresses in the range 0..DMAMASK fails on
  these platforms.  Santosh Shilimkar addresses this in this series; the
  patches were copied to the appropriate people multiple times but were
  ignored.

  Fixing this also gets rid of some ARM weirdness in the setup of the
  max*pfn variables, and brings ARM into line with every other Linux
  architecture as far as those go"

* 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
  ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
  ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
  ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
  ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
  ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
  ARM: DMA-API: better handing of DMA masks for coherent allocations
  ARM: 7857/1: dma: imx-sdma: setup dma mask
  DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
  DMA-API: dcdbas: update DMA mask handing
  DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
  DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
  DMA-API: crypto: remove last references to 'static struct device *dev'
  DMA-API: crypto: fix ixp4xx crypto platform device support
  DMA-API: others: use dma_set_coherent_mask()
  DMA-API: staging: use dma_set_coherent_mask()
  DMA-API: usb: use new dma_coerce_mask_and_coherent()
  DMA-API: usb: use dma_set_coherent_mask()
  DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
  DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
  DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
  ...
2013-11-14 07:55:21 +09:00
Linus Torvalds eeab517b68 sound updates for 3.13-rc1
There are no too intrusive changes in this update batch.  The biggest
 LOC is found in the new DICE driver, and other small changes are
 scattered over the whole sound subtree (which is a common pattern).
 
 Below are highlights:
 
 - ALSA core:
   * Memory allocation support with genpool
   * Fix blocking in drain ioctl of compress_offload
 
 - HD-audio:
   * Improved AMD HDMI supports
   * Intel HDMI detection improvements
   * thinkpad_acpi mute-key integration
   * New PCI ID, New ALC255,285,293 codecs, CX20952
 
 - USB-audio:
   * New buffer size management
   * Clean up endpoint handling codes
 
 - ASoC:
   * Further work on the dmaengine helpers, including support for
     configuring the parameters for DMA by reading the capabilities of
     the DMA controller which removes some guesswork and magic numbers
     from drivers.
   * A refresh of the documentation.
   * Conversions of many drivers to direct regmap API usage in order to
     allow the ASoC level register I/O code to be removed, this will
     hopefully be completed by v3.14.
   * Support for using async register I/O in DAPM, reducing the time
     taken to implement power transitions on systems that support it.
 
 - Fireiwre: DICE driver
 
 - Lots of small fixes for bugs reported by Coverity
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSf2ycAAoJEGwxgFQ9KSmkVPcQAIenO8wxmHFyxHStQEt4GkM/
 1BNk3V9MqAVv+ecjNPWrak+IUFY48gelUISfL1qIvlSl5pZ+FS+UEVSObczeI5Fp
 aY1WDCypC3nfsIm4JCIF/Mv3CpE3eY0Gcxqy6OO87mEVs14rLl/Q0NUw2UVrxRQp
 tu0dh6/C3Bjh8+qSnVnPVcLQG6tQsl7Wv71TyowL4ywom9yrx3uBT1qmqLftG8AH
 Wjm2mpxj0dCGAqTcgiu4DMyTJw7kuTmLduDbhExqIApiaeB2o5ilZny/uQBrP32z
 rdUiJm6cSmQ1jv7L0C0xR3vXv73rS73jXMYh2Qt/9iEZIZkwAhTy0Z7Jr5bMfPjP
 I9hICYRGhfa0S2UJa7yd6Jy3qlnUSyCAU9StQlLIiA+e3Xg0a8yoTZFQ/qWSWzwL
 UK584Wst/lCG8QWUwKV/3n/75ALcKZ1cVrBlcCvcKJwv6OKua7DK0XtDfGpsM5sz
 tiXjyY6T8nh87x62z3/IGMHD43xRp6zmadgwvCzYLkcBbsDNQSQHqzvly0XXtLYb
 4N0cEJjHjHDbiQXkWEreDZ/y9cUSv129GZWsnUQAsO1OoHQaf8hUQt5PxBeYGu9B
 E60pERBNVvicajitdwL+GJ1WeqTkl3VnU8s/ucLXGoGb92Z0aWhqtrMAHCj9MybP
 S2aL7q6otZ4k+Wgh3VKj
 =lxuj
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "There are no too intrusive changes in this update batch.  The biggest
  LOC is found in the new DICE driver, and other small changes are
  scattered over the whole sound subtree (which is a common pattern).

  Below are highlights:

   - ALSA core:
     * Memory allocation support with genpool
     * Fix blocking in drain ioctl of compress_offload

   - HD-audio:
     * Improved AMD HDMI supports
     * Intel HDMI detection improvements
     * thinkpad_acpi mute-key integration
     * New PCI ID, New ALC255,285,293 codecs, CX20952

   - USB-audio:
     * New buffer size management
     * Clean up endpoint handling codes

   - ASoC:
     * Further work on the dmaengine helpers, including support for
       configuring the parameters for DMA by reading the capabilities of
       the DMA controller which removes some guesswork and magic numbers
       from drivers.
     * A refresh of the documentation.
     * Conversions of many drivers to direct regmap API usage in order
       to allow the ASoC level register I/O code to be removed, this
       will hopefully be completed by v3.14.
     * Support for using async register I/O in DAPM, reducing the time
       taken to implement power transitions on systems that support it.

   - Firewire: DICE driver

   - Lots of small fixes for bugs reported by Coverity"

* tag 'sound-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (382 commits)
  ALSA: hda/realtek - Add new codec ALC255/ALC3234 UAJ supported
  ALSA: hda - Apply MacBook fixups for CS4208 correctly
  ASoC: fsl: imx-wm8962: remove an unneeded check
  ASoC: fsl: imx-pcm-fiq: Remove unused 'runtime' variable
  ALSA: hda/realtek - Make fixup regs persist after resume
  ALSA: hda_intel: ratelimit "spurious response" message
  ASoC: generic-dmaengine-pcm: Use SNDRV_DMA_TYPE_DEV_IRAM as default
  ASoC: dapm: Use WARN_ON() instead of BUG_ON()
  ASoC: wm_adsp: Fix BUG_ON() and WARN_ON() usages
  ASoC: Replace BUG() with WARN()
  ASoC: wm_hubs: Replace BUG() with WARN()
  ASoC: wm8996: Replace BUG() with WARN()
  ASoC: wm8962: Replace BUG() with WARN()
  ASoC: wm8958: Replace BUG() with WARN()
  ASoC: wm8904: Replace BUG() with WARN()
  ASoC: wm8900: Replace BUG() with WARN()
  ASoC: wm8350: Replace BUG() with WARN()
  ASoC: txx9: Use WARN_ON() instead of BUG_ON()
  ASoC: sh: Use WARN_ON() instead of BUG_ON()
  ASoC: rcar: Use WARN_ON() instead of BUG_ON()
  ...
2013-11-12 15:29:53 +09:00
Linus Torvalds 53575aa99d ARM: driver updates for 3.13
Updates of SoC-near drivers and other driver updates that makes more sense to
 take through our tree. In this case it's involved:
 
 - Some Davinci driver updates that has required corresponding platform code
   changes (gpio mostly)
 - CCI bindings and a few driver updates
 - Marvell mvebu patches for PCI MSI support (could have gone through the PCI
   tree for this release, but they were acked by Bjorn for 3.12 so we kept them
   through arm-soc).
 - Marvell dove switch-over to DT-based PCIe configuration
 - Misc updates for Samsung platform dmaengine drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSgBr3AAoJEIwa5zzehBx3QkEP/i0bm4V+AkNV/EXPxqXDf0Re
 WIKao/0UjqEfTLSx38F+GlsCdpiPkicPZls0tzAiuqWycx+gMiUlJ7XB+tFmQRk1
 RS4KzPQeALFVapjVLtid/Bls9OVI8NcNL1Dx7FISTURzrSzB+kXg7KIsq92SootW
 AHUMZbPQNqZoTYcRo9EFEBCm+7QwH1GmWIo5tID6sRhPIsj0xXrw/zOQDK4WDbkv
 ZmlR2PNdVTYNuKsWtBcINU5GGNcTCEpnLlHZ9QzVOGyP2M/S93FQdjjm+vDxBRC6
 0WsCCFzWc2boSyKrah8xcb7kox7+8HMXUFFAARfOJxvqnMpDCSQnQv0Hb2SiwbkF
 7AW90lj+E9KqleSVy1fjGOvx2MV8vhqFMoCYg2TXW2546JADGnCw2JOILfRcqMox
 JqIpc84Yhmnv2qFCDxdj9hLYqvhH3RjdLzaLhSfMPc8pjP1StMJzcNi7tN46KVqg
 60wU7DvJ0uWfacUGj7VBn88XiZvvJjO/laxj5UcZlS+kQzsysw4Tbriz9UeJK1yl
 N0LBl4iA9xn5aUEI/1kL8xzX+h01VodMCe6jIz3JBdE66vCX6d2Tf+zYpNHiGCsH
 kBfOpuYc1jVW6qTYqDWgO3IVdDdSGa096AF5vR3MOmtDidblq9QVVxxhDwscqO6J
 O0RIcxwZAzQGcO4F50PL
 =yCsK
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM driver updates from Olof Johansson:
 "Updates of SoC-near drivers and other driver updates that makes more
  sense to take through our tree.  In this case it's involved:

   - Some Davinci driver updates that has required corresponding
     platform code changes (gpio mostly)
   - CCI bindings and a few driver updates
   - Marvell mvebu patches for PCI MSI support (could have gone through
     the PCI tree for this release, but they were acked by Bjorn for
     3.12 so we kept them through arm-soc).
   - Marvell dove switch-over to DT-based PCIe configuration
   - Misc updates for Samsung platform dmaengine drivers"

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (32 commits)
  ARM: S3C24XX: add dma pdata for s3c2410, s3c2440 and s3c2442
  dmaengine: s3c24xx-dma: add support for the s3c2410 type of controller
  ARM: S3C24XX: Fix possible dma selection warning
  PCI: mvebu: make local functions static
  PCI: mvebu: add I/O access wrappers
  PCI: mvebu: Dynamically detect if the PEX link is up to enable hot plug
  ARM: mvebu: fix gated clock documentation
  ARM: dove: remove legacy pcie and clock init
  ARM: dove: switch to DT probed mbus address windows
  ARM: SAMSUNG: set s3c24xx_dma_filter for s3c64xx-spi0 device
  ARM: S3C24XX: add platform-devices for new dma driver for s3c2412 and s3c2443
  dmaengine: add driver for Samsung s3c24xx SoCs
  ARM: S3C24XX: number the dma clocks
  PCI: mvebu: add support for Marvell Dove SoCs
  PCI: mvebu: add support for reset on GPIO
  PCI: mvebu: remove subsys_initcall
  PCI: mvebu: increment nports only for registered ports
  PCI: mvebu: move clock enable before register access
  PCI: mvebu: add support for MSI
  irqchip: armada-370-xp: implement MSI support
  ...
2013-11-11 17:05:37 +09:00
Mark Brown d092232793 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-11-03 22:04:20 -08:00
Russell King c9bd5e690a DMA-API: sound: fix dma mask handling in a lot of drivers
This code sequence is unsafe in modules:

static u64 mask = DMA_BIT_MASK(something);
...
	if (!dev->dma_mask)
		dev->dma_mask = &mask;

as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses.  Moreover, they
all follow this with:

	if (!dev->coherent_dma_mask)
		dev->coherent_dma_mask = mask;

where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.

Fix these issues by using the new dma_coerce_coherent_and_mask()
function.

Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:47 +00:00
Wei Yongjun 29ca9c73e5 ASoC: samsung: fix return value check in i2s_alloc_dai()
In case of error, the function platform_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 10:25:51 +01:00
Mark Brown 1f7f8e0462 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-10-24 11:24:12 +01:00
Heiko Stuebner da2f5f4852 ARM: S3C24XX: Fix possible dma selection warning
Currently the s3c sound support selects CONFIG_S3C2410_DMA on s3c24xx
architectures while the generic dma config is enabled by CONFIG_S3C24XX_DMA.

With the way the Kconfig options are layed out currently it is possible
to enable Samsung sound support without enabling the necessary dma support
resulting in warnings like
  warning: (SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S &&
       SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650)
  selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX &&
       S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))

Therefore bring the s3c2410 dma support in line with the way the other
s3c24xx SoCs handle this by having the SoC dma-support selected if the generic
s3c dma support is enabled and have the sound support depend on S3C24XX_DMA
on these arches. The s3c2442 is using the same dma descriptors and therefore
also selected S3C2410_DMA.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-10-21 05:32:48 +09:00
Mark Brown 511e303317 ASoC: samsung: Initialise DMA data at device probe time
This is a minor simplification and will help with converting the platform
to use the dmaengine helpers.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:26:37 +01:00
Sachin Kamat de0022d4bf ASoC: smdk_wm8994: Add .pm to struct smdk_audio_driver
Register PM ops for this driver.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 12:59:12 +01:00
Tomasz Figa 7472a2f21b ASoC: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
Since CONFIG_PLAT_S3C64XX is going to be removed, this patch modifies
the s3c-i2s-v2 driver to use the proper way of checking for S3C64xx
support - CONFIG_ARCH_S3C64XX.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-10-06 09:01:56 +09:00
Mark Brown d644a115e8 ASoC: samsung-i2s: Use devm_snd_soc_register_component()
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:51:05 +01:00
Mark Brown 9a8e0322f0 ASoC: smdk_wm8994: Use devm_snd_soc_unregister_card()
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:50:50 +01:00
Charles Keepax b3a6006e1d ASoC: bells: Add missing route to power up DSP clock
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:43:09 +01:00
Charles Keepax a0ff6ea24f ASoC: samsung: Allow mono in i2s driver
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:42:16 +01:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Mark Brown c85fa502ef Merge remote-tracking branch 'asoc/topic/samsung' into tmp 2013-08-30 11:04:29 +01:00
Tomasz Figa 9b9ae16a97 ASoC: Samsung: Do not queue cyclic buffers multiple times
The legacy S3C-DMA API required every period of a cyclic buffer to be
queued separately. After conversion of Samsung ASoC to Samsung DMA
wrappers somebody made an assumption that the same is needed for DMA
engine API, which is not true.

In effect, Samsung ASoC DMA code was queuing the whole cyclic buffer
multiple times with a shift of one period per iteration, leading to:
  a) severe memory waste - up to 13x times more DMA transfer descriptors
     are allocated than needed,
  b) possible memory corruption, because further cyclic buffers were out
     of the original buffers, due to the offset.

This patch fixes this problem by making the legacy S3C-DMA API use the
same semantics as DMA engine (the whole cyclic buffer is enqueued at
once) and modifying users of Samsung DMA wrappers in cyclic mode to
behave appropriately.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 17:31:02 +01:00
Mark Brown c41788c091 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-08-22 14:28:49 +01:00
Tushar Behera 06b10ff913 ASoC: samsung: Fix build error with dma function rename
commit 85ff3c29d7 ("ASoC: samsung: Rename DMA platform registration
functions") renames the DMA registration functions. Fix the places where
it was left out.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 14:28:00 +01:00
Mark Brown 85ff3c29d7 ASoC: samsung: Rename DMA platform registration functions
The current naming with a simple asoc_ prefix is too generic for use in
multiplatform kernels.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2013-08-20 10:36:33 +01:00
Mark Brown 37e6071787 ASoC: samsung: Check to see if we managed to allocate a channel
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2013-08-20 10:36:00 +01:00
Julia Lawall 64efc5a0f2 ASoC: samsung-ac97: simplify use of devm_ioremap_resource
Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.

Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more clear.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@

- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14 19:14:36 +01:00
Padmavathi Venna 4ca0c0d478 ASoC: Samsung: I2S: Modify the I2S driver to support I2S on Exynos5420
Exynos5420 added support for I2S TDM mode. For this, there are some
register changes in the I2S controller. This patch adds the relevant
register changes to support I2S in normal mode. This patch adds a
quirk for TDM mode and if TDM mode is present all the relevent changes
will be applied.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-13 13:44:09 +01:00
Padmavathi Venna 7da493e922 ASoC: Samsung: I2S: Add quirks as driver data in I2S
Samsung has different versions of I2S introduced in different
platforms. Each version has some new support added for multichannel,
secondary fifo, s/w reset control and internal mux for rclk src clk.
Each newly added change has a quirk. So this patch adds all the
required quirks as driver data and based on compatible string from
dtsi fetches the quirks.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-13 13:44:06 +01:00
Mark Brown 2f6f0ffb2b ASoC: samsung: Make secondary I2S DAI device a child of primary
More for neatness than for any great utility. Really we shouldn't be
creating the child device at all, refactoring will follow.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01 12:01:29 +01:00
Mark Brown d30c148bb1 ASoC: smdk_wm8994: Configure the MCLK1 rate based on the board
Make the code more generally applicable by refactoring so that the MCLK1
rate can be selected based on the compatible string provided by the device
tree, allowing use on other boards which have different rates or use other
information sources.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 18:34:29 +01:00
Mark Brown f6ecf50b5e ASoC: smdk_wm8994: Configure DAI format at init time
Initialise the DAI format from the data link, saving code and repeated
work.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 18:34:28 +01:00
Mark Brown 0d47acc4ff ASoC: smdk_wm8994: Make driver name more unique
Avoid collisions with other SMDK audio by using the CODEC name.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 18:34:28 +01:00
Padmavathi Venna b60be4aa40 ASoC: Samsung: I2S: Modify driver to give more flexibility
This patch modifies the i2s driver to give flexibility towards register
handling. This is a pre requirement for enabling i2s support on Exynos5420.
This patch modifies only the required registers as a pre-requirement to
support on Exynos5420.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-26 16:05:33 +01:00
Mark Brown 7497185f8c ASoC: samsung-spdif: Convert to devm_clk_get()
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16 13:59:26 +01:00
Mark Brown 441c93ed6e Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2013-07-15 11:13:54 +01:00
Linus Torvalds 0fb3767b0a sound fixes for 3.11
A few small fixes (and cleanups) for HD-audio, USB-audio and ASoC.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJR3otvAAoJEGwxgFQ9KSmkfosP/28H6yuH1il0une1Z+zvmwa3
 t8AqzBf9FPaa+mODW38NQH+P7k9Pq7dNheq12h4ERzRKurOy0IdGOJ//gq2qtuEL
 mr0MoOa9nvD13+DlPWswDkgZzgJjAqTXlW+w4ls8RhhqglxFhOwhMrmaloNnmQbY
 63NF/tFh+vDiAQBSvxHG8vflX0EXW1as7I4x79j66G62SE2IFsqqc9FGrujTx6s2
 d13y427EmHm04exi7CDK+yM338Kud7L8dBzllvwNx+IMPv8cpK3iWWdR6YhGGMdo
 wraMmv6z7z6LJxi6aadzX2zp6H6vC0XnBZ3Ikeu0mQm1xuMFD1lZdFWRFkLe54z3
 L3JQ+41CU/kYkikK2Z69cEW2sTGMDNF2997bO7A770uZcs2Um0CIj0uoUTD90TQc
 lWRQb+PnpP/g4iZ+LMo8js3VsTmMPVxgn/XzpQBp1YXyDXNOAsb0RVIKfRCEBpxn
 yB0nGwIo6HPf9Z8FM3sFIafZXWInzxITGH4ixMEzCLsExhmydRK5vyIXFeZx91ek
 j/w+3GTh1SfO9Lz8RA/jbRn4IKp26m9MFXc0U73eJ5FJqzoyTMMIaRXytpoI+Tr2
 E4efThFmNhVzS0tN0yyhfJwobbhUln8XXP57n8GD+L4jHCa/8haLWsKJfNBDSZbG
 gdvzsB/vXr29ocev/L4k
 =Oabk
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A few small fixes (and cleanups) for HD-audio, USB-audio and ASoC"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: fix regression for fixed stream quirk
  ALSA: hda - Keep halting ALC5505 DSP
  ASoC: wm8962: fix NULL pdata pointer
  ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
  ASoC: Samsung: Remove redundant comment
  ALSA: hda - Fix EAPD vmaster hook for AD1884 & co
  ASoC: samsung: Remove obsolete GPIO based DT pinmuxing
  ASoC: mxs: register saif mclk to clock framework
2013-07-11 12:45:59 -07:00
Padmavathi Venna 770100108b ASoC: Samsung: Set RFS and BFS in slave mode
As per the User Manual, the RFS and BFS should be set in slave mode
for correct operation.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11 12:06:39 +01:00
Takashi Iwai 38f0ad7c90 ASoC: Updates for v3.11
A few small fixes, all driver specific.  The removal of the GPIO based
 pinmuxing is a bug fix, since the obsolete nodes had been removed from
 the DT it stopped the driver loading.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIbBAABAgAGBQJR1pSAAAoJELSic+t+oim9UCkP9it8xj9B7aXZZPPSuAAMkB6o
 SPc3dluSqmrhGpMo4C8DAEgkRg8bmNTjK8asL47z/3XXT64HO32fPXsnBZcH+eRl
 7PNGVGmKpKdyS63DinonzSadvb/zudYa0UOSC8sdPtNtdQvOiKSOYLYijWBBATGd
 mvQ8ZlOIc7TzDDuCU8MdwvJwWaT6WgNV6dkcqwsCbAKP4e6fGwI/pP9NVRBQwxTd
 mgu/FAV+Rn7+qgWY1wqxM5AgTjjGXBfGwVhUEpKAwJmhz0nEK3euzXnlzPzb9a+E
 WvnzIkzcjEeY6e71PkeaTkHg5G9Vlb/GnL91Jgx5MC5CFL7W8c5jIu774Qa7V2jU
 ICxhr+dRP3mO72VLFbtZti0O2rsWOr4VsC7wV/c2cbSibiUtnf0fqQ0MoVbKzN1V
 GW0wl7PmVJvhad+2JVubsJpR8VCwy25qLiQ8IoJXqwLxsQJ1pzA9jfNKURPKc7t7
 iDkvtEZhp783yyYG1EUdfAe46NZw1jgq3KBwMu0sgNSXRBMpcFujfDKHzMGmeWaL
 cCOrAriDvc+ucsQSfHbLcjqJVQN+0zqbmjHETrTaWyDF/ymggGn4PIUOUv9tAlYR
 ThzBWxDLOPzeHzC23vsinfypbkFkVAUIBUuHcpQDFR9xgcblQCVPHaE0GELSbtRh
 GK8epbwcKDGu0G1KxtY=
 =+rVP
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.11

A few small fixes, all driver specific.  The removal of the GPIO based
pinmuxing is a bug fix, since the obsolete nodes had been removed from
the DT it stopped the driver loading.
2013-07-05 11:54:27 +02:00
Mark Brown 58be9a9311 Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2013-07-04 18:30:02 +01:00
Sachin Kamat b3ff04668c ASoC: Samsung: Remove redundant comment
There is a typo in the filename (i2c mentioned instead of i2s).
However, this is a redundant piece of information. Delete it
altogether.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-04 13:51:14 +01:00
Linus Torvalds 1286da8bc0 sound updates for 3.11
A relative calm release at this time with a flat diffstat.
 The only significant change in the ALSA core side is the support for
 more than 32 card instances, configurable via kconfig.
 Other than that, in both ASoC and other parts, mostly some
 improvements and fixes on the driver side.
 
 - hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes
 - hda: Haswell HDMI audio fixes, runtime PM improvements
 - hda: Intel BayTrail support, ALC5505 DSP support
 - es1968: MediaForte M56VAP support
 - usb-audio: Improved support for Yamaha/Roland devices
 - usb-audio: M2Tech hiFace, Audio Advantage Micro II support
 - hdspm: wordclock fixes
 - ASoC: Pending fixes for WM8962
 - ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500
 - ASoC: Generalisation of the Bluetooth and HDMI stub drivers
 - ASoC: SSM2518 and RT5640 codec drivers.
 - ASoC: Tegra CPUs with RT5640 machine driver
 - ASoC: AC'97 refactoring bug fixes
 - ASoC: ADAU1701 driver fixes
 - Clean up of *_set_drvdata() in a wide range of drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJR1BNeAAoJEGwxgFQ9KSmk5mAP/iH8IPdaMq/EI3Kdk2lwqXwK
 xQvpQCKTeux4UrETSDM5kOfk+Nv0oq7jD60wEZs6eONAZdfIzACEjdpQBdC4vr6f
 2S8b9J6xBe2siHGbzBsgV9g8xhnYXC5m0u8QBRa9fyNVpMu1o1X6Mv7FS/wUCMZ6
 M7vaSdrU4pfa4v9sy9loOYbyDZoSZg0revwqWAm8Kfp4XSd1aPwiCVPLVOWcvNYC
 hriz5ICARFg+yqzJADPBYtSU752zxlZd/N1b2YQw1YnoxA66FoVaqQfYD1voL0WY
 8m9abNlnln6qxyeQPMvRMZty1I/kCwOlp5dO0OZHisMLE8MApLk1e7ct9+W+b9hn
 NORbo3klmwZfIl1s8JSGHs5Nknqzhdzau35TVPTmtC50wgnPO6EYVeYFiZqkuYyK
 UdCHJTRjyS6HlmbdKeSaRr+PoCR0zVQruXFjWnAwQ9Zy+1qrnVb5Ly9np7YCc8YC
 3iYOygJyn+JmyfeeIxVUCg6Rdf4NUv+JPx48yuoq79YnWAbRiSSct1/J+4YcYcm5
 VjJdtCwElil3dSeba+Oy2wcSwaJzyaINbClzmZdysT26M8QLZaRCBU0zujeiyl/n
 lV/p/n+UmmtfHIdJDz6Eu6fQVAbh0v89mZrEJdjroLebwS1NBLAaKkb9vY63AdKt
 P5c/7KWejQ/CtoVYeo3O
 =i5lT
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "A relative calm release at this time with a flat diffstat.  The only
  significant change in the ALSA core side is the support for more than
  32 card instances, configurable via kconfig.  Other than that, in both
  ASoC and other parts, mostly some improvements and fixes on the driver
  side.

   - hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes
   - hda: Haswell HDMI audio fixes, runtime PM improvements
   - hda: Intel BayTrail support, ALC5505 DSP support
   - es1968: MediaForte M56VAP support
   - usb-audio: Improved support for Yamaha/Roland devices
   - usb-audio: M2Tech hiFace, Audio Advantage Micro II support
   - hdspm: wordclock fixes
   - ASoC: Pending fixes for WM8962
   - ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500
   - ASoC: Generalisation of the Bluetooth and HDMI stub drivers
   - ASoC: SSM2518 and RT5640 codec drivers.
   - ASoC: Tegra CPUs with RT5640 machine driver
   - ASoC: AC'97 refactoring bug fixes
   - ASoC: ADAU1701 driver fixes
   - Clean up of *_set_drvdata() in a wide range of drivers"

* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (284 commits)
  ALSA: vmaster: Fix the regression of missing vmaster hook call
  ALSA: hda - Add Dell SSID to support Headset Mic recording
  ASoC: adau1701: remove control_data assignment
  ASoC: adau1701: more direct regmap usage
  ASoC: ac97: fixup multi-platform AC'97 module build failure
  ASoC: pxa2xx: fixup multi-platform AC'97 build failures
  ASoC: tegra20-ac97: Remove unused variable
  ASoC: tegra20-ac97: Remove duplicate error message
  ALSA: usb-audio: Add Audio Advantage Micro II
  ASoC: tas5086: fix Mid-Z implementation
  ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size
  ALSA: Replace the magic number 44 with const
  ALSA: hda - Fix the max length of control name in generic parser
  ALSA: hda - Guess what, it's two more Dell headset mic quirks
  ALSA: hda - Yet another Dell headset mic quirk
  ALSA: hda - Add support for ALC5505 DSP power-save mode
  ASoC: mfld: Remove unused variable
  ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
  ALSA: usb-audio: claim autodetected PCM interfaces all at once
  ALSA: usb-audio: remove superfluous Roland quirks
  ...
2013-07-03 19:52:22 -07:00
Mark Brown 0429ffeff4 ASoC: samsung: Remove obsolete GPIO based DT pinmuxing
Since the Samsung platforms have moved to pinctrl for pin muxing and that
is handled in the core the old GPIO based muxing code can just be removed.
Something similar had been submitted by Thomas Abraham back in March but
a resubmission following review never happened.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-02 13:14:05 +01:00
Al Viro 350226c20f samsung: don't bother with setting VM_IO
io_remap_pfn_range() will set it just fine

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-06-29 12:46:36 +04:00
Takashi Iwai accaf69da1 ASoC: More updates for v3.11
Some more fixes and enhancements, and also a bunch of refectoring for
 AC'97 support which enables more than one AC'97 controller driver to be
 built in.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRzXInAAoJELSic+t+oim9jBoQAJjGBiMyEyPv51CV5h2Cfo7c
 SGvoYwC+Q90fBsCLt4J/ei0rP+LUEbNUdnvs+xFeRiCqWHYs/d3/PeIZnuPMUQvZ
 VQOen7L1S+zd6mvDAr45LFmQOpAi74QkqRL1cwtuxWYeLJvFJwvYFTME6pYgjLi4
 HYAmZPZjMhOu3oNZmQIb+4Cmrf0/YbaIserI5kzHWd4b+pC8QCneBqvfwIaMowe0
 qBHw/bSB/haLTpjjbxZGw8NtnJyBvTT90ixgmv1akcZY/8NEh2bMIlzu52olNCci
 ZsCaS0HnjnICV7X5j6bBSjoqt7BQfXdQGFM7mbLn7BqW16MW/R0ONoSk1vE0RQQ0
 RGNYRA/X5yG4XReFE+93sHbJ2esGYnynwbykJd19DNFq0JRpdEpBUuudk8GsTEGh
 jsdh7YbRRGz1EUCxjiyMKiN7jHUhYGB9RRXjbR8Fo4GmTI1HHkOuv07gUfWr7v8F
 o2EcgvNdsEYtOrHP/Y7NCqkd7GkZOzDm3Xfp8Z5Wb81uKhJ3vbldvvUyjWBHrXLO
 Lzb2EACJYE8rqNN3FPsmNDBiuVlRrHeQQmtLL21lz5ZBK7b93+/NK44jN5OnNgU1
 D1PyErveZwogvtAUhZamx7FoZfnHxXQ4nNUWlLacBl3gRLrjzVqB8LQ9IdTyV1/V
 rqTrG1nTPJRCJLN0DLqq
 =UZaY
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: More updates for v3.11

Some more fixes and enhancements, and also a bunch of refectoring for
AC'97 support which enables more than one AC'97 controller driver to be
built in.
2013-06-28 13:36:22 +02:00
Mark Brown b047e1cce8 ASoC: ac97: Support multi-platform AC'97
Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.

This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27 09:48:42 +01:00
Mark Brown 25fd0bfd53 ASoC: samsung-ac97: Convert to devm_ioremap_resource()
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27 09:43:37 +01:00
Mark Brown 5d45ee3cdb ASoC: samsung-ac97: Use devm_clk_get()
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27 09:43:28 +01:00
Takashi Iwai 04c9548c78 ASoC: samsung: Fix a typo of CONFIG_SND_SOC_BT_SCO
... instead of CONFIG_SND_SOC_SCO.
Introduced in the commit 200ceb96.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-21 18:09:49 +02:00
Mark Brown 1ee9271d67 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-06-17 17:20:26 +01:00
Charles Keepax 939d3c6a6c ASoC: bells: Hookup DMICs for Bells
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-27 08:05:19 -04:00
Barry Song 200ceb962f ASoC: dfbmcs320: make the driver common for other BT modules
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips,
we don't want everyone to have a seperate codec driver. anyway, the
feature of Bluetooth SCO is same on all platforms, so this patch
makes the DFBM-CS320 driver become a common BT SCO link driver.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-21 13:17:08 -05:00
Sachin Kamat e75fa9b1f9 ASoC: Samsung: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-12 20:49:13 +04:00
Mark Brown df00b71fbd Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-04-12 13:57:13 +01:00
Heiko Stübner 32873b5953 ASoC: samsung: fix neo1973-wm8753 compilation
Commit b2ca78717c (ARM: S3C24XX: make gta02.h local) already replaced
the GTA02_GPIO_* constants in neo1973-wm8753.c but forgot to remove the
inclusion of mach/gta02.h before moving the file out of mach/.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-12 12:37:16 +01:00
Arnd Bergmann 5d229ce569 ASoC: samsung: move plat/ headers to local directory
The plat/regs-iis.h and plat/regs-ac97.h files in the samsung platform
are only needed by the ASoC drivers, so they can be moved into the same
directory, as one more step towards a multiplatform build.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 18:17:38 +01:00
Arnd Bergmann 0930c33ad0 ASoC: samsung: export idma_reg_addr_init
The idma_reg_addr_init function is used by the samsung i2s driver,
which can be a loadable module, so we have to export this function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 17:51:31 +01:00
Arnd Bergmann 2af1955848 ASoC: samsung: fix module_device_table
The second argument to the module_device_table macro must be the
name of the device id array. In the samsung i2s driver, there
was a small typo, resulting in a build error when building it
as a loadable module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 17:51:30 +01:00
Arnd Bergmann cb00e3a16d ASoC: samsung: use irq resource for idma
With multiplatform kernels, we cannot use hardwired IRQ
numbers in device drivers. This changes the idma driver
to use a proper resource, like all other drivers do.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 17:51:30 +01:00