Commit Graph

63 Commits (3d44cc3e01ee1b40317f79ed54324e25c4f848df)

Author SHA1 Message Date
Jonas Bonn f9d1ab39e8 ALSA: ASoC: Drop device registration from GTA01 lm4857 driver
Device registration should be handled at the machine level and not
in the driver code itself.  This patch removes the device registration
from the driver code in preparation for moving it to the machine
definition.

[Squashed down two parts to this patch for bisectability - there's also
a third part adding registration of the device to the out of tree GTA01
machine driver -- broonie]

Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:18:20 +02:00
Mark Brown df20cf92ca ALSA: ASoC: Fix build of GTA01 audio driver
Fix a couple of thinkos introduced during the I2C API update.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:18:15 +02:00
Jonas Bonn e8089948d6 ALSA: ASoC: Add widgets before setting endpoints on GTA01
This prevents error messages at startup where the endpoints are being
set before the widgets/controls have even been added.

Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:18:09 +02:00
Mark Brown b1cbc21c8e ALSA: ASoC: Use snd_soc_dapm_nc_pin() in GTA01 audio driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:15:57 +02:00
Mark Brown fb2aa074d4 ALSA: ASoC: Check for machine type in GTA01 machine driver
Since there are now multiple OpenMoko platforms it is more important to
check that the machine driver is running on the correct system.  This
was orgininally generated as part of the initial GTA02 machine port.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-10-10 13:41:58 +02:00
Jean Delvare b6471305bb sound: ASoC: Convert neo1973/lm4857 to a new-style i2c driver
Convert the lm4857 driver in neo1973_wm8753 to the new (standard)
i2c device driver binding model. I assumed that the LM4857 was always
on the same I2C bus as the WM8753 codec.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Tim Niemeyer <reddog@mastersword.de>
Cc: Graeme Gregory <graeme@openmoko.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 09:11:11 +02:00
Jean Delvare ad4503d8a0 sound: ASoC: Convert wm8753 to a new-style i2c driver
Convert the wm8753 codec driver to the new (standard) i2c device
driver binding model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Frank Mandarino <fmandarino@endrelia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 09:11:10 +02:00
Jean Delvare d280289e79 sound: ASoC: Fix an error path in neo1973_wm8753
The error handling in neo1973_init is incorrect:

