GitHub/moto-9609/android_kernel_motorola_exynos9610.git
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 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>
15 years agoASoC: neo1973_gta02_wm8753: Replace deprecated s3c_gpio calls with gpiolib
Lars-Peter Clausen [Wed, 29 Jul 2009 14:40:19 +0000 (16:40 +0200)]
ASoC: neo1973_gta02_wm8753: Replace deprecated s3c_gpio calls with gpiolib

With the s3c platform has implementing gpiolib support the s3c_gpio api has been
deprecated.
This patch gets rid of all s3c_gpio calls and replaces them by using gpiolib.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: neo1973_gta02_wm8753: Replace snd_soc_cnew with snd_soc_add_controls.
Lars-Peter Clausen [Wed, 29 Jul 2009 14:40:18 +0000 (16:40 +0200)]
ASoC: neo1973_gta02_wm8753: Replace snd_soc_cnew with snd_soc_add_controls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: board driver to connect bf5xx with ad1938
Barry Song [Wed, 22 Jul 2009 18:10:34 +0000 (02:10 +0800)]
ASoC: board driver to connect bf5xx with ad1938

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: blackfin I2S(TDM mode) CPU DAI driver
Barry Song [Mon, 27 Jul 2009 10:06:39 +0000 (18:06 +0800)]
ASoC: blackfin I2S(TDM mode) CPU DAI driver

The I2S DAI driver for blackfin SPORT, but works in TDM mode.
I2S is not a special case of TDM with only left and right two slots for
SPORT interface. I2S coordinates with TDM in SPORT, but not a part of
TDM. TDM require different hardware configuration with I2S, not only
different slot number.  One is "Stereo Serial Operation" mode of SPORT,
the other one is "Multichannel Operation" mode. They are incompatible
at the same time.
Hardware and DMA description and data transfer flow are much different
for I2S and TDM. Merging them as a whole will be very ugly and difficult
to maintain.
So we don't define a new DAI type, but give two DAI instances for standard
I2S and TDM, both in I2S-family DAI type. The TDM instance still uses the
I2S-family DAI type.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: CX20442: fix issues pointed out by subsystem maintainer
Janusz Krzysztofik [Tue, 28 Jul 2009 18:24:12 +0000 (20:24 +0200)]
ASoC: CX20442: fix issues pointed out by subsystem maintainer

The patch fixes some checkpatch identified issues and adds a comment about
line discipline interaction to my driver code, as requested by Mark on my
inital submission (thank you Mark for applying my imperfect patch anyway).
It also fixes MODULE_ALIAS mismatch as used in my machine driver.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Switch palm27x-asoc to jack detection api
Marek Vasut [Thu, 23 Jul 2009 20:16:56 +0000 (22:16 +0200)]
ASoC: Switch palm27x-asoc to jack detection api

This patch removes the old method of jack detection from palm27x-asoc
driver and adds jack detection api. It also removes some other (now)
useless stuff from the driver and corrects pin configuration for the
codec.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Jack handling enhancements as suggested by subsystem maintainer
Janusz Krzysztofik [Fri, 24 Jul 2009 00:48:57 +0000 (02:48 +0200)]
ASoC: Jack handling enhancements as suggested by subsystem maintainer

The patch adds a few small enhancements to the ASoC jack handling, as
suggested by Mark in his comments to my Amstrad Delta driver, and a few fixes
for related bugs found while learning Mark's code and testing results.

Enhancements:
1. Update status of an ASoC jack while associating it with new gpios.
2. Really update DAPM pins while associating them with an ASoC jack.
3. Export ASoC jack gpios over gpiolib sysfs for diagnostic purposes.

Fixes:
1. Apply mask on jack status report before using it, just for case.
2. While updating jack associated DAPM pins, use full resulting jack status,
   not the status report passed as an argument.

Created and tested on linux-2.6.31-rc3

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoALSA: Allow passing platform_data to devices attached to AC97 bus
Marek Vasut [Wed, 22 Jul 2009 11:01:03 +0000 (13:01 +0200)]
ALSA: Allow passing platform_data to devices attached to AC97 bus

This patch allows passing platform_data to devices attached to AC97 bus
(like touchscreens, battery measurement chips ...).

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: MAX9877: fix write operation for register
Joonyoung Shim [Thu, 23 Jul 2009 08:33:17 +0000 (17:33 +0900)]
ASoC: MAX9877: fix write operation for register

The MAX9877 needs an address of start register when we write values to
registers through i2c_master_send(), but the code for this was missed in
max9877_write_regs().

