pandora-kernel.git
14 years agoASoC: Add PDM DAI format definition
Lopez Cruz, Misael [Sat, 26 Sep 2009 02:02:49 +0000 (21:02 -0500)]
ASoC: Add PDM DAI format definition

Add DAI format definition for PDM interfaces.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: pxa-ssp increase max_channels to 8
Graeme Gregory [Fri, 25 Sep 2009 12:30:26 +0000 (13:30 +0100)]
ASoC: pxa-ssp increase max_channels to 8

When running in TDM mode there can be more than 2 channels used. Datasheet has
figures for upto 8 channels so increase max_channels on all SSP interfaces to
this figure.

Signed-off-by: Graeme Gregory <dp@xora.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'for-2.6.32' into for-2.6.33
Mark Brown [Wed, 23 Sep 2009 17:54:06 +0000 (10:54 -0700)]
Merge branch 'for-2.6.32' into for-2.6.33

14 years agoASoC: DaVinci: Correct McASP FIFO initialization
Chaithrika U S [Wed, 23 Sep 2009 14:12:08 +0000 (10:12 -0400)]
ASoC: DaVinci: Correct McASP FIFO initialization

McASP write FIFO registers should be modified for playback and read FIFO
registers for capture. Check the PCM mode before manipulating the
FIFO registers. Currently, irrespective of playback/capture both the
FIFOs are enabled or disbaled. This resulted in errors in audio loopback
mode.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Davinci: Fix race with cpu_dai->dma_data
Troy Kisky [Fri, 11 Sep 2009 21:29:03 +0000 (14:29 -0700)]
ASoC: Davinci: Fix race with cpu_dai->dma_data

This patch removes references to cpu_dai->dma_data.
It makes struct davinci_pcm_dma_params part of
struct davinci_mcbsp_dev or struct davinci_audio_dev.

It removes the unused name variable from davinci_pcm_dma_params.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: DaVinci: Fix divide by zero error during 1st execution
Troy Kisky [Fri, 11 Sep 2009 21:29:02 +0000 (14:29 -0700)]
ASoC: DaVinci: Fix divide by zero error during 1st execution

When both playback and capture stream were open
davinci_i2s_hw_params was setting parameters for
the wrong stream. The fix for davinci_i2s_hw_params
is sufficient, but it looks like a race still happens
in davici_pcm_open. This patch also makes the race smaller
but the next patch provides a better fix.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Blackfin: fix inverted handling of SPORT0 on PORT F/G
Cliff Cai [Wed, 23 Sep 2009 15:51:05 +0000 (11:51 -0400)]
ASoC: Blackfin: fix inverted handling of SPORT0 on PORT F/G

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Blackfin I2S: use dai state rather than local counter
Barry Song [Wed, 23 Sep 2009 15:51:04 +0000 (11:51 -0400)]
ASoC: Blackfin I2S: use dai state rather than local counter

Since the active field of the dai already tells us the stream activity,
the local counter variable is redundant and can be replaced.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: wm8753: fix mapping when MONOMIX is set to Stereo
Phil Vandry [Mon, 21 Sep 2009 15:36:08 +0000 (11:36 -0400)]
ASoC: wm8753: fix mapping when MONOMIX is set to Stereo

When MONOMIX is set to Stereo, Left PGA was not powered on but should be.
Add a mapping from Capture Left Mux to Capture Left Mixer to fix the issue.

Signed-off-by: Phil Vandry <vandry@TZoNE.ORG>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: some minor changes for AD1836 and AD1938 codec drivers
Barry Song [Mon, 21 Sep 2009 03:20:51 +0000 (11:20 +0800)]
ASoC: some minor changes for AD1836 and AD1938 codec drivers

1. delete redundant assignment to bus field in spi_driver structure
2. fix lost assignment to set_bias_level entry in ad1938 codec dai
3. change spi driver name of ad1836 from "ad1836-spi" to "ad1836"

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'upstream/wm8711' into for-2.6.33
Mark Brown [Mon, 21 Sep 2009 11:54:21 +0000 (04:54 -0700)]
Merge branch 'upstream/wm8711' into for-2.6.33

14 years agoASoC: Convert soc-cache to use C99 style initialisers for the table
Mark Brown [Mon, 21 Sep 2009 11:21:47 +0000 (04:21 -0700)]
ASoC: Convert soc-cache to use C99 style initialisers for the table

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Support WM8580 based audio subsystem on SMDK64xx machines
jassi brar [Sat, 19 Sep 2009 00:46:06 +0000 (09:46 +0900)]
ASoC: Support WM8580 based audio subsystem on SMDK64xx machines

New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's
PLLA to generate clocks from a 12MHz crystal attached to WM8580.

