Commit Graph

709 Commits

Author SHA1 Message Date
Linus Torvalds 7f06a8b26a 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: (250 commits)
  ALSA: hda: Storage class should be before const qualifier
  ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
  ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
  ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
  ASoC: TWL6040: Enable earphone path in codec
  ASoC: SDP4430: Add support for Earphone speaker
  ASoC: SDP4430: Add sdp4430 machine driver
  ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
  ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
  ALSA: sound/pci/asihpi: Use kzalloc
  ALSA: hdmi - dont fail on extra nodes
  ALSA: intelhdmi - add id for the CougarPoint chipset
  ALSA: intelhdmi - user friendly codec name
  ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
  ALSA: asihpi: incorrect range check
  ALSA: asihpi: testing the wrong variable
  ALSA: es1688: add pedantic range checks
  ARM: McBSP: Add support for omap4 in McBSP driver
  ARM: McBSP: Fix request for irq in OMAP4
  OMAP: McBSP: Add 32-bit mode support
  ...
2010-05-20 09:41:44 -07:00
Takashi Iwai d71f4cece4 Merge branch 'topic/asoc' into for-linus
Conflicts:
	sound/soc/codecs/ad1938.c
2010-05-20 12:00:43 +02:00
Takashi Iwai 20406f9b67 Merge branch 'topic/jack' into for-linus 2010-05-20 11:59:37 +02:00
Takashi Iwai 5e8aa85253 Merge branch 'topic/misc' into for-linus 2010-05-20 11:59:29 +02:00
Daniel Mack 89485d4931 ALSA: include/sound/asound.h whitespace fixups
This fixes some whitespace/indentation flaws I stumbled over.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11 22:41:50 +02:00
Peter Ujfalusi d11bb4a925 ASoC: core: Fix for the volume limiting when invert is in use
If the register for the volume needs invert, than the inversion
need to be done from the chip maximum, and not from the platform
dependent limit.
Introduce soc_mixer_control.platform_max value, which initially
equals to chip maximum.
The snd_soc_limit_volume function only modify the platform_max,
all volsw_info call returns this as well.
The .max value holds the chip default (maximum), and it is used
for the inversion, if it is needed.

Additional check in the volsw_info call has been added to check
the validity of the platform_max in case, when custom macros
used by codec drivers are not initializing it correctly.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-11 09:34:11 +01:00
Mark Gross ed77134bfc PM QOS update
This patch changes the string based list management to a handle base
implementation to help with the hot path use of pm-qos, it also renames
much of the API to use "request" as opposed to "requirement" that was
used in the initial implementation.  I did this because request more
accurately represents what it actually does.

Also, I added a string based ABI for users wanting to use a string
interface.  So if the user writes 0xDDDDDDDD formatted hex it will be
accepted by the interface.  (someone asked me for it and I don't think
it hurts anything.)

This patch updates some documentation input I got from Randy.

Signed-off-by: markgross <mgross@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-05-10 23:08:19 +02:00
Mark Brown 3efab7dcc0 ASoC: Allow DAI links to be kept active over suspend
As well as allowing DAPM pins to be marked as ignoring suspend allow DAI
links to be similarly marked.  This is primarily intended for digital
links between CODECs and non-CPU devices such as basebands in mobile
phones and will suppress all suspend calls for the DAI link.  It is
likely that this will need to be revisited if used with devices which
are part of the SoC CPU.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:37:13 +01:00
Mark Brown 1547aba993 ASoC: Support leaving paths enabled over system suspend
Some devices can usefully run audio while the Linux system is suspended.
One of the most common examples is smartphone systems, which are normally
designed to allow audio to be run between the baseband and the CODEC
without passing through the CPU and so can suspend the CPU when on a
voice call for additional power savings.