If the value of control is 0 in the max9877_set_out_mode(), the value is
not increased to 1, but actually the value to write to the register
should be 1.
And the register bits for out_mode and osc_mode should be cleared before
writing.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add support for Conexant CX20442-11 voice modem codec
Janusz Krzysztofik [Wed, 22 Jul 2009 03:22:28 +0000 (05:22 +0200)]
ASoC: Add support for Conexant CX20442-11 voice modem codec

This patch adds support for Conexant CX20442-11 voice modem codec, suitable
for use by the ASoC board driver for Amstrad E3 (Delta) videophone. Related
sound card driver will follow.

This codec is an optional part of the Conexant SmartV three chip modem design.
As such, documentation for its proprietary digital audio interface is not
available. However, on Amstrad Delta board, thanks to Mark Underwood who
created an initial, omap-alsa based sound driver a few years ago[1], the codec
has been discovered to be accessible not only from the modem side, but also
over the OMAP McBSP based CPU DAI. Thus, the driver can be used by any sound
card that can access the codec DAI directly. The DAI configuration parameters
(sample rate and format, number of channels) has been selected out empirically
for best user experience.

The codec analogue interface consists of two pairs of analogue I/O pins:
speakerphone interface or telephone handset/headset interface. Furthermore, it
seams to provide two operation modes for speakerphone I/O: standard and
advanced, with automatic gain control and echo cancelation. Even if the codec
control interface is unknown and not available, all those interfaces and modes
can be selected over the modem chip using V.253 commands. The driver is able
to issue necessary commands over a suitable hw_write function if provided by a
sound card driver. Otherwise, the codec can be controlled over the modem from
userspace while inactive.

Even if nothig is known about the codec internal power management
capabilities, DAPM widgets has been used to model the codec audio map.
Automatically performed powering up/down of those virtual widgets results in
corresponding V.253 commands being issued.

Some driver features/oddities may be board specific, but I have no way to
verify that with any board other than Amstrad Delta.

[1] http://www.earth.li/pipermail/e3-hacking/2006-April/000481.html

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

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'for-2.6.31' into for-2.6.32
Mark Brown [Thu, 23 Jul 2009 07:22:58 +0000 (08:22 +0100)]
Merge branch 'for-2.6.31' into for-2.6.32

15 years agoASoC: OMAP: Staticise pcm creation function of omap-pcm
Lopez Cruz, Misael [Thu, 23 Jul 2009 01:45:03 +0000 (20:45 -0500)]
ASoC: OMAP: Staticise pcm creation function of omap-pcm

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: tlv320aic3x: Enable PLL when not bypassed
Chaithrika U S [Wed, 22 Jul 2009 11:45:04 +0000 (07:45 -0400)]
ASoC: tlv320aic3x: Enable PLL when not bypassed

PLL was not being enabled when it was not bypassed. This patch
enables the PLL when it is used. Additionally, it disables the PLL
when it is bypassed.

Without this patch, the audio on TI DM646x EVM and DM355 EVM
does not work properly. The bit clocks and the frame sync signals
from the codec are not correct and hence the playback/record are faster
than usual for most sample rates. The reason for this was that the PLL
was not enabled when it was not bypassed.

Tested on DM6467 EVM, playback tested on DM355 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: MAX9877: separate callback functions
Joonyoung Shim [Wed, 22 Jul 2009 05:09:08 +0000 (14:09 +0900)]
ASoC: MAX9877: separate callback functions

The callback function to control register was used by whole controls in
MAX9877 driver, but this causes using many if statement for double
register control or invert.
So, the callback function for double register control is separate
differently, and the code for invert is added in the callback function.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: MPC5200: Increase the delay time between resets
John Bonesio [Tue, 21 Jul 2009 20:15:40 +0000 (13:15 -0700)]
ASoC: MPC5200: Increase the delay time between resets

Reset was failing with the original udelay(50) between the code in
psc_ac97_cold_reset() and the call to psc_ac97_warm_reset(). Through testing
it was found that a delay of 1ms was necessary for the cold_reset code to
consistently complete successfully.

Signed-off-by: John Bonesio <bones@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix checkpatch issues in AD1938
Mark Brown [Sat, 18 Jul 2009 10:09:42 +0000 (11:09 +0100)]
ASoC: Fix checkpatch issues in AD1938

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix FLL reference clock division setup in WM8993
Mark Brown [Fri, 17 Jul 2009 21:13:01 +0000 (22:13 +0100)]
ASoC: Fix FLL reference clock division setup in WM8993

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Bodge around GCC 4.4.0 flow analysis bug in GCC 4.4.0
Mark Brown [Fri, 17 Jul 2009 20:53:49 +0000 (21:53 +0100)]
ASoC: Bodge around GCC 4.4.0 flow analysis bug in GCC 4.4.0

