openwrt/staging/blogic.git
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 years agoASoC: Reenable S3C64xx I2S support
Mark Brown [Tue, 18 Aug 2009 15:02:59 +0000 (16:02 +0100)]
ASoC: Reenable S3C64xx I2S support

Joonyoung Shim reports that S3C64xx I2S is working on the NCP boards so
allow it to be selected in Kconfig.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmciro.com>
15 years agoASoC: Fix data format configuration for S3C64XX IISv2
Joonyoung Shim [Tue, 18 Aug 2009 12:56:19 +0000 (21:56 +0900)]
ASoC: Fix data format configuration for S3C64XX IISv2

The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD
register. This patch changes to the defined values it.

And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Implement TDM configuration for WM8993
Mark Brown [Mon, 17 Aug 2009 17:52:47 +0000 (18:52 +0100)]
ASoC: Implement TDM configuration for WM8993

Note that the number of slots used internally is specified in terms
of stereo slots while the external API works with mono slots.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix WM8993 MCLK configuration for high frequency MCLKs
Mark Brown [Mon, 17 Aug 2009 17:51:44 +0000 (18:51 +0100)]
ASoC: Fix WM8993 MCLK configuration for high frequency MCLKs

When used without the PLL we were accidentally clearing the MCLK/2
divider, resulting in a double rate SYSCLK when the divider should
have been used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Power speakers and headphones simultaneously
Mark Brown [Mon, 17 Aug 2009 15:26:59 +0000 (16:26 +0100)]
ASoC: Power speakers and headphones simultaneously

Speaker and headphone outputs do not need to be handled separately
since they can't be part of the same path.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix handling of bias levels for non-DAPM codecs
Mark Brown [Mon, 17 Aug 2009 10:55:38 +0000 (11:55 +0100)]
ASoC: Fix handling of bias levels for non-DAPM codecs

If the system doesn't have any DAPM widgets then we can't use their
state to check if the bias level for the codec should be up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: UDA134X: Fix mistaken mute/unmute code
Shine Liu [Mon, 17 Aug 2009 10:52:01 +0000 (18:52 +0800)]
ASoC: UDA134X: Fix mistaken mute/unmute code

There is a mistake in current uda134x_mute function: mute_reg has been
changed in line 162 or line 164, so uda134x_write should write
"mute_reg" but not "mute_reg & ~(1<<2)" to
UDA134X_DATA010.

Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: OMAP: Enhance OMAP1510 DMA progress software counter
Janusz Krzysztofik [Tue, 11 Aug 2009 19:44:29 +0000 (21:44 +0200)]
ASoC: OMAP: Enhance OMAP1510 DMA progress software counter

Enhance period_index accuracy, particularly just before buffer rewind, by
making use of DMA interrupt status flags in addition to simply counting up
interrupts.

Created against linux-2.6.31-rc5.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: OMAP: Make use of DMA channel self linking on OMAP1510
Janusz Krzysztofik [Mon, 10 Aug 2009 08:50:04 +0000 (10:50 +0200)]
ASoC: OMAP: Make use of DMA channel self linking on OMAP1510

Use newly implemented DMA channel self linking on OMAP1510 like on other OMAP
models. Remove unnecessary DMA transfer restart from interrupt handler
routine.

The interrupt routine used to maintain a period index, originally needed for
counting up periods up to a full buffer in order to restart the DMA transfer.
For some time, this counter is also used as a replacement for hardware DMA
progress counter that has been found unusable on OMAP1510 in case of playback.
Thus, the period index calculation cannot be omitted completely. However, the
accuracy of this counter can still suffer from missing DMA interrupts.

In order to work correctly, it requires patch 1 from this series also applied:
[RFC][PATCH 1/3] ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510

Created against linux-2.6.31-rc5.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Factor out cache I/O from WM8974
Mark Brown [Sat, 15 Aug 2009 11:15:10 +0000 (12:15 +0100)]
ASoC: Factor out cache I/O from WM8974

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'wm8974-upstream' into for-2.6.32
Mark Brown [Sat, 15 Aug 2009 10:52:43 +0000 (11:52 +0100)]
Merge branch 'wm8974-upstream' into for-2.6.32