Support such systems by providing an API snd_soc_dapm_ignore_suspend().
This can be used to mark DAPM endpoints as not being sensitive to
system suspend. When the system is being suspended paths between
endpoints which are marked as ignoring suspend will be kept active.
Both source and sink must be marked, and there must already be an
active path between the two endpoints prior to suspend.

When paths are active over suspend the bias management will hold the
device bias in the ON state. This is used to avoid suspending the
CODEC while it is still in use.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:36:48 +01:00
Mark Brown 50ae8384cd ASoC: Remove unused DAPM suspend flag
We now manage suspend within the main power analysis rather than by
flipping the state of widgets.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10 10:35:55 +01:00
Krzysztof Helt a20971b201 ALSA: Merge es1688 and es968 drivers
The ESS ES968 chip is nothing more then a PnP companion
for a non-PnP audio chip. It was paired with non-PnP ESS' chips:
ES688 and ES1688. The ESS' audio chips are handled by the es1688
driver in native mode. The PnP cards are handled by the ES968
driver in SB compatible mode.

Move the ES968 chip handling to the es1688 driver so the driver
can handle both PnP and non-PnP cards. The es968 is removed.

Also, a new PnP id is added for the card I acquired (the change
was tested on this card).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 09:49:30 +02:00
Krzysztof Helt 396fa82726 ALSA: es1688: allocate snd_es1688 structure as a part of snd_card structure
Allocate the snd_es1688 during the snd_card allocation.
This allows to remove the card pointer from the snd_es1688 structure.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 09:48:59 +02:00
Peter Ujfalusi 826e962c46 Revert "ASoC: tpa6130a2: Support for limiting gain"
This reverts commit 6f3991152f.

Since core has now support for limiting the volume on controls this
patch is not needed.  Furthermore, this patch actually prevents the core
to set new volume on the TPA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07 16:42:23 +01:00
Peter Ujfalusi 637d3847ba ASoC: core: Support for limiting the volume
Add support for the core to limit the maximum volume on an
existing control.
The function will modify the soc_mixer_control.max value
of the given control.
The new value must be lower than the original one (chip maximum)

If there is a need for limiting a gain on a given control,
than machine drivers can do the following in their
snd_soc_dai_link.init function:

snd_soc_limit_volume(codec, "TPA6140A2 Headphone Playback Volume", 21);

This will modify the original 31 (chip maximum) to 21, so user
space will not be able to set the gain higher than this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07 16:41:33 +01:00
Takashi Iwai aeb29a82de Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-05-06 17:06:27 +02:00
Peter Ujfalusi 6f3991152f ASoC: tpa6130a2: Support for limiting gain
Add support for platform dependent gain limiting on the
tpa6130a2 (and tpa6140a2) Headset amplifier.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-06 14:58:20 +01:00
Jarkko Nikula 5193d62f18 ASoC: tlv320aic3x: Add platform data and reset gpio handling
Handle the reset GPIO within the codec driver in order to follow
the startup protocol for the tlv320aic3x codecs.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-06 14:58:02 +01:00
Mark Brown 39b8eab7e7 ASoC: Add WM9090 amplifier driver
The WM9090 is a high performance low power audio subsystem, including
headphone and class D speaker drivers.

Note that this driver is a standalone CODEC driver and so is only
immediately suitable for use with the WM9090 as a standalone sound card
taking line inputs, or with a DAC with no software control.  The pending
ASoC multi-CODEC support will expand the range of systems that can use
the driver, or system-specific adaptations can be made.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-30 16:12:44 +01:00
Vladimir Zapolskiy b28528a124 ASoC: UDA134X: Add UDA1345 CODEC support
This patch adds support for Philips UDA1345 CODEC. The CODEC has only
volume control, de-emphasis, mute, DC filtering and power control features.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-26 15:28:18 +01:00
Mark Brown b2c812e22d ASoC: Add indirection for CODEC private data
One of the features of the multi CODEC work is that it embeds a struct
device in the CODEC to provide diagnostics via a sysfs class rather than
via the device tree, at which point it's much better to use the struct
device private data rather than having two places to store it. Provide
an accessor function to allow this change to be made more easily, and
update all the CODEC drivers are updated.