* If platform_device_add fails, we go on with the rest of the
  initialization instead of bailing out. Things will break when the
  module is removed (platform_device_unregister called on a device
  that wasn't registered.)

* If i2c_add_driver fails, we return an error so the module will not
  load, but we don't unregister neo1973_snd_device, so we are leaking
  resources.

Add the missing error handling.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Tim Niemeyer <reddog@mastersword.de>
Cc: Graeme Gregory <graeme@openmoko.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 09:11:07 +02:00
Russell King a09e64fbc0 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:55:48 +01:00
Russell King be50972935 [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:08 +01:00
Russell King 0f8469a54f [ARM] Eliminate useless includes of asm/mach-types.h
There are 43 includes of asm/mach-types.h by files that don't
reference anything from that file.  Remove these unnecessary
includes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:04 +01:00
Liam Girdwood 64105cfd65 ALSA: asoc: machines - add Digital Audio Interface (DAI) control functions.
This patch adds several functions for DAI control and config
and replaces the current method of calling function pointers within
the DAI struct within the machine drivers.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:32:51 +02:00
Liam Girdwood 1992a6fbd9 ALSA: asoc: s3c24xx - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.
This patch merges struct snd_soc_codec_dai and struct
snd_soc_cpu_dai into struct snd_soc_dai for the S3C24xx platform.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:32:45 +02:00
Liam Girdwood a5302181e5 ALSA: asoc: core - refactored DAPM pin control API.
Refactored snd_soc_dapm_set_endpoint() to snd_soc_dapm_enable_pin() and
snd_soc_dapm_disable_pin().

Renamed snd_soc_dapm_sync_endpoints() to snd_soc_dapm_sync().
Renamed snd_soc_dapm_get_endpoint_status() to
snd_soc_dapm_get_pin_status().

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:32:30 +02:00
Mike Montour a2e31a595e ALSA: ASoC: Add TLV information to the LM4857 controls on the GTA01
Signed-off-by: Mike Montour <mail@mmontour.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:48:17 +02:00
Mark Brown bdb92876f0 ALSA: ASoC: Pass the DAI being configured into CPU DAI probe and remove
This allows per-DAI initialisation to be done by the CPU DAI drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:48:01 +02:00
Takashi Iwai 89fe511792 sound: Convert to menuconfig
Convert menu in sound Kconfig files to menuconfig and if.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Werner Almesberger 33e5b22285 [ALSA] soc - Fix s3c24xx-i2s LR sync while timer ticks are disabled
When timer ticks are disabled when calling
sound/soc/s3c24xx/s3c24xx-i2s.c:s3c24xx_snd_lrsync
and the LR signal never happens, we loop forever.
This has been observed in the following call chain:
snd_pcm_common_ioctl1 -> snd_pcm_action_lock_irq ->
snd_pcm_action_single
 -> snd_pcm_do_resume -> soc_pcm_trigger -> s3c24xx_i2s_trigger

The patch below changes the timeout mechanism to use udelay, which
doesn't need timer ticks.

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 17:55:10 +02:00
Mark Brown b2efbbfba2 [ALSA] ASoC: Remove in-code changelogs
The overwhelming majority just say 'initial version' anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:20 +02:00
Mark Brown 8f3112d7a8 [ALSA] soc - neo1973_wm8753 - Convert to bulk DAPM registration APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:19 +02:00
Tim Niemeyer 1894c59fdb [ALSA] soc - Patch to add debug messages to the neo1973_wm8753 (GTA01) sound driver
Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19 13:19:14 +02:00
Davide Rizzo 2c36eecfb6 [ALSA] soc - fix S3C2410 i2s programming error
S3C2410 i2s driver currently manages only i2s protocol (and not left
justified one) and slave mode.
With this small patch, other modes are possible.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:08 +02:00
Davide Rizzo d6426171ba [ALSA] soc - fix s3c2410 PCM breakage
S3C2410 pcm doesn't work.
s3c2410_dma_request() now returns the channel number and not 0 if OK.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-05 14:12:08 +02:00
Graeme Gregory fd403dc84f [ALSA] soc - neo1973_wm8753.c add suspend and shutdown hooks for lm4857 chip
Patch taken from the openmoko bugtracker
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=781

This patch adds Suspend/Resume and Shutdown support for the lm4857 to
the driver.

Signed-off-by: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:38:34 +02:00
Graeme Gregory 443590e6f1 [ALSA] soc - neo1973_wm8753.c change maintainer contact info
I have moved workplaces since I originally wrote this driver so update
the contact info for new employers.

Signed-off-by: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:38:26 +02:00
Graeme Gregory 8ba02ace94 [ALSA] soc - neo1973_wm8753.c cleanup checkpatch issues
Clean up a few issues with the file that checkpatch noted, no functionality
changes.

Signed-off-by: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:38:18 +02:00
Mark Brown 854e4af258 [ALSA] soc - ln2440sbc_alc650 - Fix checkpatch warnings
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:38:06 +02:00
Mark Brown 5111c07534 [ALSA] soc - s3c24xx-pcm - Fix checkpatch warnings
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:37:55 +02:00
Mark Brown ccfdd6c2b2 [ALSA] soc - s3c2443-ac97 - Fix checkpatch warnings
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30 19:37:47 +02:00
Mark Brown 0fe564a564 [ALSA] soc - s3c24xx-i2s - Add missing spaces
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:43 +02:00
Mark Brown 0015e7d1e2 [ALSA] soc - s3c24xx-i2s - Fix tab/space breakage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Mark Brown 40efc15fc6 [ALSA] soc - s3c24xx-i2s - Use linux/io.h
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Mark Brown d8ed061a9f [ALSA] soc - s3c24xx - Declare suspend and resume static
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Tim Niemeyer 409203074e [ALSA] soc - s3c24xx - Improve diagnostic output
Add some debug messages for suspend/resume and to add a clear prefix to
s3c24xx-i2s and s3c24xx-pcm.

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:42 +02:00
Tim Niemeyer 6b9a9b3296 [ALSA] soc - neo1973_wm8753 - Fix module unload
Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:41 +02:00
Harvey Harrison 9bf8e7ddea [ALSA] sound: replace remaining __FUNCTION__ occurences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Ben Dooks 6cab2d3ddd [ALSA] S3C2412: suspend and resume support
Support for suspend/resume for the S3C2412 ASoC IIS
core driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:53 +01:00
Ben Dooks 49646dfa2a [ALSA] ASoC: S3C2412 IIS driver
S3C2412 SoC IIS support for ALSA/ASoC

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:53 +01:00
Graeme Gregory 5cd919a214 [ALSA] soc - Support suspend and resume of the I2S interface on s3c24xx
Signed-off-by: Graeme Gregory <graeme@openmoko.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Graeme Gregory 96d90e1930 [ALSA] soc - Reinitialise DMA on every resume
This one changes the DMA initialisation as it turns out the DMA driver
in s3c24xx doesnt store registers between suspend/resume so you have
to re-initialise the channels on every resume.

Signed-off-by: Graeme Gregory <graeme@openmoko.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:51 +01:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01:00
Julia Lawall f11b799282 [ALSA] sound: Use time_before, time_before_eq, etc.
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@ change_compare_np @
expression E;
@@
(
- jiffies <= E
+ time_before_eq(jiffies,E)
|
- jiffies >= E
+ time_after_eq(jiffies,E)
|
- jiffies < E
+ time_before(jiffies,E)
|
- jiffies > E
+ time_after(jiffies,E)
)
@ include depends on change_compare_np @
@@
#include <linux/jiffies.h>
@ no_include depends on !include && change_compare_np @
@@
  #include <linux/...>
+ #include <linux/jiffies.h>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:45 +01:00
Harald Welte aa9673cf31 [ALSA] neo1973: ASoC include pathname fix
Fix s3c24xx include file path changes in asoc driver

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:43 +01:00
Ivan Kuten 040956fabb [ALSA] soc - ln2440sbc ac97 support
This patch adds ac97 support for ln2440sbc board from LittleChips.
This board is based on s3c2440 SoC + AC97 Realtek ALC650 codec.
Existing s3c2443 implementation is slightly modified because s3c2440
and s3c2443 have different AC97 interrupts.

Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:10 +01:00
Jean Delvare 2cdddeb8d7 i2c: normal_i2c can be made const (remaining drivers)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27 18:14:47 +01:00
Krzysztof Helt 1700139acb [ALSA] s3c2443-ac97: compilation fix
The Samsung S3C24xx uses new architecture file layout in the post 2.6.23
kernel.  This patch fixes include path for the s3c2443-ac97.c.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
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>
2007-11-20 19:52:05 +01:00
Scott Thompson 8642a4ba64 [ALSA] sound/soc ioremap/iounmap balancing
ioremap / iounmap balancing in sound/soc tree

Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:21 +02:00
Harald Welte 646ab160ff [ALSA] s3c24xx-pcm: fix hw_params dma handling
Since the PCM emulation can call multiple times to hw_setup(), but we
can only once allocate/request the DMA channel, we have to handle
this gracefully.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:57 +02:00
Arnaud Patard 9c638cd641 [ALSA] Fix Kconfig entry for SND_S3C24XX_SOC_NEO1973_WM8753
SND_S3C24XX_SOC_NEO1973_WM8753 depends on MACH_GTA01 but the Kconfig
entry which is going to be merged is MACH_NEO1973_GTA01.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:46 +02:00
Matt Reimer 82fb159aa3 [ALSA] Make s3c24xx_i2s_set_clkdiv() change the correct bits
Make s3c24xx_i2s_set_clkdiv() change the correct bits.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:51 +02:00