1
0
Fork 0
Commit Graph

3507 Commits (39f1b56593293a3d1d3b49b97a59337a19fef053)

Author SHA1 Message Date
Naveen Krishna Chatradhi f192c0ab24 ASoC: SMDKV310: Enable SPDIF device
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-10 11:05:09 +01:00
Mark Brown 0f28f8e567 Merge branch 'for-3.0' into for-3.1 2011-06-10 11:03:54 +01:00
Uwe Kleine-König 2f2b3cf1dd sound/atmel_ssc_dai: add a missing space to an error message
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-10 10:55:20 +01:00
Sangbeom Kim 33195500ed ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
If DMA active status should be checked, I2SCON register should be referenced.
In this patch, Fix the incorrect referencing of I2SCON register.

Reported-by : Lakkyung Jung <lakkyung.jung@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-10 10:54:46 +01:00
Liam Girdwood 91d5e6b4f5 ASoC: pcm - rename snd_codec_close() to snd_pcm_close().
Make sure we follow naming convention for all PCM ops.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 19:29:35 +01:00
Liam Girdwood b8c0dab9bf ASoC: core - PCM mutex per rtd
In preparation for the new ASoC Dynamic PCM support (AKA DSP support).

The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
at runtime between the PCM device end (or Frontend - FE) and the physical DAI
(Backend - BE) using regular kcontrols (just like a hardware CODEC routes
audio in the analog domain). The Dynamic PCM core therefore must be
able to call PCM operations for both the Frontend and Backend(s) DAIs at
the same time.

Currently we have a global pcm_mutex that is used to serialise
the ASoC PCM operations. This patch removes the global mutex
and adds a mutex per RTD allowing the PCM operations to be reentrant and
allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
could configure multiple backend DAI hw_params() with similar or different
hw parameters at the same time.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 19:29:29 +01:00
Mark Brown 2c36c2ce00 Merge branch 'for-3.0' into for-3.1 2011-06-09 15:07:42 +01:00
Liam Girdwood ddee627cf6 ASoC: core - Separate out PCM operations into new file.
In preparation for Dynamic PCM support (AKA DSP support).

There will be future patches that add support to allow PCMs to be dynamically
routed to multiple DAIs at startup and also during stream runtime. This patch
moves the ASoC core PCM operaitions into a new file called soc-pcm.c.  This will
in simplify the ASoC core features into distinct files.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 15:07:27 +01:00
Lars-Peter Clausen 4b80b8c2ee ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
Currently it is possible that snd_soc_new_{mixer,mux,pga} is called with a
DAPM context not matching the widgets context. This can lead to a wrong
prefix_len calculation, which will result in undefined behaviour. To avoid
this always use the DAPM context from the widget itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-09 15:06:54 +01:00
Mark Brown bf564ea997 Merge branch 'for-3.0' into for-3.1 2011-06-09 12:02:26 +01:00
Timur Tabi 147dfe90f7 ASoC: p1022ds: fix incorrect referencing of device tree properties
Device tree integer properties are encoded in big-endian format, but some of
the Freescale ASoC drivers were assuming that the host is in big-endian format
as well.  Although this is true, it's better to use endian-safe accessors.

Also add a check for a failed ioremap() call in the SSI driver.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 12:02:08 +01:00
Timur Tabi 0cd114fff9 ASoC: fsl: fix initialization of DMA buffers
The DMA (PCM) driver used by some Freescale PowerPC supports separate DAIs
for playback and capture, so DMA buffers should be allocated only for the
initialized streams.  Instead of checking for the number of active channels,
which apparently is not reliable, check to see if the actual stream object
exists.

Also provide a better name for the DMA interrupt.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 11:53:11 +01:00
Mark Brown 3115ae1746 ASoC: WM8804 does not support sample rates below 32kHz
Reported-by: Kieran O'Leary <Kieran.O'Leary@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-06-09 11:51:07 +01:00
Mika Westerberg 51e2cc0c51 ASoC: ep93xx: convert to use the DMA engine API
Now that we have the EP93xx DMA engine driver in place, we convert the ASoC
drivers (I2S, AC97 and PCM) to take advantage of this new API. There are no
functional changes.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08 15:45:59 -06:00
Ricardo Neri 2763f45d40 ASoC: twl6040 - According to TWL6040 specification, gain start at 6dB and not -6dB.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-06-08 19:52:17 +01:00
Mark Brown 995e54f5fe ASoC: Fix mismerge of Speyside set_bias_level_post()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 17:51:38 +01:00
Mark Brown 47cb55a99b Merge branch 'for-3.0' into for-3.1 2011-06-08 15:25:07 +01:00
Mark Brown 22cb839bc8 ASoC: Support Speyside build variants with WM8962 fitted
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:49 +01:00
Mark Brown 417ceff939 ASoC: Defer all WM8962 clocking configuration until power up
Don't require an audio rate SYSCLK in hw_params() in order to better
support microphone detection use cases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-08 15:24:48 +01:00
Mark Brown 8f63aaa887 ASoC: Implement base 5 band EQ control for WM8962
ReTune Mobile modes are not currently supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:48 +01:00
Mark Brown 649a1a0ef2 ASoC: Report errors when we have a WM8962 IRQ and don't get FLL lock
We really should be getting the interrupt - if we don't get one it's very
likely that the configuration is incorrect and audio will fail. Also
increase the timeout substantially in this case for safety.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:47 +01:00
Mark Brown c7356da9e2 ASoC: Factor out I2C usage in WM8962 driver
The chip can actually support SPI so we shouldn't assume we've got an I2C
device even though that's the most common configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:46 +01:00
Mark Brown ffdaa48aed ASoC: Suppress restore of default register values for rbtree cache sync
Currently the rbtree code will write out the entire register map when
doing a cache sync which is wasteful and will slow things down. Check
to see if the value we're about to write is the default and don't bother
restoring it if it is, either the value will have been retained or the
device will have been reset and holds the value already.

We should really store the defaults in the nodes but this resolves the
immediate issue.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:36 +01:00
Mark Brown 0f82bdf572 ASoC: Fix WM8962 headphone volume update for use of advanced caches
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-06-08 15:18:17 +01:00
Liam Girdwood 0168bf0d13 ASoC: core - Allow components to probe/remove in sequence.
Some ASoC components depend on other ASoC components to provide clocks and
power resources in order to probe() and vice versa for remove().

Allow components to be ordered so that components can be probed() and removed()
in sequences that conform to their dependencies.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Liam Girdwood 552d1ef6b5 ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.

Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Mark Brown cf3383fbb0 Merge branch 'for-3.0' into for-3.1 2011-06-07 09:49:47 +01:00
Lars-Peter Clausen 064d58ee3a ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
Fix the codec_name field of the dai_link to match the actual device name
of the codec. Otherwise the card won't be instantiated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-07 09:49:28 +01:00
Lars-Peter Clausen 0c8e2917f2 ASoC: AD1836: Fix build error
Commit f97d0c6d5f ("ASoC: AD1836: Add input gain control for ADC2") contained
a typo in the register name, causing a build error. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 09:48:21 +01:00
Greg Dietsche bca6b39979 ASoC: wm8940: remove unnecessary if statements
removing unnecessary if(ret) checks

This updated patch corrects a minor spelling problem in the commit message
and resolves two other (similar) issues found in wm8940.c by Jonathan Cameron.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 09:47:40 +01:00
Mark Brown 46758dee72 Merge branch 'for-3.0' into for-3.1 2011-06-06 21:57:54 +01:00
Lars-Peter Clausen 8ca695f273 ASoC: AD1836: Fix setting the PCM format
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-06 21:55:10 +01:00
Lars-Peter Clausen f97d0c6d5f ASoC: AD1836: Add input gain control for ADC2
The AD1836 has a PGA for its second ADC. This patch adds a control for
adjusting the the gain of the PGA.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:43 +01:00
Lars-Peter Clausen 583eadab21 ASoC: AD1836: Remove unused fields from private struct
The control_type field is never used, so it can be removed.  The
control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:43 +01:00
Lars-Peter Clausen 874ce77bc3 ASoC: AD1836: Add AD1835/AD1837/AD1838/AD1839 support
The AD183X codec devices are mostly register compatible and can easily be
supported by the same driver.  The main difference between those devices
is the number of DACs and ADCs.

This patch adjusts the driver to allocate the controls, DAPM widgets and
routes for the DACs and ADCs dynamically based on the chip type.

