Commit Graph

114 Commits

Author SHA1 Message Date
Alexey Dobriyan 471452104b const: constify remaining dev_pm_ops
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:25 -08:00
Takashi Iwai 57648cd52b Merge branch 'topic/misc' into for-linus 2009-12-04 16:22:37 +01:00
Takashi Iwai 7959832483 Merge branch 'topic/core-change' into for-linus 2009-12-04 16:22:32 +01:00
Takashi Iwai cf5bd652c3 ALSA: aaci - Clean up duplicate code
Now snd_ac97_pcm_open() is called with the exactly same arguments
for both playback and capture directions.  Remove the unneeded check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-01 16:36:56 +01:00
Takashi Iwai ef47bf386e Merge branch 'fix/misc' into topic/misc 2009-12-01 08:36:05 +01:00
Russell King 8ee763b9c8 ALSA: AACI: fix recording bug
pcm->r[1].slots is the double rate slot information, not the
capture information.  For capture, 'pcm' will already be the
capture ac97 pcm structure.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-30 14:50:55 +01:00
Russell King 4acd57c3de ALSA: AACI: fix AC97 multiple-open bug
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-30 14:50:53 +01:00
Takashi Iwai d679732223 ALSA: Remove old DMA-mmap code from arm/devdma.c
The call of dma_mmap_coherent() is done in the PCM core now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-27 10:15:24 +01:00
Russell King 88cdca9c73 ALSA: AACI cleanup
Fix the buffer size calculation to use the size which ALSA is expecting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-23 09:44:10 +01:00
Philby John 29a4f2d31c ALSA: aaci: ARM1176 aaci-pl041 AC97 register read timeout
After a reboot on an ARM1176 which amounts to a softreset, it has been
noted that the ALSA driver does not get registered and the probe fails
with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process
of reading from a register the SL1TxBusy bit is set indicating that the
transceiver is busy and remains so until the default timeout occurs.
Set the Power down register 0x26 to an arbitrary value as specified in
the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take
their default state.

Signed-off-by: Philby John <pjohn@in.mvista.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 15:59:55 +02:00
Russell King 28f9f19db9 Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-09-21 16:02:30 +01:00
Mike Rapoport 2ba9fd0d15 [ARM] pxa: update pxa2xx-ac97.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-09-10 19:15:37 +08:00
Robert Schwebel 367da1527a ASoC: fix pxa2xx-ac97.c breakage
Today's linux-next fails to build with

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

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

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-04 20:19:56 +01:00
Marek Vasut e2365bf313 ASoC: Pass correct platform data from pxa2xx-ac97
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-23 18:18:01 +01:00
Mark Brown f8bae4caaa ALSA: Restore support for DMAless DAIs on PXA
Used for applications such as direct bluetooth connections on
smartphones which don't go via the CPU. This used to be supported
before the refactoring to share code but this check was removed
during that move.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-19 20:30:14 +01:00
Marek Vasut 4ac0478f2a ALSA: Allow passing platform_data for pxa2xx-ac97
This patch adds support for passing platform data to ac97 bus devices
from PXA2xx-AC97 driver..

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 22:19:37 +01:00
Daniel Mack b7d4de7ff0 ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Check for rtd->params->drcmr != NULL before accessing it.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-09 10:36:19 +01:00
Linus Walleij dc890c2dcd [ARM] 5544/1: Trust PrimeCell resource sizes
I found the PrimeCell/AMBA Bus drivers distrusting the resource
passed in as part of the struct amba_device abstraction. This
patch removes all hard coded resource sizes found in the PrimeCell
drivers and move the responsibility of this definition back to
the platform/board device definition, which already exist and
appear to be correct for all in-tree users of these drivers.
We do this using the resource_size() inline function which was
also replicated in the only driver using the resource size, so
that has been changed too. The KMI_SIZE was left in kmi.h in case
someone likes it. Test-compiled against Versatile and Integrator
defconfigs, seems to work but I don't posess these boards and
cannot test them.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-11 15:36:56 +01:00
Alessandro Rubini 03fbdb15c1 [ARM] 5519/1: amba probe: pass "struct amba_id *" instead of void *
The second argument of the probe method points to the amba_id
structure, so it's better passed with the correct type. None of the
current in-tree drivers uses the pointer, so they have only been
checked for a clean compile.

Change suggested by Russell King.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-05-20 23:26:51 +01:00
Mike Rapoport 1ffafeb556 pxa2xx-ac97: fix reset gpio mode setting
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-11 19:01:51 +01:00
Mark Brown eae17754ab [ARM] pxa: merge AC97 platform data structures
Currently there are two possible platform datas for the PXA AC97 driver:
one supported by the generic AC97 driver only which provides callbacks
to allow board-specific configuration at stream startup and teardown,
and another for pxa2xx-ac97-lib which allows configuration of the reset
GPIO for PXA2xx CPUs.