To ensure use of the accessor the private data structure member is
renamed, meaning that if code developed with older an older core that
still uses private_data is merged it will fail to build.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-17 10:46:22 +09:00
Jaroslav Kysela 0340c7dccd ALSA: Release v1.0.23
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-04-16 13:12:36 +02:00
Takashi Iwai 24e4a1211f ALSA: info - Use standard types for info callbacks
Use loff_t, size_t and ssize_t for arguments of info callbacks
to follow the standard procfs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-13 11:57:14 +02:00
Takashi Iwai 7445c995b0 Merge branch 'fix/asoc' into for-linus 2010-04-07 09:54:41 +02:00
Mark Brown 53a61d967a Merge branch 'for-2.6.34' into for-2.6.35
Conflicts due to context changes next to the backported DMA data change:
	include/sound/soc.h
2010-04-05 19:19:32 +01:00
Daniel Mack 5f712b2b73 ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

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

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

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-05 19:14:11 +01:00
Dan Carpenter f11947c7c5 ALSA: i2c: cleanup: change parameter to pointer
We actually pass an array of 7 chars not 5.
This silences a smatch warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-04 12:21:39 +02:00
Mark Brown d5021ec9fc ASoC: Add a notifier for jack status changes
Some systems provide both mechanical and electrical detection of jack
status changes. On such systems power savings can be achieved by only
enabling the electrical detection methods when physical insertion has
been detected.

Begin supporting such systems by providing a notifier for jack status
changes which can be used to trigger any reconfiguration.

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

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

Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19 19:37:29 +00:00
Mark Brown a655b96c24 Merge branch 'topic/jack' into for-2.6.35 2010-03-19 12:48:10 +00:00
Mark Brown ebb812cb8d ALSA: Add support for key reporting via the jack interface
Some devices provide support for detection of a small number of
buttons on their jacks. One common implementation provides a single
button, implemented by shorting the microphone to ground and detected
along with microphone presence detection by detecting varying current
draws on the microphone bias signal.

Provide support for up to three buttons via the jack interface. These
default to reporting BTN_n but an API is provided to allow these to
be remapped to other keys by the machine driver where it knows what
the keys are. More keys can be added with ease if required.

This is only intended to support simple accessory button designs. If
the interface is limiting then either creating a child device for the
accessory or accessing the input device in the jack directly is
recommended.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-17 18:10:46 +00:00
Mark Brown fbc2dae854 ASoC: Support GPIO based microphone detection for WM8904
The WM8904 allows microphone detection signals to be brought out as
alternate functions of the GPIO signals which can be detected using
interrupt inputs on the CPU. Allow this to be configured using
platform data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 16:03:30 +00:00
Mark Brown cdce4e9ba7 ASoC: Allow configuration of WM8904 GPIO pin functions
Provide platform data allowing the configuration of the GPIO pins
on the WM8904 to be selected, allowing alternate functions to be
enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:58:08 +00:00
Mark Brown 7245387e36 ASoC: Implement interrupt driven microphone detection for WM8903
Support use of the WM8903 IRQ for reporting of microphone presence
and short detection.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:57:43 +00:00
Mark Brown 8abd16a65d ASoC: Add WM8903 interrupt support
Currently used to detect completion of the write sequencer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:57:15 +00:00
Mark Brown 37f88e8407 ASoC: Initial WM8903 microphone bias and short detection
Provide support for WM8903 microphone presence and short detection
using the GPIOs to route out a logic signal suitable for handling
using snd_soc_jack_add_gpios() on the processor GPIOs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:56:54 +00:00
Mark Brown 73b34ead74 ASoC: Add GPIO configuration support for WM8903
Allow users to pass in a default configuration for the GPIOs of
the WM8903 as platform data. This allows configuration of the pin
muxing of the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:56:34 +00:00
Mark Brown da34183e64 ASoC: Allow pins to be force enabled
Allow pins to be forced on regardless of their power state. This is
intended for use with microphone bias supplies which need to be
enabled in order to support microphone detection - in systems without
appropriate hardware leaving the microphone unbiased when not in use
saves power.

