Commit Graph

2230 Commits

Author SHA1 Message Date
Haojian Zhuang f5d1e5ed58 ASoC: update setting for pxa ssp slave mode
SCFR bit is required to be always set if pxa ssp is in slave mode. This bit
indicates clock input to SSPSCLK is only active during data transfers.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-15 14:50:59 +01:00
Haojian Zhuang dd99a4524b ASoC: fix pxa2xx-pcm.h path
Since pxa2xx-pcm.h is removed from sound/soc/pxa, we need to update the
path in related files.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Tested-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-15 14:50:48 +01:00
Ian Lartey 10e2f11326 ASoC: multi-component: Fix reference to moved header file, which was unused anyway.
Removed #include of pxa2xx-pcm.h

Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-15 14:50:37 +01:00
Mark Brown 6ba6c9c341 ASoC: Remove redundant device name from debugfs directory
Since the core now includes deduplication in the name of CODEC
devices there's no need to add extra for the debugfs directory name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-15 14:50:28 +01:00
Mark Brown 13cb61f8c2 ASoC: Set up debugfs only once per CODEC
Since the debugfs directory is current per CODEC we should only init
it when the CODEC is initialised, otherwise we end up with errors
being generated when an attempt is made to add duplicate debugfs
entries.

Since most of this stuff is actually for the card we should refactor
but this can come later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-15 14:50:16 +01:00
Takashi Iwai aaae527211 Merge branch 'fix/asoc' into for-linus 2010-08-15 14:34:02 +02:00
Mark Brown b6b056911a ASoC: Only tweak WM8994 chip configuration on devices up to rev D
Any subsequent revisions will have these configuration changes applied
by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-13 14:55:13 +01:00
Mark Brown 0c17b39394 ASoC: Optimise DSP performance for WM8994
Change the chip defaults to optimise performance of some of the DSP
functionality.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-13 14:55:01 +01:00
Linus Torvalds 14a4fa20a1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: add AD1980 obsolete information
  ASoC: register cache should be 1 byte aligned for 1 byte long register
  ALSA: hda - Adding support for new IDT 92HD87XX codecs
  ASoC: Fix inverted mute controls for WM8580
  ALSA: HDA: Use model=auto for LG R510
  ALSA: hda - Update model entries in HD-Audio-Models.txt
  ALSA: hda: document VIA models
  ALSA: hda - patch_nvhdmi.c: Add missing codec IDs, unify names
  ALSA: hda - add support for Conexant CX20584
  ALSA: hda - New snd-hda-intel model/pin config for hp dv7-4000
  ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec
  ALSA: hda - Make converter setups sticky
  ALSA: hda - Add support for Acer ZGA ALC271 (1025:047c)
  sound/oss: Adjust confusing if indentation
  sound: oss: au1550_ac97.c removed duplicated #include
  ASoC: Fix for changed Eureka Kconfig symbol names
2010-08-12 10:00:06 -07:00
Linus Torvalds 58d4ea65b9 Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  mmc_spi: Fix unterminated of_match_table
  of/sparc: fix build regression from of_device changes
  of/device: Replace struct of_device with struct platform_device
2010-08-12 09:11:31 -07:00
Mark Brown 381ac990db ASoC: Remove unused driver data from WM8961 probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 16:11:07 +01:00
Mark Brown 48bd3472d6 ASoC: Staticise WM8727 codec driver structure
Nothing should be referencing this any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 16:10:55 +01:00
Mark Brown 54d8d0aeb9 ASoC: Update WM8962 to build with multi-component
No notable changes, currently build tested only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-12 15:02:11 +01:00
Mark Brown cf7af01aa7 Merge branch 'topic/multi-component' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into for-2.6.37 2010-08-12 14:40:28 +01:00
Peter Ujfalusi 5dcba5d674 ASoC: multi-component: TWL4030: Restore registers on removal
Add back the register restore call, when the codec driver is
removed.
This does not affect normal operation, but it is usefull when
debugging audio through the twl4030 class codecs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:04:35 +01:00
Mark Brown a6d14342dc ASoC: Automatically determine control_data for soc-cache users
Since the provision of a struct device for the CODEC is now mandatory
we can use container_of() to locate the struct i2c_client and struct
spi_device for relevant devices, removing the need to manually set it
in each driver.

A further patch will automate selection of the control type based on
the bus_type of the struct device, further reducing the amount of
driver code required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:02:06 +01:00
Mark Brown 960d069791 ASoC: Add MODULE_ALIAS to Samsung DAI drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:20 +01:00
Mark Brown 38445af3bc ASoC: Remove version display from WM8971 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:19 +01:00
Mark Brown af3751a0bf ASoC: Remove unneeded control_data management from Wolfson drivers
Now soc-cache.c can figure out the I2C and SPI control data from the
device for the CODEC we don't need to manually assign it in drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:19 +01:00
Mark Brown 26e277d715 ASoC: Remove version display from WM8510 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:18 +01:00
Timur Tabi ff71334a46 asoc/multi-component: fsl: add support for disabled SSI nodes
Add support for adding "status = disabled" to an SSI node to incidate that it
is not wired on the board.  This replaces the not-so-intuitive previous method
of omitting a codec-handle property.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:17 +01:00
Timur Tabi 87a0632b29 asoc/multi-component: fsl: fix exit and error paths in DMA and SSI drivers
The error handling code in the OF probe function of the SSI driver is not
freeing all resources correctly.

Since the machine driver no longer calls the DMA driver to provide information
about the SSI, we don't need to keep a list of DMA objects any more.  In
addition, the fsl_soc_dma_remove() function is incorrectly removing *all*
DMA objects when it should only remove one.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:17 +01:00
Timur Tabi 1a3c5a491a asoc/multi-component: fsl: add support for 36-bit physical addresses
Update the DMA driver used by the Freescale MPC8610 HPCD audio driver to
support 36-bit physical addresses, for both DMA buffers and the SSI registers.

The DMA driver calls snd_dma_alloc_pages() to allocate the DMA buffers for
playback and capture.  This function is just a front-end for
dma_alloc_coherent().  Currently, dma_alloc_coherent() only allocates buffers
in low memory (it ignores GFP_HIGHMEM), so we never actually get a DMA buffer
with a real 36-bit physical address.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:16 +01:00
Timur Tabi 6e6f66226f powerpc: rename immap_86xx.h to fsl_guts.h, and add 85xx support
The immap_86xx.h header file only defines one data structure: the "global
utilities" register set found on Freescale PowerPC SOCs.  Rename this file
to fsl_guts.h to reflect its true purpose, and extend it to cover the "GUTS"
register set on 85xx chips.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:15 +01:00
Chanwoo Choi f51582fd8d ASoC: multi-component - Add Goni sound driver
This patch add sound support for the Goni board based on S5PV210.

The Goni board is based on Samsung SoC(S5PV210) and include
WM8994 codec over I2S to support sound.

The kind of jack is below states :
* SND_JACK_HEADPHONE
* SND_JACK_HEADSET
* SND_JACK_MECHANICAL
  : When TV-OUT cable is inserted on Goni board,
  the TV-OUT cable isn't connected to television.
* SND_JACK_AVOUT
  : When TV-OUT cable is inserted on Goni board,
  the TV-OUT cable is connected to television.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:15 +01:00
Chanwoo Choi 3782a52897 ASoC: multi-component - Add Aquila sound driver
This patch add sound support for the Aquila board based on S5PC110.

The Aquila board is based on Samsung SoC(S5PC110) and include
WM8994 codec over I2S to support sound. This uses the I2Sv4 driver
compatible with I2Sv5 to run sound.

The kind of jack is below states :
* SND_JACK_HEADPHONE
* SND_JACK_HEADSET
* SND_JACK_MECHANICAL
  : When TV-OUT cable is inserted on Aquila board,
  the TV-OUT cable isn't connected to television.
* SND_JACK_AVOUT
  : When TV-OUT cable is inserted on Aquila board,
  the TV-OUT cable is connected to television.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

ASoC: multi-component: SAMSUNG: Fix wrong field name on Aquila board

This patch modify the wrong field name on Aquila board.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:14 +01:00
Liam Girdwood f0fba2ad1b ASoC: multi-component - ASoC Multi-Component Support
This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

 struct snd_soc_codec    --->  struct snd_soc_codec (device data)
                          +->  struct snd_soc_codec_driver (driver data)

 struct snd_soc_platform --->  struct snd_soc_platform (device data)
                          +->  struct snd_soc_platform_driver (driver data)

 struct snd_soc_dai      --->  struct snd_soc_dai (device data)
                          +->  struct snd_soc_dai_driver (driver data)

 struct snd_soc_device   --->  deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

 * Stream operations now de-reference less structures.
 * close_delayed work() now runs on a DAI basis rather than looping all DAIs
   in a card.
 * PM suspend()/resume() operations can now handle N CODECs and Platforms
   per sound card.
 * Added soc_bind_dai_link() to bind the component devices to the sound card.
 * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
   DAI link components.
 * sysfs entries can now be registered per component per card.
 * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
 * snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

 o Make CODEC driver a platform driver
 o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
 o Removed all static codec pointers (drivers now support > 1 codec dev)
 o snd_soc_register_pcms() now done by core.
 o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:00 +01:00