15 years agoASoC: Hook i.MX into build
Mark Brown [Sat, 15 Aug 2009 10:37:30 +0000 (11:37 +0100)]
ASoC: Hook i.MX into build

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Staticise unexported variables
Mark Brown [Sat, 15 Aug 2009 10:36:49 +0000 (11:36 +0100)]
ASoC: Staticise unexported variables

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Remove unneeded i.MX dependency on SND
Mark Brown [Sat, 15 Aug 2009 10:36:20 +0000 (11:36 +0100)]
ASoC: Remove unneeded i.MX dependency on SND

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'for-2.6.32' into mxc
Mark Brown [Sat, 15 Aug 2009 10:20:44 +0000 (11:20 +0100)]
Merge branch 'for-2.6.32' into mxc

Conflicts:
sound/soc/Makefile

15 years agoASoC: delete -spi suffix in ad1938 and free private data while registers fail
Barry Song [Fri, 14 Aug 2009 04:06:38 +0000 (12:06 +0800)]
ASoC: delete -spi suffix in ad1938 and free private data while registers fail

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: TWL4030: Fix for capture mixer strings
Peter Ujfalusi [Fri, 14 Aug 2009 05:44:00 +0000 (08:44 +0300)]
ASoC: TWL4030: Fix for capture mixer strings

Change the strings related to capture in order to be
interpreted correctly by alsamixer and possible other
UI based mixer applications.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoALSA: Allow passing platform_data for pxa2xx-ac97
Marek Vasut [Thu, 30 Jul 2009 00:55:01 +0000 (02:55 +0200)]
ALSA: Allow passing platform_data for pxa2xx-ac97

This patch adds support for passing platform data to ac97 bus devices
from PXA2xx-AC97 driver..

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: Add audio support fot DA850/OMAP-L138 EVM
Chaithrika U S [Tue, 11 Aug 2009 20:59:21 +0000 (16:59 -0400)]
ASoC: DaVinci: Add audio support fot DA850/OMAP-L138 EVM

There is one instance of McASP on DA850/OMAP-L138 SoC. This is
connected to TLV320AIC3106 codec for audio playback and capture.
This patch adds audio support on this platform. Some of the
structure prefix names which are common for DA830/OMAP-L137 EVM and
DA850/OMAP-L138 EVM have been renamed to da8xx from da830.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: Add a DAI format to McASP driver
Chaithrika U S [Tue, 11 Aug 2009 20:59:12 +0000 (16:59 -0400)]
ASoC: DaVinci: Add a DAI format to McASP driver

The patch adds a DAI format: Codec bit clock master and frame sync slave,
to the driver.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: McASP driver enhacements
Chaithrika U S [Tue, 11 Aug 2009 20:58:52 +0000 (16:58 -0400)]
ASoC: DaVinci: McASP driver enhacements

On DA830/OMAP-L137 and DA850/OMAP-L138 SoCs, the McASP peripheral has FIFO
support. This FIFO provides additional data buffering. It also provides
tolerance to variation in host/DMA controller response times.
The read and write FIFO sizes are 256 bytes each. If FIFO is enabled,
the DMA events from McASP are sent to the FIFO which in turn sends DMA requests
to the host CPU according to the thresholds programmed.
More details of the FIFO operation can be found at
http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=
sprufm1&fileType=pdf

This patch adds support for FIFO configuration. The platform data has a
version field which differentiates the McASP on different SoCs.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Factor out shared code from WM8993
Mark Brown [Wed, 29 Jul 2009 20:21:49 +0000 (21:21 +0100)]
ASoC: Factor out shared code from WM8993

The WM8993 analogue control is shared with other devices in the same
product line.  Since this is a very substantial proportion of the
driver move the definitions of these controls into a new wm_hubs module
which allows them to be shared between the two.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Minor cleanups to AD1938 driver
Mark Brown [Thu, 13 Aug 2009 14:19:42 +0000 (15:19 +0100)]
ASoC: Minor cleanups to AD1938 driver