[Added dependency on BROKEN since the IISv4 interface hasn't been merged
yet, fixed the PLL API usage and removed the disabling of the PLL in the
hw_free function since that'll break simultaneous playback and record
 -- broonie.]

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'for-2.6.32' into for-2.6.33
Mark Brown [Fri, 18 Sep 2009 14:09:44 +0000 (15:09 +0100)]
Merge branch 'for-2.6.32' into for-2.6.33

14 years agoASoC: Return correct codec clock in s3c64xx-i2s
Jassi [Fri, 18 Sep 2009 06:22:27 +0000 (15:22 +0900)]
ASoC: Return correct codec clock in s3c64xx-i2s

Instead of always returnig pointer to the 'audio-bus' clock,
check which clock is used to generate internal clocks and
then return it's pointer.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: DaVinci: Fixes to McASP configuration
Chaithrika U S [Tue, 15 Sep 2009 22:13:29 +0000 (18:13 -0400)]
ASoC: DaVinci: Fixes to McASP configuration

McASP register settings are not correct for DSP mode of operation.
There is a channel swap initally. This patch provides fixes to
the register values for proper working.

Tested on DA830/OMAP-L137 EVM, DM6467 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Blackfin I2S: fix resuming when device hasn't been used
Cliff Cai [Thu, 17 Sep 2009 00:25:12 +0000 (20:25 -0400)]
ASoC: Blackfin I2S: fix resuming when device hasn't been used

If the sound system hasn't been utilized yet and we suspend, then we
attempt to save/restore using state that doesn't exist.  So use a global
handle instead to reconfigure properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Blackfin I2S: add lost platform_device parameter to resume function
Barry Song [Thu, 17 Sep 2009 00:25:11 +0000 (20:25 -0400)]
ASoC: Blackfin I2S: add lost platform_device parameter to resume function

Commit dc7d7b830ee1 trimmed the platform_device parameter from all of the
suspend functions, but it also accidentally removed it from the resume
function in the Blackfin I2S driver.  So restore it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: fix typos in Blackfin headers
Barry Song [Thu, 17 Sep 2009 00:25:10 +0000 (20:25 -0400)]
ASoC: fix typos in Blackfin headers

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
Mike Frysinger [Thu, 17 Sep 2009 00:25:09 +0000 (20:25 -0400)]
ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Blackfin AC97: add a few missing multichannel define handling
Cliff Cai [Thu, 17 Sep 2009 00:25:08 +0000 (20:25 -0400)]
ASoC: Blackfin AC97: add a few missing multichannel define handling

Somewhere along the line, most of SND_BF5XX_MULTICHAN_SUPPORT handling was
merged, but two places were missed (the probe/resume functions).  Restore
handling of this option so it gets initialized properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: remove unused #include <linux/version.h>
Huang Weiyi [Wed, 16 Sep 2009 13:05:45 +0000 (21:05 +0800)]
ASoC: remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/ad1836.c
  sound/soc/codecs/ad1938.c
  sound/soc/codecs/wm8974.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add S3C64xx IIS CDCLK source selection
Mark Brown [Wed, 16 Sep 2009 18:38:53 +0000 (19:38 +0100)]
ASoC: Add S3C64xx IIS CDCLK source selection

CDCLK can either be an output generated by the CPU, intended for use
as the CODEC master clock, or an input (probably from the CODEC)
providing a master clock for the IIS block.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Davinci: Add audio codec support for DM365 EVM
Miguel Aguilar [Wed, 2 Sep 2009 21:33:59 +0000 (15:33 -0600)]
ASoC: Davinci: Add audio codec support for DM365 EVM

This patch enables tlv320aic3101 support on DM365 EVM and
it was tested on DM365 EVM rev c.

Note: this patch was created based on temp/asoc branch.

Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: use set_channel_map api to reorder channels for AD1938 and AD1836
Barry Song [Tue, 15 Sep 2009 03:24:52 +0000 (11:24 +0800)]
ASoC: use set_channel_map api to reorder channels for AD1938 and AD1836

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C I2S LRCLK polarity option.
Jassi [Tue, 15 Sep 2009 10:02:38 +0000 (19:02 +0900)]
ASoC: S3C I2S LRCLK polarity option.

1) Explicitly set LRCLK polarity for I2S Vs LSM/MSB modes.
2) Convert from numerical to bit-field values for BCLK selection.
3) Use proper error checking for return value from clk_get

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C lrsync function made to work with IRQs disabled.
Jassi [Tue, 15 Sep 2009 10:02:37 +0000 (19:02 +0900)]
ASoC: S3C lrsync function made to work with IRQs disabled.

s3c2412_snd_lrsync() maybe reached with IRQs disabled and if LRCLK
is dead due to improper initialization of CPU or CODEC, the system
gets stuck in the loop because jiffies may never get updated.
Implemented counter based wait mechanism for atleast the same
timeout period.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fix display of stream name in DAPM debugfs
Mark Brown [Mon, 14 Sep 2009 15:49:00 +0000 (16:49 +0100)]
ASoC: Fix display of stream name in DAPM debugfs