Takashi Iwai c6774bcd33 Merge branch 'topic/asoc' into for-linus 2010-08-11 08:43:13 +02:00
Sonic Zhang 2e2211a387 ASoC: add AD1980 obsolete information
This codec has been obsoleted by ADI, so add appropriate warnings to the
source tree to dissuade people from using in new designs based on driver
support.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-10 15:43:45 +01:00
Cliff Cai ac770267a7 ASoC: register cache should be 1 byte aligned for 1 byte long register
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-08-10 15:42:32 +01:00
Mark Brown 6f341d1481 ASoC: Correct WM8580 Capture control names
Should use Capture rather than ADC so the UI tools can identify their
function more readily.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-10 09:58:01 +01:00
Mark Brown 9d37e8947c ASoC: Document CFG switch settings for SMDK6410 WM8580 usage
Sadly these aren't soft controllable and can't be read back either :(

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-10 09:57:44 +01:00
Mark Brown 698cb111f4 ASoC: Remove /s from widget names on SMDK64xx WM8580
Otherwise debugfs gets upset when we try to create filenames with /
in them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-10 09:57:25 +01:00
Mark Brown 4f0ed9a51b ASoC: Fix inverted mute controls for WM8580
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-08-10 09:56:07 +01:00
Benjamin Herrenschmidt 8b449d1f13 Merge remote branch 'gcl/next' into next 2010-08-09 11:23:58 +10:00
Linus Torvalds faa38b5e0e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits)
  ALSA: hda - Add pin-fix for HP dc5750
  ALSA: als4000: Fix potentially invalid DMA mode setup
  ALSA: als4000: enable burst mode
  ALSA: hda - Fix initial capsrc selection in patch_alc269()
  ASoC: TWL4030: Capture route runtime DAPM ordering fix
  ALSA: hda - Add PC-beep whitelist for an Intel board
  ALSA: hda - More relax for pending period handling
  ALSA: hda - Define AC_FMT_* constants
  ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
  ALSA: hda - Add support for HDMI HBR passthrough
  ALSA: hda - Set Stream Type in Stream Format according to AES0
  ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
  ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
  ASoC: wm9081: fix resource reclaim in wm9081_register error path
  ASoC: wm8978: fix a memory leak if a wm8978_register fail
  ASoC: wm8974: fix a memory leak if another WM8974 is registered
  ASoC: wm8961: fix resource reclaim in wm8961_register error path
  ASoC: wm8955: fix resource reclaim in wm8955_register error path
  ASoC: wm8940: fix a memory leak if wm8940_register return error
  ASoC: wm8904: fix resource reclaim in wm8904_register error path
  ...
2010-08-07 17:07:31 -07:00
Eric Millbrandt 949ad0a783 sound/soc: mpc5200_psc_ac97: Use gpio pins for cold reset
Call the gpio reset platform function instead of using the flawed
ac97 functionality of the MPC5200(b)

From MPC5200B User's Manual:
"Some AC97 devices goes to a test mode, if the Sync line is high
during the Res line is low (reset phase). To avoid this behavior the
Sync line must be also forced to zero during the reset phase. To do
that, the pin muxing should switch to GPIO mode and the GPIO control
register should be used to control the output lines."

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-06 20:49:19 -06:00
Grant Likely 2dc1158137 of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely.  Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
2010-08-06 09:25:50 -06:00
Eric Bénard bb4d0044aa ASoC: Fix for changed Eureka Kconfig symbol names
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-05 19:25:13 +01:00
Mark Brown 9a76f1ff6e ASoC: Add initial WM8962 CODEC driver
The WM8962 is a low power, high performance stereo CODEC designed for
portable digital audio applications.