The AD1836 is a bit special in that it supports different modes for its second
ADC, so it needs some special handling. Right now the driver hardcodes the mode
to the differential PGA mode.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:42 +01:00
Lars-Peter Clausen 2cf0342822 ASoC: AD1836: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:41 +01:00
Lars-Peter Clausen 90bc11d1d0 ASoC: AD1836: Add ADC/DAC controls helper macros
The different ADC and DAC controls follow the same scheme, so add some helper
macros for declaring them.
This should make the code a bit more readable and also decreases the code size
a bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:41 +01:00
Mark Brown 85e9e76638 ASoC: Manage Speyside system clocking only in bias management
Now that the CODEC driver supports it defer configuration of the system
clock until bias management which is a much more idiomatic place to do
system power control and makes things a lot more happy when we're using
both interfaces.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:47:28 +01:00
Mark Brown cc4c670a41 ASoC: Only provide a default bias level update for CODEC contexts
This allows the card driver to use the bias level variable more easily in
multi component systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:47:05 +01:00
Mark Brown d4c6005f8e ASoC: Add context parameter to card DAPM callbacks
The card callback will get called for each DAPM context in the card so it
can be useful for it to know which device is currently undergoing a
transition.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:45 +01:00
Mark Brown 171ec6b089 ASoC: Simplify logic in snd_soc_dapm_set_bias_level()
No functional changes but much less indentation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:19 +01:00
Mark Brown 4113e44316 ASoC: Remove trace for DAPM bias level logging
It's redundant now thanks to the use of the generic trace infrastructure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:00 +01:00
Mark Brown 88d960864e ASoC: Indentation fix for null loop operation
More with the legibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown dfcc9047c9 ASoC: Don't bring the CODEC up to full power for supplies and biases
If the only widgets active within a CODEC are supplies and micbiases we
are not passing audio, we are probably just doing microphone detection.
This will not generally require either fully accurate reference voltages
or much power so

If this turns out to be unsuitable for some systems we can provide a
facility to override this decision.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown 56fba41f8f ASoC: Specify target bias state directly as a bias state
Rather than a simple flag to say if we want the DAPM context to be at full
power specify the target bias state. This should have no current effect
but is a bit more direct and so makes it easier to change our decisions
about the which bias state to go into in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown 6dffdea700 ASoC: Allow WM8915 BCLK calculation outside hw_params()
Allow more dynamic management of the device clocking by allowing BCLK to
be calculated when we set SYSCLK. This means that if the system is idle
when hw_params() runs then we don't try to use the SYSCLK used in that case
to set up the BCLK dividers, we can instead wait until a later point such
as bias level configuration. This makes it easier to manage low power modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown bd4f2acb8d Merge branch 'for-3.0' into for-3.1 2011-06-06 19:34:58 +01:00
Mark Brown fd137e2bba ASoC: Check for NULL register bank in snd_soc_get_cache_val()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 19:34:11 +01:00
Mark Brown 78bf3c9ab6 ASoC: Enforce the mask in snd_soc_update_bits()
Avoids issues if someone does a read followed by restore and doesn't mask
out only the bits being updated.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:48:42 +01:00
Mark Brown 51b3b5cabb ASoC: Error out when FLL lock interrupt is not delivered on WM8915
When the FLL locks on the WM8915 an interrupt is generated.  For safety
error out if we don't get that interrupt when the IRQ output of the
WM8915 is hooked up.  Since we *really* expect an interrupt but the
threaded IRQ handler may take a bit longer than expected to get
scheduled also dramatically increase the delay in this case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:47:57 +01:00
Mark Brown ea7b437836 ASoC: Suppress noop SYSCLK updates in WM8915
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:47:17 +01:00
Mark Brown 84abd1b395 Merge branch 'for-3.0' into for-3.1 2011-06-06 12:47:06 +01:00
Mark Brown 6ac340623c ASoC: Add missing break in WM8915 FLL source selection
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:46:52 +01:00
Mark Brown 1622ee1822 ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:46:33 +01:00
Mark Brown aa72f6899b Merge branch 'for-3.0' into for-3.1 2011-06-06 12:26:02 +01:00
Mark Brown 05d3962cc9 Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-3.0 2011-06-06 10:38:23 +01:00
Linus Torvalds 0d6925d43b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: usb - turn off de-emphasis in s/pdif for cm6206
  ALSA: asihpi: Use angle brackets for system includes
  ALSA: fm801: add error handling if auto-detect fails
  ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write
  ALSA: hda - Fix HP and Front pins of ad1988/ad1989 in ad198x_power_eapd()
  ALSA: 6fire: Don't leak firmware in error path
  ASoC: Fix wm_hubs input PGA ZC bits
  ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
2011-06-06 17:51:28 +09:00
Takashi Iwai 3190dad97b Merge branch 'fix/asoc' into for-linus 2011-06-06 09:28:49 +02:00
Linus Torvalds bb3d6bf191 Revert "ASoC: Update cx20442 for TTY API change"
This reverts commit ed0bd2333c.

Since we reverted the TTY API change, we should revert the ASoC update
to it too.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-04 07:00:50 +09:00
Ricardo Neri 68d1c4a73c ASoC: OMAP: Update Makefile and Kconfig for HDMI audio
Update Makefile and Kconfig to build HDMI audio support for
OMAP4 SDP and Panda boards.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-06-03 13:43:46 +01:00
Ricardo Neri 55b95e0e60 ASoC: OMAP4: Add HDMI Audio machine driver for OMAP4 boards
Add machine driver for HDMI audio on OMAP4 boards. This driver is
in charge of putting together the HDMI audio codec and the CPU DAI
and register the HDMI sound card with ALSA.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-06-03 13:43:45 +01:00
Ricardo Neri bca2e41d31 ASoC: OMAP: Add CPU DAI driver for HDMI
Addition of the HDMI CPU DAI driver for OMAP4. This driver is in
charge of configuring DMA settings for HDMI. Also, it finds
the HDMI video device and determines if audio playback can proceed.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-06-03 13:43:45 +01:00
Joachim Eastwood 840d8e5e96 ASoC: atmel_ssc: Don't try to free ssc if request failed
We should only call ssc_free() when ssc_request() succeeds or bad
things will happen.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-03 10:04:17 +01:00
Mark Brown e6a9be0bb0 ASoC: Use a lower detection rate when monitoring headphones on WM8915
We only need to increase the detection rate to maximum if we're monitoring
for button presses as the response times needed for user interaction there
are much lower.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-02 18:57:08 +01:00
Mark Brown 1e025a3692 ASoC: Update speyside audio driver for hardware revision 2
Revision 2 of the Speyside platform supplies a 32kHz clock on MCLK2 rather
than MCLK1.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01 20:20:59 +01:00
Mark Brown cf4a39105a ASoC: Remove internally generated WM8915 supplies
DCVDD and MICVDD are intended to be (and almost always are) generated by
on-board LDOs which are transparently controlled by the driver so we
shouldn't really be requesting them from the regulator API. If the driver
is updated to support external supply of these then we will need to change
the way we handle this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01 19:43:34 +01:00
Julia Lawall a2dc56c8a0 ASoC: add missing clk_put to nuc900-ac97
This goto is after the call to clk_get, so it should go to the label that
includes a call to clk_put.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression e1,e2;
statement S;
@@

e1 = clk_get@p1(...);
... when != e1 = e2
    when != clk_put(e1)
    when any
if (...) { ... when != clk_put(e1)
               when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
 } else S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-01 19:20:22 +01:00
Mark Brown a1e9adc00e ASoC: Support edge triggered IRQs for WM8915
Really this should be something the IRQ core can cope with for us but since
it doesn't currently do so (at least for threaded interrupts like this) do
so in the driver. This allows us to run with interrupt controllers that
only support edge triggered interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01 19:19:19 +01:00
Mark Brown 37aa716a57 ASoC: Staticize ak4641_dai
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01 19:18:59 +01:00
Mark Brown d21685ec25 Merge branch 'for-2.6.40' into for-2.6.41 2011-05-30 10:54:18 +08:00
Axel Lin 74ab24af4f ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk
Current implementation set max98095->sysclk/max98088->sysclk to freq twice.
Set it once is enough, this patch removes the first assignment in case
we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Hsiang <peter.hsiang@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-29 01:57:21 +08:00
Linus Torvalds 2a56d22202 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
  ARM: 6945/1: Add unwinding support for division functions
  ARM: kill pmd_off()
  ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
  ARM: 6943/1: mm: use TTBR1 instead of reserved context ID
  ARM: 6942/1: mm: make TTBR1 always point to swapper_pg_dir on ARMv6/7
  ARM: 6941/1: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area
  ARM: add sendmmsg syscall
  ARM: 6863/1: allow hotplug on msm
  ARM: 6832/1: mmci: support for ST-Ericsson db8500v2
  ARM: 6830/1: mach-ux500: force PrimeCell revisions
  ARM: 6829/1: amba: make hardcoded periphid override hardware
  ARM: 6828/1: mach-ux500: delete SSP PrimeCell ID
  ARM: 6827/1: mach-netx: delete hardcoded periphid
  ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume
  ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
  ARM: 6914/1: sparsemem: fix highmem detection when using SPARSEMEM
  ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM
  at91: drop at572d940hf support
  at91rm9200: introduce at91rm9200_set_type to specficy cpu package
  at91: drop boot_params and PLAT_PHYS_OFFSET
  ...
2011-05-27 19:51:32 -07:00
Linus Torvalds 09cefbb605 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
  ASoC: Fix power down for widgetless per-card DAPM context case
  ASoC: wm1250-ev1: Define "WM1250 Output" with SND_SOC_DAPM_OUTPUT
  ASoC: Remove duplicate linux/delay.h inclusion.
  ASoC: sam9g20_wm8731: use the proper SYSCKL value
  ASoC: wm8731: fix wm8731_check_osc() connected condition
  ALSA: hda - Reorganize controller quriks with bit flags
  ALSA: hda - Use snd_printd() in snd_hda_parse_pin_def_config()
  ALSA: core: remove unused variables.
  ALSA: HDA: Increase MAX_HDMI_PINS
  ALSA: PCM - Don't check DMA time-out too shortly
  MAINTAINERS: add FireWire audio maintainer
  ALSA: usb-audio: more control quirks for M-Audio FastTrack devices
  ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER
  ALSA: usb-audio: export snd_usb_feature_unit_ctl
  ALSA: usb-audio: rework add_control_to_empty()
  ALSA: usb-audio: move assignment of chip->ctrl_intf
  ALSA: hda - Use model=auto for Lenovo G555
  ALSA: HDA: Unify HDMI hotplug handling.
  ALSA: hda - Force AD1988_6STACK_DIG for Asus M3N-HT Deluxe
  ASoC: core - remove superfluous new line.
  ...