Also display streams all the time while we're here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Provide API for reordering channels
Barry Song [Fri, 11 Sep 2009 17:16:29 +0000 (01:16 +0800)]
ASoC: Provide API for reordering channels

The patch adds an interface to set the relationship between audio
channel number and slot number. The interface should be really useful
because audio channel n doesn't always use slot n in all platforms. And
for some devices, the relationship even can change with sound mode
switch in 2.1,3.1,4.1,5.1,6.1,7.1 etc.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Clean up error handling in MPC5200 DMA setup
Julia Lawall [Sat, 12 Sep 2009 12:25:35 +0000 (14:25 +0200)]
ASoC: Clean up error handling in MPC5200 DMA setup

Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: AK4671: add ak4671 codec driver
Joonyoung Shim [Wed, 9 Sep 2009 15:12:43 +0000 (00:12 +0900)]
ASoC: AK4671: add ak4671 codec driver

The AK4671 is a stereo CODEC with a built-in Microphone-Amplifier,
Receiver-Amplifier and Headphone-Amplifier.

The datasheet for the ak4671 can find at the following url:
http://www.asahi-kasei.co.jp/akm/en/product/ak4671/ak4671_f01e.pdf

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Allow per-route connectedness checks for supplies
Mark Brown [Tue, 8 Sep 2009 17:59:05 +0000 (18:59 +0100)]
ASoC: Allow per-route connectedness checks for supplies

Some chips with complex internal supply (particularly clocking)
arragements may have multiple options for some of the supply
connections. Since these don't affect user-visible audio routing
the expectation would be that they would be managed automatically
by one of the drivers.

Support these users by allowing routes to have a connected function
which is queried before the connectedness of the path is checked as
normal. Currently this is only done for supplies, other widgets
could be supported but are not currently since the expectation for
them is that audio routing will be under the control of userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: au1x: PSC-AC97 bugfixes
Manuel Lauss [Tue, 8 Sep 2009 17:45:17 +0000 (19:45 +0200)]
ASoC: au1x: PSC-AC97 bugfixes

This patch fixes the following bugs:

- only reprogram bitdepth if it has changed since last call to hw_params.
- add locking inside ac97_read/write functions:
  When reprogramming sample depth, the ac97 unit has to be disabled,
  which should not be done in the middle of codec register accesses.

- retry timed-out codec register accesses.

- wait for status bits to set/clear when starting/stopping various
  functional blocks; very important after reenabling AC97 unit else
  sound may be distorted (e.g. high-pitch noise in 1kHz sine wave).

- clear fifos before/after starting/stopping RX/TX.

- longer timeouts waiting for PSC/AC97 ready after cold reset
  with certain codecs this can take ridiculous amounts of time.

Run-tested on various Au1200 platforms with various codecs.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fix WM835x Out4 capture enumeration
Mark Brown [Mon, 7 Sep 2009 17:09:58 +0000 (18:09 +0100)]
ASoC: Fix WM835x Out4 capture enumeration

It's the 8th enum of a zero indexed array. This is why I don't let
new drivers use these arrays of enums...

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
14 years agoASoC: Remove unuused hw_read_t
Mark Brown [Mon, 7 Sep 2009 11:46:42 +0000 (12:46 +0100)]
ASoC: Remove unuused hw_read_t

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Factor out I2C 8 bit address 8 bit data I/O
Joonyoung Shim [Mon, 7 Sep 2009 03:04:37 +0000 (12:04 +0900)]
ASoC: Factor out I2C 8 bit address 8 bit data I/O

This patch is for the AK4671 codec driver using this format.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add source argument to PLL configuration
Mark Brown [Sat, 5 Sep 2009 17:52:16 +0000 (18:52 +0100)]
ASoC: Add source argument to PLL configuration

More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: fix pxa2xx-ac97.c breakage
Robert Schwebel [Fri, 4 Sep 2009 19:16:36 +0000 (21:16 +0200)]
ASoC: fix pxa2xx-ac97.c breakage

Today's linux-next fails to build with

  sound/arm/pxa2xx-ac97.c: In function 'pxa2xx_ac97_probe':
  sound/arm/pxa2xx-ac97.c:211: error: 'pxa2xx_audio_ops_t' has no member named 'codec_data'
  make[2]: *** [sound/arm/pxa2xx-ac97.o] Error 1

It looks like commit e2365bf313fb21b49b1e4c911033389564428d03 has
introduced this; patch below.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fully specify DC servo bits to update in wm_hubs
Mark Brown [Wed, 2 Sep 2009 17:51:19 +0000 (18:51 +0100)]
ASoC: Fully specify DC servo bits to update in wm_hubs