This initial driver release supports the key audio paths of the WM8962.
Extended functionality, such as microphone detection, digital microphones
and the advanced DSP signal enhancements provided by the device are not
yet supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-05 13:38:57 +01:00
Takashi Iwai e71981343a Merge branch 'topic/asoc' into for-linus 2010-08-05 11:17:01 +02:00
Jiri Kosina d790d4d583 Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
Peter Ujfalusi bda7d2a862 ASoC: TWL4030: Capture route runtime DAPM ordering fix
Fix the ordering problem in DAPM domain, when the user
changes between digital and analog sources during active
capture (or loopback) scenario.
Before this patch, when the user changed from analog source
to digital there were a short time, when the codec enabled
analog mic bias (2.2 volts) instead of the correct digital
mic bias (1.8 volts) to the digital microphones.
This behaviour caused by the former implementation of
selecting the correct type of bias. This was done at the
POST_REG event of the DAPM_MUX_E("TXx Capture Route")
widget.
By moving the bias type selection as DAPM_SUPPLY and
connecting it to the corresponding digimic widget the
problematic situation can be avoided.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-04 00:42:39 +01:00
Axel Lin 116bcd9cf2 ASoC: wm9081: fix resource reclaim in wm9081_register error path
This patch fixes the error path in wm9081_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:41 +01:00
Axel Lin d484366bee ASoC: wm8978: fix a memory leak if a wm8978_register fail
There is a memory leak found if wm8978_register() fail.
This patch moves the buffer allocate and release
at the same level to prevent the memory leak.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:27 +01:00
Axel Lin 4eaac50552 ASoC: wm8974: fix a memory leak if another WM8974 is registered
wm8974 is allocated in wm8974_i2c_probe() but is not freed if wm8974_register()
return -EINVAL (if another WM8974 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:07 +01:00
Axel Lin 6b5d071e8b ASoC: wm8961: fix resource reclaim in wm8961_register error path
This patch fixes the error path in wm8961_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:52 +01:00
Axel Lin 8089a49d99 ASoC: wm8955: fix resource reclaim in wm8955_register error path
This patch fixes the error path in wm8955_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:37 +01:00
Axel Lin db1e18de98 ASoC: wm8940: fix a memory leak if wm8940_register return error
This patch adds checking for wm8940_register return value,
and does kfree(wm8940) if wm8940_register() fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:20 +01:00
Axel Lin 62f5ad6733 ASoC: wm8904: fix resource reclaim in wm8904_register error path
This patch includes below fixes:
1. wm8904 need to be kfreed in wm8904_register() error path before return.
2. fix the error path for snd_soc_register_codec() fail and
   snd_soc_register_dai() fail to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:00 +01:00
Axel Lin 2c2749de11 ASoC: wm8711: fix a memory leak if another WM8711 is registered
wm8711 is allocated in either wm8711_spi_probe() or wm8711_i2c_probe() but is
not freed if wm8711_register() return -EINVAL(if another ad1836 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:44:29 +01:00
Axel Lin ef99e9b5a1 ASoC: wm8523: fix resource reclaim in wm8523_register error path
This patch includes below fixes:
1. If another WM8523 is registered, need to kfree wm8523 before return -EINVAL.
2. If snd_soc_register_codec failed, goto error path to properly free resources.
3. Instead of using mixed in-line and goto style cleanup, use goto style error
   handling if snd_soc_register_dai failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:44:10 +01:00
Axel Lin 085efd28b6 ASoC: da7210: fix a memory leak if failed to initialise da7210 audio codec
da7210 should be kfreed if da7210_init() return error.
This patch also fixes the error handing in the case of snd_soc_register_dai()
fail by adding snd_soc_unregister_codec() in error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:43:52 +01:00
Axel Lin 7bcaad919b ASoC: ak4642: fix a memory leak if failed to initialise AK4642
ak4642 should be kfreed if ak4642_init() return error.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:40:41 +01:00
Axel Lin fd3c8ac9cb ASoC: ad1836: fix a memory leak if another ad1836 is registered
ad1836 is allocated in ad1836_spi_probe() but is not freed if ad1836_register()
return -EINVAL (if another ad1836 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:40:26 +01:00
Ian Lartey 992bee401c ASoC: Initial WM8741 CODEC driver
The WM8741 is a very high performance stereo DAC designed for audio
applications such as professional recording systems, A/V receivers and
high specification CD, DVD and home theatre systems. The device supports
PCM data input word lengths from 16 to 32-bits and sampling rates up to
192kHz.  The WM8741 also supports DSD bit-stream data format, in both
direct DSD and PCM-converted DSD modes.

TODO: Expand wm8741_set_dai_sysclk and rate_constraint members to
allow for all supported sample rate / Master Clock frequency combinations.
Fully enable control of supplies.

Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:38:15 +01:00
Takashi Iwai 988b0dc154 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-08-02 12:10:52 +02:00
Peter Ujfalusi 998a8a69f3 ASoC: omap-mcbsp: Remove period size constraint in THRESHOLD mode
The use of sDMA packet mode in THRESHOLD mode removes the restriction on the
period size.
With the extended THRESHOLD mode user space can ask for any
period size it wishes, and the driver will configure the
sDMA and McBSP FIFO accordingly.

Replace the hw_rule for the period size with static constraint,
which will make sure that the period size will be always
even (to avoid prime period size, which could be possible in
mono stream)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi cf80e15860 ASoC: omap-mcbsp: Support for sDMA packet mode
Utilize the sDMA controller's packet syncronization mode, when
the McBSP FIFO is in use (by extending the THRESHOLD mode).
When the sDMA is configured for packet mode, the sDMA frame size
does not need to match with the McBSP threshold configuration.
Uppon DMA request the sDMA will transfer packet size number of
words, and still trigger interrupt on frame boundary.

The patch extends the original THRESHOLD mode by doing the
following:

if (period_words <= max_threshold)
Current THRESHOLD mode configuration

Otherwise (period_words > max_threshold)
McBSP threshold = sDMA packet size
sDMA frame size = period size

With the extended THRESHOLD mode we can remove the constraint
for the maximum period size, since if the period size is
bigger than the maximum allowed threshold, than the driver
will switch to packet mode, and picks the best (biggest)
threshold value, which can divide evenly the period size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi 15d0143007 ASoC: omap-mcbsp: Code cleanup in omap_mcbsp_dai_hw_params
To make the code a bit more readable, change the indexed
references to the omap_mcbsp_dai_dma_params elements with
pointer.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi 81ec027e64 ASoC: omap-mcbsp: Restructure the code within omap_mcbsp_dai_hw_params
In preparation for the extended threshold mode (sDMA packet mode
support), the code need to be restructured.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:37:43 +01:00
Kuninori Morimoto 3bc280708e ASoC: fsi: Add new funtion for SPDIF
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-29 10:28:49 -07:00
Kuninori Morimoto 265c770d03 ASoC: fsi: remove device id check
Current FSI driver id is not only 0

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-29 10:28:37 -07:00
Kuninori Morimoto bced8f5a36 ASoC: fsi: remove unnecessary clock processing
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-29 10:28:27 -07:00
Peter Ujfalusi a577b318fc ASoC: tlv320dac33: Add support for automatic FIFO configuration
Platform parameter to enable automatic FIFO configuration when
the codec is in Mode1 or Mode7 FIFO mode.
When this mode is selected, the controls for changing
nSample (in Mode1), and UTHR (in Mode7) are not added.
The driver configures the FIFO configuration based on
the stream's period size in a way, that every burst will
read period size of data from the host.
In Mode7 we need to use a formula, which gives close enough
aproximation for the burst length from the host point
of view.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-29 10:21:11 +01:00
Peter Ujfalusi f430a27f05 ASoC: tlv320dac33: Revisit the FIFO Mode1 handling
Replace the hardwired latency definition with platform data
parameter, and simplify the nSample parameter calculation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-29 10:21:04 +01:00
Peter Ujfalusi b93cc9f19b ASoC: TWL4030: Capture route DAPM event fix
There is no need to handle POST_PMU, POST_PMD event with
the Capture Route widget.
It is enough to handle POST_REG event, since that will come
when the user changes the routing, and we will switch the needed
bits in the registers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-27 11:43:40 +01:00
Ralf Baechle 93871603a7 SOUND: Au1000: Fix section mismatch
WARNING: sound/soc/au1x/snd-soc-au1xpsc-i2s.o(.data+0xa8): Section mismatch in reference from the variable au1xpsc_i2s_driver to the function .init.text:au1xpsc_i2s_drvprobe()
The variable au1xpsc_i2s_driver references
the function __init au1xpsc_i2s_drvprobe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-26 19:08:15 +01:00
Kuninori Morimoto a7e7cd5bd7 ASoC: da7210: Add HeadPhone Playback Volume control
HeadPhone Playback Volume control register of DA7210 has
reserved area. This patch considered it as mute.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-23 10:17:47 +01:00
Linus Torvalds 84b37df419 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Select wm_hubs automatically for WM8994
  ASoC: Remove duplicate AUX definition from WM8776
  ASoC:: remove a redundant snd_soc_unregister_codec call in wm8988_register
  ASoC: wm8727: add a missing return in wm8727_platform_probe
  ASoC: fsi: fixup wrong value setting order of TDM
  ASoC: fsi: fixup clock inversion operation
2010-07-21 09:29:39 -07:00
Takashi Iwai 49e7042799 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-07-21 15:01:07 +02:00
Peter Ujfalusi 01ea6ba2bc ASoC: TWL4030: Add configurable delay after digimic enable
When digital microphones are connected to twl, delay is
needed after enabling the digimic interface of the codec.
Add new parameter for the setup data, which can be used
to pass the apropriate delay in ms after the digimic
interface has been enabled.

Without certain delay (in certain HW configuration) the
beggining of the recorded sample contains a glitch, which
is generated by the digital microphones.

Delaying the micbias1, 2 (which is the bias for the digimic0
or 1) does not help, since the glitch is coming after
switching the digimic interface.

Reversing the micbias and digimic enable order does not
work either (in that case the wait need to be added after
the micbias enabled).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-21 11:57:58 +01:00
Mark Brown d1ce6b200c ASoC: Unconditionally enable WM8994 AIF1ADC TDM mode
AIF1ADC TDM mode has no effect other than causing the ADCDAT line to
be tristated rather than driven low on clock cycles where there is no
data to be transmitted. If the clock cycle is idle then there should
be no devices using the data so tristating should have no adverse
effects.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 10:27:05 +01:00
Sekhar Nori 48519f0ae0 ASoC: davinci: let platform data define edma queue numbers
Currently the EDMA queue to be used by for servicing ASP through
internal RAM is fixed to EDMAQ_0 and that to service internal RAM
from external RAM is fixed to EDMAQ_1.

This may not be the desirable configuration on all platforms. For
example, on DM365, queue 0 has large fifo size and is more suitable
for video transfers. Having audio and video transfers on the same
queue may lead to starvation on audio side.

platform data as defined currently passes a queue number to the driver
but that remains unused inside the driver.

Fix this by defining one queue each for ASP and RAM transfers in the
platform data and using it inside the driver.

Since EDMAQ_0 maps to 0, thats the queue that will be used if
the asp queue number is not initialized. None of the platforms
currently utilize ping-pong transfers through internal RAM so that
functionality remains unchanged too.

This patch has been tested on DM644x and OMAP-L138 EVMs.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-20 09:57:20 +01:00
Chanwoo Choi 5c519767b6 ASoC:Support Samsung SoC(S5P) in I2Sv2
This patch modify I2Sv2 driver to support Samsung SoC(S5PV210).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-20 09:53:36 +01:00
Mark Brown 3b89b22358 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-20 09:52:25 +01:00
Chanwoo Choi 41f9a314af ASoC: Select wm_hubs automatically for WM8994
Otherwise all machine drivers need to do so.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-20 09:51:12 +01:00
Mark Brown a3257ba869 ASoC: Implement WM8994 AIF1ADC2 paths
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 09:48:25 +01:00
Mark Brown 395e4b7362 ASoC: Explicitly disable DC servo on WM hubs headphone powerdown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 09:48:07 +01:00
Eric Bénard 8a0bbbeb58 ASoC: eukrea-tlv320: add support for cpuimx35sd
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-20 09:47:28 +01:00
Uwe Kleine-König 25d1fbfdd9 fix comment typos concerning "challenge"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-07-19 11:09:52 +02:00
Kulikov Vasiliy 50e8ce1469 ASoC: imx: check kzalloc() result and fix memory leak
If kzalloc() fails we must exit with -ENOMEM. Also we must free
allocated runtime->private_data on error as it would be lost on next
call to snd_imx_open().

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-17 19:45:56 +01:00
Kulikov Vasiliy 51b6dfb627 ASoC: imx: check kzalloc() result and fix memory leak
If kzalloc() fails we must exit with -ENOMEM. Also we must free
allocated runtime->private_data on error as it would be lost on next
call to snd_imx_open().

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-17 19:45:56 +01:00
Kulikov Vasiliy 55938b106f ASoC: davinci: check kzalloc() result (typo)
The code checks 'davinci_vc' after kzalloc() and do not checks
'davinci_vcif_dev' that kzalloc() result is assigned to. It seems that
it is a typo (autocompletion?).

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-17 19:45:56 +01:00
Kuninori Morimoto 3c2ef841c0 ASoC: fsi: Add specified ID for soc-audio
Specified ID is necessary, when some codecs are used with FSI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-17 19:45:56 +01:00
Mark Brown d947837410 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-17 19:45:43 +01:00
Mark Brown 3c0709396d ASoC: Remove duplicate AUX definition from WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-07-17 19:44:40 +01:00
Jorge Eduardo Candelaria 0fad4ed7b2 ASoC: TWL6040: Correct widget handling for drivers
In order to reduce pop-noise at powering up/down of the DACs and Drivers,
these components have to be handled in a specific sequence. Headset,
Handsfree, and Earphone drivers are now registered as PGA components to
ensure DACs are enabled first.

Also, add a delay to leave time for DACs to settle before
continuing power up/down sequence.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-17 19:27:18 +01:00
Mark Brown 5164d74d74 ASoC: Handle read failures in codec_reg
When a device is powered down volatile registers can't be read so
attempts to display codec_reg will show error values, and obviously
it is also possible for there to be hardware errors too. Check for
errors from reads and display them more clearly when formatting
codec_reg.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-14 20:13:09 +01:00
Mark Brown 03b0dc02cf Merge branch 'for-2.6.35' into for-2.6.36 2010-07-14 20:12:57 +01:00
Axel Lin cecb66fddf ASoC:: remove a redundant snd_soc_unregister_codec call in wm8988_register
snd_soc_unregister_codec is called twice if snd_soc_register_dai fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:31 +01:00
Axel Lin c555b028f1 ASoC: wm8727: add a missing return in wm8727_platform_probe
otherwise the error path will always be executed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:18 +01:00
Manuel Lauss 0c74a939d8 ASoC: au1x: fix section mismatch in psc-i2s.c
Annotate platform probe callback with __devinit instead of plain __init.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:39:14 +01:00
arnaud.patard@rtp-net.org b424ec9533 ASoC: kirkwood-i2s: Handle mute/unmute playback/record
The controller has mute/unmute capability and some bootloader may mute
them at boot. If it's not handled, all things will seem to be working
but no sound will come out of the speaker/headphone.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:37:09 +01:00
arnaud.patard@rtp-net.org dfe4c93627 ASoC: Fix kirkwood i2s mono playback
Kirkwood controller needs to be informed if the audio stream is mono
or not. Failing to do so will result in playing at the wrong speed.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:37:09 +01:00
Kuninori Morimoto ccad7b44cc ASoC: fsi: Fixup for master mode
This patch add hw_params to snd_soc_dai_ops,
because board specific set_rate is needed
when FSI was used as master mode.

This patch remove fsi_clk_ctrl from fsi_dai_startup,
because clock should be disabled before set_rate.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:39 +01:00
Kuninori Morimoto d78541473d ASoC: fsi: Add pr_err for noticing unsupported access
This patch didn't use dev_err,
because it is difficult to get struct device here.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:38 +01:00
Kuninori Morimoto 73b92c1fc0 ASoC: fsi: Change struct fsi_regs to fsi_core
Many registers which were grouped by category were added in FSI2.
To make easy to switch FSI/FSI2, fsi_core was added instead of fsi_regs.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:37 +01:00
Kuninori Morimoto a7ffb52bb3 ASoC: fsi: remove noisy CR_FMT macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:36 +01:00
Kuninori Morimoto a09370cb8c ASoC: fsi: remove un-used variable on fsi_dai_startup
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:35 +01:00
Joe Perches 4726a57b8c ASoC: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:34:06 +01:00
Joe Perches 8ff23610a6 ASoC: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:33:59 +01:00
Mark Brown 4d53952a39 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-13 12:29:10 +01:00
Kuninori Morimoto 637727838a ASoC: fsi: fixup wrong value setting order of TDM
channel size should be set before setting register value

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:26:26 +01:00
Kuninori Morimoto b427b44cc8 ASoC: fsi: fixup clock inversion operation
Clock inversion should be specified by each flags bit.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:26:26 +01:00
Peter Ujfalusi 27eeb1feed ASoC: TWL4030: DAC power optimization
Restructure the DAPM connections in order to enable
only the needed DAC (out of four in twl4030 series).
I need to keep the 'AIF Enable' supply connected to
the L2/R2 digital path, since the digital loopback
needs AIF and APLL running.
If no valid route available, than none of the DAC will
be powered, but the AIF and APLL is going to be enabled.
Furthermore, if only one audio path have valid route,
than only the corresponding DAC will be powered.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsomicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-13 11:30:12 +01:00
Peter Ujfalusi 8b0d31532e ASoC: TWL4030: Fix for digital loopback gain range
When the gain is configured using dB value it was
not possible to use -24dB since the loopback got
muted instead of -24dB.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsomicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-13 11:30:05 +01:00
Mark Brown 66b47fdb85 ASoC: Implement WM8994 OPCLK support
The WM8994 can output a clock derived from its internal SYSCLK, called
OPCLK.  The rate can be selected as a sysclk, with a division from the
SYSCLK rate specified (multiplied by 10 since a division of 5.5 is
supported) and the clock can be disabled by specifying a divisor of
zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 08:50:12 +09:00
Mark Brown e88ff1e6db ASoC: Include WM8994 GPIO and interrupt registers in codec_reg
Very handy for debug.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 01:37:06 +09:00
Raffaele Recalcati d9823ed9fa ASoC: DaVinci: More accurate continuous serial clock for McBSP (I2S)
i2s_accurate_sck switch can be used to have a better approximate
    sampling frequency.
    The clock is an externally visible bit clock and it is named
    i2s continuous serial clock (I2S_SCK).
    The trade off is between more accurate clock (fast clock)
    and less accurate clock (slow clock).
    The waveform will be not symmetric.
    Probably it is possible to get a better algorithm for calculating
    the divider, trying to keep a slower clock as possible.

    This patch has been developed against the
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm, but using
    uda1345 as external audio codec).

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:07 +09:00
Raffaele Recalcati ec63755337 ASoC: DaVinci: Added selection of clk input pin for McBSP
When McBSP peripheral gets the clock from an external pin,
    there are three possible chooses, MCBSP_CLKX, MCBSP_CLKR
    and MCBSP_CLKS.
    evm-dm365 uses MCBSP_CLKR, instead in bmx board I have a different
    hardware connection and I use MCBSP_CLKS, so I have added
    this possibility.

    This patch has been developed against the:
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm)

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Raffaele Recalcati a4c8ea2dda ASoC: DaVinci: Added two clocking possibilities to McBSP (I2S)
Added two clocking options for dm365 McBSP peripheral when used
    with I2S timings, that are SND_SOC_DAIFMT_CBS_CFS (the cpu generates
    clock and frame sync) and SND_SOC_DAIFMT_CBS_CFM (the cpu gets clock
    from external pin and generates frame sync).
    A slave clock management can be important when the external codec needs
    the system clock and the bit clock synchronized (tested with uda1345).
    This patch has been developed against the:
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm, but using
    uda1345 as external audio codec).

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Maurus Cuelenaere 088fbab406 ASoC: Invert speaker enabling behaviour in SmartQ sound driver
The speaker was enabled when the headphone was plugged in, which isn't the
wanted behaviour so correct this.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Mark Brown db059c0f6e ASoC: Automatically manage ALC coefficients for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-06 08:46:10 +09:00
Mark Brown afd6d36a0d ASoC: Automatically manage DAC deemphasis rate for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:41:18 +09:00
Mark Brown 4faaa8d968 ASoC: Remove current WM8960 deemphasis control
It will be replaced with automatic deemphasis rate configuration but since
we have an enumeration table in this driver this is done in a separate
commit to make the renumbering of the enumeration items clear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:37:17 +09:00
Mark Brown 9af8381023 ASoC: Fix sorting of Makefile and Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:35:29 +09:00
Maurus Cuelenaere ce93a37028 ASoC: Add SmartQ sound driver
This adds sound support for the SmartQ board.

