Commit Graph

44 Commits

Author SHA1 Message Date
Takashi Iwai e854df613f Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2010-06-02 14:17:44 +02:00
Sascha Hauer 29512c95b5 ASoC: MX31ads sound support should depend on MACH_MX31ADS_WM1133_EV1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 18:11:38 +01:00
Sascha Hauer fc9cbe3998 ASoC: Add missing Kconfig entry for Phytec boards
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31 18:05:33 +01:00
Takashi Iwai 274a24c16f Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2010-05-27 09:46:10 +02:00
Stuart Longland e2b3e622b2 ASoC: Update Freescale i.MX SSI driver DMA parameter handling
This updates the i.MX SSI driver to make it compatible with the ASoC tree
following the move of DMA parameters from the DAI to the audio substream
object.

Signed-off-by: Stuart Longland <redhatter@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-05-26 08:46:51 -07:00
Takashi Iwai d71f4cece4 Merge branch 'topic/asoc' into for-linus
Conflicts:
	sound/soc/codecs/ad1938.c
2010-05-20 12:00:43 +02:00
Mark Brown 890c681275 Merge branch 'for-2.6.34' into for-2.6.35 2010-04-17 10:45:54 +09:00
Takashi Iwai d336905e00 Merge branch 'fix/asoc' into for-linus 2010-04-16 10:03:36 +02:00
Sascha Hauer 8392609969 ASoC: imx-ssi: do not call hrtimer_disable in trigger function
Doing so causes a deadlock, so just signal the timer to stop
using an atomic variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-16 01:02:35 +09:00
Sascha Hauer 565a79f74a ASoC: imx-ssi: increase minimum periods to 4
Currently the notification of elapsed periods is not very exact.
Increase minimum periods to 4 as suggested by Liam Girdwood.

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

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-08 15:21:05 +01:00
Sascha Hauer 671999cb5d ASoC: imx-pcm-dma-mx2: restart DMA after an error
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-08 15:21:01 +01:00
Sascha Hauer 206b60e189 ASoC: imx-ssi: honor IMX_SSI_DMA flag
When checking if we are DMA capable we have to check for the
IMX_SSI_DMA flag which is already set from platform_data instead
of setting it again when we want to do DMA.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@Slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-08 15:20:57 +01:00
Linus Torvalds 84db18bbeb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: mixart: range checking proc file
  ALSA: hda - Fix a wrong array range check in patch_realtek.c
  ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
  ALSA: hda - Enable amplifiers on Acer Inspire 6530G
  ASoC: Only do WM8994 bias off transition from standby
  ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
  ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
  ASoC: Support second DC servo readback method for wm_hubs
  ASoC: Avoid wraparound in wm_hubs DC servo correction
  ALSA: echoaudio - Eliminate use after free
  ALSA: i2c: cleanup: change parameter to pointer
  ALSA: hda - Add MSI blacklist for Aopen MZ915-M
  ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code
  ALSA: hda - Update document about MSI and interrupts
  ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
  ALSA: hda - Add missing printk argument in previous patch
  ASoC: Fix passing platform_data to ac97 bus users and fix a leak
  ALSA: hda - Fix ADC/MUX assignment of ALC269 codec
  ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
  ASoC: wm8994: playback => capture
2010-04-07 08:42:25 -07:00
Daniel Mack 5f712b2b73 ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

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

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

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-05 19:14:11 +01:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

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

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

The script does the followings.

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

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

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

The conversion was done in the following steps.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Mark Brown 74511020dd Merge branch 'for-2.6.34' into for-2.6.35 2010-03-22 17:23:46 +00:00
Mark Brown 2f14430af5 ASoC: Move WM8350 microphone detection bias managment out of driver
Allow machines to control exactly when the bias is turned on and off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 17:21:38 +00:00
Mark Brown 3cc4e53f86 ASoC: Remove BROKEN from i.MX audio after dependencies merged
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 11:17:41 +00:00
Daniel Mack fd23b7dee5 ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

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

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

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-19 14:09:05 +00:00
Mark Brown 27648b2f1c ASoC: Correct typoed Mic2 connections on 1133-EV1 board
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 11:15:42 +00:00
Mark Brown fad837c16c Merge commit 'v2.6.34-rc1' into for-2.6.35 2010-03-10 15:02:37 +00:00
Mark Brown eeec124685 ASoC: Wolfson Microelectronics 1133-EV1 audio support
Initial support for audio using the 1133-EV1 audio and PMIC module for
the i.MX31ADS.  Currently only playback is supported, and the FIQ DMA
driver has performance problems at higher sample rates which cause
audible dropouts.