GCC 4.4.0 doesn't appear to be able to spot that we don't apply any FLL
configuration if the output frequency is zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6
Candelaria Villareal, Jorge [Wed, 15 Jul 2009 01:04:08 +0000 (20:04 -0500)]
ASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6

Board sdp3430 has hardware support for EXTMUTE using TWL4030 GPIO6
line, controlled by register INTBR_PMBR1. Machine driver takes care
of enabling gpio line through i2c and codec driver manipulates the
line during headset ramp up/down sequence.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Kill direct accesses to driver_data
Takashi Iwai [Fri, 17 Jul 2009 05:48:03 +0000 (07:48 +0200)]
ASoC: Kill direct accesses to driver_data

Replaced with dev_{get|set}_drvdata().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoASoC: new ad1938 codec driver based on asoc
Barry Song [Thu, 16 Jul 2009 08:00:05 +0000 (16:00 +0800)]
ASoC: new ad1938 codec driver based on asoc

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: davinci: don't use clock names
Kevin Hilman [Wed, 15 Jul 2009 17:42:09 +0000 (10:42 -0700)]
ASoC: davinci: don't use clock names

clock name strings are no longer passed on platform_data.  Instead,
we rely entirely on struct device and clkdev to find the right clock.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: MAX9877: add MAX9877 amp driver
Joonyoung Shim [Wed, 15 Jul 2009 11:34:00 +0000 (20:34 +0900)]
ASoC: MAX9877: add MAX9877 amp driver

The MAX9877 combines a high-efficiency Class D audio power amplifier
with a stereo Class AB capacitor-less DirectDrive headphone amplifier.

The max9877_add_controls() is called to register the MAX9877 specific
controls on machine specific init() of the machine driver.

The datasheet for the MAX9877 can find at the following url:
http://datasheets.maxim-ic.com/en/ds/MAX9877.pdf

[Slight edit to sort the ALL_CODECS entries -- broonie.]

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add SOC_DOUBLE_R_EXT_TLV control type
Joonyoung Shim [Wed, 15 Jul 2009 11:33:50 +0000 (20:33 +0900)]
ASoC: add SOC_DOUBLE_R_EXT_TLV control type

This is a macro for double controls with special callback function and
TLV. The SOC_DOUBLE_R_EXT_TLV needs two registers and one shift for
double controls.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: add SOC_DOUBLE_EXT_TLV control type
Joonyoung Shim [Wed, 15 Jul 2009 11:33:47 +0000 (20:33 +0900)]
ASoC: add SOC_DOUBLE_EXT_TLV control type

This is a macro for double controls with special callback function and
TLV. The SOC_DOUBLE_EXT_TLV needs one register and two shifts for double
controls.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Error out if we can't determine a suitable WM9081 sysclk
Mark Brown [Wed, 15 Jul 2009 09:36:51 +0000 (10:36 +0100)]
ASoC: Error out if we can't determine a suitable WM9081 sysclk

Due to the flexibility of the WM9081 FLL this should never happen
in a real system.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix sample rate lookup in WM8993
Mark Brown [Wed, 15 Jul 2009 09:01:30 +0000 (10:01 +0100)]
ASoC: Fix sample rate lookup in WM8993

We need to use the best value we picked, not the last value we
looked at.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Blackfin I2S: fix resume handling
Cliff Cai [Tue, 14 Jul 2009 14:01:40 +0000 (10:01 -0400)]
ASoC: Blackfin I2S: fix resume handling

There is no need to manually start playback/capture ourselves as the PCM
driver will handle things for us.

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>
15 years agoASoC: Blackfin AC97: fix resume handling
Cliff Cai [Tue, 14 Jul 2009 14:01:39 +0000 (10:01 -0400)]
ASoC: Blackfin AC97: fix resume handling

There is no need to manually start playback/capture ourselves as the PCM
driver will handle things for us.

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>
15 years agoMerge branch 'for-2.6.31' into for-2.6.32
Mark Brown [Mon, 13 Jul 2009 22:05:51 +0000 (23:05 +0100)]
Merge branch 'for-2.6.31' into for-2.6.32

15 years agoASoC: fixes multiple typos in comments, no functional change
Peter Meerwald [Mon, 13 Jul 2009 22:05:11 +0000 (23:05 +0100)]
ASoC: fixes multiple typos in comments, no functional change

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: spdif: set module licence to GPL
Kevin Hilman [Mon, 13 Jul 2009 21:50:40 +0000 (14:50 -0700)]
ASoC: spdif: set module licence to GPL

