Commit Graph

2013 Commits (1152b2617a6e1943b6b82e07c962950e56f1000c)

Author SHA1 Message Date
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
Peter Ujfalusi bd843edf81 ASoC: tpa6130a2: Fix for the custom kcontrol functions
Since the functions arre only used for volume register,
change their name, and also fix them to properly
handle the cases, when via soc core the volume is
limited.

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-07 16:42:40 +01:00
Peter Ujfalusi 826e962c46 Revert "ASoC: tpa6130a2: Support for limiting gain"
This reverts commit 6f3991152f.

Since core has now support for limiting the volume on controls this
patch is not needed.  Furthermore, this patch actually prevents the core
to set new volume on the TPA.

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-07 16:42:23 +01:00
Peter Ujfalusi 637d3847ba ASoC: core: Support for limiting the volume
Add support for the core to limit the maximum volume on an
existing control.
The function will modify the soc_mixer_control.max value
of the given control.
The new value must be lower than the original one (chip maximum)

If there is a need for limiting a gain on a given control,
than machine drivers can do the following in their
snd_soc_dai_link.init function:

snd_soc_limit_volume(codec, "TPA6140A2 Headphone Playback Volume", 21);

This will modify the original 31 (chip maximum) to 21, so user
space will not be able to set the gain higher than this.

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-07 16:41:33 +01:00
Mark Brown 3057876498 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.35 2010-05-07 16:38:26 +01:00
Takashi Iwai aeb29a82de Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-05-06 17:06:27 +02:00
Peter Ujfalusi 2f005471e2 ASoC: tlv320dac33: Use codec defaults for LOM/LOP and DAC power
Do not change the codec defaults for the following registers:
0x40, 0x41: Line output gains, do not use amplification
0x42: LOM/LOP Voltage hold, and selection
0x44: LOM inversion control

It has been found, that the values configured to these registers
can cause amplification, which can make the output of DAC33
distorted.

The codec reset values are considered safe in all environmnts.

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-06 14:58:29 +01:00
Peter Ujfalusi 6f3991152f ASoC: tpa6130a2: Support for limiting gain
Add support for platform dependent gain limiting on the
tpa6130a2 (and tpa6140a2) Headset amplifier.

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-06 14:58:20 +01:00
Jarkko Nikula 5193d62f18 ASoC: tlv320aic3x: Add platform data and reset gpio handling
Handle the reset GPIO within the codec driver in order to follow
the startup protocol for the tlv320aic3x codecs.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-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-06 14:58:02 +01:00
Jarkko Nikula 49100c9835 ASoC: omap: Add basic audio support for Nokia RX-51/N900
This patch adds support for integrated stereo speakers and digital
microphone found on Nokia RX-51 hardware. This is a cut down version based
on Maemo kernel sources and earlier patchset by Eduardo Valentin et al.

http://mailman.alsa-project.org/pipermail/alsa-devel/2009-October/022033.html

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-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-06 09:50:11 +01:00
Jassi Brar 8a7c251871 ASoC: S3C: I2S: Move set_sysclk to common code
Now that we can specify feature of a particular controller, we can
avoid multiple copies of same code by defining the CDCLKCON bit
feature in controller specific code and detecting that flag in the
code common to all controllers.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:15:14 +01:00
Jassi Brar 9e991a4bf3 ASoC: S3C: I2Sv2: New field for controller feature
In order to make s3c-i2s-v2.c manage controllers with minor
quirks and variation in features, we define a per-block flag
that indicates the availability/lack of a particular feature
to the s3c-i2s-v2.c

While adding support for new SoCs' I2S, check for the blocks
of older SoCs that have similar feature and set the flag for
that feature.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:14:21 +01:00
Jassi Brar d47ef9c79d ASoC: S3C64XX: I2S: Use s3c2412 defines
Now that the fields are defined for s3c2412, use them and avoid having
multiple copies of same defines.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:13:48 +01:00
Jassi Brar 5728242789 ASoC: S3C: I2Sv2: Unify i2s_get_clock callback
Now that we have two callbacks s3c2412_i2s_get_clock & s3c64xx_i2s_get_clock
doing exactly the same thing, we can define one generic s3c_i2sv2_get_clock
and discard other two copies. Also, switch the users to make calls to the
newly defined and generic s3c_i2sv2_get_clock

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:13:20 +01:00
Jassi Brar 21a7ad08e2 ASoC: S3C: I2Sv2: Discard redundant field iis_clk
No need to keep redundant field iis_clk in s3c_i2sv2_info.
iis_cclk and iis_pclk is all we need.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:12:29 +01:00
Jassi Brar d79696ff44 ASoC: S3C2412: I2S: Return correct source clock
Until now, s3c2412_get_iisclk would return NULL since iis_clk was never
initialized.
Return appropriate pointer as per the selection made for source clock.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:11:52 +01:00
Jassi Brar ce76f9fd34 ASoC: S3C2412: I2S: Debug IMS field
The IMS field of s3c2412/13 is essentially the same as that of s3c64xx.
That is, the IISMOD[11] bit decides Master/Slave mode and IISMOD[10] bit
selects source clock for signal generation.
For that reason, remove improper defines for IISMOD[11:10] field mask
and define two 1bit fields that can be set independent of each other.
As a consequence, corresponding fields for PLAT_S3C64XX too get to use
these new defines.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:11:29 +01:00
Jassi Brar b720d56294 ASoC: SAMSUNG: I2S: Add bit definitions
Define more bit definitions in the order of mainline
support for the SoC.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:11:02 +01:00
Jassi Brar d07e7ce9b6 ASoC: S3C: I2Sv2: Move defines closer to driver
The header for I2Sv2
   linux/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
