Commit Graph

1267 Commits

Author SHA1 Message Date
Troy Kisky 35cf63583d ASoC: DaVinci: i2s, remove MOD_REG_BIT macro
No functional changes. Rename variable w to something
more meaningful. Remove code obfuscating macro MOD_REG_BIT.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:06 +01:00
Lars-Peter Clausen 637a935aab ASoC: Fix wm8753 register cache size and initialization
Register cache space was not being allocated for the final register,
causing bugs when it was used.  Allocate space for it.

Also ensure that the final register is displayed in sysfs.

[Commit message rewritten to document actual issue. -- broonie]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 14:35:49 +01:00
Lopez Cruz, Misael 6814044324 ASoC: TWL4030: Add tristate callbacks for HiFi and Voice
Add "set_tristate" callbacks for HiFi and Voice DAIs.
Machine drivers can enable and disable tristate for each
DAI with "snd_soc_dai_set_tristate" function.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 11:01:05 +01:00
Candelaria Villareal, Jorge 1b6ebdd7bb ASoC: Zoom2: Update twl4030_setup_data parameters
Add support for EXTMUTE in Zoom2 machine driver. This is necessary
to further reduce pop noise problem. Signal EXTMUTE is connected to
signal GPIO 153 in Zoom2 board.

In addition, change ramp delay value to 3 (218/161/109 ms). With
previous ramp delay value, pop noise was louder. With a longer value
the beep tone can be observed.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 11:01:05 +01:00
Grant Likely 0827d6ba0b ASoC: add locking to mpc5200-psc-ac97 driver
AC97 bus register read/write hooks need to provide locking, but the
mpc5200-psc-ac97 driver does not.  This patch adds a mutex around
the register access routines.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 10:41:47 +01:00
Grant Likely 07573534b0 ASoC: Fix mpc5200-psc-ac97 to ensure the data ready bit is cleared
When doing register reads, it is possible for there to be a stale
data ready bit set which will cause subsequent reads to return
prematurely with incorrect data.  This patch fixes the issues by
ensuring stale data is cleared before starting another transaction.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 10:41:46 +01:00
Mark Brown 1df892cba4 ASoC: Fix register cache initialisation for WM8753
The wrong register cache variable was being used to provide the size for
the memcpy(), resulting in a copy of only a void * of data.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-07-03 10:41:45 +01:00
Candelaria Villareal, Jorge 4e49ffd10f ASoC: TWL4030: Add EXTMUTE to reduce pop-noise effect
According to TRM, an external FET controlled by a 1.8V output signal
can be used to reduce the pop-noise heard when the audio amplifier is
switched on. It is suggested that GPIO6 of TWL4030 be used, but any
other gpio can be used instead. This is indicated in machine driver
with the following twl4030_setup_data members:

-hs_extmute. Set to 1 if board has support for EXTMUTE.

-set_hs_extmute. Set to a callback funcion to control an external gpio
line. Set to NULL if MUTE[GPIO6] pin is used.

Codec driver takes care of enabling and disabling this output during
the headset pop attenuation sequence.

Also add a delay to let VMID settle in ramp up sequence.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-02 11:06:26 +01:00
Mark Brown 2115d2c173 Merge branch 'for-2.6.31' into for-2.6.32 2009-07-01 21:45:47 +01:00
Mark Brown 1dcf98ff8e ASoC: Add WM8523 CODEC driver
The WM8523 is a high performance stereo DAC with integral charge
pump providing 2Vrms line driver outputs using a single 3.3V power
supply rail.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-01 18:47:45 +01:00
Mark Brown da9ff1f796 ASoC: Only disable pxa2xx-i2s clocks if we enabled them
The clock API can't cope with unbalanced enables and disables and
we only enable in hw_params() but try to disable in shutdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-01 18:31:32 +01:00
Mark Brown 8a123ee2a4 ASoC: WM8974 DAPM cleanups
Also implement AUX mode control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 21:30:42 +01:00
Mark Brown 8b83a19367 ASoC: WM8974 cosmetic cleanups
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 21:30:35 +01:00
Mark Brown cb11d39ead ASoC: Use symmetric rates for WM8974
The chip has a single LRCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 21:30:25 +01:00
Mark Brown a5f8d2f1b8 ASoC: Add WM8974 TLV information
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:34:32 +01:00
Mark Brown 91d0c3ecba ASoC: Refresh WM8974 PLL configuration
Move away from a fixed table to runtime calculation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:34:23 +01:00
Mark Brown 33d81af4d1 ASoC: Declare 2 channels for WM8974
The device is a mono device but it can read two channel data and
many I2S controllers only understand 2 channels.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:34:16 +01:00
Mark Brown df1ef7a38d ASoC: Refresh WM8974 bias configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:34:09 +01:00
Mark Brown 416356fcfa ASoC: Convert to dev_pm_ops
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:32:57 +01:00
Janusz Krzysztofik 1bdd741991 ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
This patch tries to work around the problem of broken OMAP1510 PCM playback
pointer calculation by replacing DMA function call that incorrectly tries to
read the value form DMA hardware with a value computed locally from an
already maintained variable omap_runtime_data.period_index.

Tested on OMAP5910 based Amstrad Delta (E3) using work in progress ASoC
driver.

Based on linux-2.6-asoc.git v2.6.31-rc1.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:39:12 +01:00
Grant Likely 40d9ec14e7 ASoC: remove BROKEN from Efika and pcm030 fabric drivers
The needed spin_event_timeout() macro is now merged in from the
powerpc tree, so these drivers are no longer broken.  This reverts
commit 0c0e09e21a (ASoC: Mark MPC5200
AC97 as BROKEN until PowerPC merge issues are resolved)

Tested against 2.6.31-rc1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:23:41 +01:00
Grant Likely 6a84c234da ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS.
Without SND_SOC_AC97_BUS defined, an AC97 device will not get correctly
registered on the AC97 bus, which prevents thinks like the WM9712
touchscreen driver from getting probed.

Tested against 2.6.31-rc1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:23:40 +01:00
Mark Brown 9ea21ebca1 ASoC: Fix WM8961 suspend function type
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-29 16:34:57 +01:00
Mark Brown 372a14a4a4 ASoC: Remove unreferenced wm8974_add_controls()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-29 16:14:19 +01:00
Mark Brown c2caa4da46 ASoC: Fix widget powerdown on shutdown
We need to set the widget power state we want to implement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-26 15:36:56 +01:00
Lopez Cruz, Misael e3c7dbb07c ASoC: Remove word "Switch" from Handsfree switch name
SoC dapm adds the suffix "Switch" to SND_SOC_DAPM_SWITCH controls,
removing word "Switch" from HandsfreeL/HandsfreeR widget name
for avoiding to duplicate it.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-26 10:39:52 +01:00
Atsushi Nemoto 647613e97f ASoC: txx9aclc: dynamically allocate dmaengine devname
Use kasprintf to allocate temporary devname string instead of a
fixed size string.
This fixes "FIXME" introduced on removal of BUS_ID_SIZE.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-25 21:06:30 +01:00
Takashi Iwai 62b1653e29 Merge branch 'for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-06-25 15:28:39 +02:00
Mark Brown d5fc3b5fe3 Merge branch 'for-2.6.31' into for-2.6.32 2009-06-25 13:58:37 +01:00
Mark Brown e2f551dacb ASoC: Add core suspend and resume callbacks to WM8961
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-25 13:57:59 +01:00
Mark Brown 517374704d ASoC: Add a shutdown callback
Ensure that the audio subsystem is powered down cleanly when the system
shuts down by providing a shutdown operation. This ensures that all the
components have been returned to an off state cleanly which should avoid
audio issues from partially charged capacitors or noise on digital inputs
if the system is restarted quickly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Ben Dooks <ben-linux@fluff.org>
2009-06-23 23:48:53 +01:00
Linus Torvalds c488eef815 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: hda - Make jack-plug notification selectable
  ALSA: ctxfi - Add PM support
  sound: seq_midi_event: fix decoding of (N)RPN events
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
  sound: fix check for return value in snd_pcm_hw_refine
  ALSA: ctxfi - Allow unknown PCI SSIDs
  ASoC: Blackfin: update the bf5xx_i2s_resume parameters
  ASoC: Blackfin: keep better track of SPORT configuration state