Obviously this won't actually work when using the generic AC97 driver
since the drivers will attempt to parse the platform data in both
formats. Fix this by merging the two structures.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-15 10:54:06 +08:00
Takashi Iwai b114701c0e Merge branch 'topic/asoc' into for-linus 2009-04-06 03:47:20 +02:00
Luotao Fu 057de50c0d pxa2xx-ac97: fix displaying GSR after reset timeout
the variable gsr_bit is set in isr. It is however set to 0 and interrupts are
disabled prior to reset. Hence it doesn't make a lot of sense to show the
content of gsr_bit in case of a reset timeout.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:15 +01:00
Russell King ed40d0c472 Merge branch 'origin' into devel
Conflicts:
	sound/soc/pxa/pxa2xx-i2s.c
2009-03-28 20:29:51 +00:00
Takashi Iwai ae02cde7e9 Merge branch 'topic/drop-l3' into for-linus 2009-03-24 00:36:05 +01:00
Takashi Iwai b5c784894c Merge branch 'topic/asoc' into for-linus 2009-03-24 00:35:53 +01:00
Takashi Iwai e0d2054fd3 Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
Takashi Iwai dec14f8c0e Merge branch 'topic/snd_card_new-err' into for-linus 2009-03-24 00:35:35 +01:00
Takashi Iwai 1f2186951e ALSA: Fix wrong pointer to dev_err() in arm/pxa2xx-ac97-lib.c
Fix the wrong device pointer passed to dev_err().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-19 14:16:19 +01:00
Dmitry Artamonow 323a59613e ALSA: drop outdated and broken sa11xx-uda1341 driver
It depends on L3 support from 2.4 kernel (CONFIG_L3) that never got
merged into mainline. Since there's no way to use it on any of
supported machines (iPaq h3100 or h3600), better drop it for now.
It can be reimplemented later using ASoC infrastructure (there's
already a driver for uda1341 codec in mainline, so only CPU and machine
parts need to be written).

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-17 17:58:13 +01:00
Takashi Iwai dbe36c9dd5 Merge branch 'topic/snd_card_new-err' into topic/drop-l3 2009-03-17 17:57:37 +01:00
Robert Jarzmik 26ade896b6 ASoC: Allow choice of ac97 gpio reset line
As the PXA27x series allow 2 gpios to reset the ac97 bus,
allow through platform data configuration the definition of
the correct gpio which will reset the AC97 bus.

This comes from a silicon defect on the PXA27x series, where
the gpio must be manually controlled in warm reset cases.

Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-15 20:20:37 +00:00
Russell King 97fb44eb6b Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:

	arch/arm/mach-at91/gpio.c