Avoids potential issues if we read back unexpected values during
a read/modify/write cycle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Debugged improper setting of PLL fields in WM8580 driver
jassi brar [Tue, 1 Sep 2009 02:35:08 +0000 (11:35 +0900)]
ASoC: Debugged improper setting of PLL fields in WM8580 driver

Bug was caught while trying to use WM8580 as I2S master on SMDK.
Symptoms were lesser LRCLK read by CRO(41.02 instead of 44.1 KHz) Solved
by referring to WM8580A manual and setting mask value correctly and
making the code to not touch 'reserved' bits of PLL4 register.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: new board driver to connect bfin-5xx with ad1836 codec
Barry Song [Tue, 1 Sep 2009 04:45:14 +0000 (12:45 +0800)]
ASoC: new board driver to connect bfin-5xx with ad1836 codec

As discussed, the patch uses the original TDM order without rewriting.
For the match between TDM slot number and audio channel number, a new
API need be added.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
Jarkko Nikula [Fri, 28 Aug 2009 12:35:35 +0000 (15:35 +0300)]
ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI

The McBSP1 port in OMAP3 processors (I believe OMAP2 too but I don't have
specifications to check it) have additional CLKR and FSR pins for McBSP1
receiver. Reset default is that receiver is using bit clock and frame
sync signal from those pins but it is possible to configure to use
also CLKX and FSX pins as well. In fact, other McBSP ports are doing that
internally that transmitter and receiver share the CLKX and FSX.

Add functionaly that machine drivers can set the CLKR and FSR sources by
using the snd_soc_dai_set_sysclk.

Thanks to "Aggarwal, Anuj" <anuj.aggarwal@ti.com> for reporting the issue.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: davinci: i2c device creation moved into board files
Chaithrika U S [Tue, 25 Aug 2009 12:22:21 +0000 (15:22 +0300)]
ASoC: davinci: i2c device creation moved into board files

Also, the codec setup data structure has to remain for successful
probe.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Don't reconfigure WM8350 FLL if not needed
Mark Brown [Wed, 26 Aug 2009 13:14:51 +0000 (14:14 +0100)]
ASoC: Don't reconfigure WM8350 FLL if not needed

If the requested FLL configuration is the one we're currently running
in it's at best pointless to reconfigure the FLL.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fix s3c-i2s-v2 build
Mark Brown [Wed, 26 Aug 2009 13:17:23 +0000 (14:17 +0100)]
ASoC: Fix s3c-i2s-v2 build

We now need the PCM header to kick the DMA.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Make platform data optional for TLV320AIC3x
Mark Brown [Wed, 26 Aug 2009 12:05:14 +0000 (13:05 +0100)]
ASoC: Make platform data optional for TLV320AIC3x

Now that we don't need the I2C address for the device the platform data
is redundant so allow it to be omitted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Chaithrika U S <chaithrika@ti.com>
14 years agoASoC: Add S3C24xx dependencies for Simtec machines
Mark Brown [Tue, 25 Aug 2009 14:53:41 +0000 (15:53 +0100)]
ASoC: Add S3C24xx dependencies for Simtec machines

No point in building them for S3C64xx, certainly no sense in running
into build issues there.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: SDP3430: Fix TWL GPIO6 pin mux request
Candelaria Villareal, Jorge [Tue, 25 Aug 2009 15:13:25 +0000 (10:13 -0500)]
ASoC: SDP3430: Fix TWL GPIO6 pin mux request

Fix the write to PMBR1 register through I2C. Also, the constant which
holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
name is based on TRM to avoid confusion.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
Shine Liu [Tue, 25 Aug 2009 12:05:50 +0000 (20:05 +0800)]
ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time

s3c24xx dma has the auto reload feature, when the the trnasfer is done,
CURR_TC(DSTAT[19:0], current value of transfer count) reaches 0, and DMA
ACK becomes 1, and then, TC(DCON[19:0]) will be loaded into CURR_TC. So
the transmission is repeated.

IRQ is issued while auto reload occurs. We change the DISRC and
DCON[19:0] in the ISR, but at this time, the auto reload has been
performed already. The first block is being re-transmitted by the DMA.

So we need rewrite the DISRC and DCON[19:0] for the next block
immediatly after the this block has been started to be transported.

The function s3c2410_dma_started() is for this perpose, which is called
in the form of "s3c2410_dma_ctrl(prtd->params->channel,
S3C2410_DMAOP_STARTED);" in s3c24xx_pcm_trigger().

But it is not correct. DMA transmission won't start until DMA REQ signal
arrived, it is the time s3c24xx_snd_txctrl(1) or s3c24xx_snd_rxctrl(1)
is called in s3c24xx_i2s_trigger().