- Build in SND_SOC_ALL_CODECS.
- Remove null suspend/resume stuff.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agonew ad1836 codec driver based on asoc
Barry Song [Thu, 13 Aug 2009 03:59:32 +0000 (11:59 +0800)]
new ad1836 codec driver based on asoc

There has been an ad1836 driver in sound/blackfin based on traditional alsa.
The new driver is based on asoc. The architecture of ad1836 codec driver is
very much like ad1938.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: TWL4030: Introduce PGAs for outputs
Peter Ujfalusi [Thu, 13 Aug 2009 12:59:34 +0000 (15:59 +0300)]
ASoC: TWL4030: Introduce PGAs for outputs

Dynamically control and control only the needed output amplifier
muting/un-muting.

The original code was muting and un-muting the following output
amplifiers: Earpiece PreDrivL/R, CarkitL/R at the same time
regardless which pin is actually in use at the given moment.

Move these as separate PGA so only the needed amplifier will be touched.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add output/input widgets in ad1938 to make dac/adc dynamic PM work
Barry Song [Wed, 12 Aug 2009 03:34:25 +0000 (11:34 +0800)]
ASoC: add output/input widgets in ad1938 to make dac/adc dynamic PM work

According to the function dapm_dac_check_power() in
sound/soc/soc-dapm.c, dac power can't be on/off stand-alone without any
output widget as sink. And according to dapm_adc_check_power(), adc
power can't be on/off stand-alone without any input widget as source. So
we can't only define some stand-alone SND_SOC_DAPM_DAC/SND_SOC_DAPM_ADC
to hope their power can be managed dynamically.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Update AD1938 for new TDM slot API
Mark Brown [Wed, 12 Aug 2009 13:30:33 +0000 (14:30 +0100)]
ASoC: Update AD1938 for new TDM slot API

It's only actually paying attention to the slot count anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Update WM9081 for tdm_slot() API change
Mark Brown [Tue, 11 Aug 2009 15:28:39 +0000 (16:28 +0100)]
ASoC: Update WM9081 for tdm_slot() API change