contains only controller specific definitions and nothing
SoC specific. So, it could be moved to sound/soc/s3c24xx/

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-05 15:10:39 +01:00
Mark Brown 985d8c4c9e ASoC: Add debug output tracing all cache register writes
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-05 15:10:17 +01:00
Peter Ujfalusi e5e5b31e8c ASoC: tpa6130a2: TLV mapping for tpa6140a2
Both tpa6130a2, and tpa6140a2 is supported by the
same driver, but the gain dB scaling is different on
the amplifiers.

Provide different mixer control for the chips with correct
TLV mapping.

User space will see:
"TPA6130A2 Headphone Playback Volume" in case of 6130
"TPA6140A2 Headphone Playback Volume" in case of 6140

The way machine drivers are using this amplifier remained
the same.

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-04 20:55:01 +01:00
Peter Ujfalusi ad05c03b1c ASoC: tlv320dac33: Support for turning off the codec
Let the codec to hit OFF instead of STANDBY, when there is no activity.
When the codec is off, than the associated regulator can be also turned
off (if the number of users on the regulator is 0).

After initialization, the codec remains in power off, it is only turned
on for reading the ID registers (also testing the regulators).

The codec power is enabled, when the codec is moving from BIAS_OFF
to BIAS_STANDBY.
The codec is turned off, when it hits BIAS_OFF.

There are few scenarios, which has to be taken care::
1. Analog bypass caused BIAS_OFF -> BIAS_ON
   We need to power on the codec, and do the chip init, but we does not
   need to execute the playback related configuration
2. Playback caused  BIAS_OFF -> BIAS_ON
   We need to power on the codec, and do the chip init, and also we need
   to execute the playback related configuration.
3. Playback start, while Analog bypass is on (BIAS_ON -> BIAS_ON)
   We need to execute the playback related configuration. The codec is
   already on.
4. Analog bypass enable, while playback (BIAS_ON -> BIAS_ON)
   Nothing need to be done.
5. Playback start withing soc power down timeout (BIAS_ON -> BIAS_ON)
   We need to execute the playback related configuration. The codec is
   still on.

Since the power up, and the codec init is optimized, the added overhead
in stream start is minimal.

Withing this patch, the hard_power function is now only doing what it
supposed to: only handle the powers, and GPIO reset line.
The codec initialization and state restore has been moved out.

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-03 12:55:54 +01:00
Peter Ujfalusi 0b61d2b9f2 ASoC: tlv320dac33: Manage a pointer for snd_pcm_substream in private structure
As a preparation for supporting codec to be turned off,
when we are in BIAS_STANDBY.

The substream must be easily available in other places than
pcm_* callbacks.

Manage a pointer in _startup, and _shutdown for this.

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-03 12:55:48 +01:00
Peter Ujfalusi 239fe55c7f ASoC: tlv320dac33: Revised module loading, and DAC33 ID read
Optimize the way how tlv320dac33 is powered uppon module and
soc initialization.
Also read the DAC33 ID registers, and update the reg_cache
to reflect it.

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-03 12:55:48 +01:00
Peter Ujfalusi ef909d6729 ASoC: tlv320dac33: Optimize power up, and restore
On power up we only need to initialize the codec, and
restore only registers, which are not in either in DAPM
nor in the playback start sequence.
These are mostly gain related 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-05-03 12:55:48 +01:00
Peter Ujfalusi 1b7c9afbfb ASoC: TWL4030: Remove OUTL/R outputs
OUTL/R are leftovers from the original driver, and they
are no longer needed.

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-03 12:47:30 +01:00
Peter Ujfalusi 7b4c734eea ASoC: TWL4030: AIF/APLL fix in DAPM domain
This patch orders the APLL and AIF power sequence in
case of HiFi (audio in TWL4030 terms) playback/capture.