In the current framework, s3c24xx_pcm_trigger() is always called before
s3c24xx_pcm_trigger(). So the s3c2410_dma_started() should be called in
s3c24xx_pcm_trigger() after s3c24xx_snd_txctrl(1) or
s3c24xx_snd_rxctrl(1) is called in this function.

However, s3c2410_dma_started() is dma related, to call this function we
should provide the channel number, which is given by
substream->runtime->private_data->params->channel. The private_data
points to a struct s3c24xx_runtime_data object, which is define in
s3c24xx_pcm.c, so s3c2410_dma_started() can't be called in s3c24xx_i2s.c

Fix this by moving the call to signal the DMA started to the DAI
drivers.

Signed-off-by: Shine Liu <liuxian@redflag-linux.com>
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
Jarkko Nikula [Sun, 23 Aug 2009 09:24:27 +0000 (12:24 +0300)]
ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop

Functionality of functions omap_mcbsp_xmit_enable and omap_mcbsp_recv_enable
can be merged into omap_mcbsp_start and omap_mcbsp_stop since API of
those omap_mcbsp_start and omap_mcbsp_stop was changed recently allowing
to start and stop individually the transmitter and receiver.

This cleans up the code in arch/arm/plat-omap/mcbsp.c and in
sound/soc/omap/omap-mcbsp.c which was the only user for those removed
functions.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
Jarkko Nikula [Sun, 23 Aug 2009 09:24:26 +0000 (12:24 +0300)]
ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI

Commit ca6e2ce08679c094878d7f39a0349a7db1d13675 is setting up few XCCR and
RCCR bits for I2S and DPS_A formats. Part of the bits are already set
for all formats and I believe that XDISABLE and RDISABLE bits are
format independent.

As XCCR and RCCR are found only from OMAP2430 and OMAP34xx, I move setup
of XDISABLE and RDISABLE to where those cpu's are tested and remove format
dependent part for simplicity.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Use textual values in DMA operating mode sysfs files
Jarkko Nikula [Mon, 24 Aug 2009 14:45:50 +0000 (17:45 +0300)]
OMAP: McBSP: Use textual values in DMA operating mode sysfs files

Use more descriptive than numerical value when showing and storing the
McBSP DMA operating mode. Show function is using similar syntax than e.g.
the led triggers so that all possible values for store function are
printed but with current value surrounded with square brackets.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
Janusz Krzysztofik [Sun, 23 Aug 2009 15:56:12 +0000 (17:56 +0200)]
ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510

Implement DMA channel self linking on OMAP1510 using AUTO_INIT and REPEAT
flags of the DMA CCR register.

Created against linux-2.6.31-rc5.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'topic/digital-mixing' into for-2.6.32
Mark Brown [Mon, 24 Aug 2009 19:44:41 +0000 (20:44 +0100)]
Merge branch 'topic/digital-mixing' into for-2.6.32

14 years agoASoC: Select core DMA when building for S3C64xx
Mark Brown [Mon, 24 Aug 2009 19:21:51 +0000 (20:21 +0100)]
ASoC: Select core DMA when building for S3C64xx

Ensure that the core DMA support is available when building for
S3C64xx.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Remove unneeded inclusion of linux/regulator/consumer.h
Takashi Iwai [Mon, 24 Aug 2009 07:41:32 +0000 (09:41 +0200)]
ASoC: Remove unneeded inclusion of linux/regulator/consumer.h

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: add missing inclusion of debugfs.h
Takashi Iwai [Mon, 24 Aug 2009 07:40:34 +0000 (09:40 +0200)]
ASoC: add missing inclusion of debugfs.h

To fix compile errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: Pass correct platform data from pxa2xx-ac97
Marek Vasut [Fri, 21 Aug 2009 18:02:52 +0000 (20:02 +0200)]
ASoC: Pass correct platform data from pxa2xx-ac97

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: free socdev if init_card() fails in wm9705_soc_probe()
Roel Kluin [Sat, 22 Aug 2009 19:24:24 +0000 (21:24 +0200)]
ASoC: free socdev if init_card() fails in wm9705_soc_probe()

Free socdev if snd_soc_init_card() fails.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add DAPM widget power decision debugfs files
Mark Brown [Fri, 21 Aug 2009 15:38:13 +0000 (16:38 +0100)]
ASoC: Add DAPM widget power decision debugfs files

Currently when built with DEBUG DAPM will dump information about
the power state decisions it is taking for each widget to dmesg.
This isn't an ideal way of getting the information - it requires
a kernel build to turn it on and off and for large hub CODECs the
volume of information is so large as to be illegible. When the
output goes to the console it can also cause a noticable impact
on performance simply to print it out.

Improve the situation by adding a dapm directory to our debugfs
tree containing a file per widget with the same information in
it. This still requires a decision to build with debugfs support
but is easier to navigate and much less intrusive.