The hardware consists of a S3C6410 coupled with a WM8987 over I²S. The WM8750
driver is used for driving the WM8987, as they are register compatible.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-04 18:04:12 +09:00
Maurus Cuelenaere 0d9c15e45b ASoC: codec: Add WM8987 device id to WM8750 driver
The WM8987 codec is register compatible with the WM8750, so just add it to the
SPI and I²C device table.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-04 18:02:07 +09:00
Kuninori Morimoto a300de3cff ASoC: ak4642: Add Digital Playback Volume control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-01 17:08:47 +01:00
Vladimir Zapolskiy 338de9d9da ASoC: uda134x: correct bias level setup for codecs family
For UDA1341 codec power control is managed in STATUS1 register, and
for all other codecs in DATA011 register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Vladimir Zapolskiy ed632ad3b8 ASoC: uda134x: add DATA011 register found in codecs family
In UDA1340, UDA1344 and UDA1345 codecs there is one more functional
register in part of DATA0 tranfser. For UDA1341 this register
coincides with EA register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Mark Brown af51b5c0f0 Merge remote branch 'takashi/topic/asoc' into for-2.6.36 2010-06-30 14:46:53 +01:00
Linus Torvalds 29ccb201a2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: usb/endpoint, fix dangling pointer use
  ALSA: asihpi - Get rid of incorrect "long" types and casts.
  ASoC: DaVinci: Fix McASP hardware FIFO configuration
  ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2
  ALSA: usb-audio: fix UAC2 control value queries
  ALSA: usb-audio: parse UAC2 sample rate ranges correctly
  ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE
  ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2()
  ALSA: hda - Don't check capture source mixer if no ADC is available