Without MODULE_LICENCE("GPL"), when built as a module it will fail
to load because it uses other GPL symbols from kernel.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: spdif codec: enable use by modules
Kevin Hilman [Mon, 13 Jul 2009 21:50:39 +0000 (14:50 -0700)]
ASoC: spdif codec: enable use by modules

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: fix checking for external widgets bug
Rongrong Cao [Fri, 10 Jul 2009 19:13:30 +0000 (20:13 +0100)]
ASoC: fix checking for external widgets bug

In SOC DAPM layer of SOUND subsystem, when add signal route (in the
function snd_soc_dapm_add_route() ), the original code has wrong logic
when dapm layer check each widget whether an external one.

Signed-off-by: Rongrong Cao <rrcao@ambarella.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Keep index within stac9766_reg[]
Roel Kluin [Mon, 13 Jul 2009 00:20:10 +0000 (02:20 +0200)]
ASoC: Keep index within stac9766_reg[]

Keep index within stac9766_reg[]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'tlv320aic3x' into reg-cache
Mark Brown [Fri, 10 Jul 2009 20:06:33 +0000 (21:06 +0100)]
Merge branch 'tlv320aic3x' into reg-cache

15 years agoASoC: WM8510 has a single frame clock so needs symmetric rates
Mark Brown [Thu, 9 Jul 2009 10:28:07 +0000 (11:28 +0100)]
ASoC: WM8510 has a single frame clock so needs symmetric rates

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Daniel Mack [Wed, 8 Jul 2009 17:24:26 +0000 (19:24 +0200)]
ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free

Check for rtd->params->drcmr != NULL before accessing it.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add pop delay debug at end of DAPM sequencing
Mark Brown [Wed, 8 Jul 2009 17:54:57 +0000 (18:54 +0100)]
ASoC: Add pop delay debug at end of DAPM sequencing

Provide an interval after the end of DAPM sequencing so that we
can distinguish between a pop in the final step of the sequence
and a pop generated from some other source outside DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Configure WM8731 SYSCLK at startup on AT91SAM9G20-EK
Mark Brown [Wed, 8 Jul 2009 17:26:16 +0000 (18:26 +0100)]
ASoC: Configure WM8731 SYSCLK at startup on AT91SAM9G20-EK

The system clock is currently fixed by the driver and this avoids
the need for us to handle errors with enabling and disabling MCLK
(which was incorrect previously so this fixes bugs in error
handling).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Disable microphone input for AT91SAM9G20-EK by default
Mark Brown [Wed, 8 Jul 2009 17:18:19 +0000 (18:18 +0100)]
ASoC: Disable microphone input for AT91SAM9G20-EK by default

As shipped the board does not have inputs but it is relatively
straightforward to modify the board to hook them up so support
is provided in the driver. When these modifications have not
been made enabling the microphone stage can cause problems.

Add an ifdef to disable this by default. Don't put it into
Kconfig since users will have to get their soldering irons
out to change things.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Use CODEC as clock master on AT91SAM9G20-EK
Mark Brown [Wed, 8 Jul 2009 17:05:51 +0000 (18:05 +0100)]
ASoC: Use CODEC as clock master on AT91SAM9G20-EK

This simplifies the driver by removing the need to manually
configure dividers within the CPU and improve audio performance
by ensuring that the optimal phase relationships between the
clocks in the system are maintained.

Note that currently this means that for playback to work the
Output Mixer HiFi switch must be enabled since otherwise CODEC
will not generate the DAC clock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Limit WM8731 to symmetric rates
Mark Brown [Wed, 8 Jul 2009 16:48:12 +0000 (17:48 +0100)]
ASoC: Limit WM8731 to symmetric rates

While the hardware is capable of some limited asynmmetric modes the
driver does not currently support those modes so tell applications
that only symmetric rates are available.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add WM8993 CODEC driver
Mark Brown [Fri, 5 Jun 2009 15:32:59 +0000 (16:32 +0100)]
ASoC: Add WM8993 CODEC driver

The WM8993 is a highly integrated ultra-low power hi-fi CODEC designed
for portable devices such as multimedia phones.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci I2S needs mach/asp.h
Mark Brown [Wed, 8 Jul 2009 15:54:51 +0000 (16:54 +0100)]
ASoC: DaVinci I2S needs mach/asp.h