In addition to the previously displayed information active streams
are also shown in these files.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add FSI-AK4642 sound support for SuperH
Kuninori Morimoto [Fri, 21 Aug 2009 00:42:59 +0000 (09:42 +0900)]
ASoC: Add FSI-AK4642 sound support for SuperH

This patch is tested by ms7724se

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add ak4642/ak4643 codec support
Kuninori Morimoto [Fri, 21 Aug 2009 01:23:41 +0000 (10:23 +0900)]
ASoC: Add ak4642/ak4643 codec support

This is very simple driver for ALSA
It supprt headphone output and stereo input only
This patch is tested by ms7724se

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C24XX: Support for Simtec Hermes boards
Ben Dooks [Thu, 20 Aug 2009 21:50:43 +0000 (22:50 +0100)]
ASoC: S3C24XX: Support for Simtec Hermes boards

Add support for the tlv320aic3x CODEC on the Simtec Hermes board.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: tlv320aic3x: fixup board device changes
Ben Dooks [Thu, 20 Aug 2009 21:50:42 +0000 (22:50 +0100)]
ASoC: tlv320aic3x: fixup board device changes

Fixup the device changes by modifying the files that we just removed the
explicit device creation from with i2c_register_board_info() until this
can be moved into the relevant board files.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: tlv320aic3x: Change to use device model
Ben Dooks [Thu, 20 Aug 2009 21:50:41 +0000 (22:50 +0100)]
ASoC: tlv320aic3x: Change to use device model

The tlv320aic3x driver managed its own i2c device, instead of an extant
one created by the board support code. Change the code to make it so that
the driver binds to an extant (in this case i2c) device.

Add explict tlv320aic33 as well as tlv320aic3x to the supported device
table and remove the old driver bindings from the users of this code.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C24XX: Add audio core and tlv320aic23 for Simtec boards
Ben Dooks [Thu, 20 Aug 2009 21:50:40 +0000 (22:50 +0100)]
ASoC: S3C24XX: Add audio core and tlv320aic23 for Simtec boards

Add core support for the range of S3C24XX Simtec boards with TLV320AIC23
CODECs on them. Since there are also boards with similar IIS routing the
AMP and the configuration code is placed in a core file for re-use with
other CODEC bindings.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Use DMA operating mode of McBSP
Eduardo Valentin [Thu, 20 Aug 2009 13:18:26 +0000 (16:18 +0300)]
ASoC: OMAP: Use DMA operating mode of McBSP

Configures DMA sync mode depending on McBSP operating mode value.
The value is configurable by McBSP instance. So, depending
on McBSP operating mode, the DMA sync mode is passed from
omap-mcbsp to omap-pcm. Besides that, it also configures
McBSP threshold value depending on which McBSP mode is activated.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Use McBSP threshold to playback and capture
Eduardo Valentin [Thu, 20 Aug 2009 13:18:25 +0000 (16:18 +0300)]
ASoC: OMAP: Use McBSP threshold to playback and capture

This patch changes the way DMA is done in omap-pcm.c
in order to reduce power consumption. There is no need
to have so much SW control in order to have DMA in idle
state during audio streaming. Configuring McBSP threshold value
and DMA to FRAME_SYNC are sufficient.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Always syncronize audio transfers on frames
Eero Nurkkala [Thu, 20 Aug 2009 13:18:24 +0000 (16:18 +0300)]
ASoC: Always syncronize audio transfers on frames

All these steps are required for ASoC to behave correctly.
rccr and xccr are format dependent, for example TDM audio
has different values than I2S or DSP_A. Also the
omap_mcbsp_xmit_enable and/or omap_mcbsp_recv_enable must
be called right after the DMA has started.
This provides no longer L and R channels switching at random.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add runtime check for RFIG and XFIG
Eero Nurkkala [Thu, 20 Aug 2009 13:18:23 +0000 (16:18 +0300)]
ASoC: Add runtime check for RFIG and XFIG

This is, no RFIG or XFIG (Not defined in 34xx), correct
initiliazation of rccr and xccr.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Make DMA 64 aligned
Eduardo Valentin [Thu, 20 Aug 2009 13:18:22 +0000 (16:18 +0300)]
ASoC: OMAP: Make DMA 64 aligned

Align DMA address to DMA burst transaction sizes.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: OMAP: Enable DMA burst mode
Eduardo Valentin [Thu, 20 Aug 2009 13:18:21 +0000 (16:18 +0300)]
ASoC: OMAP: Enable DMA burst mode

Improve DMA transfers by enabling Burst transaction.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Let element DMA mode hit retention also
Eero Nurkkala [Thu, 20 Aug 2009 13:18:20 +0000 (16:18 +0300)]
OMAP: McBSP: Let element DMA mode hit retention also