Store the TDM slot width then if it's set use that rather than the
sample size to calculate BCLK. Leave imposing constraints to the
core (which should do this but doesn't yet) or machine driver.

Also allow 0 TDM slots to be configure (for use when disabling TDM).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge commit 'a5479e389e989acfeca9c32eeb0083d086202280' into for-2.6.32
Mark Brown [Tue, 11 Aug 2009 12:09:27 +0000 (13:09 +0100)]
Merge commit 'a5479e389e989acfeca9c32eeb0083d086202280' into for-2.6.32

15 years agoASoC: fix I2C build errors
Randy Dunlap [Mon, 10 Aug 2009 23:04:39 +0000 (16:04 -0700)]
ASoC: fix I2C build errors

Fix soc build errors when I2C is built as a loadable module:

(.text+0x5d26b): undefined reference to `i2c_master_send'
soc-cache.c:(.text+0x5d32d): undefined reference to `i2c_transfer'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Drop unneeded declaration of removed wm8731 SPI write function
Mark Brown [Mon, 10 Aug 2009 11:59:29 +0000 (12:59 +0100)]
ASoC: Drop unneeded declaration of removed wm8731 SPI write function

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Define more formats for the AC97 CODECs
Mark Brown [Sun, 9 Aug 2009 19:08:31 +0000 (20:08 +0100)]
ASoC: Define more formats for the AC97 CODECs

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Convert WM8776 to use factored out register cache code
Mark Brown [Sat, 8 Aug 2009 09:37:33 +0000 (10:37 +0100)]
ASoC: Convert WM8776 to use factored out register cache code

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: Support Audio on DA830 EVM
Chaithrika U S [Fri, 7 Aug 2009 14:07:51 +0000 (10:07 -0400)]
ASoC: DaVinci: Support Audio on DA830 EVM

Add support for audio on DA830 EVM- here McASP1 is interfaced to
TLV320AIC3106 codec.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: s3c2443-ac97: convert semaphore to mutex
Uwe Kleine-König [Fri, 7 Aug 2009 20:42:37 +0000 (22:42 +0200)]
ASoC: s3c2443-ac97: convert semaphore to mutex

This fixes a build failure for 2.6.31-rc4-rt1 (ARCH=arm, s3c2410_defconfig):

  CC [M]  sound/soc/s3c24xx/s3c2443-ac97.o
sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX'
sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: parameter names (without types) in function declaration
sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_read':
sound/soc/s3c24xx/s3c2443-ac97.c:59: error: 'ac97_mutex' undeclared (first use in this function)
sound/soc/s3c24xx/s3c2443-ac97.c:59: error: (Each undeclared identifier is reported only once
sound/soc/s3c24xx/s3c2443-ac97.c:59: error: for each function it appears in.)
sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_write':
sound/soc/s3c24xx/s3c2443-ac97.c:93: error: 'ac97_mutex' undeclared (first use in this function)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoTTY/ASoC: Rename N_AMSDELTA line discipline to N_V253
Janusz Krzysztofik [Thu, 6 Aug 2009 11:07:32 +0000 (13:07 +0200)]
TTY/ASoC: Rename N_AMSDELTA line discipline to N_V253

The patch changes the line discipline name registered in include/linux/tty.h
and updates the ams-delta machine driver to use it.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'reg-cache' into for-2.6.32
Mark Brown [Fri, 7 Aug 2009 10:43:58 +0000 (11:43 +0100)]
Merge branch 'reg-cache' into for-2.6.32

15 years agoMerge branch 'for-2.6.31' into for-2.6.32
Mark Brown [Fri, 7 Aug 2009 10:42:01 +0000 (11:42 +0100)]
Merge branch 'for-2.6.31' into for-2.6.32

15 years agoASoC: DaVinci: pcm, constrain buffer size to multiple of period
Troy Kisky [Thu, 6 Aug 2009 23:55:32 +0000 (16:55 -0700)]
ASoC: DaVinci: pcm, constrain buffer size to multiple of period

The dma setup code assumes that the buffer size is a multiple
of the period size.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: i2s: don't bounce through rtd to get dai
Troy Kisky [Thu, 6 Aug 2009 23:55:31 +0000 (16:55 -0700)]
ASoC: DaVinci: i2s: don't bounce through rtd to get dai

dai is a parameter to the functions, so use it instead of
looking it up.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoARM: OMAP: McBSP: Fix ASoC on OMAP1510 by fixing API of omap_mcbsp_start/stop
Jarkko Nikula [Fri, 7 Aug 2009 06:59:47 +0000 (09:59 +0300)]
ARM: OMAP: McBSP: Fix ASoC on OMAP1510 by fixing API of omap_mcbsp_start/stop

Simultaneous audio playback and capture on OMAP1510 can cause that second
stream is stalled if there is enough delay between startup of the audio
streams.

Current implementation of the omap_mcbsp_start is starting both transmitter
and receiver at the same time and it is called only for firstly started
audio stream from the OMAP McBSP based ASoC DAI driver.

Since DMA request lines on OMAP1510 are edge sensitive, the DMA request is
missed if there is no DMA transfer set up at that time when the first word
after McBSP startup is transmitted. The problem hasn't noted before since
later OMAPs are using level sensitive DMA request lines.

Fix the problem by changing API of omap_mcbsp_start and omap_mcbsp_stop by
allowing to start and stop individually McBSP transmitter and receiver
logics. Then call those functions individually for both audio playback
and capture streams. This ensures that DMA transfer is setup before
transmitter or receiver is started.

Thanks to Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> for detailed problem
analysis and Peter Ujfalusi <peter.ujfalusi@nokia.com> for info about DMA
request line behavior differences between the OMAP generations.

Reported-and-tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: change set_tdm_slot api to allow slot_width override.
Daniel Ribeiro [Tue, 16 Jun 2009 00:44:31 +0000 (21:44 -0300)]
ASoC: change set_tdm_slot api to allow slot_width override.

Extend set_tdm_slot to allow the user to arbitrarily set the frame width
and active TX/RX slots.

Updates magician.c and wm9081.c for the new set_tdm_slot(). wm9081.c
still doesn't handle the slot_width override.

While being there, correct an incorrect use of SlotsPerFrm(7) use in
bitmask on pxa-ssp.c (SSCR0_SlotsPerFrm(x) is (((x) - 1) << 24)) ).