2011-05-27 10:10:51 -07:00
Mark Brown ea02c63d57 ASoC: Fix wm_hubs input PGA ZC bits
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-27 22:17:09 +08:00
Stephen Warren a5fe6be42e ASoC: Tegra: Enable Kaen HP_MUTE at boot
We want the default state of the HP_MUTE signal to be asserted, so that
the headphones are muted before the first audio playback. Without this,
the headphones are left unmuted until shortly after the first audio
playback completes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-27 22:13:54 +08:00
Mark Brown 2ac8b6f41a ASoC: Use explicit endianness conversion in snd_soc_16_8_write()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-27 22:01:40 +08:00
Mark Brown 94228bcf8c ASoC: Use cpu_to_be16() in 8x16 write
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-27 22:00:58 +08:00
Mark Brown f06f136fe0 ASoC: Convert 7x9 write to use cpu_to_be16()
Run the data through cpu_to_be16() so it's at least clear what we're up to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-27 22:00:38 +08:00
Stephen Warren 1007da0604 ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared
Commit af46800 ("ASoC: Implement mux control sharing") introduced
function dapm_is_shared_kcontrol.

When this function returns true, the naming of DAPM controls is derived
from the kcontrol_new. Otherwise, the name comes from the widget (and
possibly a widget's naming prefix).

A bug in the implementation of dapm_is_shared_kcontrol made it return 1
in all cases. Hence, that commit caused a change in control naming for
all controls instead of just shared controls.

Specifically, a control is always considered shared because it is always
compared against itself. Solve this by never comparing against the widget
containing the control being created.

Equally, controls should never be shared between DAPM contexts; when the
same codec is instantiated multiple times, the same kcontrol_new will be
used. However, the control should no be shared between the multiple
instances.

I tested that with the Tegra WM8903 driver:
* Shared is now mostly 0 as expected, and sometimes 1.
* The expected controls are still generated after this change.

However, I don't have any systems that have a widget/control naming
prefix, so I can't test that aspect.

Thanks for Jarkko Nikula for pointing out how to fix this.

Reported-by: Liam Girdwood <lrg@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-27 21:49:36 +08:00
Linus Torvalds 9f1912c48c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (57 commits)
  regulator: Fix 88pm8607.c printk format warning
  input: Add support for Qualcomm PMIC8XXX power key
  input: Add Qualcomm pm8xxx keypad controller driver
  mfd: Add omap-usbhs runtime PM support
  mfd: Fix ASIC3 SD Host Controller Configuration size
  mfd: Fix omap_usbhs_alloc_children error handling
  mfd: Fix omap usbhs crash when rmmoding ehci or ohci
  mfd: Add ASIC3 LED support
  leds: Add ASIC3 LED support
  mfd: Update twl4030-code maintainer e-mail address
  mfd: Correct the name and bitmask for ab8500-gpadc BTempPullUp
  mfd: Add manual ab8500-gpadc batt temp activation for AB8500 3.0
  mfd: Provide ab8500-core enumerators for chip cuts
  mfd: Check twl4030-power remove script error condition after i2cwrite
  mfd: Fix twl6030 irq definitions
  mfd: Add phoenix lite (twl6025) support to twl6030
  mfd: Avoid to use constraint name in 88pm860x regulator driver
  mfd: Remove checking on max8925 regulator[0]
  mfd: Remove unused parameter from 88pm860x API
  mfd: Avoid to allocate 88pm860x static platform data
  ...
2011-05-26 12:14:20 -07:00
Linus Torvalds 829ae27329 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (33 commits)
  OMAP3: PM: Boot message is not an error, and not helpful, remove it
  OMAP3: cpuidle: change the power domains modes determination logic
  OMAP3: cpuidle: code rework for improved readability
  OMAP3: cpuidle: re-organize the C-states data
  OMAP3: clean-up mach specific cpuidle data structures
  OMAP3 cpuidle: remove useless SDP specific timings
  usb: otg: OMAP4430: Powerdown the internal PHY when USB is disabled
  usb: otg: OMAP4430: Fixing the omap4430_phy_init function
  usb: musb: am35x: fix compile error when building am35x
  usb: musb: OMAP4430: Power down the PHY during board init
  omap: drop board-igep0030.c
  omap: igep0020: add support for IGEP3
  omap: igep0020: minor refactoring
  omap: igep0020: name refactoring for future merge with IGEP3
  omap: Remove support for omap2evm
  arm: omap2plus: GPIO cleanup
  omap: musb: introduce default board config
  omap: move detection of NAND CS to common-board-devices
  omap: use common initialization for PMIC i2c bus
  omap: consolidate touch screen initialization among different boards
  ...
2011-05-26 12:11:54 -07:00
Samuel Ortiz e45be4b5fc mfd: Use mfd cell platform_data for wm8400 cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:14 +02:00
Samuel Ortiz cb5811cf32 mfd: Use mfd cell platform_data for davinci cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:13 +02:00
Samuel Ortiz a4579ad2bb mfd: Use mfd cell platform_data for twl4030 codec cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:09 +02:00
Samuel Ortiz 9e554696c0 mfd: Use mfd cell platform_data for wl1273 cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:02 +02:00
Jarkko Nikula ea77b94774 ASoC: Fix power down for widgetless per-card DAPM context case
Commit 52ba67b ("ASoC: Force all DAPM contexts into the same bias state")
powers up all the DAPM contexts in a card if any DAPM context becomes
active. Unfortunately power down newer happens if per-card DAPM context
doesn't have any widgets.

Reason for this is that power state of per-card DAPM context without
widgets is never cleared and thus all the DAPM contexts remain permanently
active. Test for widgetless calling DAPM context in dapm_power_widgets()
doesn't work for per-card DAPM context since power change is never
originating from widgetless per-card DAPM context.

Fix this by pre-clearing power state flag of non-codec DAPM context at the
beginning of power sequence.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:58:14 +08:00
Axel Lin 979f486944 ASoC: wm1250-ev1: Define "WM1250 Output" with SND_SOC_DAPM_OUTPUT
Codec output pin should be defined with SND_SOC_DAPM_OUTPUT.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:11:24 +08:00
Jesper Juhl 65afc4118d ASoC: Remove duplicate linux/delay.h inclusion.
It's enough to include linux/delay.h just once in
sound/soc/codecs/wm8915.c, so remove the duplicate.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:11:23 +08:00
Nicolas Ferre 6bb74a7293 ASoC: sam9g20_wm8731: use the proper SYSCKL value
at91sam9g20 is providing master clock to wm8731: not using a crystal but an
external MCLK. We can avoid conflict and save power using WM8731_SYSCLK_MCLK as
we do not need oscillator to be powered.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:11:19 +08:00
Nicolas Ferre 5a195b4450 ASoC: wm8731: fix wm8731_check_osc() connected condition
The crystal oscillator is only enabled if the WM8731_SYSCLK_XTAL master clock
is specified. Fix the connected() struct snd_soc_dapm_route function to take
this into account. Oscillator is not enabled on machine that need it otherwise.

Machine drivers have to make sure that they use the proper SYSCLK value.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:11:16 +08:00
Nicolas Ferre 2cdcd951c4 ASoC: atmel_ssc_dai: fix ssc error path
We do not have to free a resource that is not allocated yet.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:10:11 +08:00
Nicolas Ferre 97b4fc3c44 ASoC: trivial: typo in atmel_pcm_dma_params strucutre comment
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:10:07 +08:00
Nicolas Ferre 7309d2e28d ASoC: trivial: typo in debug comment
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:09:28 +08:00
Stephen Warren 82e14e8bdd ASoC: core: Don't schedule deferred_resume_work twice
For cards that have two or more DAIs, snd_soc_resume's loop over all
DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
Since this is the same work item each time, the 2nd and subsequent
calls return 0 (work item already queued), and trigger the dev_err
message below stating that a work item may have been lost.

Solve this by adjusting the loop to simply calculate whether to run the
resume work immediately or defer it, and then call schedule work (or not)
one time based on that.

Note: This has not been tested in mainline, but only in chromeos-2.6.38;
mainline doesn't support suspend/resume on Tegra, nor does the mainline
Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
mainline.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 22:06:08 +08:00
Daniel Mack b6f7d7c8bf ASoC: Fix comment in cs4270 codec driver
The comment does not reflect reality anymore since the multi-component
monster patch landed. Things are matched by names now, and not by
exporting and referencing a struct. Fix it to avoid confusion.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-26 09:26:22 +08:00
Russell King 586893ebc4 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable
Conflicts:
	arch/arm/Kconfig
	arch/arm/mach-exynos4/mach-nuri.c
2011-05-25 21:47:48 +01:00
Ben Gardiner bb5b5fd4d4 ASoC: davinci-pcm: comments for the conversion to BATCH mode
In the previous commit 'ASoC: davinci-pcm: convert to BATCH mode', the phase
offset of 2 was mentioned in the commit message but not well commented in the
source.

Add descriptive comments of the phase offset with and without ping-pong
buffers enabled.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 22:59:07 +08:00
Ben Gardiner 52e2c5d38e ASoC: davinci-pcm: convert to BATCH mode
The davinci-pcm driver's snd_pcm_ops pointer function currently calls into
the edma controller driver to read the current positions of the edma channels
to determine pos to return to the ALSA framework. In particular,
davinci_pcm_pointer() calls edma_get_position() and the latter has a comment
indicating that "Its channel should not be active when this is called" whereas
the channel is surely active when snd_pcm_ops.pointer is called.

The operation of davinci-pcm in capture and playback appears to follow close
the other pcm drivers who export SNDRV_PCM_INFO_BATCH except that davinci-pcm
does not report it's positions from pointer() using the last transferred
chunk. Instead it peeks directly into the edma controller to determine the
current position as discussed above.

Convert the davinci-pcm driver to BATCH mode: count the periods elapsed in the
prtd->period member and use its value to report the 'pos' to the alsa
framework in the davinci_pcm_pointer function.

There is a phase offset of 2 periods between the position used by dma setup
and the position reported in the pointer function. Either +2 in the dma
setup or -2 in the pointer function (with wrapping, both) accounts for this
offset -- I opted for the latter since it makes the first-time setup clearer.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:31 +08:00
Ben Gardiner 10ab3bfda4 ASoC: davinci-pcm: extract period elapsed functions
Extract functions that modify the prtd->period member in preparation for
conversion to BATCH mode playback.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:31 +08:00
Ben Gardiner ef39eb6f21 ASoC: davinci-pcm: fix audible glitch on 2nd ping-pong playback
The release of the dma channels was being performed in prepare and there was a
edma_resume call for the asp-channel only being executed on START, RESUME and
PAUSE_RELEASE.

The mcasp on da850evm with ping-pong buffers enabled was exhibiting an audible
glitch on every playback after the first. It was determined through trial and
error that the following two changes fix this problem:

1) Move the edma_start calls from prepare to trigger and 2) reverse the order
of starting the asp and ram channels.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:30 +08:00
Ben Gardiner acb8e2666e ASoC: davinci-pcm: increase the maximum channels
Based on the registration of davinci-mcasp.1 in the davinci-evm platform
setup for da830 and dm6467, davinci-pcm can handle more than the currently
reported maximum channels of 2.