We also need to make sure that the AIF is running during
playback/capture, when there is no valid DAPM route
available. For this purpose I introduce these virtual
widgets:
/* To have complete playback route all the time */
DAPM_OUTPUT("Virtual HiFi OUT") /* Will keep AIF/APLL enabled */

/* To have complete capture route all the time */
DAPM_INPUT("Virtual HiFi IN") /* Will keep AIF/APLL enabled */

/* To have complete playback route for the voice module */
DAPM_OUTPUT("Virtual Voice OUT") /* Will keep APLL enabled */

The DAPM_SUPPLY widgets for APLL and AIF are placed in a way,
that during any audio activity the needed configuration of AIF
and APLL will be enabled (playback, capture, analog loopback,
digital loopback, and voice activity).

The apll reference counting code has been lifted,
and modified from Liam Girdwood's earlier patch.

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-03 12:47:29 +01:00
Geert Uytterhoeven b0b4ce38a5 MIPS: TXx9: Add missing MODULE_ALIAS definitions for TXx9 platform devices
This enables autoloading of the TXx9 sound driver on RBTX4927.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Linux MIPS Mailing List <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1101/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-04-30 20:52:40 +01:00
Mark Brown 39b8eab7e7 ASoC: Add WM9090 amplifier driver
The WM9090 is a high performance low power audio subsystem, including
headphone and class D speaker drivers.

Note that this driver is a standalone CODEC driver and so is only
immediately suitable for use with the WM9090 as a standalone sound card
taking line inputs, or with a DAC with no software control.  The pending
ASoC multi-CODEC support will expand the range of systems that can use
the driver, or system-specific adaptations can be made.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-30 16:12:44 +01:00
Liam Girdwood cf134d5bfb ASoC: tlv320dac33 - disable regulators at i2c remove()
Acked-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-04-28 13:27:18 +01:00
Liam Girdwood 1849235876 ASoC: zoom2 - update DAPM pins
Remove bogus twl4030 pins

Acked-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-04-28 13:27:18 +01:00
Liam Girdwood 1beb91f004 ASoC: pandora - update DAPM pins
Remove bogus TWL4030 pins.

Acked-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-04-28 13:27:18 +01:00
Mark Brown dde3a7e9cb ASoC: Remove redundant WM8960 SYSCLKSEL clkdiv option
The SYSCLK source is automatically managed when configuring the PLL.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-28 11:33:04 +01:00
Takashi Iwai cb7b76961f Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-04-27 15:35:59 +02:00
Jarkko Nikula 07779fdd1a ASoC: tlv320aic3x: Add basic regulator support
This patch adds the TLV320AIC3x supplies and enables all of them for the
entire lifetime of the device.

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-04-27 11:19:23 +01:00
Jarkko Nikula db13802e51 ASoC: tlv320aic3x: Change bias management semantics
Move PLL enable from BIAS_ON state to BIAS_PREPARE to be pair with
BIAS_STANDBY where PLL is disabled. Remove also old comments about power
control.

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-04-27 11:08:06 +01:00
Jarkko Nikula d3235c4ac1 ASoC: tlv320aic3x: Remove needless power off from aic3x_set_bias_level
These ADC, DAC and output pin power off commands are needless in
aic3x_set_bias_level since they are not enabled in aic3x_init and they are
defined in aic3x_dapm_widgets so the ASoC DAPM will take care of them
anyway.

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-04-27 11:08:06 +01:00
Jarkko Nikula c6de6e0300 ASoC: tlv320aic3x: Remove unused version string
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-04-27 11:08:05 +01:00
Vladimir Zapolskiy b28528a124 ASoC: UDA134X: Add UDA1345 CODEC support
This patch adds support for Philips UDA1345 CODEC. The CODEC has only
volume control, de-emphasis, mute, DC filtering and power control features.

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-04-26 15:28:18 +01:00
Mark Brown 5e5e2bef28 ASoC: Warn on low WM8994 AIFCLK
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-26 15:26:13 +01:00
Mark Brown 759512fbac ASoC: Correct inversion of speaker mixer PCM switch
Reported-by: Anti Sullin <anti.sullin@artecdesign.ee>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-26 15:24:28 +01:00
Peter Ujfalusi f57d2cfaad ASoC: tlv320dac33: FIFO caused delay reporting
Delay reporting for the three implemented DAC33 FIFO modes.
DAC33 has FIFO depth status register(s), but it can not be used, since
inside of pcm_pointer we can not send I2C commands.
Timestamp based estimation need to be used. The method of calculating
the delay depends on the active FIFO mode.