2009-06-23 10:45:39 -07:00
Lopez Cruz, Misael 30808ca751 ASoC: TWL4030: Correct bypass event for voice sidetone
Event for voice sidetone was being interpreted as an
analog HiFi bypass event because VSTPGA register offset
is less than ARXR2_APGA_CTL offset. Reordering the
register checks allows to handle voice digital bypass
event properly.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-23 10:57:38 +01:00
Lopez Cruz, Misael 328d0a138e ASoC: TWL4030: Add AVADC Clock Priority
AVDAC clk priority allows to determine the path ADC must
be connected when the codec is in option2 and both HiFi
and Voice paths are enabled.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-23 10:57:37 +01:00
Linus Torvalds 9e268beb92 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (49 commits)
  [ARM] idle: clean up pm_idle calling, obey hlt_counter
  [ARM] S3C: Fix gpio-config off-by-one bug
  [ARM] S3C64XX: add to_irq() support for EINT() GPIO
  [ARM] S3C64XX: clock.c: fix typo in usb-host clock ctrlbit
  [ARM] S3C64XX: fix HCLK gate defines
  [ARM] Update mach-types
  [ARM] wire up rt_tgsigqueueinfo and perf_counter_open
  OMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons
  OMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL
  OMAP3: Add support for DPLL3 divisor values higher than 2
  OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers
  OMAP3 SRAM: add more comments on the SRAM code
  OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change
  OMAP3 clock: add a short delay when lowering CORE clk rate
  OMAP3 clock: initialize SDRC timings at kernel start
  OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize
  [ARM] Add old Feroceon support to compressed/head.S
  [ARM] 5559/1: Limit the stack unwinding caused by a kthread exit
  [ARM] 5558/1: Add extra checks to ARM unwinder to avoid tracing corrupt stacks
  [ARM] 5557/1: Discard some ARM.ex*.*exit.text sections when !HOTPLUG or !HOTPLUG_CPU
  ...
2009-06-22 14:56:13 -07:00
Lopez Cruz, Misael c264301c77 ASoC: TWL4030: Fix voice interface clock masters
Voice interface of twl4030 codec supports: CBM_CFM and
CBS_CFS. It doesn't support CBS_CFM.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-By: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-22 11:24:04 +01:00
Mark Brown e370f45aeb Merge branch 'wm8961' into for-2.6.32 2009-06-22 11:08:26 +01:00
Linus Torvalds 413318444f 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: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: snd_usb_caiaq: fix legacy input streaming
  ASoC: Kill BUS_ID_SIZE
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 13:13:08 -07:00
Barry Song f274143f12 ASoC: Blackfin: convert internal names from bf52x to bf5xx
These drivers aren't BF52x specific, so don't use bf52x in the names.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:47:56 +01:00
Barry Song 92a6ad3428 ASoC: Blackfin: update the bf5xx_i2s_resume parameters
Latest ASoC only passes snd_soc_dai to the resume function.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:45:28 +01:00
Cliff Cai 895c9c0565 ASoC: Blackfin: keep better track of SPORT configuration state
Do not let the SPORT be reconfigured until there are no more active
streams.  Then we can let the system reprogram the SPORT state.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:45:28 +01:00
Mark Brown 423c238d71 ASoC: Staticise put_twl4030_opmode_enum_double()
It's an operation for a control and doesn't need to be exported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 13:58:09 +01:00
Mark Brown b53109db5e ASoC: Fix shadowed variables in twl4030
No need to define second copies of mode and format, they're declared
with exactly the same type at the head of the function and there's no
conflict in their use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 13:58:08 +01:00
Russell King 187f81b3d8 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-06-18 23:09:52 +01:00
Mark Brown a583cd5347 ASoC: Regulator support for WM8580
Add basic support for integration with the regulator API to WM8580.
Since the core cannot yet disable biases when the CODEC is idle we
simply request and enable the regulators for the entire time the
driver is active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-17 17:33:01 +01:00
Takashi Iwai ef39412622 ASoC: Kill BUS_ID_SIZE
Remove the use of BUS_ID_SIZE from txx9aclc.c, as BUS_ID_SIZE will be
removed soon later.

Also, use snprintf() instead of sprintf() as a safer operation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 11:42:45 +02:00
Linus Torvalds 661adc423d 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: ctxfi - Fix deadlock with xfi-timer
  ALSA: intel8x0 - Fix PCM position craziness
  ALSA: usb-audio - rework quirk for TerraTec Aureon USB 5.1 MkII
  ASoC: magician: fix PXA SSP clock polarity
  ASoC: Instantiate any forgotten DAPM widgets
  ASoC: Revert duplicated code in SSM2602 driver
  ALSA: hda - Add quirk for Acer Aspire 6935G
  ALSA: ctxfi - Replace atc lock to mutex
  ASoC: Remove odd bit clock ratios for WM8903
2009-06-16 12:10:31 -07:00
Mark Brown 8776b268c6 [ARM] pxa: register wm8731 explicitly for corgi and poodle
The wm8731 driver has been converted to register using the standard I2C
device registration mechanism so we can now do the registration in the
arch/arm code as normal.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-06-16 21:03:36 +08:00
Philipp Zabel 1abd918499 ASoC: UDA1380: refactor device registration
This patch mostly follows commit 5998102b90
"ASoC: Refactor WM8731 device registration" to make UDA1380 use standard
device instantiation. Similarly, the I2C device registration temporarily
moves into the magician machine driver before it will find its final
resting place in the board file.