2010-06-27 07:39:57 -07:00
Eric Bénard 9c1be7e8cb ASoC: clean i.MX Kconfig
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:30:48 +01:00
Vladimir Zapolskiy e4295b40ee ASoC: uda134x: fix bias level setup on initialization
On initialization ADC/DAC are enabled only for UDA1341, that's why
bias_level shall be set to off explicitly, otherwise dapm is
misinformed about bias_level on startup.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:02 +01:00
Vladimir Zapolskiy cc3202f5da ASoC: uda134x: replace a macro with a value in platform struct.
This change wipes out a hardcoded macro, which enables codec bias
level control. Now is_powered_on_standby value shall be used instead.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:01 +01:00
Takashi Iwai e827e32efc Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-06-24 11:11:41 +02:00
Jarkko Nikula 8c523115ae ASoC: RX-51: Add basic jack detection
This patch adds GPIO jack detection to Nokia N900/RX-51. At the moment only
SND_JACK_VIDEOOUT type is reported. More types could be reported after
getting more audio features supported and necessary drivers integrated for
implementing automated accessory detection.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:14 +01:00
Jarkko Nikula 4eb5470326 ASoC: RX-51: Add Jack Function kcontrol
Nokia RX-51/N900 has multifunction 4-pole audio-video jack that can be used
as headphone, headset or audio-video connector. This patch implements the
control 'Jack Function' which is used to select the desired function.
At the moment only TV-out without audio is supported.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:08 +01:00
Eric Bénard 3d5a451623 codecs/tlv320aic23: fix bias management for suspend/resume
in tlv320aic23_set_bias_level, for the case SND_SOC_BIAS_ON, the
comment says "vref/mid, osc on, dac unmute" but the code doesn't
clear the corresponding bits, thus when resuming, several bits are
not cleared preventing the codec from working.

in tlv320aic23_suspend, clearing the active register is not needed
as it will be done by tlv320aic23_set_bias_level, when setting
bias to SND_SOC_BIAS_OFF

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: broonie@opensource.wolfsonmicro.com
Cc: anuj.aggarwal@ti.com
Cc: lrg@slimlogic.co.uk
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:28:53 +01:00
Lars-Peter Clausen 5898dd9ebd ASoC: JZ4740: Add qi_lb60 board driver
This patch adds ASoC support for the qi_lb60 board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:10:57 +01:00
Lars-Peter Clausen 3b097d64ea ASoC: Add JZ4740 codec driver
This patch adds support for the JZ4740 internal codec.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:10:45 +01:00
Lars-Peter Clausen 11bd3dd1b7 ASoC: Add JZ4740 ASoC support
This patch adds ASoC support for JZ4740 SoCs I2S module.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:08:06 +01:00
Grazvydas Ignotas 4b94dba029 ASoC: pandora: fix CLKX polarity
After mass production started it was found that several boards exhibit
noise problems during sound playback. After some investigation it was
determined that CLKX polarity is set incorrectly, and even if most boards
can tolerate the wrong setting, there are some that don't.

Fix polarity setup in the board file. As the clock settings for input and
output now match, merge in and out functions and structures to simplify
code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-21 18:16:17 +01:00
Mark Brown b45416656f ASoC: Fix sorting of DA7210 entries in Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-20 14:05:46 +01:00
Stuart Longland 20630c7f59 ASoC: Fix overflow bug in SOC_DOUBLE_R_SX_TLV
When SX_TLV widgets are read, if the gain is set to a value below 0dB,
the mixer control is erroniously read as being at maximum volume.

The value read out of the CODEC register is never sign-extended, and
when the minimum value is subtracted (read; added, since the minimum is
negative) the result is a number greater than the maximum allowed value
for the control, and hence it saturates.

Solution: Mask the result so that it "wraps around", emulating
sign-extension.

Signed-off-by: Stuart Longland <redhatter@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-19 02:33:44 +01:00
Eric Bénard 43793207fd ASoC: eukrea-tlv320: add support for our i.MX25 board
* tdm slot has to be configured to get sound working on i.MX25

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-18 01:56:45 +01:00
Jiri Kosina f1bbbb6912 Merge branch 'master' into for-next 2010-06-16 18:08:13 +02:00
Uwe Kleine-König 421f91d21a fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-16 18:05:05 +02:00
Peter Huewe 66517915e0 ASoC: Fix I2C dependency for SND_FSI_AK4642 and SND_FSI_DA7210
The config option SND_FSI_AK4642 selects SND_SOC_AK4642 which in turn
enables the compilation of ak4642.c - however this codec uses I2C to
communicate with the HW.
Same applies to DA7210.

Consequently when I2C is not set, the compilation fails [1]

This patch fixes this issues, by adding a depencdency on the related HW-
controller.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-16 16:34:17 +01:00
Mark Brown f1df5aec68 ASoC: Pay attention to write errors in volsw_2r_sx
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-16 12:07:35 +01:00
Grant Likely f487537c2b powerpc/5200: Fix build error in sound code.
Compiling in the MPC5200 sound drivers results in the following build error:

sound/soc/fsl/mpc5200_psc_ac97.o: In function `to_psc_dma_stream':
mpc5200_psc_ac97.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
sound/soc/fsl/efika-audio-fabric.o: In function `to_psc_dma_stream':
efika-audio-fabric.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
make[3]: *** [sound/soc/fsl/built-in.o] Error 1
make[2]: *** [sound/soc/fsl] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

This patch fixes it by declaring the inline function in the header file to
also be a static.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Jon Smirl <jonsmirl@gmail.com>
Tested-by: John Hilmar Linkhorst <John.Linkhorst@rwth-aachen.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 14:47:04 -06:00
Mark Brown e71fa37042 ASoC: Default WM2000 ANC and speaker to enabled
The most useful configuration for the WM2000 is to enable the ANC so turn
that on by default, and since we're not reflecting chip default state also
enable the speaker output by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-15 15:14:00 +01:00
Mark Brown 67884e215b Merge branch 'for-2.6.35' into for-2.6.36 2010-06-15 11:55:35 +01:00
Sudhakar Rajashekhara 5b61ea4997 ASoC: DaVinci: Fix McASP hardware FIFO configuration
On DA830/OMAP-L137 and DA850/OMAP-L138 SoCs, the McASP peripheral
has FIFO support. This FIFO provides additional data buffering. It
also provides tolerance to variation in host/DMA controller response
times. More details of the FIFO operation can be found at

http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufm1&fileType=pdf

Existing sequence of steps for audio playback/capture are:
a. DMA configuration
b. McASP configuration (configures and enables FIFO)
c. Start DMA
d. Start McASP (enables FIFO)

During McASP configuration, while FIFO was being configured, FIFO
was being enabled in davinci_hw_common_param() function of
sound/soc/davinci/davinci-mcasp.c file. This generated a transmit
DMA event, which gets serviced when DMA is started.

https://patchwork.kernel.org/patch/84611/ patch clears the DMA
events before starting DMA, which is the right thing to do. But
this resulted in a state where DMA was waiting for an event from
McASP (after step c above), but the event which was already there,
has got cleared (because of step b above).

The fix is not to enable the FIFO during McASP configuration as
FIFO was being enabled as part of McASP start.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:53:18 +01:00
Kuninori Morimoto 1a01eff1b2 ASoC: header cleanup for da7210
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:30:38 +01:00
Kuninori Morimoto 3367e452d9 ASoC: header cleanup for ak4642
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:30:37 +01:00
Kuninori Morimoto c3be0af3d0 ASoC: header cleanup for FSI-DA7210
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:30:37 +01:00
Kuninori Morimoto 6c8abb4987 ASoC: header cleanup for FSI-AK4642
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:30:36 +01:00
Kuninori Morimoto 8600d700c0 ASoC: header cleanup for FSI
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 11:30:34 +01:00
Grant Likely 4e8680f56b ASoC: Remove unused header from MPC5200 PSC driver
The header contains an extern that isn't used by anything.  Remove.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-12 18:06:14 +01:00
Linus Torvalds 7c8d20d40f Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6164/1: Add kto and kfrom to input operands list.
  ARM: 6166/1: Proper prefetch abort handling on pre-ARMv6
  ARM: 6165/1: trap overflows on highmem pages from kmap_atomic when debugging
  ARM: 6152/1: ux500 make it possible to disable localtimers
  [ARM] pxa/spitz: Correctly register WM8750
  [ARM] pxa/palmtc: storage class should be before const qualifier
  ARM: 6146/1: sa1111: Prevent deadlock in resume path
  ARM: 6145/1: ux500 MTU clockrate correction
  ARM: 6144/1: TCM memory bug freeing bug
  ARM: VFP: Fix vfp_put_double() for d16-d31