Reported-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Correct WM8731 Mic Capture Switch control name
Mark Brown [Wed, 8 Jul 2009 16:05:43 +0000 (17:05 +0100)]
ASoC: Correct WM8731 Mic Capture Switch control name

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add TLV information for WM8731
Mark Brown [Wed, 8 Jul 2009 15:53:12 +0000 (16:53 +0100)]
ASoC: Add TLV information for WM8731

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: pcm, don't play 1st sound period twice
Troy Kisky [Wed, 8 Jul 2009 00:36:06 +0000 (17:36 -0700)]
ASoC: DaVinci: pcm, don't play 1st sound period twice

Update the dma link with correct data as soon as
the master channel has copied it. Otherwise, the
1st period will play twice.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'davinci' into for-2.6.32
Mark Brown [Tue, 7 Jul 2009 18:18:46 +0000 (19:18 +0100)]
Merge branch 'davinci' into for-2.6.32

Conflicts:
sound/soc/davinci/davinci-i2s.c

15 years agoMerge branch 'for-2.6.31' into for-2.6.32
Mark Brown [Mon, 6 Jul 2009 20:49:35 +0000 (21:49 +0100)]
Merge branch 'for-2.6.31' into for-2.6.32

15 years agoASoC: Factor out WM8580 register cache code
Mark Brown [Sun, 5 Jul 2009 16:57:57 +0000 (17:57 +0100)]
ASoC: Factor out WM8580 register cache code

Note the slightly tricky cache usage in the volume update function due
to the requirement for a separate write for the VU bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Remove use of hw_read from TLV320AIC3x driver
Mark Brown [Sun, 5 Jul 2009 16:35:28 +0000 (17:35 +0100)]
ASoC: Remove use of hw_read from TLV320AIC3x driver

The TLV320AIC3x driver is currently the only user of the CODEC hw_read
operation and is jumping through some hoops in order to do so.  In order
to support future refactoring to make the hw_read operation more usable
unwrap the usage in this driver to avoid its use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Remove unused AK4535 hardware read functionality
Mark Brown [Sun, 5 Jul 2009 16:28:41 +0000 (17:28 +0100)]
ASoC: Remove unused AK4535 hardware read functionality

Nothing uses it and the existing hw_read operation needs to be
refectored so it's easier to remove it rather than work with it.
Support can be re-added if the code requires volatile registers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Begin to factor out register cache I/O functions
Mark Brown [Sun, 5 Jul 2009 16:24:50 +0000 (17:24 +0100)]
ASoC: Begin to factor out register cache I/O functions

A lot of CODECs share the same register data formats and therefore
replicate the code to manage access to and caching of the register
map. In order to reduce code duplication centralised versions of
this code will be introduced with drivers able to configure the use
of the common code by calling the new snd_soc_codec_set_cache_io()
API call during startup.

As an initial user the 7 bit address/9 bit data format used by many
Wolfson devices is supported for write only CODECs and the drivers
with straightforward register cache implementations are converted to
use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix leaks in WM8988 registration error handling
Mark Brown [Sun, 5 Jul 2009 15:29:39 +0000 (16:29 +0100)]
ASoC: Fix leaks in WM8988 registration error handling

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix WM8960 leaks on probe failure
Mark Brown [Sun, 5 Jul 2009 14:47:03 +0000 (15:47 +0100)]
ASoC: Fix WM8960 leaks on probe failure

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Fix leaks in WM8731 probe error handling
Mark Brown [Sun, 5 Jul 2009 14:18:01 +0000 (15:18 +0100)]
ASoC: Fix leaks in WM8731 probe error handling

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: Add CODEC volatile register operation
Mark Brown [Sun, 5 Jul 2009 14:12:22 +0000 (15:12 +0100)]
ASoC: Add CODEC volatile register operation

Add a volatile_register() operation to the CODEC structure providing a
standard operation to query if a register is volatile. This will be used
to factor out the register cache I/O operations for the CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: i2s, add davinci_i2s_prepare and shutdown
Troy Kisky [Sun, 5 Jul 2009 02:29:59 +0000 (19:29 -0700)]
ASoC: DaVinci: i2s, add davinci_i2s_prepare and shutdown

If the codec is master then prepare should call
mcbsp_start, not trigger.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoASoC: DaVinci: i2s, fix mcbsp_word_length update
Troy Kisky [Sun, 5 Jul 2009 02:29:57 +0000 (19:29 -0700)]
ASoC: DaVinci: i2s, fix mcbsp_word_length update

Code previously just "ors" in this field without clearing
first. Fix, by never reading this register.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>