Increase the maximum channels to 384 to match the maximum reported by
davinci-mcasp.1.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:29 +08:00
Ben Gardiner 8e56d5b834 ASoC: davinci-pcm: expand the .formats
Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of
handling data of width up to and including 32bits.

"
	if ((data_type == 0) || (data_type > 4)) {
		printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type);
		return -EINVAL;
	}
"

Update the .format member of the snd_pcm_hardware instances it registers to
reflect this capability.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:29 +08:00
Ben Gardiner fb1e9703af ASoC: davinci-pcm: trivial: make ping-pong params setup symmetrical
The setup of the pong channel uses EDMA_CHAN_SLOT instead of & 0x3f as the
setup of the ping channel does.

Make the setup of ping and pong symmetric. There is no functional change
introduced by this patch.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:28 +08:00
Liam Girdwood 92505299a1 ASoC: core - remove superfluous new line.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 04:45:47 +08:00
Liam Girdwood 61b61e3c5c ASoC: core - fix module reference counting for CPU DAIs
Currently CODEC and platform drivers have their module reference count
incremented soc_probe_dai_link() whilst CPU DAI drivers have their reference
count incremented in soc_bind_dai_link().

CPU DAIs should have their reference count incremented in soc_probe_dai_link()
just like the CODEC and platform drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 23:25:34 +08:00
Daniel Mack 477a66948e ASoC: fix raumfeld platform
Commit f0fba2ad (ASoC: multi-component - ASoC Multi-Component Support)
broke support for Raumfeld platforms as it didn't take into account the
different hardware features on individual devices.

In particular, Raumfeld speakers have no S/PDIF output, so the members
of the snd_soc_card struct must be set dynamically.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-24 23:25:00 +08:00
Kuninori Morimoto 23ca853392 ASoC: sh: fsi: add fsi_hw_startup/shutdown
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:42:07 +08:00
Kuninori Morimoto cda828cafe ASoC: sh: fsi: cleanup suspend/resume
Current FSI driver was using saved_xxx variable for suspend/resume.
OTOH, the start and stop of power/clock are controlled by
fsi_hw_startup/fsi_hw_shutdown in current FSI driver.
The all necessary registers value are set by fsi_hw_startup.

So, if fsi_hw_shutdown is called when "suspend" is generated,
and fsi_hw_startup is called at "resume",
the saved_xxx are not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:42:02 +08:00
Kuninori Morimoto 4c48125331 ASoC: sh: fsi: remove fsi_module_init/kill
FSIA/B ports is enabled by default when power-on,
and current FSI is supporting RuntimePM.
In addition, current fsi_module_init/kill doesn't care
simultaneous playback/recorde.
This mean FSI port control is not needed.
This patch remove fsi_module_init/kill

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:57 +08:00
Kuninori Morimoto 2da658927c ASoC: sh: fsi: make sure fsi_stream_push/pop access by spin lock
fsi_stream_push/pop might be called in same time.
This patch protect it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:52 +08:00
Kuninori Morimoto 9478e0b60f ASoC: sh: fsi: remove pm_runtime from fsi_dai_set_fmt.
pm_runtime_get/put_sync were used to access FSI register in fsi_dai_set_fmt
which is called when ALSA probe.
But this register value will disappear after pm_runtime_put_sync
if platform is supporting RuntimePM.
To solve this issue, this patch adds new variable for format,
and remove pm_runtime_get/put_sync from fsi_dai_set_fmt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:48 +08:00
Kuninori Morimoto 2e651bafa9 ASoC: sh: fsi: tidyup unclear variable naming
Some variables on this driver were a unclear naming,
and were different unit (byte, frame, sample).
And some functions had wrong name
(ex. it returned "sample width" but name was "fsi_get_frame_width").
This patch tidy-up this issue, and the minimum unit become "sample".
Special thanks to Takashi YOSHII.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:44 +08:00
Kuninori Morimoto 1ddddd3635 ASoC: sh: fsi: irq control moves to fsi_port_start/stop
Using fsi_irq_enable/disable in fsi_port_start/stop is very natural.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:40 +08:00
Kuninori Morimoto 4f56cde17e ASoC: sh: fsi: add fsi_set_master_clk
Current FSI driver is using set_rate call back function which is for
master mode.
By this patch, it is used from fsi_set_master_clk.
This patch is preparation of cleanup suspend/resume patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:36 +08:00
Kuninori Morimoto 0ffe296add ASoC: sh: fsi: tidyup parameter of fsi_stream_push
It is possible to create buff_len and period_len
from substream->runtime.
This patch is preparation of tidyup unclear variable naming patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-24 18:41:32 +08:00
Mark Brown 60c655e62f ASoC: Convert 16x16 write to use cpu_to_be16()
Make it clear what we're doing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-24 18:41:09 +08:00
Tony Lindgren 9b28b11e2a Merge branch 'for_2.6.40/pm-cleanup' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus 2011-05-24 00:45:06 -07:00
Linus Torvalds 99dff58562 Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
  serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
  tty/serial: Fix break handling for PORT_TEGRA
  tty/serial: Add explicit PORT_TEGRA type
  n_tracerouter and n_tracesink ldisc additions.
  Intel PTI implementaiton of MIPI 1149.7.
  Kernel documentation for the PTI feature.
  export kernel call get_task_comm().
  tty: Remove to support serial for S5P6442
  pch_phub: Support new device ML7223
  8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
  ASoC: Update cx20442 for TTY API change
  pch_uart: Support new device ML7223 IOH
  parport: Use request_muxed_region for IT87 probe and lock
  tty/serial: add support for Xilinx PS UART
  n_gsm: Use print_hex_dump_bytes
  drivers/tty/moxa.c: Put correct tty value
  TTY: tty_io, annotate locking functions
  TTY: serial_core, remove superfluous set_task_state
  TTY: serial_core, remove invalid test
  Char: moxa, fix locking in moxa_write
  ...

Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.

I did the hci_ldisc thing as an evil merge, cleaning things up.
2011-05-23 12:23:20 -07:00
Jarkko Nikula 9fb352b18b ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state
TLV320AIC33, TLV320AIC34 and I believe others too in this family have some
hw bugs that cause that analogue and digital VDD supplies remain leaking
up to a few mA of current after certain use cases even the hw blocks inside
codec are driven to off.

Highest leakages occur after using the bypass paths inside codec but it
is possible to get smaller leakages just by toggling mute switches in
unused audio paths (i.e. no DAPM changes) while codec is on due another
active audio path.

While some cases are able to workaroud by making sure that e.g. output mixer
switches are muted before powering down the output stage this doesn't help
all the cases.