Bypass mode: FIFO is bypassed, report 0 as delay

Mode1: nSample fill mode. In this mode I need to use two timestamp
ts1: taken when the interrupt has been received
ts2: taken before writing to nSample register.

Interrupts are coming when DAC33 FIFO depth goes under alarm threshold.

Phase1: when we received the alarm threshold, but our workqueue has
        not been executed (safeguard phase). Just count the played out
        samples since ts1 and subtract it from the alarm threshold
        value.
Phase2: During nSample burst (after writing to nSample register), count
        the played out samples since ts1, count the samples received
        since ts2 (in a burst). Estimate the FIFO depth using these and
        alarm threshold value.
Phase3: Draining phase (after the burst read), count the played out
        samples since ts1. Estimate the FIFO depth using the nSample
        configuration and the alarm threshold value.

Mode7: Threshold based fill mode. In this mode one timestamp is enough.
ts1: taken when the interrupt has been received

Interrupts are coming when DAC33 FIFO depth reaches upper threshold.

Phase1: Draining phase (after the burst), counting the played out
        samples since ts1, and subtract it from the upper threshold
        value.
Phase2: During burst operation. Using the pre calculated time needed to
        play out samples from the buffer during the drain period (from
        upper to lower threshold), move the time window to cover the
        estimated time from the burst start to the current time.
        Calculate the samples played out since lower threshold and also
        the samples received during the same 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-04-26 15:16:39 +01:00
Peter Ujfalusi 76f471274d ASoC: tlv320dac33: Calculate the interface speed during bursts
When the DAC33 FIFO is in use the dai interface is running in
much higher speed than the sampling frequency.
Calculate the rate based on the internal base frequency and
the bclk divider.

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-04-26 15:16:33 +01:00
Peter Ujfalusi 4260393e71 ASoC: tlv320dac33: Change magic numbers used in Mode7
Upper and Lower threshold values are used as magic
numbers. Replace them with defines for later use.

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-04-26 15:16:28 +01:00
Peter Ujfalusi 55abb59c9a ASoC: tlv320dac33: Skip calculations in FIFO Bypass mode
There is no need for calculations for FIFO bypass mode.
Just in case set the nsample maximum limit, which
has been done in the calculation phase.

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-04-26 15:16:23 +01:00
Peter Ujfalusi f4d5932806 ASoC: tlv320dac33: Fix for early interrupt in FIFO Mode1
Alarm threshold interrupt is triggered right after the
playback start.
This interrupt is recieved during the first burst period,
and caused the state machine to write additional nSample
command, which has to be avoided.
To fix this issue move the DAC33 interrupt unmasking
after we configured the PREFILL register with a small
delay.

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-04-26 15:16:18 +01:00
Mark Brown 3a278a0c65 ASoC: Allow reporting of NULL jacks
Follow the core jack implementation and allow reporting on the status
of NULL jacks, avoiding the need to check in detection implementations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-23 17:07:10 +01:00
Barry Song ba0a24e738 ASoC: ad193x: fix typo, delete redundant space
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-04-23 16:14:57 +01:00
Barry Song d6bdc0f7fe ASoC: ad193x: fix wrong register setting in ad193x_set_dai_fmt
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-04-23 16:14:02 +01:00
Mark Brown 7add84aa77 ASoC: Allow unspecified source when stopping WM8994 FLLs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-22 02:29:01 +09:00
Mark Brown ee839a2127 ASoC: Tone down debugging for WM8994 class W
It's a little verbose during path changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-21 01:41:28 +09:00
Mark Brown 7d48a6acbc ASoC: Set full range of WM8994 FLL Fratio values
Use all the available Fratio values when configuring the WM8994 FLL, not
just 0 and 3, following more complete characterisation of the device
performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-21 01:41:27 +09:00
Mark Brown 136ff2a272 ASoC: Support FLL input clock selection on WM8994
The WM8994 FLL can be clocked from one of four inputs, the two MCLKs and
the LRCLK and BCLK of the AIF associated with the FLL. Allow all four
inputs to be used rather than defaulting to MCLK1.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-21 01:41:26 +09:00
Phil Carmody 4f6f22d7be ASoC: da7210: Fencepost error in reg cache read
An index equal to the array size may not be accessed.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Acked-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-04-21 01:41:26 +09:00
Takashi Iwai d4a8ca2461 ASoC: missing conversions to snd_soc_codec_*_drvdata()
Conversions to snd_soc_codec_{get|set}_drvdata() were missing in some files
in the previous commit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-20 08:29:19 +02:00
Mark Brown b2c812e22d ASoC: Add indirection for CODEC private data
One of the features of the multi CODEC work is that it embeds a struct
device in the CODEC to provide diagnostics via a sysfs class rather than
via the device tree, at which point it's much better to use the struct
device private data rather than having two places to store it. Provide
an accessor function to allow this change to be made more easily, and
update all the CODEC drivers are updated.