(this series is meant for Mark's for-2.6.32 branch)

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: CX20442: simplify codec controller usage
Janusz Krzysztofik [Thu, 6 Aug 2009 10:25:00 +0000 (12:25 +0200)]
ASoC: CX20442: simplify codec controller usage

This patch is a workaround for the problem of several subsequent control
statements not being applied correctly to the codec controller (modem).

In order to follow the hook switch state change from handset to handsfree
while
in full duplex mode, two consecutive +VLS control commands were sent to the
modem. The first one was M1 (microphone only), the seconds one was M1S1 (both
microphone and speaker). As there was no real modem handshaking procedure
implemented, neither in the codec nor in the machine driver part of the line
discipline, the modem was having the second command missed.

Since a possibility to switch to microphone only mode (and speaker only mode
as well) seams of no value, I have modified the code to issue single M1S1
command only for any of those cases.

Tested on my Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: CX20442: add some debugging
Janusz Krzysztofik [Thu, 6 Aug 2009 10:24:54 +0000 (12:24 +0200)]
ASoC: CX20442: add some debugging

This patch adds debugging statement that can help in tracing
how the driver is trying to control the codec device.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add WM8776 CODEC driver
Mark Brown [Tue, 4 Aug 2009 22:50:16 +0000 (23:50 +0100)]
ASoC: Add WM8776 CODEC driver

The WM8776 is a high performance, stereo audio CODEC with five channel
input selector. The WM8776 is ideal for surround sound processing
applications for home hi-fi, DVD-RW and other audio visual equipment.

This driver implements support for most WM8776 features - currently the
ADC automatic level control/limiter functionality is omitted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix review issues in i.MX2x PCM driver
javier Martin [Wed, 5 Aug 2009 21:29:39 +0000 (22:29 +0100)]
ASoC: Fix review issues in i.MX2x PCM driver

Signed-off-by: javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add machine driver for i.mx27_visstrim_m10 board
javier Martin [Tue, 4 Aug 2009 15:18:02 +0000 (17:18 +0200)]
ASoC: add machine driver for i.mx27_visstrim_m10 board

This adds support for i.mx27_visstrim_sm10 board machine driver which
uses an i.mx27 processor plus a wm8974 codec.

It has been tested on a visstrim_sm10 board.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add DAI platform ssi driver for MXC
javier Martin [Wed, 5 Aug 2009 06:47:48 +0000 (08:47 +0200)]
ASoC: add DAI platform ssi driver for MXC

This adds support for DAI platform for the SSI present in MXC platforms.

It currently does not support i.MX3, the only thing necessary to do
this is to export DMA data for i.MX3 interface which I haven't done
because I don't have a i.MX3 based board available.

It has been tested on i.MX27 board.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add DMA platform driver for MX1x and MX2x
javier Martin [Tue, 4 Aug 2009 15:17:52 +0000 (17:17 +0200)]
ASoC: add DMA platform driver for MX1x and MX2x

This adds support for DMA platform valid for i.MX1 and i.MX2 platforms.

This is not valid for i.MX3 since it doesn't share the same DMA
interface than i.MX1 and i.MX2.

It has been tested on i.MX27 board.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device
Daniel Mack [Wed, 5 Aug 2009 18:50:43 +0000 (20:50 +0200)]
ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device

Power management for the cs4270 codec is currently implemented as part
of the i2c_driver struct. The disadvantage of doing it this way is that
the callbacks registered in the snd_soc_card struct are called _before_
the codec's callbacks.

That doesn't work, because the snd_soc_card callbacks will most likely
switch down the codec's power domains or pull the reset GPIOs, and
hence make the i2c communication bail out.

Fix this by binding the suspend and resume code to the
snd_soc_codec_device driver model and let the I2C functions only call
the SoC core function for resume and suspend, which do nothing currently
but will do later.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: MPC5200: Support for buffer wrap around
John Bonesio [Wed, 29 Jul 2009 15:38:55 +0000 (08:38 -0700)]
ASoC: MPC5200: Support for buffer wrap around

The code in psc_dma_bcom_enqueue_tx() didn't account for the fact that
s->runtime->control->appl_ptr can wrap around to the beginning of the
buffer. This change fixes this problem.

Signed-off-by: John Bonesio <bones@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Existing S3C24xx AC97 drivers should depend on S3C24xx
Mark Brown [Tue, 4 Aug 2009 10:38:42 +0000 (11:38 +0100)]
ASoC: Existing S3C24xx AC97 drivers should depend on S3C24xx

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Factor out 7 bit register 9 bit data SPI write
Mark Brown [Fri, 10 Jul 2009 22:28:16 +0000 (23:28 +0100)]
ASoC: Factor out 7 bit register 9 bit data SPI write

This converts all the Wolfson drivers using this format (the only devices
that do) except WM8753 to use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs
Mark Brown [Fri, 10 Jul 2009 22:12:01 +0000 (23:12 +0100)]
ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Factor out I2C 8 bit address 16 bit data I/O
Mark Brown [Fri, 10 Jul 2009 22:11:24 +0000 (23:11 +0100)]
ASoC: Factor out I2C 8 bit address 16 bit data I/O

As part of this refactoring the type of the CODEC hw_read operation
is changed to match the regular read operation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add I/O control bus information to factored out cache setup
Mark Brown [Fri, 10 Jul 2009 21:24:27 +0000 (22:24 +0100)]
ASoC: Add I/O control bus information to factored out cache setup

While writes tend to be able to use a fairly bus independant format to
do the writes reads are all bus specific. To allow us to factor out
this code include the bus type as a parameter when setting up the
cache.

Initially just use this to factor out hw_write_t for I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add support for Amstrad E3 (Delta) machine
Janusz Krzysztofik [Wed, 29 Jul 2009 11:18:53 +0000 (13:18 +0200)]
ASoC: add support for Amstrad E3 (Delta) machine

This patch adds machine support for Amstrad E3 (Delta) videophone to ASoC.

Created and tested against linux-2.6.31-rc3.
Applies and works with linux-omap-2.6 commit
7c5cb7862d32cb344be7831d466535d5255e35ac as well.

Depends on:
1) latest version of the CX20442 codec driver that exposes v253_ops
   structure[1],