2010-06-10 07:35:41 -07:00
Wan ZongShun 019afb581a ASoC: NUC900: patch for fix build error
This patch is to change 'auido.h' to 'audio.h' for
fixing nuc900 alsa driver build error.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-10 14:40:35 +01:00
Ryan Mallon 315f7da631 ASoC: EP93xx: Add Snapper CL15 i2s audio support
Add support for i2s audio on Bluewater Systems Snapper CL15 module

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-09 11:16:18 +01:00
Takashi Iwai 9eb3430268 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2010-06-07 18:38:56 +02:00
Wan ZongShun 04c09a15f5 ASoC: patch for the useless 'break' removal in kirkwood
This patch to remove the 'break;', when the 'switch' jumps to
the 'default' branch, the 'return -EINVAL' will be return with
a error number, so the 'break;' code never be run, it is unuseful
and should be removed here.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-07 14:27:18 +01:00
Wan ZongShun 911ff689ff ASoC: atmel: trivial code cleanup
Remove break after return, it is not needed.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-07 14:25:45 +01:00
Ryan Mallon db5bf412ba ASoC: ep93xx i2s audio driver
Add ep93xx i2s audio driver

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-07 14:24:19 +01:00
Peter Ujfalusi 9d7db2b2cb ASoC: tlv320dac33: Add support for changing upper threshold
Upper threshold is used in mode7 of DAC33.
Instead of hard wired UTHR, add control to change the upper threshold
value.
Changing upper threshold is not allowed when the playback is already
running, since wrongly timed change in the UTHR can cause problems
with the codec.
With this control the length of the burst in mode7 can be changed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-07 10:43:35 +01:00
Eric Bénard 91157888f2 ASoC: imx: add eukrea-tlv320
Add the necessary files to support the TLV320AIC23B wired in I2S
on our i.MX platforms.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-03 19:00:38 +01:00
Eric Bénard 0e79612012 ASoC: imx-ssi.c: add new choices to platform configuration
* introduce 3 new flags to allow a more detailed configuration
of the SSI link :
	IMX_SSI_NET : enable Network Mode
	IMX_SSI_SYN : enable Synchronous Mode
	IMX_SSI_USE_I2S_SLAVE : enable I2S Slave Mode
* new platform can use these settings without breaking actual
platforms.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-03 19:00:16 +01:00
Wan ZongShun 749266cd91 ASoC: s3c: patch for the unnecessary variable 'state' removal
The variable 'state' of structure 's3c_ac97_info' seems no use here,
so this patch is to remove the unnecessary variable.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-03 19:00:16 +01:00
Wan ZongShun b07adffbbc ASoC: atmel: patch for the unnecessary variable removal
The variable 'periods' of structure 'atmel_runtime_data'
seems no use in whole atmel alsa driver,so I make a patch
to remove the unnecessary variable.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-03 19:00:16 +01:00
Wan ZongShun c0da5500e9 ASoC: use resource_size for au1x
Use the resource_size function instead of manually calculating the
resource size.This patch can reduce the chance of introducing off-by-one
errors.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Manuel Lauss <manuel.lauss@googlemail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-03 19:00:16 +01:00
Peter Ujfalusi ddc29b0104 ASoC: omap-mcbsp: Place correct constraints for streams
OMAP McBSP FIFO is word structured:
McBSP2 has 1024 + 256 = 1280 word long buffer,
McBSP1,3,4,5 has 128 word long buffer

This means, that the size of the FIFO
depends on the McBSP word size configuration.
For example on McBSP3:
16bit samples: size is 128 * 2 = 256 bytes
32bit samples: size is 128 * 4 = 512 bytes
It is simpler to place constraint for buffer and period based on channels.
McBSP3 as example again (16 or 32 bit samples):
1 channel (mono): size is 128 frames (128 words)
2 channels (stereo): size is 128 / 2 = 64 frames (2 * 64 words)
4 channels: size is 128 / 4 = 32 frames (4 * 32 words)

Use the second method to place hw_rule on buffer size, and in threshold
mode to period size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolsfonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-03 16:12:40 +01:00
Peter Ujfalusi 3f024039e0 ASoC: omap-mcbsp: Save, and use wlen for threshold configuration
Save the word length configuration of McBSP, and use that information
to calculate, and configure the threshold in McBSP.
Previously the calculation was only correct when the stream had 16bit
audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolsfonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-03 16:12:40 +01:00
Wan ZongShun 5ef650ae5c ASoC: s6000: use resource_size for {request/release}_mem_region and ioremap
The size calculation is end - start + 1. But,sometimes, the '1' can
be forgotten carelessly, witch will have potential risk, so use resource_size
for {request/release}_mem_region and ioremap here should be good habit.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Daniel Glöckner <dg@emlix.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-02 14:02:39 +01:00
Takashi Iwai e854df613f Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2010-06-02 14:17:44 +02:00
Mark Brown 85252b6ae5 Merge branch 'for-2.6.35' into for-2.6.36 2010-06-02 11:47:24 +01:00
Wan ZongShun 08a0b71757 ASoC: nuc900: patch for modifing the ac97 delays to minimum
This patch is to modify the ac97 delays to minimum, all these 1000 micro
seconds delays seem over spec for the AC97 interface.

I deleted some unnecessary delays here and changed the AC97 cold and warm reset
delays from 1000us to 100us.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-02 11:47:06 +01:00
Wan ZongShun 0dc3b44202 ASoC: nuc900: fix a typo and rename the header file
Fix a '#include "nuc900-audio.h' typo, I think it should be 'audio'.
At the same time, this patch renames the 'nuc900-auido.h' file to
'nuc900-audio.h'.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-02 11:47:06 +01:00
Wan ZongShun 8dfb0c7815 ASoC: nuc900: fix a wait loop bug
The current implement meant ACTL_ACCON was only accessed once when read or write
proceeding, which is not right, if so,we have to wait the 'timeout=0x10000' to end
every times.

We need to polling the bit AC_R_FINISH and AC_W_FINISH of ACTL_ACCON
register to identify whether read or write is finished or not,so I make
the patch to fix the issue.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-02 11:47:06 +01:00
Wan ZongShun 018334c045 ASoC: nuc900: patch for SUBSTREAM_TYPE', 'PCM_TX' and 'PCM_RX' removal
This patch is to remove the 'SUBSTREAM_TYPE','PCM_TX' and 'PCM_RX' definition.

There is no need to redefine SNDRV_PCM_STREAM_PLAYBACK as PCM_TX,
the SUBSTREAM_TYPE(substream) can be deleted too, the playback or record can be
judged by 'if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)' directly rather
than 'if (PCM_TX == stype)', which makes the codes easy to read.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-02 11:47:06 +01:00
Sascha Hauer 29512c95b5 ASoC: MX31ads sound support should depend on MACH_MX31ADS_WM1133_EV1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 18:11:38 +01:00
Sascha Hauer fc9cbe3998 ASoC: Add missing Kconfig entry for Phytec boards
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 18:05:33 +01:00
Takashi Iwai 1fab79b8a1 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2010-05-31 18:13:20 +02:00
Takashi Iwai c876ae3eb2 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-05-31 18:12:41 +02:00
Mark Brown 37a5ddf450 ASoC: Fix S/PDIF build
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 13:47:26 +01:00
apatard@mandriva.com 2e8693ee79 ASoC: kirkwood: Add audio support to openrd client platforms
This patch is adding support for openrd client platforms. It's using
the cs42l51 codec and has one mic and one speaker plugs.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 13:16:37 +01:00
apatard@mandriva.com f9b95980f8 ASoC: kirkwood: Add i2s support
This patch enables support for the i2s controller available on kirkwood
platforms

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 13:16:37 +01:00
apatard@mandriva.com 72ed5a8c9b ASoC: Add driver for cs42l51
This patch is adding a ASoC driver for the cs42l51 from Cirrus Logic.
Master mode and spi mode are not supported.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.ul>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 12:20:02 +01:00
Seungwhan Youn 3a642915ad ASoC: spdif: Add codec driver to use spdif stand-alone
This patch adds spdif dummy codec driver for using spdif-dit as
a stand-alone. Until this, spdif-dit can be used only with other
codecs like tlv320aci3x in davinci platform.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 12:08:33 +01:00
Peter Ujfalusi a3a29b55c7 ASoC: TWL4030: Add functionalty to reset the registers
Machine driver can instruct the codec driver to reset the
chip registers to their default values at probe time.

If machine driver does not provide setup data, then the
registers are going to be reseted to their defaults, to
be safe.

If the developer on the platform confirms that the register
reset is not needed, than it can be skipped, saving ~20ms
time in probe.

As safety measure do the register reset at remove time also.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:59 +01:00
Peter Ujfalusi 2046f175bc ASoC: TWL4030: Use BIAS_OFF instead of BIAS_STANDBY, when not in use
Restructure the codec power code in order to be able to hit
off when the codec is not in use.

Since the audio registers are accessible while the codec is powered
down, there is no need for additional safety mechanism.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi 3c36cc688e ASoC: TWL4030: Correct the ARXR2_APGA_CTL chip default
It seams at least on twl5031 that the ARXR2_APGA_CTL register
does not have the same default value as it is written in
the TRM.
Since the codec part of the PM chip has not been actually
changed according to TI, assuming, that all version has
the same problem, so writing there the TRM value.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi 9fdcc0f72a ASoC: TWL4030: Helper to check chip default registers
Since the twl4030 codec driver supports different version
of the PM chip, a helper function can come handy, which
can check the driver's default versus the chip values.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi ee4ccac7ce ASoC: TWL4030: Optimize the power up sequence
Since the reg cache now contains the chip default values
for all registers (REG_OPTION is reset to it's default
within this patch), there is no longer need to rewrite
_all_ registers.
Initialize only few selected registers.

According to the latest information, the offset cancellation
need to be done only once, when the codec is powered on, so
there is no need for the power up wrapper.