To ensure use of the accessor the private data structure member is
renamed, meaning that if code developed with older an older core that
still uses private_data is merged it will fail to build.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-17 10:46:22 +09:00
Mark Brown 890c681275 Merge branch 'for-2.6.34' into for-2.6.35 2010-04-17 10:45:54 +09:00
Takashi Iwai d336905e00 Merge branch 'fix/asoc' into for-linus 2010-04-16 10:03:36 +02:00
Sascha Hauer 8392609969 ASoC: imx-ssi: do not call hrtimer_disable in trigger function
Doing so causes a deadlock, so just signal the timer to stop
using an atomic variable.

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-04-16 01:02:35 +09:00
Sascha Hauer 565a79f74a ASoC: imx-ssi: increase minimum periods to 4
Currently the notification of elapsed periods is not very exact.
Increase minimum periods to 4 as suggested by Liam Girdwood.

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-04-15 10:29:49 +09:00
Marek Vasut d21e0f4cd1 ASoC: Zipit Z2 WM8750 ASoC driver
This patch adds support for sound through the WM8750 codec on Zipit Z2.
Also, this patch incorporates support for detecting headset jack
insertion through the jack detection API.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-12 11:33:16 +01:00
Bill Gatliff e135443e21 ASoC: Use SNDRV_PCM_RATE_8000_96000 macro for WM8731
Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-12 11:33:04 +01:00
Marek Vasut 6ca0c22ef8 ASoC: WM8750: Convert to new API
Register the WM8750 as a SPI or I2C device. This patch mostly shuffles code
around. Hugely inspired by WM8753 which was already converted.

Also, this patch fixes the Jive and Spitz machine.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-09 12:17:42 +01:00
Sascha Hauer 43a3cec013 ASoC: imx-ssi: Use a hrtimer in FIQ mode
Using a regular timer results in poll times < 1 jiffie with small
buffers, so we loaded the timer with the actual jiffie value. We can
be more accurate using a hrtimer. Also, we have to call
snd_pcm_period_elapsed after playing period_bytes and not
runtime->period_size (which is in samples and not in bytes).

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-04-08 15:21:05 +01:00
Sascha Hauer 671999cb5d ASoC: imx-pcm-dma-mx2: restart DMA after an error
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-04-08 15:21:01 +01:00
Sascha Hauer 206b60e189 ASoC: imx-ssi: honor IMX_SSI_DMA flag
When checking if we are DMA capable we have to check for the
IMX_SSI_DMA flag which is already set from platform_data instead
of setting it again when we want to do DMA.

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-04-08 15:20:57 +01:00
Huang Weiyi 78e4fd26ef ASoC: wm2000: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/wm2000.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-08 15:16:00 +01:00
Linus Torvalds 84db18bbeb 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: mixart: range checking proc file
  ALSA: hda - Fix a wrong array range check in patch_realtek.c
  ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
  ALSA: hda - Enable amplifiers on Acer Inspire 6530G
  ASoC: Only do WM8994 bias off transition from standby
  ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
  ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
  ASoC: Support second DC servo readback method for wm_hubs
  ASoC: Avoid wraparound in wm_hubs DC servo correction
  ALSA: echoaudio - Eliminate use after free
  ALSA: i2c: cleanup: change parameter to pointer
  ALSA: hda - Add MSI blacklist for Aopen MZ915-M
  ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code
  ALSA: hda - Update document about MSI and interrupts
  ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
  ALSA: hda - Add missing printk argument in previous patch
  ASoC: Fix passing platform_data to ac97 bus users and fix a leak
  ALSA: hda - Fix ADC/MUX assignment of ALC269 codec
  ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
  ASoC: wm8994: playback => capture
2010-04-07 08:42:25 -07:00
Mark Brown 53a61d967a Merge branch 'for-2.6.34' into for-2.6.35
Conflicts due to context changes next to the backported DMA data change:
	include/sound/soc.h
2010-04-05 19:19:32 +01:00
Mark Brown 8876698406 ASoC: Implement interrupt based WM8994 microphone detection
Support interrupt based microphone bias detection. The WM8994 has two
microphone bias supplies, with detection supported on both. Detection
using GPIOs together with the standard GPIO based jack framework is
already supported via the platform data for the WM8994 core driver.

Note that as well as the microphone bias itself the system clock and
whichever AIF clock is supplying the system clock will need to be
enabled for detection to function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-05 19:18:12 +01:00
Daniel Mack 5f712b2b73 ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