The device no longer hits retention if element DMA
mode is taken for at least the duration of the
serial console timeout. Force element DMA mode to
shut down through smartidle.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Do not enable wakeups for no-idle mode
Eero Nurkkala [Thu, 20 Aug 2009 13:18:19 +0000 (16:18 +0300)]
OMAP: McBSP: Do not enable wakeups for no-idle mode

When no-idle mode is taken, wakeups need not to be enabled.
Moreover, CLOCKACTIVITY bits are unnecessary with this mode
also.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Configure NO IDLE mode for DMA mode different of threshold
Eduardo Valentin [Thu, 20 Aug 2009 13:18:18 +0000 (16:18 +0300)]
OMAP: McBSP: Configure NO IDLE mode for DMA mode different of threshold

Use dma mode property to configure NO IDLE or SMART IDLE of McBSPs.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Retain McBSP FCLK clockactivity
Eero Nurkkala [Thu, 20 Aug 2009 13:18:17 +0000 (16:18 +0300)]
OMAP: McBSP: Retain McBSP FCLK clockactivity

FCLK may get autogated so that it prevents the McBSP
to work properly. It is the bit 9 that must be set
for maintaining the McBSP FCLK.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Change wakeup signals
Eduardo Valentin [Thu, 20 Aug 2009 13:18:16 +0000 (16:18 +0300)]
OMAP: McBSP: Change wakeup signals

Configure only XRDYEN and RRDYEN wakeup signals
in order to get better power consumption.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Wakeups utilized
Eero Nurkkala [Thu, 20 Aug 2009 13:18:15 +0000 (16:18 +0300)]
OMAP: McBSP: Wakeups utilized

This patch enables the smart idle mode while
McBPS is being utilized. Once it's done,
force idle mode is taken instead. Apart of it,
it also configures what signals will wake mcbsp up.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Add link DMA mode selection
Peter Ujfalusi [Thu, 20 Aug 2009 13:18:14 +0000 (16:18 +0300)]
OMAP: McBSP: Add link DMA mode selection

It adds a new sysfs file, where the user can configure the mcbsp mode to use.
If the mcbsp channel is in use, it does not allow the change.
Than in omap_pcm_open we can call the omap_mcbsp_get_opmode to get the mode,
store it, than use it to implement the different modes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Rename thres sysfs symbols
Eduardo Valentin [Thu, 20 Aug 2009 13:18:13 +0000 (16:18 +0300)]
OMAP: McBSP: Rename thres sysfs symbols

This patch renames the symbols that handles threshold
sysfs properties. This way we can add more sysfs properties
to them.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP3: McBSP: Lower the maximum buffersize for McBSP1, 3, 4, 5
Peter Ujfalusi [Thu, 20 Aug 2009 13:18:12 +0000 (16:18 +0300)]
OMAP3: McBSP: Lower the maximum buffersize for McBSP1, 3, 4, 5

Do not allow applications to use the full buffer found on
McBSP1,3,4,5. Using the full buffer in threshold mode causes
the McBSP buffer to run dry, which can be observed as channels
are switching (in reality the channels are shifting).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Create and export max_(r|t)x_thres property
Eduardo Valentin [Thu, 20 Aug 2009 13:18:11 +0000 (16:18 +0300)]
OMAP: McBSP: Create and export max_(r|t)x_thres property

This patch export through sysfs two properties to configure
maximum threshold for transmission and reception on each
mcbsp instance. Also, it exports two helper functions to
allow mcbsp users to read this values.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Add transmit/receive threshold handler
Eduardo Valentin [Thu, 20 Aug 2009 13:18:10 +0000 (16:18 +0300)]
OMAP: McBSP: Add transmit/receive threshold handler

This patch adds a way to handle transmit/receive threshold.
It export to mcbsp users a callback registration procedure.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Use appropriate value for startup delay
Eduardo Valentin [Thu, 20 Aug 2009 13:18:09 +0000 (16:18 +0300)]
OMAP: McBSP: Use appropriate value for startup delay

Increasing startup delay value as worst case:
 CLKSRG*2 = 8000khz: (1/8000) * 2 * 2 usec

Although, 100us may give enough time for two CLKSRG,
due to some unknown PM related, clock gating etc. reason,
this patch increases it to 500us.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Add IRQEN, IRQSTATUS, THRESHOLD2 and THRESHOLD1 registers.
Eduardo Valentin [Thu, 20 Aug 2009 13:18:08 +0000 (16:18 +0300)]
OMAP: McBSP: Add IRQEN, IRQSTATUS, THRESHOLD2 and THRESHOLD1 registers.

Adding McBSP register definition for IRQEN, IRQSTATUS, THRESHOLD2 and THRESHOLD1 registers.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoOMAP: McBSP: Provide functions for ASoC frame syncronization
Eero Nurkkala [Thu, 20 Aug 2009 13:18:07 +0000 (16:18 +0300)]
OMAP: McBSP: Provide functions for ASoC frame syncronization