Move all chip initialization code under chip_init, and do
it when the codec is initialized.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi 979bb1f4b8 ASoC: TWL4030: Make offset cancellation path configurable
Add means for machine drivers to select the path for offset
cancellation.
Reset the reg cache value to the chip reset value at the
same time.

Machine drivers can specify which path need to be used for
offset cancellation via the twl4030_setup.offset_cncl_path.
For paths use the defines from
include/linux/mfd/twl4030-codec.h:
TWL4030_OFFSET_CNCL_SEL_*

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi cbd2db128f ASoC: TWL4030: Remove wrapper for power down
There is no need for the power down wrapper.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Peter Ujfalusi 33f92ed4b3 ASoC: TWL4030: Revisit codec defaults
Reset most of the codec registers to their chip reset
value.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-31 11:08:58 +01:00
Mark Brown e37c83c06c Merge commit 'v2.6.35-rc1' into for-2.6.36 2010-05-31 11:07:15 +01:00
Marek Vasut d30e5d897c [ARM] pxa/spitz: Correctly register WM8750
This patch registers the WM8750 codec on a proper place on the SPITZ machine
after the WM8750 driver was converted to new API.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-31 12:03:45 +08:00
Linus Torvalds 52b0ace7df Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
  ALSA: snd-usb-caiaq: Bump version number to 1.3.21
  ALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
  ALSA: snd-usb-caiaq: Simplify single case to an 'if'
  ALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
  ALSA: hda: Use LPIB for a Shuttle device
  ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
  ALSA: hda: Use LPIB for Sony VPCS11V9E
  ALSA: usb-audio: fix feature unit parser for UAC2
  ALSA: asihpi - Minor code cleanup
  ALSA: asihpi - Add support for new ASI8800 family
  ALSA: asihpi - Fix bug preventing outstream_write preload from happening
  ALSA: asihpi - Fix imbalanced lock path in hw_message
  ALSA: asihpi - Remove support for old ASI8800 family
  ALSA: asihpi - Add hd radio blend functions
  ALSA: asihpi - Remove unused io map functions
  ALSA: usb-audio: add support for UAC2 pitch control
  ALSA: usb-audio: parse UAC2 endpoint descriptors correctly
  ALSA: usb-audio: fix return values
  ALSA: usb-audio: parse more format descriptors with structs
  sound: Add missing spin_unlock
  ...
2010-05-29 15:31:57 -07:00
Jassi Brar ce1f7d3076 ASOC: S5PV210: Enable AC97 support
The S5PV210 and S5PC110 has the AC97 controller same as S3C6410.
Simply enable the options to build the drivers for S5PC110 and
S5PV210 also.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-27 04:05:49 -04:00
Jassi Brar 3dedece4a5 ASOC: S5PC100: Enable AC97 support
The S5PC100 has the AC97 controller same as S3C6410.
Simply enable the options to build the drivers for
S5PC100 also.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-27 04:05:48 -04:00
Takashi Iwai 274a24c16f Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2010-05-27 09:46:10 +02:00
Mark Brown f68596c6d8 ASoC: Fix dB scales for WM8990
These should be regular, not linear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-05-26 08:46:53 -07:00
Mark Brown 3351e9fbb0 ASoC: Fix dB scales for WM8400
These scales should be regular, not linear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-05-26 08:46:52 -07:00
Mark Brown e6a08c5a89 ASoC: Fix dB scales for WM835x
These should be regular rather than linear scales.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-05-26 08:46:51 -07:00
Stuart Longland e2b3e622b2 ASoC: Update Freescale i.MX SSI driver DMA parameter handling
This updates the i.MX SSI driver to make it compatible with the ASoC tree
following the move of DMA parameters from the DAI to the audio substream
object.

Signed-off-by: Stuart Longland <redhatter@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-05-26 08:46:51 -07:00
Guennadi Liakhovetski 3ca3414996 ASoC: fix uninitialised variable in siu_dai.c
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-26 08:46:50 -07:00
Mark Brown 021f80cc70 ASoC: Fix dB scales for WM8990
These should be regular, not linear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-05-25 15:35:21 -07:00
Mark Brown 9cd8bd8a2c ASoC: Fix dB scales for WM8400
These scales should be regular, not linear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-05-25 15:35:19 -07:00
Mark Brown 52e39d22c8 ASoC: Fix dB scales for WM835x
These should be regular rather than linear scales.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-05-25 15:35:18 -07:00
Mark Brown bd73fc76f7 ASoC: Remove version display from WM8990
It's not needed and the version number never gets updated anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-25 11:31:22 -07:00
Linus Torvalds 0fed2b5cb4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (25 commits)
  sh: fix up sh7785lcr_32bit_defconfig.
  arch/sh/lib/strlen.S: Checkpatch cleanup
  sh: fix up sh7786 dmaengine build.
  sh: guard cookie consistency across termination in the DMA driver
  sh: prevent the DMA driver from unloading, while in use
  sh: fix Oops in the serial SCI driver
  sh: allow platforms to specify SD-card supported voltages
  mmc: let MFD's provide supported Vdd card voltages to tmio_mmc
  sh: disable SD-card write-protection detection on kfr2r09
  mfd: pass platform flags down to the tmio_mmc driver
  tmio: add a platform flag to disable card write-protection detection
  sh: Add SDHI DMA support to migor
  sh: Add SDHI DMA support to kfr2r09
  sh: Add SDHI DMA support to ms7724se
  sh: Add SDHI DMA support to ecovec
  mmc: add DMA support to tmio_mmc driver, when used on SuperH
  sh: prepare the SDHI MFD driver to pass DMA configuration to tmio_mmc.c
  mmc: prepare tmio_mmc for passing of DMA configuration from the MFD cell
  sh: add DMA slave definitions to sh7724
  sh: add DMA slaves for two SDHI controllers to sh7722
  ...
2010-05-24 07:58:28 -07:00
Guennadi Liakhovetski 10440af1bc sh: define DMA slaves per CPU type, remove now redundant header
Now that DMA slave IDs are only used used in platform specific code and have
become opaque cookies for the rest of the code, we can make the, CPU specific
too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22 16:51:17 +09:00
Grant Likely cf9b59e9d3 Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.

Conflicts:
	drivers/i2c/busses/i2c-cpm.c
	drivers/i2c/busses/i2c-mpc.c
	drivers/net/gianfar.c

Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-22 00:36:56 -06:00
Grant Likely 4018294b53 of: Remove duplicate fields from of_platform_driver
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver.  This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.

This patch is a pretty mechanical change.  The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial.  This patch looks big and scary because it touches so
many files, but it should be pretty safe.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
2010-05-22 00:10:40 -06:00
Linus Torvalds 6f68fbaafb Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  DMAENGINE: extend the control command to include an arg
  async_tx: trim dma_async_tx_descriptor in 'no channel switch' case
  DMAENGINE: DMA40 fix for allocation of logical channel 0
  DMAENGINE: DMA40 support paused channel status
  dmaengine: mpc512x: Use resource_size
  DMA ENGINE: Do not reset 'private' of channel
  ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
  ioat3: disable cacheline-unaligned transfers for raid operations
  ioat2,3: convert to producer/consumer locking
  ioat: convert to circ_buf
  DMAENGINE: Support for ST-Ericssons DMA40 block v3
  async_tx: use of kzalloc/kfree requires the include of slab.h
  dmaengine: provide helper for setting txstate
  DMAENGINE: generic channel status v2
  DMAENGINE: generic slave control v2
  dma: timb-dma: Update comment and fix compiler warning
  dma: Add timb-dma
  DMAENGINE: COH 901 318 fix bytesleft
  DMAENGINE: COH 901 318 rename confusing vars
2010-05-21 17:05:46 -07:00
Barry Song fab90aa4cf ASoC: ad193x: add set_sysclk entry to support different clock input
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-21 09:23:49 -07:00
Jorge Eduardo Candelaria 44ebaa5de1 ASoC: TWL6040: Fix playback with 19.2 Mhz MCLK
When using MCLK is configured for 19.2 Mhz, clock slicer should be
enabled and HPPLL should be bypassed in clock path.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-21 10:47:25 +01:00
Mark Brown 669be070ef Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.36 2010-05-20 15:58:22 -07:00
Linus Torvalds 7f06a8b26a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (250 commits)
  ALSA: hda: Storage class should be before const qualifier
  ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
  ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
  ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
  ASoC: TWL6040: Enable earphone path in codec
  ASoC: SDP4430: Add support for Earphone speaker
  ASoC: SDP4430: Add sdp4430 machine driver
  ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
  ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
  ALSA: sound/pci/asihpi: Use kzalloc
  ALSA: hdmi - dont fail on extra nodes
  ALSA: intelhdmi - add id for the CougarPoint chipset
  ALSA: intelhdmi - user friendly codec name
  ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
  ALSA: asihpi: incorrect range check
  ALSA: asihpi: testing the wrong variable
  ALSA: es1688: add pedantic range checks
  ARM: McBSP: Add support for omap4 in McBSP driver
  ARM: McBSP: Fix request for irq in OMAP4
  OMAP: McBSP: Add 32-bit mode support
  ...