[Note that this is a backported version for 2.6.34.
 Upstream commit is fd23b7dee]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-05 19:14:11 +01:00
Mark Brown d522ffbfb9 ASoC: Only do WM8994 bias off transition from standby
Otherwise we may try to power down multiple times when the using
idle bias off and the driver is removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-05 16:20:49 +01:00
Mark Brown 4dcc93d0ed ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
The DCS_DATAPATH_BUSY bit used to monitor the completion of DC servo
operations has been deprecated and with some more recente revisions
may perform incorrectly, especially when only analogue bypass paths
are in use. Switch to using readback from the DC servo command
register instead, which is supported for all devices. Without this
unacceptably long timeouts may be observed in some circumstances.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-05 16:20:02 +01:00
Mark Brown ae9d8607fe ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
If we need to offset correct the DC servo then don't use runtime
recalibration since that is likely to introduce further offsets
which will be evident on powerdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-05 16:19:29 +01:00
Mark Brown 8437f7006b ASoC: Support second DC servo readback method for wm_hubs
More recent Wolfson hubs devices add the ability to read back the DC
servo calibration information from the register used to write offsets,
and later still ones remove the old readback registers. Add support
for the new scheme, and use it for WM8994 device revisions that
support it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-05 16:19:09 +01:00
Mark Brown 3fa49e3ad9 ASoC: Avoid wraparound in wm_hubs DC servo correction
If the correction wraps around then a substantial offset would be
introduced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-05 16:17:39 +01:00
Janusz Krzysztofik b5442a75de ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code
With recent (2.6.34) chnages in PCM handling, capture stopped working on my
OMAP1510 based Amstrad Delta videophone.

Using 2.6.34-rc2, I was able to correct the problem in 3 different ways:

1. reverting commit 7b3a177b0d,
2. enabling additional jiffies check with
	echo 4 >/proc/asound/card0/pcm0c0/xrun_debug
3. applying the patch below.

Since I wasn't able to reproduce the problem on my i686 PC, I guess the
problem is probably machine specific.

The patch reuses the method for software emulation of missing hardware
pointer, already implemented for playback on OMAP1510. It's possible that
event if a hardware pointer is available for capture on this machine, its
behaviour may be not compatible with what upper layer expects.

If you think the problem may be more general and should be solved differently,
on a higher level, I can try to work more on it if you give me a hint.

If the patch gets accepted, I suggest it goes as a fix in the current release
cycle.

Created and tested against linux-2.6.34-rc2.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-02 17:10:25 +01:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Mark Brown 2c9504228f Merge branch 'for-2.6.34' into for-2.6.35 2010-03-29 21:03:20 +01:00
Barry Song 9dd7b79a86 ASoC: ad193x: move codec register/unregister to bus probe/remove
The way i've factored out the bus probe and removal functions so
that there's no code in the individual I2C and SPI functions means
that the register() and unregister() functions could just be squashed
into the bus_probe() and bus_remove() functions.

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-03-29 21:02:24 +01:00
Graham Gower fb48e3c6a4 ASoC: Fix passing platform_data to ac97 bus users and fix a leak
[The issue is an attempt to write the pdata without the AC97 device
allocated when using ac97.c - also added a comment in soc-core.c for the
special case for ac97. -- broonie]

Signed-off-by: Graham Gower <graham.gower@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-29 21:00:37 +01:00
Mark Brown e6ab07ce0f Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.35 2010-03-29 21:00:04 +01:00
Tejun Heo 923a00427a ASoC: update gfp/slab.h includes
Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 21:28:43 +02:00
Takashi Iwai d01e14a6b9 ASoC: Fix file permission of soc/codecs/twl6040.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 09:31:57 +02:00
Stephen Rothwell 68b40cc40a ASoC: TWL6040: use of kzalloc/kfree requires the include of slab.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 09:31:07 +02:00
Stephen Rothwell 1b132ea03e ASoC: update for removeal of slab.h from percpu.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 08:30:23 +02:00
Linus Walleij c3635c78e5 DMAENGINE: generic slave control v2
Convert the device_terminate_all() operation on the
DMA engine to a generic device_control() operation
which can now optionally support also pausing and
resuming DMA on a certain channel. Implemented for the
COH 901 318 DMAC as an example.