The force done at power check time in order to avoid disrupting other
power detection logic.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:56:10 +00:00
Mark Brown e82f5cfa63 ASoC: Remove unused 'muted' flag from DAPM widgets
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16 15:55:48 +00:00
Peter Ujfalusi eeb309a8a6 ASoC: tlv320dac33: Add option for keeping the BCLK running
Platform data option for the codec to keep the BCLK clock
continuously running in FIFO modes (codec master).

OMAP3 McBSP when in slave mode needs continuous BCLK running
on the serial bus in order to operate correctly.

Since in FIFO mode the DAC33 can also shut down the BCLK clock
and enable it only when it is needed, let the platforms decide
if the CPU side needs the BCLK running or not.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-12 11:12:25 +00:00
Mark Brown fad837c16c Merge commit 'v2.6.34-rc1' into for-2.6.35 2010-03-10 15:02:37 +00:00
Takashi Iwai a3087ae970 Merge branch 'topic/misc' into for-linus 2010-03-08 09:35:50 +01:00
Mark Brown 1d24452b55 ASoC: Remove unused pmdown_time flag
The flag is no longer used in the code so it just wastes a bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-05 16:42:46 +00:00
Jaroslav Kysela b30477d5e2 ALSA: timer - pass real event in snd_timer_notify1() to instance callback
Do not use hardcoded SNDRV_TIMER_EVENT_START value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-03 22:39:45 +01:00
Mark Brown 913d7b4cc0 ASoC: Add support for WM8960 capless mode
The WM8960 headphone outputs can be run in capless mode with OUT3
used to drive a pseudo ground for the headphone drivers. In this
mode the mono mixer is not used, the mixer should be turned on
in concert with the headphone output drivers and the device bias
levels are managed differently.

Also tweak the existing bias management to remove the use of active
discharge while we're at it since that's often audible.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-03 17:08:43 +00:00
Mark Brown b6877a477d ASoC: Move WM8960 platform data into include/sound
Avoids machine files having to peer into sound/soc which is a bit
rude and icky.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-03 17:08:42 +00:00
Peter Ujfalusi 258020d088 ASoC: core: Add delay operation to snd_soc_dai_ops
The delay callback can be used by the core to query the delay
on the dai caused by FIFO or delay in the platform side.
In case if both CPU and CODEC dai has FIFO the delay reported
by each will be added to form the full delay on the chain.
If none of the dai has FIFO, than the delay will be kept as
zero.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-03 17:08:41 +00:00
Takashi Iwai 6679ee1870 Merge branch 'topic/asoc' into for-linus 2010-03-01 12:38:59 +01:00
Jassi Brar 14dc5734bd ASoC: Allow mulitple usage count of codec and cpu dai
If we are to have a snd_soc_dai i.e, cpu_dai and codec_dai, shared among two
or more dai_links we need to log the number of active users of the dai.
For that, we change semantics of the snd_soc_dai.active flag from indicator
to reference counter.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-26 11:17:48 +00:00
jassi brar 6423c1875c ASoC: Remove runtime field from DAI
In order for having snd_soc_dais shared among two or more dai_links,
remove the relatively global runtime field from the struct snd_soc_dai

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-22 14:15:30 +00:00
jassi brar d273ebe77a ASoC: Pass dai_link as argument to platform suspend and resume
Passing pointer to relevant dai_link provides easier reach to the
ASoC tree in suspend/resume of snd_soc_platform. It also provides
direct access to the dai at the other end of the dai_link.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-22 14:14:58 +00:00