Therefore use the software reset command to clear possible leakage currents
since that works in every cases and affects only this codec instance. Only
drawback is that now cache sync is required everytime when codec bias comes
out from bias off state, not only when supply regulators were off.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-23 10:36:44 +01:00
Jarkko Nikula 508b76864c ASoC: tlv320aic3x: Don't sync first two registers from register cache
There is no need to sync first two registers from cache to hw after a reset.
First one is used to select page for register access and this driver is
normally accessing page 0 only. Second one does a software reset which is
obviously unneeded after hardware or previous software reset command.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-23 10:36:43 +01:00
Mark Brown de0853c000 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.40 2011-05-22 10:31:51 +08:00
Jarkko Nikula 2b39535b9e ASoC: core: Don't set "(null)" as a driver name
Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name")
writes "(null)" to driver name string in struct snd_card if card->driver_name
is NULL. This causes segmentation faults with some user space ALSA utilities
like aplay and arecord.

Fix this by using the card->name if no driver name is specified.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-22 10:31:11 +08:00
Michael Williamson 2aba76f014 audio: tlv320aic26: fix PLL register configuration
The current PLL configuration code for the tlc320aic26 codec appears to assume a
hardcoded system clock of 12 MHz.  Use the clock value provided by the DAI_OPS
API for the calculation.

Tested using a MityDSP-L138 platform providing a 24.576 MHz clock.

Signed-off-by: Michael Williamson <michael.williamson@criticallink.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-21 12:07:56 +01:00
Dimitris Papastamos 7e146b5586 ASoC: soc-cache: Cache a pointer to the last accessed rbnode
Whenever we are doing a read or a write through the rbtree code, we'll
cache a pointer to the rbnode.  To avoid looking up the register
everytime we do a read or a write, we first check if it can be found in
the cached register block, otherwise we traverse the rbtree and finally
cache the rbnode for future use.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:22:06 +01:00
Dimitris Papastamos 0944cc392e ASoC: soc-cache: Block based rbtree compression
This patch prepares the ground for the actual rbtree optimization patch
which will save a pointer to the last accessed rbnode that was used
in either the read() or write() functions.

Each rbnode manages a variable length block of registers.  There can be no
two nodes with overlapping blocks.  Each block has a base register and a
currently top register, all the other registers, if any, lie in between these
two and in ascending order.

The reasoning behind the construction of this rbtree is simple.  In the
snd_soc_rbtree_cache_init() function, we iterate over the register defaults
provided by the driver.  For each register value that is non-zero we
insert it in the rbtree.  In order to determine in which rbnode we need
to add the register, we first look if there is another register already
added that is adjacent to the one we are about to add.  If that is the case
we append it in that rbnode block, otherwise we create a new rbnode
with a single register in its block and add it to the tree.

In the next patch, where a cached rbnode is used by both the write() and the
read() functions, we also check if the register we are about to add is in the
cached rbnode (the least recently accessed one) and if so we append it in that
rbnode block.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:21:53 +01:00
Stephen Warren 0dfe8da492 ASoC: Tegra: Fix compile when debugfs not enabled
The prototype of the inline dummy version of tegra_i2s_debug_add
was not consistent with the real version.

Reported-by: Rhyland-Klein <rklein@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:20:13 +01:00
Stephen Warren 6ae759e889 ASoC: spdif-dit: Add missing MODULE_*
MODULE_ALIAS is required so that the module will auto-load based on a
platform_device registration in the board file.

While we're at it, add some other MODULE_*.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20 11:19:29 +01:00
Takashi Iwai 4a787a3ff3 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-05-20 11:25:32 +02:00
Ben Gardiner a0c8326397 ASoC: davinci-mcasp: enable ping-pong SRAM buffers
The davinci-i2s driver copies the platform data for playback and capture
sram sizes which is in turn used by davinci-pcm to allocate ping-pong
buffers.

Copy also the platform data in davinci-mcasp probe.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:11:17 -07:00
Dmitry Artamonow c26f642e26 ASoC: add iPAQ hx4700 machine driver
AK4641 connected via I2S and I2C, jack detection via GPIO.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:10:59 -07:00
Dmitry Artamonow 00d2701070 ASoC: Asahi Kasei AK4641 codec driver
A driver for the AK4641 codec used in iPAQ hx4700 and Glofiish M800
among others.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-19 14:10:45 -07:00
Taylor Hutt 5394942535 ASoC: Max98095: Move existing NULL check before pointer dereference.
Visual inspection shows that max98095_put_eq_enum() and
max98095_put_bq_enum() each have a possible NULL deref of 'pdata'.

This change moves the NULL check above the use.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Acked-by: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-18 09:33:27 -07:00
Tony Lindgren b08827f4c7 Merge branches 'devel-fixes', 'devel-cleanup' and 'devel-genirq' into for-next 2011-05-17 03:44:50 -07:00
Stephen Boyd 34e268d87d ASoC: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:

In file included from arch/x86/include/asm/uaccess.h:573,
                 from include/linux/poll.h:14,
                 from include/sound/pcm.h:29,
                 from include/sound/ac97_codec.h:31,
                 from sound/soc/soc-core.c:34:
In function 'copy_from_user',
    inlined from 'codec_reg_write_file' at
    sound/soc/soc-core.c:252:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct

presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.

Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-16 13:21:41 -07:00
Jarkko Nikula 9d03545d88 ASoC: Fix wrong data type access in a few codec drivers
Commit fafd217 ("ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol")
changed the control private data type that is passed to snd_soc_cnew when
creating dapm mixer and mux controls. Commit did not update a few codec
drivers that are using their own put callbacks and thus are accessing a
wrong data type.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-16 09:06:47 -07:00
Mark Brown fa63e477dd ASoC: Don't restart an already running WM8958 DSP2
Don't want to upset the DSP.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:55:52 -07:00
Mark Brown d7fdae7c65 ASoC: Skip noop reconfiguration of WM8958 DSP2 algorithms
If we're setting the currently applied value for one of the DSP algorithm
configurations we can just skip all the handling as the control set is a
noop. This ensures we do not disrupt a running DSP.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:55:20 -07:00
Mark Brown fb5af53d42 ASoC: Add some missing volume update bit sets for wm_hubs devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-05-16 08:54:47 -07:00
Mark Brown d0b48af6c2 ASoC: Ensure output PGA is enabled for line outputs in wm_hubs
Also fix a left/right typo while we're at it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com.
Cc: stable@kernel.org
2011-05-16 08:54:20 -07:00
Kukjin Kim 4b42120df7 ASoC: Remove to support sound for S5P6442
According to removing ARCH_S5P6442, we don't need to support
sound for S5P6442.

Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-16 14:04:41 +09:00
Jin Park 25709f6d83 ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2
Added digital mute function in DAI1 and DAI2.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:26:36 -07:00
Jin Park 938b4fbc91 ASoC: codecs: max98088: Moved the EX Limiter Mode from dapm widget to control
Moved the EX Limiter Mode from dapm widget to control, because it was not
required DAPM route.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:26:26 -07:00
Jin Park 770939c37f ASoC: codecs: max98088: Fixed invalid register definitions in mixer controls
Fixed invalid register definitions in mixer controls such as left
speaker mixer, left hp mixer and left rec mixer.

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-15 21:25:46 -07:00
Mark Brown f7391fce6a ASoC: Reintroduce do_spi_write()
There is an unfortunate difference in return values between spi_write()
and i2c_master_send() so we need an adaptor function to translate.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-15 08:50:59 -07:00
Tony Lindgren 91d94af56a omap: Remove support for omap2evm
The board support has never been merged for it as noticed
by Russell King <linux@arm.linux.org.uk>. So let's remove the
related dead code.

Cc: linux-fbdev@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-13 04:41:32 -07:00
Sanjeev Premi d491297752 ASoC: omap-mcbsp: Remove restrictive checks for cpu type
Current checks for cpu type were too restrictive leading
to failures for other silicons in same family.

The problem was found while testing audio playback on
AM37x and AM35x processors. But should exist on OMAP36xx
as well.

Signed-off-by: Sanjeev Premi <premi@ti.com>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
cc: Liam Girdwood <lrg@ti.com>
cc: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 12:00:15 +01:00
Peter Ujfalusi b417382419 ASoC: omap-pcm: Period wakeup disabling on OMAP2+
Allow disabling ALSA period wakeup interrupts.
This can only be done on OMAP2+ (2/3/4), since there
we can chain the DMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 12:00:14 +01:00
Liam Girdwood 1f71a3ba8f ASoC: twl6040 - fix LINEGAIN volume control
Fix the TWL6040 LINEGAIN volume control to match the TRM.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 11:49:39 +01:00
Misael Lopez Cruz d5e4b0adf6 ASoC: DMIC codec - Add input widget
Digital microphones can have some additional elements in their
audio path (like microphone bias). An input widget is required
for digital microphone CODEC driver to allow external connections
in machine drivers.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-12 17:40:05 +02:00
Liam Girdwood 22de71ba03 ASoC: core - allow ASoC more flexible machine name
Allow ASoC machine drivers to register a driver name
and a longname. This allows user space to determine
the flavour of machine driver.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-12 17:40:03 +02:00
Mark Brown ed0bd2333c ASoC: Update cx20442 for TTY API change
receive_buf() was recently changed to return the number of bytes
received but the cx20442 driver wasn't updated to match the new API.
I don't have any hardware but since we don't actually appears to be
listening to the data at all just report that we accepted all the data
that was offered to us.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-11 15:11:21 -07:00
Randy Dunlap 9e53d856af ASoC: fix wm8958-dsp2 printk format warnings
Fix printk format warnings in wm8958-dsp2.c:

sound/soc/codecs/wm8958-dsp2.c:103: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
sound/soc/codecs/wm8958-dsp2.c:111: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
sound/soc/codecs/wm8958-dsp2.c:144: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-11 18:15:54 +02:00
Peter Ujfalusi 0ac3a014b8 ASoC: RX51: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:52:02 +01:00
Peter Ujfalusi 1c7687b995 ASoC: omap-pcm: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:15:18 +01:00
Peter Ujfalusi 56a8742916 ASoC: omap-mcbsp: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:57 +01:00
Peter Ujfalusi b4079ef40a ASoC: tpa6130a2: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:45 +01:00
Peter Ujfalusi 93864cf042 ASoC: tlv320dac33: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:35 +01:00
Mark Brown ca629928b9 ASoC: Disable WM8994/58 microphone detection over suspend
It will be non-functional with the basises and clocks off anyway, if the
system needs microphone detection enabled over suspend then it should be
causing the CODEC to ignore suspend using the APIs for that to prevent
the biases being disabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:56:32 +02:00
Mark Brown 6e28f976ec ASoC: Use spi_write() for SPI writes
do_spi_write() is just an open coded copy of do_spi_write() so we can
delete it and just call spi_write() directly.  Indeed, as a result of
recent refactoring all the SPI write functions are just very long
wrappers around spi_write() which don't add anything except for some
pointless copies so we can just use spi_write() as the hw_write
operation directly. It should be as type safe to do this as it is to do
the same thing with I2C and it saves us a bunch of code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:56:03 +02:00
Mark Brown 063b7cc43f ASoC: Remove byte swap in 4x12 SPI write
snd_soc_4_12_spi_write() contains a byte swap. Since this code was written
for an Analog CODEC on a Blackfin reference board it appears that this is
done because while Blackfin is little endian the CODEC is big endian (as
are most CODECs).

Push this up into the generic 4x12 write function and use cpu_to_be16() to
do the byte swap so things are more regular and things work on both CPU
endiannesses.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:55:45 +02:00
Mark Brown 051e994e95 ASoC: Don't squash 16x8 registers down to 8 bits
Currently we'll force all registers to fit in 8 bits before passing
down to the I/O function. Looks like a cut'n'paste bug.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:55:06 +02:00
Mark Brown 3afb1b3e6f ASoC: Fix NULL vs. 0 warning in SSM2602
sparse complains if 0 is used as a NULL pointer constant.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-11 15:24:05 +02:00
Mark Brown 0f3c6af921 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-10 15:58:17 +02:00
Stephen Warren 61bf35b9a3 ASoC: WM8903: Fix Digital Capture Volume range
Increase the range of the Digital Capture Volume control to be 120 steps.
Each step is 0.75dB, and the range starts at -72dB, giving a max setting
of 18dB, which matches the latest datasheet, to the precision of the step
size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-10 11:48:33 +02:00
Takashi Iwai 1209842af4 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2011-05-10 09:24:50 +02:00
Takashi Iwai f0a2b0cb71 Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-05-10 09:20:19 +02:00
Lars-Peter Clausen f3eee00da3 ASoC: SSM2602: Provide dB ranges for the volume controls
Also fix the maximum value for the capture volume control.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:26 +02:00
Lars-Peter Clausen 2a43801a76 ASoC: SSM2602: Model power supply for the digital core as a DAPM widget
Model the power supply for the digital core as a DAPM_SUPPLY widget. This allows
to cleanup the code a bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:17 +02:00
Lars-Peter Clausen 7dcf2760bf ASoC: SSM2602: Add entry for the ssm2603 to the device id table
The SSM2603 is mostly register compatible with the SSM2602 and can be supported
by the current driver without any changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:09 +02:00
Lars-Peter Clausen b1f7b2b56b ASoC: SSM2602: Add SSM2604 support
The SSM2604 is basically a lightweight variant of the SSM2602 with a compatible
register layout. Thus we can easily support both devices by the same driver,
by providing a slightly set of controls, widgets and routes.