[dan.j.williams@intel.com: update for timberdale]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Li Yang <leoli@freescale.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Magnus Damm <damm@opensource.se>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Joe Perches <joe@perches.com>
Cc: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-03-26 16:44:01 -07:00
Kuninori Morimoto cc780d380a ASoC: fsi: Add FSI2 device support
ARM-SHMOBILE series have FIFO-buffered serial interface 2 (FSI2)
device which is advanced version of FSI.
This patch add simple support for it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-26 11:17:45 +00:00
Kuninori Morimoto 4a942b457e ASoC: fsi: Add FIFO size calculate
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-26 11:16:27 +00:00
Dan Carpenter a8462bde78 ASoC: wm8994: playback => capture
Sparse caught that initialize "playback" two times instead of
initializing "capture".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-24 14:05:28 +00:00
Kuninori Morimoto 10ea76cc25 ASoC: fsi: IRQ related process had be united
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-24 11:16:47 +00:00
Kuninori Morimoto feb58cffca ASoC: fsi: ensures process inside master lock
Bit operation for fsi_master should be done inside master lock.
But soft-reset/interrupt operation were outside of it.
This patch modify this problem.
It still allow to INT_ST outside-operation on fsi_interrupt,
but it is not problem.
Because this register doesn't need the bit operation.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-24 11:16:47 +00:00
Kuninori Morimoto 1ad747ca9b ASoC: ak4642: Add enhanced sampling rate
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-23 10:59:11 +00:00
Kuninori Morimoto 0643ce8f42 ASoC: ak4642: Add set_fmt function for snd_soc_dai_ops
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-23 10:59:11 +00:00
Kuninori Morimoto 4b6316b4b1 ASoC: ak4642: Add pll select support
Current ak4642 was not able to select pll.
This patch add support it.
It still expect PLL base input pin is MCKI.
see Table 5 "setting of PLL Mode" of datasheet

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-23 10:59:11 +00:00
Mark Brown 778a76e2db ASoC: Implement WM8994 DAI tristate support
This also adds the first DAI operation for AIF3 so fill out the ID and
the ops for that too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-23 10:57:11 +00:00
Mark Brown 74511020dd Merge branch 'for-2.6.34' into for-2.6.35 2010-03-22 17:23:46 +00:00
Mark Brown 69266866a5 ASoC: Allow WM8903 mic detect disable and don't force bias on
Don't force enable the microphone bias on WM8903 when doing jack
detection, and don't force enable microphone bias. This allows
platforms to only enable microphone detection when a jack has been
inserted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:22:56 +00:00
Mark Brown f06bce9c8c ASoC: Allow disabling of WM835x jack detection
If no report is specified then disable detection. Note that we don't
disable the slow clock, though the power consumption from it should
be negligable. That should be reference counted, ideally through DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:22:39 +00:00
Mark Brown 2f14430af5 ASoC: Move WM8350 microphone detection bias managment out of driver
Allow machines to control exactly when the bias is turned on and off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:21:38 +00:00
Mark Brown 5b9e87cccc ASoC: Allow force enabled pins to be disabled
Some systems, such as those with mechanical jack detection, may wish
to force enable a pin (typically mic bias) only some of the time.
Support such systems by having disable_pin() also coveer force enabled
pins.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:21:23 +00:00
Mark Brown d5021ec9fc ASoC: Add a notifier for jack status changes
Some systems provide both mechanical and electrical detection of jack
status changes. On such systems power savings can be achieved by only
enabling the electrical detection methods when physical insertion has
been detected.

Begin supporting such systems by providing a notifier for jack status
changes which can be used to trigger any reconfiguration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:20:57 +00:00
Peter Ujfalusi c96907f21f ASoC: TWL4030: PM fix for output amplifiers
Gain controls on outputs affect the power consumption
when the gain is set to non 0 value.

Outputs with amps have one register to configure the
routing and the gain:
PREDL_CTL (0x25):
bit 0: Voice enable
bit 1: Audio L1 enable
bit 2: Audio L2 enable
bit 3: Audio R2 enable
bit 4-5: Gain (0x0 - power down, 0x1 - 6dB, 0x2 - 0dB, 0x3 - -6dB)

bit 0 - 3: is handled in DAPM domain (DAPM_MIXER)
bit 4 - 5: has simple volume control

If there is no audio activity (BIAS_STANDBY), and
user changes the volume, than the output amplifier will
be enabled.
If the user changes the routing (but the codec remains in
BIAS_STANDBY), than the cached gain value also be written
to the register, which enables the amplifier.

The existing workaround for this is to have virtual
PGAs associated with the outputs, and whit DAPM PMD
the gain on the output will be forced to 0 (off) by
bypassing the regcache.
This failed to disable the amplifiers in several
scenario (as mentioned above).

Also if the codec is in BIAS_ON state, and user modifies
a volume control, which path is actually not enabled, than
that amplifier will be enabled as well, but it will
be not turned off, since there is no DAPM path, which
would make mute it.