At the same time, platform specific configuration is moved to platform data
and common power/reset GPIO handling moves into the codec driver.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-15 21:54:48 +01:00
Linus Torvalds 2cf4d4514d 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: (417 commits)
  MAINTAINERS: EB110ATX is not ebsa110
  MAINTAINERS: update Eric Miao's email address and status
  fb: add support of LCD display controller on pxa168/910 (base layer)
  [ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
  [ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
  [ARM] 5544/1: Trust PrimeCell resource sizes
  [ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
  [ARM] pxa/sharpsl_pm: drop set_irq_type calls
  [ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
  [ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
  [ARM] sa1100: remove unused collie_pm.c
  [ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
  [ARM] 5550/1: Add default configure file for w90p910 platform
  [ARM] 5549/1: Add clock api for w90p910 platform.
  [ARM] 5548/1: Add gpio api for w90p910 platform
  [ARM] 5551/1: Add multi-function pin api for w90p910 platform.
  [ARM] Make ARM_VIC_NR depend on ARM_VIC
  [ARM] 5546/1: ARM PL022 SSP/SPI driver v3
  ARM: OMAP4: SMP: Update defconfig for OMAP4430
  ARM: OMAP4: SMP: Enable SMP support for OMAP4430
  ...
2009-06-14 13:42:43 -07:00
Philipp Zabel 33745fb344 ASoC: magician: fix PXA SSP clock polarity
Follow-up fix needed since "ASoC: pxa-ssp.c fix clock/frame invert".

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-14 16:15:07 +01:00
Mark Brown 6d5701b29e ASoC: Instantiate any forgotten DAPM widgets
With the recent changes to the DAPM power checks it has become important
to explicitly instantiate all widgets but some drivers were forgetting
to do that.  Since everything needs to do it add a call to instantiate
them immediately before the card registration - it does no harm when it
is called repeatedly and saves work in drivers.

Tested-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-14 16:14:53 +01:00
Russell King 4c31791c3d Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-06-14 11:00:16 +01:00
Mark Brown b3b50b3f31 ASoC: Add suspend and resume callbacks to Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 22:30:18 +01:00
Mark Brown 831dc0f10f ASoC: Add stub suspend and resume calls for ASoC subdevices
Now that ASoC subdevices can be regular devices they can have normal
suspend and resume calls from their buses.  However, suspending them
individually is not desirable since this can lead to problems such as
pops and clicks from devices being suspended with their signals being
amplified or clocks being stopped suddenly.

This will be resolved by having the normal device model suspend and
resume calls call into ASoC which will suspend the entire card while any
of its components are suspended.  At present this is not yet implemented
but in order to aid the transition of drivers to the standard device
model this patch adds API calls for the notifications.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:28 +01:00
Mark Brown 619439998a ASoC: Automatically manage WM8350 sloping stopband filter
For best performance the DAC sloping stopband filter should be enabled
below 24kHz and not enabled above that so remove the user visible
control for this and do it autonomously in the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:25 +01:00
Mark Brown 21002e2076 ASoC: Automatically manage WM8900 sloping stopband filter
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:23 +01:00
Mark Brown 9e79261f30 ASoC: Automatically control WM8903 sloping stopband filter
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:23 +01:00
Mark Brown 5ba73683ba ASoC: Revert duplicated code in SSM2602 driver
The Blackfin submission was done as a patch against a different tree
and contained a duplicate hunk which will cause us to loose track of the
substream pointers when shutting down.  Remove one of the duplicated
hunks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 19:35:24 +01:00
Lopez Cruz, Misael df205936d5 ASoC: Zoom2: Add machine driver for Zoom2 board
Add support for Zoom2 board. Zoom2 machine driver
connects both codec DAIs (audio and voice) to omap3
McBSP ports in the following way:

  HiFi <-> McBSP2
 Voice <-> McBSP3

The zoom2 driver has the following DAPM widgets:
* Ext Mic: MAINMIC, SUBMIC (with bias)
* Ext Spk: HFL, HFR
* Headset Stereophone: HSOL, HSOR
* Headset Mic: HSMIC (with bias)
* Aux In: AUXL, AUXR

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-12 21:57:07 +01:00
Mark Brown ba2533a478 ASoC: Remove odd bit clock ratios for WM8903
These are not supported since performance can not be guaranteed
when they are in use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-06-12 17:29:54 +01:00
Mark Brown 74dc55ed5b ASoC: Add WM8961 driver
The WM8961 is a low power, high quality stereo CODEC designed for
portable digital applications with headphone and stereo class D speaker
drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-12 17:16:06 +01:00
Mark Brown 0e09b67e58 Merge branch 'dapm' into for-2.6.32 2009-06-11 21:04:04 +01:00
Daniel Ribeiro fa44c077eb ASoC: remove duplicated code on pxa-ssp.c
* We don't need to write the registers twice, remove the first write.
* DAIFMT_INV switch is duplicated inside DAIFMT_FORMAT switch, move it
  out.

(This patch is for Mark's for-2.6.32 branch, I have not checked if the
code is duplicated on current 2.6.30)

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-11 21:03:19 +01:00
Russell King 547c32aeb5 Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-06-10 22:41:06 +01:00
Mark Brown 236e6723be ASoC: Fix lm4857 control
Commit 4eaa9819dc changed semantics of
private_value member of kcontrol. This resulted in inability to control
amplifier and subsequently in very low output volume.

Tested-by: Johannes Schauer <josch@pyneo.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-10 13:55:34 +01:00
Chaithrika U S efd13be09e ASoC: Minor fixes to DaVinci I2S probe function
Assign proper errors when platform resource claims fail.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 14:55:12 +01:00
Mark Brown 291f3bbcac ASoC: Make DAPM power sequence lists local variables
They are now only accessed within dapm_power_widgets() so can be local
to that function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 13:52:06 +01:00
Mark Brown 4f1c192385 ASoC: Coalesce power updates for PGAs
Handle gain ramping for PGAs so we can coalesce their power updates too.
This is not ideal since we can't cope properly with gain ramping for
stereo paths but that was the case without coalescing and gain ramping
is relatively infrequently used so the effects are limited.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 13:52:05 +01:00
Mark Brown 81628103dd ASoC: Coalesce power updates for DAPM widgets with events
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 13:51:59 +01:00
Mark Brown e3d4dabd2d ASoC: Sort specialised mixers and muxes together
The more flexible value muxes and named mixers don't need to be sorted
differently from a power management point of view, they are different
only in terms of the control interface and not in terms of seqencing
behaviour.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 13:51:12 +01:00
Mark Brown b22ead2a51 ASoC: Coalesce register writes for DAPM sequences
Reduce the number of register writes we need to set the power state for
a CODEC by coalescing updates to widgets with the same sequence order and
same register into a single write.

This can be a noticable performance improvement with slow or heavily
contended control buses, such as I2C controllers with a low clock
frequency, and is particularly noticable when resuming. It can also
reduce the noticability of and pops and clicks by ensuring that left
and right channels are powered simultaneously if they are in the same
register.

Currently widgets that have events are not coalesced, including PGAs
which may use the volume ramping control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 13:51:04 +01:00
Daniel Ribeiro 46f5822f78 ASoC: Allow 32 bit registers for DAPM
Replace the remaining unsigned shorts with unsigned ints.
Tested with pcap2 codec (25 bits registers).

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-08 10:53:12 +01:00
Chaithrika U S 04f80f5c48 ASoC: Add machine driver support for DM646x
This patch does the following:
(1) Add support for the DM646x machine
(2) Modifications required to introduce the platform driver model to get
platform data for all the machines including dm355 and dm644x.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-07 20:23:40 +01:00
Chaithrika U S b67f448729 ASoC: Add mcasp support for DM646x
Adds driver support for the two instances of McASP on TI's DM646x.

The multichannel audio serial port (McASP) functions as a general-purpose audio
serial port optimized for the needs of multichannel audio application.
(http://www.ti.com/litv/pdf/spruer1b).

There are two instances of McASP on DM646x. The McASP0 module includes up to 4
serializers that can be individually enabled to either transmit or receive
in different modes. The McASP1 module is limited with only 1 pinned-out
serializer that can be enabled to only transmit in DIT mode (neither receiving
in any mode nor transmitting in either Burst or TDM mode is supported).

McASP0 consists of transmit and receive sections that may operate
synchronized, or completely independently with separate master clocks, bit
clocks, and frame syncs, and using different transmit modes with different
bit-stream formats.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-07 20:10:01 +01:00
Chaithrika U S 5204d49676 ASoC: Introduce platform driver model for dm644x, dm355
Introduce the platform driver model to get platform data for dm355 and dm644x.
Register platform driver and acquire the resources in the probe function Since
the platform specific code had been moved from machine driver to dm<soc>.c

Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-07 20:08:40 +01:00
Mark Brown 163cac061c ASoC: Factor out DAPM sequence execution
Lump the list walk into a single function, and pull in the power
application too so we can do some further refactoring. Pure code
motion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-07 13:03:27 +01:00
Mark Brown 38357ab2c8 ASoC: Sort DAPM power sequences while building lists
In the past the DAPM power sequencing was done by iterating over the list
of widgets once for each widget type and powering widgets of that type.
Instead of doing that do the sorting at the time we insert the widgets
into the lists of widgets to apply power changes to. This reduces the
amount of computation required for seqencing still further, though the
costs are generally dwarfed by the costs of the register writes
implementing them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-07 13:02:27 +01:00
Mark Brown 74b8f955a7 ASoC: Apostrophe patrol
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-06 11:26:15 +01:00
Troy Kisky ccff4b15e0 ASoC: codec tlv320aic23 fix bogus divide by 0 message
Some code analyzer software mistakenly gives
divide by 0 error messages for these lines.
This patch will end its confusion.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-06 09:24:48 +01:00
Marek Vasut 37330efd4a [ARM] pxa/palm: Add Palm27x aSoC driver to PalmTE2
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-06-05 10:41:54 +08:00
Daniel Mack e3509ff0fb ASoC: fix NULL pointer dereference in soc_suspend()
In case the initalization of an soc_device failed, there is no codec
associated with it. soc_suspend() will still dereference the pointer
and cause an Ooops when entering the sleep mode.

This happens on our board with a multi-target kernel image when booted
on a machine without audio circuits.

This patch makes the code bail out very early in this special case.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-04 13:24:08 +01:00
Takashi Iwai d08664fdb5 ASoC: Fix build error in twl4030.c
Fix the (likely cut-n-paste) error by commit
16a30fbb0d, which causes the error below:
  sound/soc/codecs/twl4030.c: In function 'twl4030_read_reg_cache':
  sound/soc/codecs/twl4030.c:152: error: 'cache' undeclared (first use in this function)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 10:01:11 +02:00
Cliff Cai f692fce0cf ASoC: SSM2602: assign last substream to the master when shutting down
Fixes crash when shutting down.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-03 11:38:23 +01:00
Sonic Zhang cf485da15a ASoC: Blackfin: document how anomaly 05000250 is handled
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-03 11:31:42 +01:00
Cliff Cai 80d5bd9314 ASoC: Blackfin: set the transfer size according the ac97_frame size
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-03 11:30:01 +01:00
Cliff Cai 2552a710f4 ASoC: SSM2602: remove unsupported sample rates
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-03 11:25:51 +01:00
Peter Ujfalusi eaf1ac8bb5 ASoC: TWL4030: Check the interface format for 4 channel mode
In addition to the operating mode check, also check the
codec's interface format in case of four channel mode.
If the codec is not in TDM (DSP_A) mode, return with error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-01 23:46:08 +01:00
Peter Ujfalusi 16a30fbb0d ASoC: TWL4030: Use reg_cache in twl4030_init_chip
Use the codec->reg_cache instead of the array directly
in twl4030_init_chip for setting the default values.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-29 11:02:48 +01:00
Mark Brown 203350c1a8 ASoC: Initialise dev for the dummy S/PDIF DAI
Also include the header to make sure the DAI is prototyped.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28 18:54:52 +01:00
Chaithrika U S be461ba836 ASoC: Add dummy S/PDIF codec support
McASP on DM646x can operate in DIT (S/PDIF) where no codec is needed.
This patch provides stub codec that can be used in these configurations.
On DM646x EVM the McASP1 is connected to the S/PDIF out.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28 14:48:38 +01:00
Roel Kluin 449bd54dcb ASoC: correct print specifiers for unsigneds
Unsigned variables should use `%u' rather than `%d'.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28 10:20:26 +01:00
Jon Smirl ea8b27ad0c ASoC: Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()
The function signature for spin_event_timeout() has changed in version V9.
Adjust the mpc5200 AC97 driver to use the new function.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-27 21:10:37 +01:00
Mark Brown 08d15f034e ASoC: Switch FSL SSI DAI over to symmetric_rates
The effect of symmetric_constraints should provide a standard way to
enforce the use of the same sample rate for both directions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
2009-05-27 11:12:45 +01:00
Mark Brown 0c0e09e21a ASoC: Mark MPC5200 AC97 as BROKEN until PowerPC merge issues are resolved
These drivers use spin_event_timeout() which is only present in the
PowerPC tree at present and which is undergoing some API revisions
so temporarily mark them as BROKEN until these issues are sorted
out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-26 21:14:59 +01:00
Jon Smirl 6ffee43ecf ASoC: Fabric bindings for STAC9766 on the Efika
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-26 21:13:02 +01:00
Jon Smirl a9262c4fd4 ASoC: Support for AC97 on Phytec pmc030 base board.
A wm9712 AC97 codec is used.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-26 21:13:01 +01:00
Jon Smirl 20d0e1520e ASoC: AC97 driver for mpc5200
I've implemented retries for when the AC97 hardware doesn't reset on
first try. About 10% of the time both the Efika and pcm030 AC97 codecs
don't reset on first try and need to be poked multiple times.  Failure
is indicated by not having the link clock start ticking. Every once in
a while even five pokes won't get the link started and I have to power
cycle.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-26 21:13:00 +01:00
Jon Smirl dbcc347562 ASoC: Main rewite of the mpc5200 audio DMA code
Rewrite the mpc5200 audio DMA code to support both I2S and AC97.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-26 21:12:50 +01:00
Peter Ujfalusi 0f89bdcac6 ASoC: TWL4030: HandsfreeL/R mute DAPM switch
Add DAPM switch for HeadsetL/R mute. Since all bits are are needed
for the HFL/R pop removal to work the switch is using the SW_SHADOW
no HW register for the HandsfreeL/R mute.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-25 11:54:14 +01:00
Peter Ujfalusi f3b5d3002d ASoC: TWL4030: Add shadow register
Shadow, non HW register for dealing with the HandsfreeL/R
muting.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-25 11:54:14 +01:00
Peter Ujfalusi 5a2e9a48b1 ASoC: TWL4030: Handsfree pop removal redesign
Move the HandsfreeL/R (IHFL/R) pop removal code from the DAPM_MUX_E
to a more appropriate DAPM_PGA_E widget.
Also fix the power-up sequence to match with the TRM.
The power-down sequence is not described in the TRM, so do it
in a way, which seams like the correct sequence.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-25 11:54:13 +01:00
Jon Smirl cebe77674c ASoC: Rename the PSC functions to DMA
Rename the functions in the mpc5200 DMA file from i2s based names to dma
ones to reflect the file they are in.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24 19:31:03 +01:00
Jon Smirl 89dd084252 ASoC: Basic split of mpc5200 DMA code out of mpc5200_psc_i2s
Basic split of mpc5200 DMA code out from i2s into a standalone file.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24 19:31:03 +01:00
Mark Brown 05e1efa2de ASoC: Fix minor issues in STAC9766 driver
Fairly minor issues:
 - Don't register the DAIs, it's not required for AC97 devices.
 - Make unexported functions static.
 - Wrap some excessively long lines.
 - Undo tab/space breakage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24 13:32:24 +01:00
Jon Smirl 3c166c7f18 ASoC: Codec for STAC9766 used on the Efika
Datasheet: http://www.idt.com/products/getDoc.cfm?docID=13134007

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24 13:15:21 +01:00
Mark Brown 4fcbbb67a3 ASoC: Update WM8974 to use standard I2C device probe methods
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23 16:43:12 +01:00
Mark Brown 1a55b3f6ed ASoC: WM8974 checkpatch cleanups
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23 11:31:40 +01:00
Mark Brown 0a1bf55335 ASoC: Add WM8974 CODEC driver
The WM8974 is a low power, high quality mono CODEC designed for portable
applications such as digital still cameras or digital voice recorders.

This driver was originally written by Graeme Gregory and Liam Girdwood
and has since been maintained by myself with some updates contributed by
Brett Saunders and Javier Martin.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23 11:28:03 +01:00
Mark Brown 606689e9f8 ASoC: Add Openmoko Neo FreeRunner (GTA02) audio driver
This driver supports the audio subsystem on the Openmoko Neo FreeRunner
smartphone, often known by its codename GTA02.  The system has a WM8753
connected to a Samsung S3C2442 with an external GPIO controlled speaker
amplifier.

The driver was originally written by Graeme Gregory and has recieved
contributions from Openmoko, myself and members of the Openmoko
community.  For much of this time the primary Openmoko kernel maintainer
was Andy Green.

Signed-off-by: Graeme Gregory <graeme@openmoko.com>
Signed-off-by: Andy Green <andy@openmoko.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23 11:06:11 +01:00
Mark Brown 0154724d48 ASoC: Fix WM9081 PowerPC compiler issues
Ensure that we always set a new sysclk when using the FLL in master mode
and pick out the correct value for the sample rate in hw_params().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23 10:24:15 +01:00
Mark Brown 86ed3669f0 ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driver
The WM9081 is designed to provide high power output at low distortion
levels in space-constrained portable applications.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22 15:11:22 +01:00
Peter Ujfalusi b4852b793a ASoC: TWL4030: Differentiate the playback streams
Give unique stream names for the two playback streams so
DAPM can figure out which codec_dai is in use.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22 15:08:43 +01:00
Peter Ujfalusi 7385ba44f8 ASoC: SDP4030: Use the twl4030_setup_data for headset pop-removal
With this patch the initial headset pop-removal related values are
configured for the twl4030 codec (ramp delay and sysclk).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22 10:23:22 +01:00
Peter Ujfalusi 9da28c7b38 ASoC: TWL4030: Add support for platform dependent configuration
twl4030_setup_data structure can be passed from platform drivers to
the codec via the snd_soc_device->codec_data pointer.

Currently the setup data has support for the Headset pop-removal
related configuration, which differs from board to board.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22 10:23:22 +01:00
Ben Dooks 99ae99533a [ARM] S3C24XX: Merge devel-gpio
Merge branch 'devel-gpio' into for-rmk-devel
2009-05-21 22:10:21 +01:00
Peter Ujfalusi 6943c92e87 ASoC: TWL4030: Move the Headset pop-attenuation code to PGA event
This patch adds SND_SOC_DAPM_PGA_E to the headset path, which handles
the headset ramp up and down sequences needed for the pop noise
removal.

With this patch the order of the internal components in the twl4030
codec is turned on and off in a correct order.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Tested-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Misael Lopez Cruz  <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-20 09:53:25 +01:00
Peter Ujfalusi 4005d39a5f ASoC: TWL4030: Change DAPM routings and controls for DACs and PGAs
Restructuring the twl4030 codec's DAPM routing to be able to handle the power
sequences correctly.

The twl4030 codec internal implementation have this order:
DAC -> Analog PGA -> Mixer/Mux

While the ASoC framework expects the following order:
DAC -> Mixer -> Analog PGA

This patch moves the Analog PGA handling from SND_SOC_DAPM_PGA to _MIXER and
adds two levels of mixer to handle the digital and analog loopback
functionality.

Now the analog loopback does not powers on any of the DACs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Tested-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Misael Lopez Cruz  <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-20 09:52:51 +01:00
Atsushi Nemoto e24805dd85 ASoC: Add TXx9 AC link controller driver (v3)
This patch adds support for the integrated ACLC of the TXx9 family.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-19 19:54:28 +01:00
Lopez Cruz, Misael 11a7281106 ASoC: SDP3430: Connect twl4030 voice DAI to McBSP3
Connect twl4030 voice DAI to McBSP3 in sdp3430 machine driver.
Voice DAI init function enables corresponding interface by
writting directly to VOICE_IF codec register.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujflausi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-19 10:35:11 +01:00
Lopez Cruz, Misael b74bd40fa4 ASoC: TWL4030: Add control for selecting codec operation mode
Add a control for selecting the codec operation mode. TWL4030 codec
has two modes:
- Option 1. Audio only (4 audio DACs)
- Option 2. Voice/Audio (2 audio DACs and voice ADC/DAC)

Control is restricted when a stream is ongoing, since codec's
operation mode cannot be changed on-the-fly.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujflausi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-19 10:35:11 +01:00
Peter Ujfalusi 181da78cd0 ASoC: TWL4030: Fix Analog capture path for AUXR
AUXR is selected by bit 2 and not by bit 1 in the ANAMICR register.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-19 09:38:57 +01:00
Ben Dooks ec976d6eb0 [ARM] S3C24XX: GPIO: Move gpio functions out of <mach/hardware.h>
Move all the gpio functions out of <mach/hardware.h> as
this file is for defining the generic IO base addresses
for the kernel IO calls.

Make a new header <mach/gpio-fns.h> to take this and
include it via the chain from <linux/gpio.h> which is
what most of these files should be using (and will be
changed as soon as possible).

Note, this does make minor changes to some drivers but
should not mess up any pending merges.

CC: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:25:40 +01:00
Mark Brown f83fba8baa ASoC: Add debug trace for bias level transitions
A standard way of making sure we know when the bias level changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-18 15:53:16 +01:00
Mark Brown 452c5eaa0d ASoC: Integrate bias management with DAPM power management
Rather than managing the bias level of the system based on if there is
an active audio stream manage it based on there being an active DAPM
widget. This simplifies the code a little, moving the power handling
into one place, and improves audio performance for bypass paths when no
playbacks or captures are active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-18 15:53:16 +01:00
Mark Brown aef908434c ASoC: Make DAPM sysfs entries non-optional
sysfs is so standard these days there's no point.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-18 15:53:15 +01:00
Mark Brown 6d3ddc81f5 ASoC: Split DAPM power checks from sequencing of power changes
DAPM has always applied any changes to the power state of widgets as soon
as it has determined that they are required. Instead of doing this store
all the changes that are required on lists of widgets to power up and
down, then iterate over those lists and apply the changes. This changes
the sequence in which changes are implemented, doing all power downs
before power ups and always using the up/down sequences (previously they
were only used when changes were due to DAC/ADC power events). The error
handling is also changed so that we continue attempting to power widgets
if some changes fail.

The main benefit of this is to allow future changes to do optimisations
over the whole power sequence and to reduce the number of walks of the
widget graph required to check the power status of widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-18 15:53:14 +01:00
Misael Lopez Cruz b7a755a8a1 ASoC: TWL4030: Enable/disable voice digital filters
Enable TWL4030 VTXL/VTXR and VRX digital filters for uplink
and downlink paths, respectively.

This patch also corrects voice 8/16kHz mode selection bit
(SEL_16K) of CODEC_MODE register.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-18 11:13:12 +01:00
Julia Lawall 5b740ea975 sound: use dev_set_drvdata
Eliminate direct accesses to the driver_data field.
cf 82ab13b26f15f49be45f15ccc96bfa0b81dfd015

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct device *dev;
expression E;
type T;
@@

- dev->driver_data = (T)E
+ dev_set_drvdata(dev, E)

@@
struct device *dev;
type T;
@@

- (T)dev->driver_data
+ dev_get_drvdata(dev)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-17 19:31:49 +02:00
Takashi Iwai 2bf2778e0f ASoC: Optimize switch/case in magician.c
Use default to optimize the switch/case in magicial_playback_hw_params(),
which also fixes the compile warnings below:
  sound/soc/pxa/magician.c:89: warning: 'acds' may be used uninitialized in this function
  sound/soc/pxa/magician.c:89: warning: 'acps' may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 12:20:52 +02:00
Takashi Iwai 2baaec2806 ASoC: Add missing __devexit in wm8940.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 12:18:47 +02:00
Mark Brown 81a4275bff Merge branch 'for-2.6.30' into for-2.6.31 2009-05-15 08:59:52 +01:00
David Brownell f492ec9f02 ASoC: DaVinci EVM board support buildfixes
This is a build fix, resyncing the DaVinci EVM ASoC board code
with the version in the DaVinci tree.  That resync includes
support for the DM355 EVM, although that board isn't yet in
mainline.

(NOTE:  also includes a bugfix to the platform_add_resources
call, recently sent by Chaithrika U S <chaithrika@ti.com> but
not yet merged into the DaVinci tree.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-15 08:59:07 +01:00
David Brownell a62114cb90 ASoC: DaVinci I2S updates
This resyncs the DaVinci I2S code with the version in the DaVinci
tree.  The behavioral change uses updated clock interfaces which
recently merged to mainline.  Two other changes include adding a
comment on the ASP/McBSP/McASP confusion, and dropping pdev->id in
order to support more boards than just the DM644x EVM.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-15 08:58:58 +01:00
David Brownell 82075af6cb ASoC: davinci-pcm buildfixes
This is a buildfix for the DaVinci PCM code, resyncing it with
the version in the DaVinci tree.  The notable change is using
current EDMA interfaces, which recently merged to mainline.
(The older interfaces never made it into mainline.)

NOTE:  open issue, the DMA should be to/from SRAM; see chip
errata for more info.  The artifacts are extremely easy to
hear on DM355 hardware (not yet supported in mainline), but
don't seem as audible on DM6446 hardwaare (which does have
mainline support).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-15 08:58:05 +01:00
Marek Vasut 63c26baa2a ASoC: Support AC97 link off by default on WM9712
The WM9712 can be configured by resistor strapping GPIO4 to behave like
the WM9713 and default to leaving the AC97 link disabled after cold
reset until a warm reset occurs.  In this configuration we need to issue
a warm reset after cold to bring the link up so do so.  The warm reset
will be harmless on systems that don't need it.

[Changelog rewritten to document the reasoning. -- broonie]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 20:52:46 +01:00
Mark Brown c13cb78ace Merge branch 'pxa2xx-i2s' into for-2.6.31 2009-05-14 20:35:51 +01:00
Karl Beldan 916465a841 ASoC: pxa2xx-i2s: Fix suspend/resume
pxa2xx_i2s_resume is :
 - unconditionnaly setting SACR0_ENB
 - unsetting SACR0_ENB in saved SACR0 pxa_i2s.sacr0
fix these.

In pxa2xx_i2s_{resume,suspend}, save/restore registers even
when !dai->active.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 20:35:32 +01:00
Karl Beldan 9bc04fd167 ASoC: pxa2xx-i2s: Fix inappropriate release of i2s clock
i2s_clk is 'put' for no reason in pxa2xx_i2s_shutdown.
Now we 'get' i2s_clk at probe and 'put' it at driver removal or when
probe fails.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 20:35:31 +01:00
Karl Beldan 34555c1077 ASoC: pxa2xx-i2s: Handle SACR1_DRPL and SACR1_DREC separately
- hw_params enables both RPL and REC functions each time : Enable the
	appropriate function in pxa2xx_i2s_trigger.
- pxa2xx_i2s_shutdown disables i2s anytime one of RPL or REC function is
	off : Turn it off only when both functions are off.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 20:35:23 +01:00
Karl Beldan b243b77c70 ASoC: pxa2xx-i2s: Proper hw initialization
Make sure we are in a know good state at end of probe :
Reset FIFO logic and registers, and make sure REC and RPL functions
along with FIFO service are disabled (SACR0_RST enables REC and RPL).

Resetting loses current settings so remove reset from stream startup.
Now reset occurs only at probe.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 20:34:40 +01:00
Anuj Aggarwal 14610ce711 ASoC: Added OMAP3 EVM support in ASoC.
Resending the patch after fixing the minor issues.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-14 12:47:26 +01:00
Karl Beldan 8c10dc4f54 ASoC: pxa2xx-i2s: Proper initialization
Reset FIFO logic and registers, and make sure REC and RPL functions along
with FIFO service are disabled at probe.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-13 19:16:00 +01:00
Mark Brown 13e2c86c20 Merge branch 'for-2.6.30' into for-2.6.31 2009-05-12 10:53:33 +01:00
Joonyoung Shim 97b8096dc9 ASoC: TWL4030: change DAPM for analog microphone selection
The inputs of the twl4030 codec can be mixed, so we will use the mixer
DAPM for the analog microphone registers(0x05, 0x06), but if we enable
more than one input at the same time, the input impedance of the input
amplifier will be reduced.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-12 10:53:22 +01:00
Mark Brown 7de0a0aee5 ASoC: Enforce symmetric rates for PXA2xx I2S
There is a single I2S_SYNC pin on the chip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-12 10:53:22 +01:00
Mike Rapoport eaaa532883 ASoC: em-x270: make the driver support also eXeda and CM-X300 machines
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-12 10:53:22 +01:00
Roel Kluin 31cb31f76e ASoC: remove driver_data direct access of struct device
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-11 22:09:22 +01:00
Mike Rapoport 914dc18255 ASoC: soc-core: fix crash when removing not instantiated card
If the card was not instantiated in snd_soc_instantiate_card, calling
soc-remove will crash because some of codec, cpu_dai and card .remove
methods are called twice.
Fix this by returning from soc_remove immediately.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-11 19:01:51 +01:00
Mark Brown 151ab22cf7 ASoC: Fix up CODEC DAI formats for big endian CPUs
ASoC uses the standard ALSA data format definitions to specify the wire
format used between the CPU and CODEC. Since the ALSA data formats all
include the endianess of the data but this information is not relevant
by the time the data has been encoded onto the serial link to the CODEC
this means that either all the CODEC drivers need to declare both big and
little endian variants or the core needs to fix up the format constraints
specified by CODEC drivers.

For now take the latter approach - this will need to be revisited if any
CODECs are endianness dependant.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-09 16:35:21 +01:00
Sergey Lapin b4df0a6c9d ASoC: AFEB9260 driver
ASoC driver for AT91SAM9260-based AFEB9260 board

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-08 19:14:34 +01:00
Peter Ujfalusi c198d81181 ASoC: TWL4030: Fix typo in twl4030_codec_mute function
Copy-paste error: TWL4030_PRECKL_GAIN >> TWL4030_PRECKR_GAIN
It has not caused problems, since
TWL4030_PRECKL_GAIN == TWL4030_PRECKR_GAIN == 0x30

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-08 12:00:12 +01:00
Daniel Mack 5e7c034425 ASoC: cs4270: add power management support
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-07 09:00:27 +01:00
Daniel Mack 80ab8817bf ASoC: cs4270: introduce CS4270_I2C_INCR
Replace the magic 0x80 value with a suitable macro definition.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-05 19:16:41 +01:00
Mark Brown b290750172 Merge branch 'for-2.6.30' into for-2.6.31 2009-05-05 10:13:01 +01:00
Mark Brown f3831a592f Merge commit 'takashi/topic/asoc' into for-2.6.31 2009-05-05 10:12:55 +01:00
Peter Ujfalusi 376f7839b7 ASoC: TWL4030: Add VIBRA output
This patch adds support for the VIBRA output on TWL4030 codec.
The VIBRA output can be driven with audio data or with
local vibrator driver.
Add the needed DAPM elements and routes for the VIBRA output and
controls for the VIBRA driver configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-05 10:12:45 +01:00
Jonathan Cameron a195b51bc5 ASoC: IMote2 ASoC Support
This patch adds the ASoC side of the board support for the Crossbow
IMB400 daughter board.

Thanks to Crossbow for considerable assistance.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-05 10:12:36 +01:00
Lopez Cruz, Misael ee8f6894f3 ASoC: TWL4030: Add voice digital loopback: sidetone
This patch add voice digital loopback (sidetone) to the twl4030
driver. It mixes voice uplink attenuated (by sidetone gain) with
voice downlink when the codec is working in option2 (voice/audio
mode).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-05 10:12:20 +01:00
Lopez Cruz, Misael fcd274a345 ASoC: TWL4030: Add VDL analog bypass
This patch adds voice downlink analog bypass switch. It follows
the same approach as in other analog bypass switches.
DAC switch is moved from 'DAC Voice' to 'Analog Voice Playback Mixer',
that will also allow voice DAC to be powered in digital voice
loopback (sidetone).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-05 10:12:14 +01:00
Jinyoung Park 97a775c49c ASoC: Fix errors in WM8990
The mis-typing exist in dapm controller definitions and dapm route definitions,
so happen mis-matched error when snd_soc_dapm_add_routes().

Cc: stable@kernel.org
Signed-off-by: Jinyoung Park <parkjy@mtekvision.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com
2009-05-05 09:56:49 +01:00
Takashi Iwai 8560b9321f Merge branch 'fix/asoc' into topic/asoc 2009-05-04 16:05:23 +02:00
Takashi Iwai 6574612fbb ASoC: Remove BROKEN from mpc5200 kconfig
The regression was fixed by commit
3e5b50165f, so no need to mark this
driver as BROKEN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-04 16:03:21 +02:00
Takashi Iwai 3a20ac2c52 Merge branch 'fix/pcm-jiffies-check' into fix/asoc 2009-05-04 16:00:16 +02:00
Mark Brown 33f503c96c ASoC: Use a shared define for AC97 CODEC data formats
The AC97 wire format is completely fixed so CODECs don't have any choice
about the formats they accept but controllers accept a variety of data
formats and render them down onto the bus.  Have a shared define so all
the CODEC drivers will interoperate with any of our controller drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-02 12:32:09 +01:00
Ben Dooks 8970ef47d5 [ARM] S3C24XX: Remove hardware specific registers from DMA
calls

The S3C24XX DMA API channel configuration registers are being passed
values comprised of register values which makes it hard to move the
API to cover both the S3C24XX and S3C64XX.

These values can be calculated from knowing which device the channel
is connected to, so remove them from the two calls s3c2410_dma_config
and s3c2410_dma_devconfig.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 11:39:06 +01:00
Mark Brown 71437552f2 ASoC: Use platform device resource for S3C64xx IISv2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 14:08:01 +01:00
Mark Brown abbc824669 ASoC: Staticise txctrl and rxctrl for S3C IISv2
They aren't used by anything external and aren't prototyped; if any
users appear they can be exported again for them.

Also report what modes we have a problem with when we encounter invalid
mode configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:30:43 +01:00
Mark Brown 38e43c81a0 ASoC: Display S3C IISv2 mode and MS errors by default
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:30:43 +01:00
Mark Brown af3ea7bdc7 ASoC: Display the clock rate used as the basis for rate calculation
Aids debugging.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:30:42 +01:00
Mark Brown c86bde5406 ASoC: Allow use of resource from the platform device for S3C IISv2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:30:42 +01:00
Mark Brown 07736d4805 ASoC: Fix boot warnings from S3C IISv2
On startup we try to make sure that the port is quiesced but if the
port is already stopped then this will generate a warning about the
RX/TX mode configuration. Configure the mode before doing the teardown
to suppress these warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:30:35 +01:00
Mark Brown 553b1dd58c ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit
The data format configuration for S3C64xx IISv2 is completely different
to that for S3C24xx. Instead of a single bit configuration in bit 0 of
IISMOD we have format selection in bits 13 and 14 and bit clock rate
selection in bits 1 and 2. While we're here add support for 24 bit
samples in S3C64xx.

At some point it may be desirable to expose the bit clock rate selection
to users but given the limited configuration options that may not be
required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:26:34 +01:00
Mark Brown 51438449e7 ASoC: Make S3C64xx clock export function to return struct clk
This makes the interface usable with the s3c-iis-v2 rate calculator
and consistent with S3C2412.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:24:45 +01:00
Mark Brown 8a0f62b842 ASoC: Check for supported CPUs when building s3c-i2s-v2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:24:34 +01:00
Mark Brown 09aa60df92 ASoC: Fix error message formatting in s3c64xx-i2s driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-30 13:24:24 +01:00
Mark Brown 72e31981a4 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-28 19:33:45 +01:00
Joonyoung Shim 18cc8d8d9b ASoC: TWL4030: Fix gain control for earpiece amplifier
The gain control for earpiece amplifier uses 0dB ~ 12dB according to the
TRM, but the present code is implemented to -6dB ~ 6dB.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-28 16:11:22 +01:00
Takashi Iwai 2008f137e9 ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers
Added SNDRV_PCM_INFO_BATCH flag to PCM info field of some drivers that
really don't give the precise pointer value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 15:06:44 +02:00
Mark Brown 6be01cfb85 ASoC: Staticise TLV values in WM8940
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:57:42 +01:00
Mark Brown 2625240d07 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-27 20:47:35 +01:00
Jon Smirl 0c95de73a7 ASoC: Set the MPC5200 i2s driver to BROKEN status.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:40:55 +01:00
Mark Brown 5e42336a46 ASoC: Fix logic in WM8350 master clocking check
We need to check only if the WM8350 is master and only when starting
the stream so if either is not true then we can skip the check.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:40:21 +01:00
Daniel Mack 1a4ba05ec8 ASoC: cs4270: add Master Playback Switch
This adds a new control named 'Master Playback Switch' for cs4270
codecs. It is implemented using the new SOC_DOUBLE_EXT macro to catch
the put function and store the information about manually set mute
controls from userspace. When a manual mute is set, we don't want the
soc core to un-mute the outputs.

Renamed cs4270_mute() to cs4270_dai_mute() to avoid confusion.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:38:56 +01:00
Daniel Mack 9c93538651 ASoC: cs4270: fix Master Capture Switch polarity
The control modifies the MUTE register, hence the polarity must be
inverted.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-By: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:37:49 +01:00
Jonathan Cameron 0b5e92c5e0 ASoC WM8940 Driver
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:37:13 +01:00
Mark Brown a7be4d92d9 ASoC: Use our registration function for S3C64xx
Make sure we get the DAI operations initialised.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:28:14 +01:00
Mark Brown 5c556a6e19 ASoC: s3c-i2s-v2 diagnostic improvements
Say what invalid values we're seeing when we see an invalid value and
ensure that errors are displayed by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:28:08 +01:00
Mark Brown 008db442ef ASoC: Include WM8350 register definitions in CODEC header
It's expected behaviour for the CODEC header to provide them but the
WM8350 doesn't due to having all the registers together under drivers/mfd.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:27:01 +01:00
Mark Brown 4bc4d8998a ASoC: Enforce symmetric rates for S3C64xx I2S interface
There is only one LRCLK pin on each interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-27 20:26:53 +01:00
Takashi Iwai f0787f62df Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: s3c-i2s-v2 needs to declare a license for modular builds
  ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
  ASoC: Fix WM8580 volume update handling for large register changes
  ASoC: Fix offset of freqmode in WM8580 PLL configuration
2009-04-27 17:15:32 +02:00
Mark Brown 008bec397c ASoC: S3C2412: Failing to get the I2S clock is an error
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-24 17:40:06 +01:00
Mark Brown 172fd9e262 ASoC: Fix S3C64xx IIS device registration and support both ports
The S3C64xx IIS code had a number of problems with device registration.
The hardware has two IIS ports of which the driver supported only one
at once via a single exported DAI, attempting to identify the DAI to
use based on the dev->id of the ASoC platform device.  As well as
limiting the driver to only supporting one IIS port at once this also
meant that the ID of the soc-audio device (or in future the card device)
had to match the IIS ID.

Fix both problems by converting the driver to register the DAIs based on
probing of platform devices registered by the arch/arm code, using those
platform devices to interact with the clock API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-24 17:39:38 +01:00
Peter Ujfalusi a8353a5729 ASoC: Beagle: Add support for 4 channel
This patch adds support for the four channel TDM mode
on Beagle board.

Depending on the channel count, the interface needs to be
configured differently (I2S for stereo DSP_A for four channels)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-24 17:38:25 +01:00
Linus Torvalds 6ae85d6db4 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5460/1: Orion: reduce namespace pollution
  [ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config
  [ARM] 5457/1: mach-imx gpio buildfix
  [ARM] 5456/1: add sys_preadv and sys_pwritev
  [ARM] pxa/pcm990: start external GPIOs immediately after built-in ones
  [ARM] pxa/palm27x: General fix for Palm27x aSoC driver
  [ARM] pxa/mioa701: use GPIO95 as AC97 reset line
  [ARM] pxa: merge AC97 platform data structures
  [ARM] pxa/magician: remove un-necessary #include of pxa-regs.h and hardware.h
2009-04-24 08:36:41 -07:00
Peter Ujfalusi 8a1f936acd ASoC: TWL4030: Add 4 channel TDM support
Support for 4 channel TDM (SND_SOC_DAIFMT_DSP_A) for twl4030
codec.
The channel allocations are:
Playback:
TDM         i2s   TWL RX
Channel 1   Left  SDRL2
Channel 3   Right SDRR2
Channel 2   --    SDRL1
Channel 4   --    SDRR1

Capture:
TDM         i2s   TWL TX
Channel 1   Left  TXL1
Channel 3   Right TXR1
Channel 2   --    TXL2
Channel 4   --    TXR2

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-23 16:11:17 +01:00
Peter Ujfalusi 31a00c6b7c ASoC: OMAP: Add 4 channel support to mcbsp
Add 4 channel support to omap-mcbsp.
This mode is going to be used by the twl4030 codec, when it
is configured in Option1 mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-23 16:11:17 +01:00
Mark Brown b933453f19 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-23 16:09:52 +01:00
Mark Brown a396e32ef0 ASoC: s3c-i2s-v2 needs to declare a license for modular builds
It relies on EXPORT_SYMBOL_GPL() symbols.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-23 16:06:21 +01:00
Eric Miao 8eb9feabe5 ASoC: change stereo/mono to 32-bit/16-bit for pxa-ssp
The original idea came from pHilipp, and this makes the code looks
more consistent.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-23 11:00:58 +01:00
Mark Brown 049da6393f Merge branch 'for-2.6.30' into for-2.6.31 2009-04-23 10:37:17 +01:00
Mark Brown 19ab054df8 Merge commit 'takashi/fix/asoc' into for-2.6.30 2009-04-23 10:33:47 +01:00
Eric Miao 2d7e71fa23 ASoC: simplify the SSP DMA parameters settings by run-time generation
The SSP DMA parameters can actually be easily generated at run-time since
they are almost similar except for the FIFO width and direction. Another
benefit is the re-use of information from 'struct ssp_device', like SSDR
physical FIFO address and DRCMR register index for both directions.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: pHilipp Zabel <philipp.zabel@gmail.com>
2009-04-23 10:19:43 +01:00
Joonyoung Shim 1a787e7ad2 ASoC: TWL4030: Add VDL path support
Add DAPMs for VDL(Voice Down Link) path. To support VDL path, we have
to change DAPMs of outputs(Earpiece, PreDrive Left/Right, Headset
Left/Right, Carkit Left/Right) from mux to mixer.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-23 10:15:08 +01:00
Takashi Iwai a1992db55d ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-23 08:23:10 +02:00
Mark Brown 291ce18ceb ASoC: Implement WM8903 digital sidetone support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:48 +01:00
Mark Brown 727fb909e5 ASoC: Remove redundant rate constraint for WM8903
This is now handled by symmetric_rates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:42 +01:00
Mark Brown d7d5c5476a ASoC: Actively manage the DC servo for WM8903
Save a little extra power by enabling the DC servo offset correction
for the output channels only when the relevant channels are enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:36 +01:00
Mark Brown 4dbfe80971 ASoC: Optimise configuration of WM8903 DC servo
Modify the default startup sequence in the chip to set the DC servo
dither level for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:30 +01:00
Mark Brown c2aef4ffd2 ASoC: Support CLK_DSP in WM8903
CLK_DSP provides a master clock for the DAC and ADC related functionality
on the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:24 +01:00
Mark Brown 42768a1282 ASoC: Use DAPM supply widget for WM8903 charge pump
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:02 +01:00
Mark Brown 246d0a17f5 ASoC: Add power supply widget to DAPM
Many modern CODECs have shared resources on chip which must be enabled
for portions of the chip to work but which can be disabled at other times
in order to achieve power savings. Examples of such resources include
power supplies and some internal clocks.

Since these widgets are dependencies for the audio path but do not carry
audio signals they require slightly different handling to most widgets -
they do not contribute to the audio path and so should not be counted as
either inputs or outputs during path walks.

Cases where one supply provides a supply for another will require
additional work. There is also room for more optimisation of the graph
walking to avoid repeated checks for the same thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 19:10:13 +01:00
Joonyoung Shim 1b4246a1fc ASoC: OMAP: Add checking to detect bufferless pcms
Add checking in hw_params and prepare to detect bufferless pcms(i.e. BT
<--> codec).

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 16:57:18 +01:00
Mark Brown ccb077fd46 ASoC: Fix WM8580 volume update handling for large register changes
The driver is out of sync with the core functions it is using.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 10:52:18 +01:00
Mark Brown ce88168f5b ASoC: Fix offset of freqmode in WM8580 PLL configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-04-21 16:18:01 +01:00
Takashi Iwai f22d806b6c Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: Fix warning in wm9705
  ASoC: OMAP: Update contact addresses
  ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
2009-04-21 07:42:49 +02:00
Mark Brown b75576d76d ASoC: Make the DAPM power check an operation on the widget
Rather than having switch statements at point of use make the DAPM
power check a member of the widget structure and set it when we
instantiate the widget.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:48 +01:00
Mark Brown 6ea31b9f0a ASoC: Factor out DAPM power checks for DACs and ADCs
This also switches us to using a switch statement for the widget type
in dapm_power_widget().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:41 +01:00
Mark Brown cd0f2d4736 ASoC: Factor out generic widget power checks
This will form a basis for further power check refactoring: the overall
goal of these changes is to allow us to check power separately to
applying it, allowing improvements in the power sequencing algorithms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:33 +01:00
Russell King 64bd43a086 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-04-20 14:03:04 +01:00
Mark Brown 9b5b0c0159 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-20 12:45:40 +01:00
Joonyoung Shim 7154b3e802 ASoC: TWL4030: Add support Voice DAI
Add Voice DAI to support the PCM voice interface of the twl4030 codec.

The PCM voice interface can be used with 8-kHz(voice narrowband) or
16-kHz(voice wideband) sampling rates, and 16bits, and mono RX and mono
TX or stereo TX.

The PCM voice interface has two modes
 - PCM mode1 : This uses the normal FS polarity and the rising edge of
               the clock signal.
 - PCM mode2 : This uses the FS polarity inverted and the falling edge
               of the clock signal.

If the system master clock is not 26MHz or the twl4030 codec mode is not
option2, the voice PCM interface is not available.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 12:44:24 +01:00
Marek Vasut e91fb9137d [ARM] pxa/palm27x: General fix for Palm27x aSoC driver
Firstly, this patch makes the palm27x asoc driver a little more sane. Also,
since all affected devices use GPIO95 as AC97_nRESET, this patch sets that
properly. Affected are PalmT5, TX and LifeDrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-19 21:56:54 +08:00
Takashi Iwai 1e2ae4ddd3 Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0
2009-04-19 11:39:38 +02:00
Russell King - ARM Linux 516ef69f16 ASoC: Fix warning in wm9705
I notice that the fixes were merged, minus one:

sound/soc/codecs/wm9705.c: At top level:
sound/soc/codecs/wm9705.c:445: warning: initialization from incompatible pointer type

so you might find this trivial patch useful.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-18 10:45:10 +01:00
Peter Ujfalusi 6b87a91f54 ASoC: TWL4030: Fix for the constraint handling
The original implementation of the constraints were good against sane
applications.
If the opening sequence is:
stream1_open, stream1_hw_params, stream2_open, stream2_hw_params -> the
constraints are set correctly for stream2.

But if the sequence is:
stream1_open, stream2_open, stream2_hw_params, stream1_hw_params -> than stream2
would receive constraint rate = 0, sample_bits = 0, since the stream1 has not
yet called hw_params...

The command to trigger this event:
gst-launch-0.10 alsasrc device=hw:0 ! alsasink device=hw:0 sync=false

This patch does some 'black magic' in order to always set the correct
constraints and sets it only when it is needed for the other stream.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 16:02:23 +01:00
Jarkko Nikula b08f7a62ca ASoC: OMAP: Update contact addresses
My email address is going to expire soon so update it. Adding also
Peter Ujfalusi <peter.ujfalusi@nokia.com> as a second contact to OMAP core
drivers since I won't have anymore access to non-public OMAP documentation
in the future and Peter is working with these drivers as well.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 15:55:09 +01:00
Philipp Zabel 1a29728686 ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
Those macros are just screwed as soon as CONFIG_PXA25x is enabled.

This patch
- changes ssp_set_scr to take an ssp_dev pointer instead of ssp_device
- adds a corresponding ssp_get_scr function.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 15:55:08 +01:00
Mark Brown 8d98f2246d Merge branch 'for-2.6.30' into for-2.6.31 2009-04-16 14:14:35 +01:00
Peter Ujfalusi 3ba191ce05 ASoC: OMAP: Add DSP_A mode support for mcbsp
DSP_A mode is similar to the DSP_B, but the MSB is delayed with
one bclk (appears after the FS pulse and not under it).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 14:04:10 +01:00
Peter Ujfalusi c29b206ffd ASoC: OMAP: Use single-phase for DSP mode
Use single-phase mode for the DSP mode and keep the dual phase
mode for the I2S mode.

The mono (1 channel) mode already used single phase mode,
now it is more cleaner. There is no need to configure the
second phase, when the single phase is used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 14:04:09 +01:00
Jarkko Nikula 002fbad829 ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
Using inverted FS polarity in OSK5912 must be an error since TLV320AIC23
do not have support for inverted polarities. This is mostly due the hassle
with the DSP formats in OMAP McBSP DAI and inversion on OMAP side probably
just made this configuration working at some point.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Jarkko Nikula 36ce858245 ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
The DSP format wasn't still correct in OMAP McBSP DAI even after the commit
bd25867a6c.

Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being
part of the fix. Now the FS length definition is more clear by defining
it with  FWID(0).

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 76fff36802 ASoC: Fix include build error in s3c2412-i2s.c
Fix accidental change of <mach/regs-gpio.h> to
<plat/regs-gpio.h> in s3c2412-i2s.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 3715c6aaa9 ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
Fix the build error in s3c-i2s-v2.c caused by
a change to the snd_soc_dai ops field.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 1d2b7ae9a0 ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
The definition of s3c_i2sv2_iis_calc_rate was never
renamed from s3c2412_iis_calc_rate, so rename this
to allow the build to work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 01c4cad4f7 ASoC: Fix jive_wm8750.c build problems
Fix build errors in sound/soc/s3c24xx/jive_wm8750.c
from changes to ASoC.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:25 +01:00
Daniel Mack a5735b7ede ASoC: pxa-ssp: allow setting of dai format 0
pxa_ssp_set_dai_fmt() currently has an early exit if the desired format
equals the current configuration. This is correct behaviour unless this
function is called with a zero value parameter for the first time.
Zero is a valid value for this function, but the early exit is bogus in
this case.

Hence, set priv->dai_fmt to -1 in the beginning so we can configure the
port.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:25 +01:00
Mark Brown 0d960e8891 ASoC: Request shared rates for WM8903
It has a shared LRCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:11 +01:00
Mark Brown fd5dfad9cf ASoC: Volume controls are never of boolean type
Some limited volume controls (mostly simple attenuations) have only two
settings so the ASoC info functions misreport them as booleans. Since
we currently have no better information check for " Volume" in the
control name and always report any controls matching as being integer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:10 +01:00
Mark Brown 3f1a4d8267 ASoC: Check we have DAI ops when calling via accessor functions
Also make sure we're checking for the right operation while we're here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:09 +01:00
Eric Miao 5e901b37e4 [ARM] pxa/magician: remove un-necessary #include of pxa-regs.h and hardware.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-15 10:53:45 +08:00
Mark Brown 6967963d6d Merge branch 'for-2.6.30' into for-2.6.31 2009-04-14 13:22:37 +01:00
Takashi Iwai 34e51ce60a Merge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-04-14 11:48:25 +02:00
Mark Brown 9b1a88c710 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-13 15:12:48 +01:00
Mark Brown f2644a2c00 ASoC: Add WM8960 CODEC driver
The WM8960 is a low power, high quality stereo codec designed for
portable digital audio applications.

Stereo class D speaker drivers provide 1W per channel into 8W loads.
Guaranteed low leakage, excellent PSRR and pop/click suppression
mechanisms enable direct battery connection for the speaker supply.

The device also integrates a complete microphone interface and a stereo
headphone driver. External component requirements are drastically
reduced as no separate microphone, speaker or headphone amplifiers are
required. Advanced on-chip digital signal processing performs automatic
level control for the microphone or line input.

Stereo 24-bit sigma-delta ADCs and DACs are used with low power
over-sampling digital interpolation and decimation filters and a
flexible digital audio interface.

The master clock can be input directly or generated internally by an
onboard PLL, supporting most commonly-used clocking schemes.

This driver was originally written by Liam Girdwood, with substantial
subsequent additions and updates for feature completeness and changes in
the ASoC framework from me.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 15:11:46 +01:00
Daniel Ribeiro a820532002 ASoC: pxa-ssp.c fix clock/frame invert
SCMODE(0): Data Driven (Falling), Data Sampled (Rising), Idle State (Low)
SCMODE(1): Data Driven (Rising), Data Sampled (Falling), Idle State (Low)
SCMODE(2): Data Driven (Rising), Data Sampled (Falling), Idle State (High)
SCMODE(3): Data Driven (Falling), Data Sampled (Rising), Idle State (High)

SCMODE(3) does not invert the clock polarity compared to the default SCMODE(0).

This patch also adds all possible NF/IF, NB/IB combinations to the DSP_A and
DSP_B modes.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 13:23:03 +01:00
Mark Brown 6bbcb459cd ASoC: Move the WM9713 voice DAC powerdown to a DAPM event
This ensures that we sync with the DAPM powerdown sequencing properly
and don't need to bounce the power on the voice DAC so often.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Mark Brown f6d655a6e6 ASoC: Support DAPM events for DACs and ADCs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Mark Brown 025756eca4 ASoC: Factor out application of power for generic widgets
This is simple code motion, intended to support future refactoring of
the DAPM algorithms and (more immediately) the additon of events for
DACs and ADCs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00