This driver is based heavily on an out of tree one written by Liam
Girdwood.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-03 17:08:11 +00:00
Mark Brown b4e82b5b78 ASoC: Check progress when reporting periods from i.MX FIQ handler
Currently the i.MX FIQ handler is reporting periods as elapsed based
purely on a timer running in the CPU. This means that any clock
mismatch between the CPU and the audio subsystem can result in the
status reported to applications drifting away from the actual status
of the hardware. This is particularly likely at present since the
SSI driver is only capable of operating in slave mode so it's very
likely that the interface will be clocked from a different source.

Instead check the offset reported by the FIQ and only notify when we
have transferred at least one period, re-firing the timer if we didn't
do so. Also factor out the calculation of the timer expiry time for
make it a bit easier to experiment with.

Note that this only improves the situation, problems can still be
triggered.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-25 15:25:07 +00:00
Mark Brown 9e4a10d27e ASoC: Remove a unused variables from i.MX FIQ runtime data
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-25 15:25:07 +00:00
Paul Menzel c6848bf566 ASoC: Typo. s/Freecale/Freescale/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 11:14:42 +00:00
Mark Brown 22313eafe9 ASoC: add phycore-ac97 sound support
This patch adds sound support for Phytec PhyCORE / PhyCARD
modules in AC97 mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 10:42:33 +00:00
Mark Brown b05f5c13d5 ASoC: Mark new i.MX drivers as BROKEN until arch/arm merged
Currently they don't build due to cross tree dependencies, they will be
reenabled once the arch/arm side has merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 16:45:06 +00:00
Mark Brown e919c24b64 ASoC: Remove old i.MX driver code
This has been superceeded by Sascha's new driver but was not removed in
the patch series due to cutdowns for review.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:10:03 +00:00
Mark Brown d08a68bfca ASoC: i.MX SSI driver does not yet support master mode
The clocks for the SSI block need handling before this can work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:10:02 +00:00
Mark Brown 48dbc41988 ASoC: Convert new i.MX SSI driver to use static DAI array
While dynamically allocated DAIs are the way forward the core doesn't
yet support anything except matching with a pointer to the actual DAI
so convert to doing that so that machine drivers don't have to jump
through hoops to register themselves.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
2010-01-17 11:10:01 +00:00
Mark Brown 157a777c8e ASoC: Fix i.MX audio build for i.MX3x
Don't unconditionally include the i.MX2x DMA driver, the arch/arm
functions it uses aren't available for i.MX3x.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
2010-01-17 11:10:01 +00:00
Sascha Hauer 8380222ec9 ASoC: Add a new imx-ssi sound driver
The old driver has the number of SSI units in the system hardcoded,
does not make use of the device model and works only on i.MX21/27.

This driver replaces it. It works in DMA mode on i.MX21/27 and using
an FIQ handler on other systems. It also supports AC97 mode of
the SSI units.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:09:46 +00:00
Roel Kluin 370066e2b1 ASoC: Wrong variable returned on error
The wrong variable was returned in the case of an error

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-08 12:46:11 +00:00
Mark Brown b727916a1f Merge branch 'for-2.6.32' into for-2.6.33 2009-10-08 10:45:09 +01:00
Mark Brown b266002abf ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
These should be handled via set_tdm_slot() now and cause build
failures as-is.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 19:26:57 +01:00
Mark Brown 85488037bb ASoC: Add source argument to PLL configuration
More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-05 18:52:16 +01:00
Mark Brown d555a552ae ASoC: Staticise unexported variables
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-15 11:36:49 +01:00
Mark Brown a2d512a978 ASoC: Remove unneeded i.MX dependency on SND
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-15 11:36:20 +01:00
javier Martin fbb474deda ASoC: Fix review issues in i.MX2x PCM driver
Signed-off-by: javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-05 22:31:55 +01:00
javier Martin 2ccafed43a ASoC: add machine driver for i.mx27_visstrim_m10 board
This adds support for i.mx27_visstrim_sm10 board machine driver which
uses an i.mx27 processor plus a wm8974 codec.

It has been tested on a visstrim_sm10 board.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-05 22:31:54 +01:00
javier Martin 9d8bc2968c ASoC: add DAI platform ssi driver for MXC
This adds support for DAI platform for the SSI present in MXC platforms.

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

It has been tested on i.MX27 board.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-05 22:31:54 +01:00
javier Martin fd6a6394d7 ASoC: add DMA platform driver for MX1x and MX2x
This adds support for DMA platform valid for i.MX1 and i.MX2 platforms.

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

It has been tested on i.MX27 board.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-05 22:31:54 +01:00