To prevent amps being enabled, when they are not
needed, introduce the following workaround:
Track the state of each of this type of output.
In twl4030_write only allow actual write, when the
given output is enabled, otherwise only update
the reg_cache.
The PGA event handlers on power up will write the cached
value to the chip (restoring gain, routing selection).
On power down 0 is written to the register (disabling
the amp, and also just in case clearing the routing).

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-03-22 16:47:12 +00:00
Mark Brown 3cc4e53f86 ASoC: Remove BROKEN from i.MX audio after dependencies merged
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 11:17:41 +00:00
Mark Brown f9b44121b3 Merge commit 'v2.6.34-rc2' into for-2.6.34 2010-03-22 11:17:26 +00:00
Mark Brown 4ca612ebdb Merge branch 'for-2.6.34' into for-2.6.35 2010-03-19 19:39:23 +00:00
Guennadi Liakhovetski b2dfa62c52 ASoC: remove a card from the list, if instantiation failed
If instantiation of a card failed, we still have to remove it from the
card list on unregistration. This fixes an Oops on Migo-R, triggering,
when after a failed firmware load attempt the driver modules are removed
and re-inserted again.

Signed-off-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-03-19 19:39:18 +00:00
Daniel Mack fd23b7dee5 ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 19:37:29 +00:00
Mark Brown 093208f5d0 ASoC: Hook up microphone jack detection on 1133-EV1 board
Note that since all the microphones share a bias there is a single
jack exported for all three, even though there are two physical
connectors plus the soldered down silicon mic.  Note also that the SiMic
is always present by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-19 14:09:05 +00:00
Barry Song 698c375666 ASoC: change bf5xx-ad1938 machine driver to bf5xx-ad193x machine driver
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-03-19 12:47:34 +00:00
Mark Brown cffce322be ASoC: Unexport AD193x bus probe/remove functions
The export is not needed since the per-bus code lives in the same
module.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-19 12:22:03 +00:00
Barry Song a1533d94c6 ASoC: rename ad1938 to ad193x and add support for ad1936/7/8/9
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Yi Li <yi.li@analog.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 12:12:16 +00:00
Misael Lopez Cruz 8ecbabd977 ASoC: TWL6040: Add twl6040 codec driver
Initial version of TWL6040 codec driver.

The TWL6040 codec uses a proprietary PDM-based digital audio interface.
Audio paths supported are:

- Input: Main Mic, Sub Mic, Headset Mic, Auxiliary-FM Left/Right
- Output: Headset Left/Right, Handsfree Left/Right

TWL6040 codec supports power-up/down manual and automatic sequence.
Manual sequence is done through a specific register writes sequence.
Automatic sequence is done when the codec is powered-up through the
external AUDPWRON line. The completion of the sequence is signaled
through the audio interrupt.

TWL6040 codec sysclk can be provided by: low-power or high
performance PLL:

- The low-power PLL takes a low-frequency input at 32,768 Hz and
generates an approximate of 17.64 or 19.2 MHz (for 44.1 KHz and 48 KHz
respectively)

- The high-performance PLL generates an exact 19.2 MHz clock signal
from high-frequency input at 12/19.2/26/38.4 MHz.

Low-power playback mode is a special scenario where only headset path
(headset DAC and driver) is active.

For the particular case of headset path, PLL being used defines the
headset power mode: low-power, high-performance.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 11:29:33 +00:00
Mark Brown 6937c947d3 ASoC: Bail out of wm_hubs DC servo if calibration fails
We're keeping track of the number of times we've iterated but never
actually using this to bail out if the chip looks stuck.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-19 11:17:36 +00:00
Peter Ujfalusi fdb6b1e195 ASoC: tlv320dac33: Internal clocking changes
During validation of the internal clocking setup it has
been found that the following settings were not configured
in an optimal way:

ASRC_CTRL_A: SRCLKDIV was incorrect, instad of divide ratio 3,
             ratio of 2 has to be used (as the comment stated)
DAC_CTRL_A: Fs = Fsref is the desired configuration instead of
            Fs = Fsref / 1.5

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-03-19 11:17:24 +00:00
Peter Ujfalusi 44f497b4e0 ASoC: tlv320dac33: Fix DSP modes
To make DSP_A mode working correctly the data delay should be
configured to 0. DSP_B mode thus can not be used with DAC33,
so remove it.

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-03-19 11:17:24 +00:00
Mark Brown 27648b2f1c ASoC: Correct typoed Mic2 connections on 1133-EV1 board
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 11:15:42 +00:00
Peter Ujfalusi 299a151f53 ASoC: omap-mcbsp: Add support for Left Justified format
Basic support for Left Justified coding for OMAP McBSP.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 11:14:39 +00:00