Compared to the SSM2602 the SSM2604 has no microphone input and no headphone
output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:45:01 +02:00
Lars-Peter Clausen f6c1f2d5e5 ASoC: SSM2602: Do not power the codec up in probe
It is not required to have the codec powered at this stage and DAPM will power
the ADC and DAC down again after probe has run anyway.
Thus we avoid some unnecessary writes by this change.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:44:54 +02:00
Lars-Peter Clausen 7164bdb643 ASoC: SSM2602: Fix default register cache
Some of the values in the default register cache did not represent the codecs
state after reset. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 01:44:45 +02:00
Mark Brown afd8f37c80 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-08 15:33:41 +01:00
Marek Belisko bf707de21f ASoC: UDA134x: Remove POWER_OFF_ON_STANDBY define.
Define POWER_OFF_ON_STANDBY cause trobles when trying to get some
sound from codec because code for bias setup was not compiled
(define wasn't defined). This define was removed in commit:
cc3202f5 but again introduced by commit: f0fba2ad1 which then
completely break codec functionality so remove it again.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-08 15:27:48 +01:00
Lars-Peter Clausen 5663940e2a ASoC: SSM2602: Remove unused struct and define
Those are leftovers from a pre-multicomponent era.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:11 +01:00
Lars-Peter Clausen ffd13c39c7 ASoC: SSM2602: Remove duplicate control
There are currently two controls which allow selecting the capture source, one
as a normal control, the other as part of a DAPM_MUX widget.
Remove the normal control.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:11 +01:00
Lars-Peter Clausen 0b4cd2e01c ASoC: SSM2602: Cleanup coeff handling
Drop unused field from the coeff struct, precalculate the srate register at
compile-time and cleanup up the naming.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:44:05 +01:00
Mark Brown 5e8bc53b7c Merge branch 'for-2.6.39' into for-2.6.40 2011-05-08 14:43:18 +01:00
Lars-Peter Clausen 8fc63fe941 ASoC: SSM2602: Fix reg_cache_size
reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:42:21 +01:00
Lars-Peter Clausen 36c90ab33f ASoC: SSM2602: Fix 'Mic Boost2' control
The 'Mic Boost2' control's shift was off by one and thus was not working.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-05-08 14:42:15 +01:00
Lars-Peter Clausen 04b894553f ASoC: SSM2602: Properly annotate i2c probe and remove functions
Annotate the i2c probe and remove functions with __devinit and __devexit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:41:34 +01:00
Dimitris Papastamos 64d2706975 ASoC: soc-cache: Allow codec->cache_bypass to be used with snd_soc_hw_bulk_write_raw()
If we specifically want to write a block of data to the hw bypassing the
cache, then allow this to happen inside snd_soc_hw_bulk_write_raw().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:38:31 +01:00
Lars-Peter Clausen 77530150fb ASoC: Create codec DAPM widgets before calling the codecs probe function
This allows to create DAPM routes depending on those widgets in the
codecs probe function.  This is helpful when supporting similar codecs
with minor differences in the DAPM routing with the same driver.

Something similar has already been done for cards in commit
a841ebb9 (ASoC: Create card DAPM widgets early so they can be used in
callbacks).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-08 14:38:08 +01:00
Mark Brown 20ed0938bf Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 23:30:36 +01:00
xingchao 9ab88434e8 ASoC: sst_platform: add hw_free callback to fix resource leak
Signed-off-by: xingchao <xingchao.wang@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 23:29:54 +01:00
Mark Brown e1a0206608 ASoC: Remove outdated FIXME from WM8915
Actually the current code is perfectly sensible given the hardware.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:29:28 +01:00
Mark Brown abc9d5aa08 ASoC: Use shared controls for input signal path in WM8915
Gives finer grained power management.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:29:08 +01:00
Mark Brown ed77cc122a ASoC: Don't crash on PM operations
The move over to exposing snd_soc_register_card() let the initialisation
of the driver data we use to find the card in PM operations go AWOL. Fix
this by setting the driver data when we register the card.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-03 23:28:04 +01:00
Stephen Warren af46800b9a ASoC: Implement mux control sharing
Control sharing is enabled when two widgets include pointers to the
same kcontrol_new in their definition. Specifically:

static const struct snd_kcontrol_new adcinput_mux =
	SOC_DAPM_ENUM("ADC Input", adcinput_enum);

static const struct snd_soc_dapm_widget wm8903_dapm_widgets[] = {
  SND_SOC_DAPM_MUX("Left ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
  SND_SOC_DAPM_MUX("Right ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
};

This is useful when a single register bit or field affects multiple
muxes at once. The common case is to have separate control bits or
fields for each mux (channel). An alternative way of looking at this
is that the mux is a stereo (or even n-channel) mux, rather than
independant mono muxes.

Without this change, a separate kcontrol will be created for each
DAPM_MUX. This has the following disadvantages:

* Confuses the user/programmer with redundant controls that don't
  map to separate hardware.

* When one of the controls is changed, ASoC fails to update the DAPM
  logic for paths solely affected by the other controls impacted by
  the same register bits. This causes some paths not to be correctly
  powered up or down. Prior to this change, to work around this, the
  user or programmer had to manually toggle all duplicate controls away
  from the intended setting, and then back to it.

Control sharing implies that the control is named based on the
kcontrol_new itself, not any of the widgets that are affected by it.

Control sharing is implemented by: When creating kcontrols, if a
kcontrol does not yet exist for a particular kcontrol_new, then a new
kcontrol is created with a list of widgets containing just a single
entry. This is the normal case. However, if a kcontrol does already
exists for the given kcontrol_new, the current widget is simply added
to that kcontrol's list of affected widgets.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:29:15 +01:00
Stephen Warren fafd2176f7 ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol
A future change will allow multiple widgets to be affected by the same
control. For example, a single register bit that controls separate muxes
in both the L and R audio paths.

This change updates the code that handles relevant controls to be able
to iterate over a list of affected widgets. Note that only the put
functions need significant modification to implement the iteration; the
get functions do not need to iterate, nor unify the results, since all
affected widgets reference the same kcontrol.

When creating the list of widgets, always create a 1-sized list, since
the control sharing is not implemented in this change.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:29:05 +01:00
Stephen Warren fad598887d ASoC: Add w->kcontrols, and populate it
Future changes will need reference to the kcontrol created for a given
kcontrol_new. Store the created kcontrol values now.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:28:57 +01:00
Stephen Warren 82cfecdc03 ASoC: s/w->kcontrols/w->kcontrol_news/g
A future change will modify struct snd_soc_dapm_widget to store the
actual kcontrol pointers for each kcontrol_new in a field named
kcontrols. Rename the existing kcontrols field to enable this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 19:28:47 +01:00
Mark Brown 65f7e32520 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 19:07:45 +01:00
Lars-Peter Clausen 005967a1df ASoC: JZ4740: Fix i2s shutdown
The i2s shutdown callback has the check whether it should be disabled reversed.
Currently it is disabled if another stream is still active, but kept enabled if
the last stream is closed. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:48:24 +01:00
Lars-Peter Clausen 6c45e12656 ASoC: Remove DAPM debugfs entries before freeing widgets
Remove the DAPM debugfs entries before freeing the context's widgets, otherwise a
use after free situation might occur.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:52 +01:00
Lars-Peter Clausen d5d1e0bef4 ASoC: Move DAPM widget debugfs entry creation to snd_soc_dapm_new_widgets
Currently debugfs entries for a DAPM widgets are only added in
snd_soc_dapm_debugfs_init. If a widget is added later (for example in the
dai_link's probe callback) it will not show up in debugfs.
This patch moves the creation of the widget debugfs entry to
snd_soc_dapm_new_widgets where it will be added after the widget has been
properly instantiated.

As a side-effect this will also reduce the number of times the DAPM widget list
is iterated during a card's instantiation.

Since it is possible that snd_soc_dapm_new_widgets is invoked form the codecs or
cards probe callbacks, the creation of the debugfs dapm directory has to be
moved before these are called.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:44 +01:00
Lars-Peter Clausen 8eecaf6244 ASoC: Move DAPM debugfs directory creation to snd_soc_dapm_debugfs_init
Move the creation of the DAPM debugfs directory to snd_soc_dapm_debugfs_init
instead of having the same duplicated code in both codec and card DAPM setup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:32 +01:00
Lars-Peter Clausen 0aaae527c7 ASoC: Free the card's DAPM context
Free the card's DAPM context when the card is removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:43:15 +01:00
Mike Rapoport 1307394afd ASoC: tegra: TrimSlice machine support
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03 18:42:44 +01:00
Mark Brown 9b1b937c77 ASoC: Don't specify the DMA driver for Goni baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:11:06 +01:00
Mark Brown 3784019af3 ASoC: Don't specify the DMA driver for OpenMoko baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:11:00 +01:00
Mark Brown dd4028c59e Merge branch 'for-2.6.39' into for-2.6.40 2011-04-28 12:10:25 +01:00
Mark Brown 69b91bc155 ASoC: Fix CODEC DAI names for Goni
Immediately after sending the last fix I realised that the CODEC DAI names
also don't correspond to the WM8994 driver. Update the DAI names to match.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:53 +01:00
Mark Brown 1270b01f75 ASoC: Fix CODEC name in Goni
This was typoed at some point in the multi-component merge, though the
driver was added along with that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:41 +01:00
Mark Brown fb257897bf ASoC: Work around allmodconfig failure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-28 12:09:06 +01:00
Mark Brown 6be449e53d ASoC: Implement WM8962 ADC high pass filter configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:13 +01:00
Lars-Peter Clausen 91a5fca4b1 ASoC: Add dapm_find_widget helper
This patch adds a helper function for searching DAPM widgets by name.
This allows to streamline functions which operate on widgets by name.
It also allows to get rid of copy'n'pasted code which was added to fallback to
widgets from other contexts if the widget was not found in the current context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-27 22:33:13 +01:00
Mark Brown b864a8c9dd ASoC: Don't specify the DMA driver for Speyside baseband link
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:12 +01:00
Mark Brown 848dd8beef ASoC: Add more natural support for no-DMA DAIs
Since we can now support multiple platforms allow machines to not specify
a platform in a DAI link. Since the rest of the code requires that we have
a struct device for all objects we do this by substituting in a dummy
device that we register automatically.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:33:11 +01:00
Mark Brown 8842c72afe ASoC: Allow platform drivers to have no ops structure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-27 22:10:55 +01:00
Mark Brown 5357e8f505 ASoC: Don't warn if the WM8962 SYSCLK FLL setting doesn't match reality
When bringing up audio low power modes boards may configure SYSCLK before
they actually start the FLL as we do much of the clocking setup prior to
the power up sequence.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:49:17 +01:00
Mark Brown e47ac37c01 ASoC: Implement WM8962 DMIC support
DMIC support is automatically disabled when none of the GPIOs are set up
to bring out the DMICCLK and DMICDAT pins at startup.

Note that there's no support for controlling DMIC routing except the power
control so the board DAPM configuration will need to manage DMIC enable and
disable if analogue mics (eg, a headset) also exist.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:49:09 +01:00
Mark Brown 92a4352cdb ASoC: Move WM8962 FLL configuration to CODEC
There's only one DAI anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:48:54 +01:00
Mark Brown 3b8a6d80e5 ASoC: Support FLL lock interrupt on WM8962
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:48:37 +01:00
Mark Brown c5f336cc00 ASoC: Support 24.576MHz MCLKs in WM8915
We can safely divide these down to within the supported SYSCLK range.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:48:26 +01:00
Mark Brown f9f4b1c71d Merge branch 'for-2.6.39' into for-2.6.40 2011-04-26 11:46:47 +01:00
Ben Gardiner db92f43745 davinci-mcasp: fix _CBM_CFS pin directions
The current davinci_mcasp_set_dai_fmt() sets bits ACLKX and ACLKR in the PDIR
register for the codec clock-master/frame-slave mode; however, this results in
the ACLKX and ACLKR pins being outputs according to SPRUFM1 [1]  which
conflicts with "codec is clock master."

Similarly to the previous patch in this series, "fix _CBM_CFS hw_params" --
For codec clock-master/frame-slave mode (_CMB_CFS), clear bits ACLKX and ACLKR
in the PDIR register to set the pins as inputs and hence allow externally
sourced bit-clocks.

[1] http://www.ti.com/litv/pdf/sprufm1

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:43:53 +01:00
Ben Gardiner a90f549e25 davinci-mcasp: fix _CBM_CFS hw_params
The current davinci_mcasp_set_dai_fmt() sets bits ACLKXE and ACLKRE (CLKXM
and CLKRM as they are reffered to in SPRUFM1 [1]) for codec clock-slave/
frame-slave mode (_CBS_CFS) which selects internally generated bit-clock and
frame-sync signals; however, it does the same thing again for codec
clock-master/frame-slave mode (_CBM_CFS) in the very next case statement which
is incorrectly selecting internally generated bit-clocks in this mode.

For codec clock-master/frame-slave mode (_CBM_CFS), clear bits ACLKXE and
ACLKRE to select externally-generated bit-clocks.

[1] http://www.ti.com/litv/pdf/sprufm1

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:43:38 +01:00
Ben Gardiner 9595c8f035 davinci-mcasp: use bitfield definitions for PDIR
The current driver creates value for set/clr of PDIR using (x<<26) instead
of the #defines that are convieniently made available.

Update the driver to use the bitfield definitions of PDIR. There is no
functional change introduced by this patch.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:43:29 +01:00
Ben Gardiner 049cfaaa47 ASoC: davinci-mcasp: correct tdm_slots limit
The current check for the number of tdm-slots specified by platform data is
always true (x >= 2 || x <= 32); therefore the else branch that warns of an
incorrect number of slots can never be taken.

Check that the number of tdm slots specified by platform data is between 2
and 32, inclusive.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:43:19 +01:00
Kuninori Morimoto 1f5e2a319d ASoC: sh: fsi: Add module/port clock control function
The FIFO of each port were always working though it was not used
in current FSI driver.
This patch add module/port clock control function for fixing it.
This patch is also caring suspend/resume.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:42:11 +01:00
Kuninori Morimoto 106c79ecf2 ASoC: sh: fsi: add dev_pm_ops :: suspend/resume
Current FSI driver sets important settings when probing.
And it are not set again as long as driver is not bind again.
This mean FSI driver will lost it from register
if suspend/resume are happen.
This patch save important settings for suspend/resume.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:42:06 +01:00
Kuninori Morimoto 6a9ebad821 ASoC: sh: fsi: add fsi_is_clk_master function
If FSI port is clock master, it use set_rate function
which is callback from platform,
and it is not necessary to call it if FSI port is clock slave.
Current FSI driver called this callback if platform provide it.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <simon@horms.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26 11:40:55 +01:00
Mark Brown 5debd6c14c ASoC: Remove default settings from Tegra Kconfig
There needs to be a strong reason for overriding the Kconfig default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26 11:26:44 +01:00
Mark Brown a9e3de6f9f Merge branch 'tegra' into for-2.6.40
Fix up merge with Harmony driver rename.

Conflicts:
	sound/soc/tegra/Kconfig
2011-04-21 12:00:27 +01:00
Stephen Warren 47912a657e ARM: Tegra: select MACH_HAS_SND_SOC_TEGRA_WM8903
CONFIG_SND_SOC_TEGRA_WM8903 is useful for many Tegra boards. To avoid the
ASoC tegra/Kconfig enumerating them all, instead have the Tegra machine
Kconfig select MACH_HAS_SND_SOC_TEGRA_WM8903 where appropriate, and have
SND_SOC_TEGRA_WM8903 depend on this.

[Redid ASoC diff so it applies. -- broonie]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-21 11:57:31 +01:00
Stephen Warren 97945c46a2 ASoC: WM8903: Implement DMIC support
In addition to the currently supported analog capture path, the WM8903
also supports digital mics.

The analog and digital capture paths are exclusive; a mux is present to
select the capture source.

Logically, the mux exists to select the decimator's input, from either
the ADC or DMIC block outputs. However, the ADC power domain also
includes the DMIC interface. Consequently, this change represents the
mux as existing immediately before the ADC, and selecting between the
Input PGA and DMIC block outputs.

An alternative might be to represent the mux in its correct location,
and associate the ADC power enable controls with both the real ADC, and
a fake ADC for the DMIC?

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 14:00:35 +01:00
Peter Hsiang dad31ec133 ASoC: Add EQ and filter to max98095 CODEC driver
This patch adds the equalizer and biquad filter controls.

Signed-off-by: Peter Hsiang <peter.hsiang@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:41 +01:00
Stephen Warren dea8b6eef0 ASoC: Tegra: wm8903: s/code/data/ for control/widget/maps
Replace calls to a variety of registration functions by updating
struct snd_soc_card snd_soc_tegra_wm8903 to directly point at the
various control/widget/map tables instead. The ASoC core now
performs any required registration based on these data fields.

(Applying Mark's TrimSlice review comments to the existing driver)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:36 +01:00
Lu Guanqun a739362362 ASoC: fix two ident style problems
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:29 +01:00
Lu Guanqun f9861e17bd ASoC: remove unused comment
`type` parameter is not longer used in `snd_soc_codec_set_cache_io`,
so remove this line.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:16 +01:00
Lu Guanqun dc2bea616a ASoC: fix a simple coding style issue
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:11 +01:00
Stephen Warren a68b38ada5 ASoC: snd_soc_dapm_get_pin_status: Match other contexts too
Not all widgets on a card are within the codec's DAPM context. Fix
snd_soc_dapm_get_pin_status to search all contexts when looking for a
widget.

This change is required when modifying tegra_wm8903 to use
snd_soc_card.widgets rather than calling snd_soc_dapm_new_controls; the
former adds the widgets to the card's DAPM context, whereas tegra_wm8903
uses the codec's DAPM context when calling snd_soc_dapm_new_controls.

By code inspection, I suspect this also applies to Samsung Speyside.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:06 +01:00
Stephen Warren a32955dba2 ASoC: Tegra: Retrieve card from DAPM context not codec
Card widgets are created in the card's DAPM context, not any codec's DAPM
context. Hence, w->codec==NULL. Instead, find the card from the widget
through the DAPM context of the widget, not the codec of the widget.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:50:01 +01:00
Stephen Warren 075413966a ASoC: Tegra: Don't return mclk_changed from utils_set_rate
Only the clock programming code needs to know whether the clocks changed,
and that is encapsulated within tegra_asoc_utils_set_rate(). The machine
driver's call to snd_soc_dai_set_sysclk(codec_dai, ...) is safe
irrespective of whether the clocks changed.

(Applying Mark's TrimSlice review comments to the existing driver)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:49:55 +01:00
Stephen Warren acb8303f15 ASoC: Tegra: wm8903: Remove redundant drvdata clears
When the driver is not initialized/registered, nothing should be touching
these fields anyway, so there's no point clearing them out.

(Applying Mark's TrimSlice review comments to the existing driver)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:49:50 +01:00
Stephen Warren d9e3c4cc68 ASoC: Tegra: wm8903 probe: Don't call machine_is_*()
This machine driver is a platform driver, and hence will only be
instantiated on the correct machines. Hence, there is no need to
check the current machine during probe.

(Applying Mark's TrimSlice review comments to the existing driver)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20 13:49:35 +01:00
Stephen Warren 773b1d3d31 ASoC: Tegra: Support more boards
* Ventana is identical to Harmony.
* Seaboard, Kaen, and Aebl are all pretty similar, mainly with slightly
  different sets of GPIOs, and slightly different WM8903 pin connectivity.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 21:34:16 +01:00
Stephen Warren 3eb25f998d ASoC: Tegra: Don't store snd_soc_jack_gpio in an array
Storing the struct in an array makes the assignments to the GPIO member a
little non-obvious, and is pointless when there's only a single GPIO.

(I thought I fixed this during the review cycle when first submitting this
driver, but I guess I overlooked that)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 21:34:03 +01:00
Stephen Warren 2ba9471b34 ASoC: Tegra: Rename Kconfig SND_TEGRA_SOC_* to SND_SOC_TEGRA_*
The previous commit renames SND_TEGRA_SOC_HARMONY to SND_TEGRA_SOC_WM8903.
While we're breaking people's .config files, rename all Tegra/SOC-related
Kconfig variables to be more consistent with at least the core codec
variables. Note that there exist machines that name their variables both
ways.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 21:33:54 +01:00
Stephen Warren dc0a50afa6 ASoC: Tegra: Rename harmony.c to tegra_wm8903.c
Soon, this machine driver will be updated to handle a number of Tegra boards
using the WM8903 codec. Rename the file in advance to reflect this.

Fix the content of tegra_wm8903.c to match the rename; replace references
to Harmony board with something more generic.

* s/struct tegra_harmony/struct tegra_wm8903/
* s/harmony/machine/ # variable name
* Similar rename for some functions
* Similar comment fix
* Similar MODULE_DESCRIPTION fix

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 21:33:42 +01:00
Mark Brown c6d46678a1 Merge branch 'tegra' into for-2.6.40 2011-04-18 18:08:22 +01:00
Mark Brown d5381e42f6 ASoC: Merge branch 'for-2.6.39' into for-2.6.40
Fix trivial conflict caused by silly spelling fix patch.

Conflicts:
	sound/soc/codecs/wm8994.c
2011-04-18 18:07:43 +01:00
Stephen Warren 7b33af252f ASoC: Tegra: Rename pdev tegra-snd-harmony to tegra-snd-wm8903
Soon, this machine driver will be updated to handle a number of Tegra boards
using the WM8903 codec. Rename the platform device in advance to reflect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:54:09 +01:00
Stephen Warren 4651d55668 ARM: Tegra: Rename harmony_audio.h -> tegra_wm8903_pdata.h
The audio driver will soon support more than just the Tegra Harmony board.
Rename the platform data header file and data type to reflect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:54:05 +01:00
Guennadi Liakhovetski b3c27b51db ASoC: add a module alias to the FSI driver
This patch enables FSI driver autoloading on sh-mobile systems.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Simon Horman <horms@verge.net.au
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:14:28 +01:00
Mark Brown fac56c2df5 Merge commit 'v2.6.39-rc3' into for-2.6.39 2011-04-18 17:12:14 +01:00
Lars-Peter Clausen 674479124f ASoC: codecs: JZ4740: Convert to table based controls and DAPM setup
Use the newly introduced dapm_widgets, dpam_routes and controls fields of the
snd_soc_dai_driver struct to setup controls and DAPM.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13 10:35:03 -07:00
Lars-Peter Clausen 621206b768 ASoC: JZ4740: qi_lb60: Use the SND_SOC_DAPM_EVENT_OFF for the speakers status
Use SND_SOC_DAPM_EVENT_OFF for determining whether the speaker should be turned
on or off instead of open coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13 10:34:54 -07:00
Lars-Peter Clausen c6f0ede7c5 ASoC: JZ4740: qi_lb60: Use gpio_request_array to request and setup gpios
This patch changes the qi_lb60 setup code to use gpio_request_array instead of
manually calling gpio_request and gpio_direction_output for each gpio.
Doing so makes the code a bit more compact.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13 10:34:43 -07:00