ASoC has an annoying bug letting either L or R channel to be
played on L channel. In other words, L and R channels can
switch at random. This provides McBSP funtionality that may
be used to fix this feature.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add SuperH FSI driver support for ALSA
Kuninori Morimoto [Thu, 20 Aug 2009 12:01:05 +0000 (21:01 +0900)]
ASoC: Add SuperH FSI driver support for ALSA

This driver is very simple.
It support playback only now.
This patch is tested by ms7724se board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: S3C24XX : Align the peroid size to the buffer size
Shine Liu [Thu, 20 Aug 2009 15:02:23 +0000 (23:02 +0800)]
ASoC: S3C24XX : Align the peroid size to the buffer size

> Then it's a driver bug.  If unaligned period size is allowed, it means
> that the irq is really generated in that period, not at the buffer
> boundary.  Otherwise, it must have a proper hw-constraint to align the
> period size to the buffer size.

This patch will fix the bug metioned in the above mail. Force the peroid
size to be aligned with the buffer size.

Based and tested on linux-2.6.31-rc6.

Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoALSA: Restore support for DMAless DAIs on PXA
Mark Brown [Wed, 19 Aug 2009 18:31:46 +0000 (19:31 +0100)]
ALSA: Restore support for DMAless DAIs on PXA

Used for applications such as direct bluetooth connections on
smartphones which don't go via the CPU. This used to be supported
before the refactoring to share code but this check was removed
during that move.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Provide default set_bias_level() implementation
Mark Brown [Wed, 19 Aug 2009 13:18:53 +0000 (14:18 +0100)]
ASoC: Provide default set_bias_level() implementation

If the CODEC does not provide a set_bias_level() then update the
bias_level variable for it since other parts of the system expect
that to be maintained.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add TLV information to WM8711
Mark Brown [Tue, 18 Aug 2009 20:29:31 +0000 (21:29 +0100)]
ASoC: Add TLV information to WM8711

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: WM8711 minor cleanups
Mark Brown [Tue, 18 Aug 2009 20:17:34 +0000 (21:17 +0100)]
ASoC: WM8711 minor cleanups

Coding style changes only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add SPI support to WM8711
Mark Brown [Tue, 18 Aug 2009 20:15:14 +0000 (21:15 +0100)]
ASoC: Add SPI support to WM8711

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Factor out WM8711 cache I/O
Mark Brown [Tue, 18 Aug 2009 20:12:30 +0000 (21:12 +0100)]
ASoC: Factor out WM8711 cache I/O

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Mark Brown [Tue, 18 Aug 2009 19:59:01 +0000 (20:59 +0100)]
Merge branch 'topic/asoc' of git://git./linux/kernel/git/tiwai/sound-2.6 into upstream/wm8711

14 years agoASoC: Update WM8711 to driver model registration method
Mark Brown [Tue, 18 Aug 2009 19:57:33 +0000 (20:57 +0100)]
ASoC: Update WM8711 to driver model registration method

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add WM8711 CODEC driver
Mike Arthur [Tue, 18 Aug 2009 19:37:49 +0000 (20:37 +0100)]
ASoC: Add WM8711 CODEC driver

The WM8711 or WM8711L (WM8711/L) is a low power stereo DAC with an
integrated headphone driver. The WM8711/L is designed specifically for
portable MP3 audio and speech players. The WM8711/L is also ideal for
MD, CD machines and DAT players.

Signed-off-by: Mike Arthur <Mike.Arthur@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: WM8993 digital mixing support
Mark Brown [Tue, 18 Aug 2009 15:01:57 +0000 (16:01 +0100)]
ASoC: WM8993 digital mixing support

The WM8993 provides digital sidetone paths and also allows each
channel on the audio interface to be routed separtately to the
DACs and ADCs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Add input and output AIF widgets
Mark Brown [Mon, 17 Aug 2009 16:39:22 +0000 (17:39 +0100)]
ASoC: Add input and output AIF widgets

Currently DAPM interfaces with the audio streams to and from the
processor at the DAC and ADC widgets. As the digital capabilities
of parts increases this is becoming a less and less able to meet
the needs of parts.

To meet the needs of these devices create new widgets interfacing
with the TDM bus but not integrated into any other functionality.
Audio can then be routed to and from these widgets using existing
routing widgets.

A slot number is provided in the definition but this is currently
not used yet. This is intended to support devices which can use
more than one TDM slot on a single interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Remove duplicate ADC/DAC widgets from wm_hubs.c
Mark Brown [Tue, 18 Aug 2009 14:24:05 +0000 (15:24 +0100)]
ASoC: Remove duplicate ADC/DAC widgets from wm_hubs.c

These need to be in the CODEC since the DAIs supported by the CODECs
aren't static.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>