2010-05-20 09:41:44 -07:00
Takashi Iwai d71f4cece4 Merge branch 'topic/asoc' into for-linus
Conflicts:
	sound/soc/codecs/ad1938.c
2010-05-20 12:00:43 +02:00
Jarkko Nikula ad8332c130 ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
These pins are for decoupling capacitors for the internal charge pumps
in TPA6130A2 and TPA6140A2 and not for connecting external supply.

Thanks to Eduardo Valentin <eduardo.valentin@nokia.com> for pointing out the
issue with TPA6130A2 and Ilkka Koskinen <ilkka.koskinen@nokia.com> with
TPA6140A2.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-20 10:28:39 +01:00
Jarkko Nikula 266d38c8e3 ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
Codec output pin should be defined with SND_SOC_DAPM_OUTPUT as otherwise
external widgets doesn't alter the output state.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-19 16:38:03 +01:00
Wan ZongShun 1082e2703a ASoC: NUC900/audio: add nuc900 audio driver support
Add support for NUC900 AC97

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-19 08:14:10 -07:00
Liam Girdwood d8b55d2cd0 ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
Fix build warning about unused ops and add ops
to the sdp4430 DAI link.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-19 14:14:51 +01:00
Jorge Eduardo Candelaria 871a05a78b ASoC: TWL6040: Enable earphone path in codec
Add control to enable earphone driver in TWL6040 codec. This driver
is connected to HSDAC Left.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-19 14:07:23 +01:00
Jorge Eduardo Candelaria 7254e2bddc ASoC: SDP4430: Add support for Earphone speaker
Enable earphone speaker in sdp4430 machine driver.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-19 14:07:15 +01:00
Misael Lopez Cruz 5e64d6aadd ASoC: SDP4430: Add sdp4430 machine driver
Add ASoC support for TI SDP4430.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-19 14:04:40 +01:00
Grant Likely 61c7a080a5 of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated.  This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-18 16:10:44 -06:00
Dan Williams 0b28330e39 Merge branch 'ioat' into dmaengine 2010-05-17 16:30:58 -07:00
Linus Walleij 058276303d DMAENGINE: extend the control command to include an arg
This adds an argument to the DMAengine control function, so that
we can later provide control commands that need some external data
passed in through an argument akin to the ioctl() operation
prototype.

[dan.j.williams@intel.com: fix up some missed conversions]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-05-17 16:30:42 -07:00
Peter Ujfalusi 2d4cdd6fc9 ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
Avoid calling the dac33_hard_power when the codec was
already in BIAS_OFF state.
This could happen in device suspend and module removal
time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-17 20:34:15 +01:00
Felipe Balbi 7fd1d74bfc ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
Since the cases when the same power state would be set again
handled gracefully, we do not need to use dev_warn.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-17 20:34:10 +01:00
apatard@mandriva.com b6f4bb383d ASoC: Add SOC_DOUBLE_R_SX_TLV control
This patch is adding a new control which has the following capabilities:
- tlv
- variable data size (for instance, 7 ou 8 bit)
- double mixer
- data range centered around 0

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Liam Girdwood <lrg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-16 18:04:46 +01:00
Sergey Lapin d98508a121 OMAP: McBSP: Add 32-bit mode support
This patchs should allow to use 32-bit samples on e.g. TLV320AIC3x codec,
or others.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-14 11:14:24 +01:00
Peter Ujfalusi 36aeff6146 ASoC: TWL4030: Add control for digimic Left Right swap
The codec has support for swapping the left and right
channels in the digimic interface.
New kcontrol to handle this bit.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-12 09:58:26 +01:00
Haojian Zhuang baffe1699c [ARM] pxa: add namespace on ssp
In order to prevent code ambiguous, add namespace on functions in ssp driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Eric Miao 866d091dcb [ARM] pxa: remove incorrect select PXA_SSP in Kconfig
PXA_SSP is actually used by drivers like drivers/spi/pxa2xx_spi.c and
sound/soc/pxa/pxa-ssp.c, not by boards. Remove those incorrect 'select'
from Kconfig and make SOC_PXA_SSP to select.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Haojian Zhuang 54c39b420f [ARM] pxa: move ssp into common plat-pxa
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Eric Miao 83f2889643 [ARM] pxa: merge regs-ssp.h into ssp.h
No need to separate them as they should be together from the begining.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Mark Brown 6a2f1ee1f9 ASoC: Don't restart unconfigured WM8994 FLLs
If the FLL is not configured attempting to resume it will produce a
warning message so skip the resume.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-11 14:18:52 +01:00
Mark Brown 6adb26bd03 ASoC: Reorder power down sequence for WM hubs devices
Disable the output stage prior to the delay stage rather than the
other way around. Fixes merge issue with previous headphone output
path corrections.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-11 14:18:41 +01:00
Mark Brown 3254d28500 ASoC: Add additional WM hubs DC servo trace
Log the values we're getting back from the DC servo and the values we
write to it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-11 14:18:34 +01:00
Mark Brown fd5722e5cd ASoC: Add register write logging for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-11 14:18:18 +01:00
Peter Ujfalusi d11bb4a925 ASoC: core: Fix for the volume limiting when invert is in use
If the register for the volume needs invert, than the inversion
need to be done from the chip maximum, and not from the platform
dependent limit.
Introduce soc_mixer_control.platform_max value, which initially
equals to chip maximum.
The snd_soc_limit_volume function only modify the platform_max,
all volsw_info call returns this as well.
The .max value holds the chip default (maximum), and it is used
for the inversion, if it is needed.

Additional check in the volsw_info call has been added to check
the validity of the platform_max in case, when custom macros
used by codec drivers are not initializing it correctly.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-11 09:34:11 +01:00
Mark Brown 896060c76b ASoC: Use more idiomatic driver name for WM8731
Make dev_() prints much prettier.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-10 11:04:34 +01:00
Mark Brown 06ae99888e ASoC: Refactor WM8731 regulator management into bias management
This allows more flexible integration with subsystem features.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-10 11:04:22 +01:00
Mark Brown 3efab7dcc0 ASoC: Allow DAI links to be kept active over suspend
As well as allowing DAPM pins to be marked as ignoring suspend allow DAI
links to be similarly marked.  This is primarily intended for digital
links between CODECs and non-CPU devices such as basebands in mobile
phones and will suppress all suspend calls for the DAI link.  It is
likely that this will need to be revisited if used with devices which
are part of the SoC CPU.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:37:13 +01:00
Mark Brown 452a5fd679 ASoC: Allow active paths from the GSM modem while the GTA02 is suspended
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:37:04 +01:00
Mark Brown 1547aba993 ASoC: Support leaving paths enabled over system suspend
Some devices can usefully run audio while the Linux system is suspended.
One of the most common examples is smartphone systems, which are normally
designed to allow audio to be run between the baseband and the CODEC
without passing through the CPU and so can suspend the CPU when on a
voice call for additional power savings.

Support such systems by providing an API snd_soc_dapm_ignore_suspend().
This can be used to mark DAPM endpoints as not being sensitive to
system suspend. When the system is being suspended paths between
endpoints which are marked as ignoring suspend will be kept active.
Both source and sink must be marked, and there must already be an
active path between the two endpoints prior to suspend.

When paths are active over suspend the bias management will hold the
device bias in the ON state. This is used to avoid suspending the
CODEC while it is still in use.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:36:48 +01:00
Mark Brown 9949788b79 ASoC: Refactor DAPM suspend handling
Instead of using stream events to handle power down during suspend
integrate the handling with the normal widget path checking by
replacing all cases where we report a connected endpoint in a path
with a function snd_soc_dapm_suspend_check() which looks at the ALSA
power state for the card and reports false if we are in a D3 state.

Since the core moves us into D3 prior to initating the suspend all
power checks during suspend will cause the widgets to be powered
down. In order to ensure that widgets are powered up on resume set
the card to D2 at the start of resume handling (ALSA API calls
require D0 so we are still protected against userspace access).

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:36:36 +01:00
Mark Brown 50ae8384cd ASoC: Remove unused DAPM suspend flag
We now manage suspend within the main power analysis rather than by
flipping the state of widgets.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:35:55 +01:00
Mark Brown 29e189c29d ASoC: Remove unneeded suspend bias managment from CODEC drivers
The core will ensure that the device is in either STANDBY or OFF bias
before suspending, restoring the bias in the driver is unneeded. Some
drivers doing slightly more roundabout things have been left alone
for now.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:35:25 +01:00
Jassi Brar d0bbc24d2a ASoC: SMDK64XX: Switch to IISv4 CPU driver
Switch the MACHINE driver to use IISv4 CPU dai.
Remove BROKEN dependency now that we have proper CPU driver available.
Also, disable build for SMDK6400, since the S3C6400 doesn't have IISv4
controller.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07 16:46:06 +01:00
Jassi Brar af56b1c27b ASoC: S3C64XX: IISv4: Add CPU driver
Add the CPU driver for the IISv4 block found on S3C6410.
For now, the driver is almost a copy of s3c64xx-i2s.c but
it should diverge as more IISv4 specific stuff is added.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07 16:45:41 +01:00