2) patch 2/3 form this series: TTY: Add definition of a new line
   discipline required by Amstrad E3 (Delta) ASoC driver[2].

CPU DAI parameters best matching the codec DAI has been selected out
empirically for best user experience.

Board specific audio function control (with related DAPM widgets) has been
modeled after empirically discovered codec capabilities.

Unlike other ASoC machine drivers, this one makes use of a codec provided line
discipline that is required for talking to a modem chip that can control the
codec behavoiur. As the line discipline operations must call board specific
bits as well, the machine driver registers its own line discipline ops, not
the codec provided, and then calls those codec provided from inside its own
callbacks.
If some kind of a glue, like a bus over a tty, exsited that could help in
runtime detection of a modem (bus adapter) over a more generic line discipline
(bus driver)[3], the line discipline code could be probably designed in a
more generic way.

In order to work at all, this driver requires a working McBSP1. On OMAP1510
based machines (not sure if other OMAP1 variants as well), where McBSP1 is a
DSP public peripheral, that means the kernel must provide basic DSP support,
ie. omap_dsp_init(), in order to power up the DSP. This used to be included in
linux-omap-2.6 tree up to commit 2512fd29db4eb09e82d182596304c7aaf76d2c5c.
Without that, the driver would not work, ie. not shift in/out any bits over
the CPU DAI[4]. This limitation is not board, but CPU specific, and may apply
to other code that makes use of McBSP1/McBSP3 on affected machines. I provide
an extra patch (4/3) as a temporary solution.