2009-03-13 21:44:51 +00:00
Eric Miao 5742964e91 [ARM] pxa: remove unnecessary #include of pxa-regs.h and hardware.h
pxa-regs.h and hardware.h are not intended for use directly in driver
code, remove those unnecessary references.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:38 +08:00
Roel Kluin f6f35bbe7c [ARM] AACI: timeout will reach -1
With a postfix decrement the timeout will reach -1 rather than 0,
so the warning will not be issued.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-10 09:59:20 +00:00
Takashi Iwai 2ebfb8eeb8 ALSA: Add missing KERN_* prefix to printk in other sound/*
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 16:11:58 +01:00
Takashi Iwai bd7dd77c2a ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function
in other sound subdirectories.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:21:19 +01:00
Dmitry Baryshkov 7961233688 pxa2xx-ac97: switch AC unit to correct state before probing
If AC97 unit is in partially enabled state, early request_irq can trigger
IRQ storm or even full hang up. Workaround this by forcibly switching ACLINK off
at the start of the probe.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:17 +00:00
Eric Miao 1f017a9964 [ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h
The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Eric Miao afb5b5c9ad [ARM] pxa: explicit #include <mach/dma.h> in various drivers
Where 'pxa_dma_desc' and 'pxa_{request,free}_dma' are referenced.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:26 +08:00
Takashi Iwai bfd4e66b8d Merge branches 'topic/asoc', 'topic/misc-fixes' and 'topic/hda' into for-linus 2008-10-23 19:20:54 +02:00
Mark Brown 13095c37b2 ALSA: Ensure PXA runtime data is initialised
The rest of the code relies on the runtime data being zero initialised
so we need to use kzalloc() to allocate it.

Reported-by: Oliver Ford <ipaqlinux@oliford.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-22 17:22:01 +02:00
Linus Torvalds 6bb7a93548 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: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
  ALSA: hda - Fix quirk lists for realtek codecs
  ALSA: hda - Add support of ALC272
  ALSA: hda - Add ALC887 support
  ALSA: hda - Add ALC1200 support
  ALSA: hda - Fix PCI SSID of ASUS M90V
  ALSA: hda - Add auto mic switch in realtek auto-probe mode
  ALSA: Fix pxa2xx-ac97-lib.c compilation
  ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
  ALSA: hda: fix nid variable warning
  ALSA: ASoC: Fix compile-time warning for tlv320aic23.c
2008-10-16 15:36:58 -07:00
Marc Zyngier 8825e8e8d0 ALSA: Fix pxa2xx-ac97-lib.c compilation
The last ALSA merge broke pxa2xx-ac97-lib.c, as it brought back
references to cpu_is_pxa21x that Eric Miao removed in commit
0ffcbfd54ea81ca24c0749f55ca4fcf3e2bdc23e:

	[ARM] pxa: make cpu_is_pxa2* macros more consistent

This patch gets rid of those references, and only keeps cpu_is_pxa25x().

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-14 11:02:21 +02:00
Linus Torvalds 7cc4e87f91 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: (236 commits)
  [ARM] 5300/1: fixup spitz reset during boot
  [ARM] 5295/1: make ZONE_DMA optional
  [ARM] 5239/1: Palm Zire 72 power management support
  [ARM] 5298/1: Drop desc_handle_irq()
  [ARM] 5297/1: [KS8695] Fix two compile-time warnings
  [ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.
  [ARM] pxa: allow multi-machine PCMCIA builds
  [ARM] pxa: add preliminary CPUFREQ support for PXA3xx
  [ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h
  [ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c
  [ARM] pxa/zylonite: add support for USB OHCI
  [ARM] ohci-pxa27x: use ioremap() and offset for register access
  [ARM] ohci-pxa27x: introduce pxa27x_clear_otgph()
  [ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource
  [ARM] ohci-pxa27x: move OHCI controller specific registers into the driver
  [ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers
  [ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c
  [ARM] pxa: simplify DMA register definitions
  [ARM] pxa: make additional DCSR bits valid for PXA3xx
  [ARM] pxa: move i2c register and bit definitions into i2c-pxa.c
  ...

Fixed up conflicts in
	arch/arm/mach-versatile/core.c
	sound/soc/pxa/pxa2xx-ac97.c
	sound/soc/pxa/pxa2xx-i2s.c
manually.
2008-10-11 10:09:45 -07:00
Eric Miao 87f3dd7797 [ARM] pxa: simplify DMA register definitions
1. DRCMRxx is no longer recommended, use DRCMR(xx) instead, and
   pass DRCMR index by "struct resource" if possible

2. DCSRxx, DDADRxx, DSADRxx, DTADRxx, DCMDxx is never used, use
   DCSR(), DDADR(), DSADR(), DTADR(), DCMD() instead

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-07 19:12:56 +01:00
Dmitry Baryshkov a6d7731767 ALSA: Separate common pxa2xx-pcm code
ASoC and non-ASoC drivers for PCM DMA on PXA share lots of common code.
Move it to pxa2xx-lib.

[Fixed some checkpatch warnings -- broonie]

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:10 +02:00
Dmitry Baryshkov 9d1cf39be6 ALSA: pxa2xx-ac97-lib: support building for several CPUs
Support building of pxa2xx-ac97-lib for several CPUs by making code
run-time selected, not only compile-time.

[Fixed 3XX->3xx typos in ifdef checks -- broonie.]

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:09 +02:00
Dmitry Baryshkov 9c63634221 ALSA: Separate common pxa2xx-ac97 code
ASoC and non-ASoC drivers for ACLINK on PXA share lot's of common code.
Move all common code into separate module snd-pxa2xx-lib.

[Fixed handing of SND_AC97_CODEC in Kconfig and some checkpatch warnings
 -- broonie]

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-23 08:18:08 +02:00
Uwe Kleine-König e8f18ae558 ALSA: fix section for sa11xx-uda1341 platform driver
Don't use __init but __devinit to define probe function.  A pointer to
sa11xx_uda1341_probe is passed to the core via platform_driver_register
and so the function must not disappear after the module is loaded.  Using
__init and having HOTPLUG=y and SND_SA11XX_UDA1341=m the following
probably oopses:

	echo -n sa11xx_uda1341.1 > /sys/bus/platform/driver/sa11xx_uda1341/unbind
	echo -n sa11xx_uda1341.1 > /sys/bus/platform/driver/sa11xx_uda1341/bind

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Brian Avery <b.avery@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 18:51:56 +02:00