To work correctly in playback mode, this driver requires my prevoiusly
submitted patch that corrects pcm pointer calculation for OMAP1510 based
machines[5] (already included in linux-2.6.31-rc3).

To support codec controls, this driver requires my previously submitted patch
that adds support for modem found on Amstrad Delta[6].

[1] http://mailman.alsa-project.org/pipermail/alsa-devel/2009-July/019780.html
[2] http://www.spinics.net/lists/linux-serial/msg01862.html
[3] http://www.spinics.net/lists/linux-serial/msg01856.html
[4] http://www.spinics.net/lists/linux-omap/msg15114.html
[5] http://mailman.alsa-project.org/pipermail/alsa-devel/2009-June/018950.html
[6] http://www.spinics.net/lists/linux-omap/msg15432.html

Credits to:
Mark Underwood - for his initial, omap-alsa based sound driver for
this machine,
Mark Brown - for his help, patience and excellent subsytem maintainer support.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: CX20442: push down machine independent line discipline bits
Janusz Krzysztofik [Wed, 29 Jul 2009 10:24:46 +0000 (12:24 +0200)]
ASoC: CX20442: push down machine independent line discipline bits

This corrected patch adds machine independent line discipline code, prevoiusly
exsiting inside my Amstrad Delta ASoC machine dirver, to the Conexant CX20442
codec driver. The code can be used as a standalone line discipline, or as a
set of codec specific functions called from machine's line discipline
callbacks. Anyway, the line discipline itself must be registered by a machine
driver.

Applies on top of the followup to my initial driver version:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-July/019757.html

Suggested by ASoC manintainer Mark Brown <broonie@opensource.wolfsonmicro.com>

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoTTY: Add definition of a new line discipline required by Amstrad E3 (Delta) ASoC...
Janusz Krzysztofik [Wed, 22 Jul 2009 03:22:37 +0000 (05:22 +0200)]
TTY: Add definition of a new line discipline required by Amstrad E3 (Delta) ASoC driver

This patch adds new line discipline name an number to include/linux/tty.h. The
line discipline will be used by the Amstrad E3 (Delta) sound driver that will
come next in this series of patches.

Created against linux-2.6.31-rc3.
Applies to linux-omap-2.6 commit 7c5cb7862d32cb344be7831d466535d5255e35ac as
well.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: jack: Fix race in snd_soc_jack_add_gpios
Lars-Peter Clausen [Fri, 31 Jul 2009 19:15:25 +0000 (21:15 +0200)]
ASoC: jack: Fix race in snd_soc_jack_add_gpios

The irq can fire as soon as it has been requested, thus all fields accessed
from within the irq handler must be initialized prior to requesting the irq.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Allow CODECs to flag invalid registers
Mark Brown [Fri, 31 Jul 2009 17:26:51 +0000 (18:26 +0100)]
ASoC: Allow CODECs to flag invalid registers

This helps CODECs with sparse register maps work better with the
register cache display interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'gta02-audio' into for-2.6.32
Mark Brown [Thu, 30 Jul 2009 12:21:38 +0000 (13:21 +0100)]
Merge branch 'gta02-audio' into for-2.6.32

15 years agoASoC: Fix checkpatch issues and typos of ad1938 codec and bf5xx-tdm dai
Barry Song [Wed, 29 Jul 2009 07:03:16 +0000 (15:03 +0800)]
ASoC: Fix checkpatch issues and typos of ad1938 codec and bf5xx-tdm dai

1. fix "line over 80 characters" checkpatch warnings
2. ‘DMA_nnBIT_MASK’ is deprecated, use DMA_BIT_MASK instead
3. fix typos

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>