Commit Graph

9471 Commits (847b2f42be203f3cff7f243fdd3ee50c1e06c882)

Author SHA1 Message Date
Takashi Iwai db72f3fcd4 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-03-10 16:03:09 +01:00
Mark Brown 80e1b84ffe Merge branch 'for-2.6.38' into for-2.6.39 2011-03-10 14:16:35 +00:00
Russell King 3afdb0f352 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2011-03-10 13:53:29 +00:00
Mark Brown 7c2de63386 ASoC: Ensure WM8958 gets all WM8994 late revision widgets
Without this fix the driver won't instantiate properly on relevant
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-03-09 20:30:29 +00:00
Mark Brown 0627bd2575 ASoC: Fix typo in late revision WM8994 DAC2R name
Without this fix the driver won't instantiate properly on relevant
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-03-09 20:30:22 +00:00
Takashi Iwai 848669da3a sound: Use sound_register_*() for additional OSS minor devices
Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.

This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.

Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-09 20:10:37 +01:00
Alexander Sverdlin 4cfeb695e2 ASoC: Enable 192kHz sample rate for EP93xx.
Enable 192kHz sample rate for EP93xx.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:42 +00:00
Alexander Sverdlin 5cbf7e49de ASoC: Improve EP93xx I2S clocks management.
Improve EP93xx I2S clocks management.
Some freqs values are set not exact as they requested for MCLK and
original code was not able to find divisors for SCLK and LRCLK.
This code just picks up nearest value from 3 possible variants.
This patch makes 44100 and 192000 rates working and fixes
capture function (by selecting SCLK/LRCLK=64 where possible).
All other rates should work as before.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:36 +00:00
Alexander Sverdlin 6d33cd771b ASoC: EDB93xx: Manage I2S rates according to datasheet for CS4271 CODEC.
Manage I2S rates according to datasheet for CS4271 CODEC in EDB93xx
machine driver.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:32 +00:00
Alexander Sverdlin 5c3a12e96c ASoC: Manage mode and rate bits correctly for CS4271 CODEC.
Manage mode and rate bits correctly, according to datasheet in CS4271 CODEC.
This is done to make capture work properly.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:16 +00:00
Mark Brown 15086ded21 Merge branch 'for-2.6.38' into for-2.6.39
Conflicts:
	sound/soc/codecs/wm8978.c
	sound/soc/soc-dapm.c
2011-03-09 12:37:42 +00:00
Mark Brown 3e5ff4dfa5 ASoC: Fix double addition of prefixes due to widget prefixing
We're not only prefixing all controls, we're also prefixing the widget
names in the runtime data. This causes us to add the prefix twice - once
when using the widget name to generate the control name and once when
adding the control.

Really we shouldn't be prefixing the widget names at all, the matching
code should be handing this as we always know which DAPM context a
widget came from and always display the widget name in terms of a DAPM
context.  However, we're quite close to the merge window and that's
relatively invasive.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-09 12:36:14 +00:00
Mark Brown 28e8680810 ASoC: Use the correct DAPM context when cleaning up final widget set
Now we've got multi-component we need to make sure that the DAPM context
(and hence register I/O context) we use to apply the pending updates at
the end of a DAPM sequence is the one we were processing rather than the
one that was used to initate the state change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 12:32:50 +00:00
Mark Brown 823dba5191 ASoC: Fix broken bitfield definitions in WM8978
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-03-09 12:32:50 +00:00
Mark Brown 378a90f454 ASoC: Simplify WM9081 speaker startup by using widgets for spaker output
Now we have a register write minimisation code in DAPM we don't need to
worry about the ordering of the enable and disable of the PGA and the
output stage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 12:23:03 +00:00
Abhilash K V ffd6eae2a0 ASoC: AM3517: Update codec name after multi-component update
The i2c client device name (".2-001a" in this case, including
the separator period) for the AIC23 codec on the TI AM3517-EVM
was appended to the codec_name member of am3517evm_dai to
resolve the names mismatch happening in soc_bind_dai_link(),
due to which the card was not getting registered.

Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 11:48:55 +00:00
Jarkko Nikula fa4d1f595a ASoC: omap: rx51: Enable McBSP2 sidetone
McBSP sidetone is needed in telephony applications. McBSP sidetone is a
configurable FIR filter that forms a loopback from McBSP input to output.
This patch enables the McBSP2 sidetone ALSA controls so that it can be used
on Nokia RX-51/N900.

Sidetone feature can be tested with following commands:

	(set up codec input and output paths)
	# Enable and configure sidetone
	amixer -D hw:0 set 'McBSP2 Sidetone' on
	amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767
	echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps
	# Do not loop audio via CPU
	arecord -f dat >/dev/null |aplay /dev/zero

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 10:52:28 +00:00
Dan Carpenter 62f75aafdf ASoC: sgtl5000: use after free in ldo_regulator_register()
The "ldo" variable was dereferenced after free on the error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-08 18:57:24 +00:00
Mark Brown efb7ac3f9c ASoC: Fix prefixing of DAPM controls by factoring prefix into snd_soc_cnew()
Currently will ignore prefixes when creating DAPM controls. Since currently
all control creation goes through snd_soc_cnew() we can fix this by factoring
the prefixing into that function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:35 +00:00
Mark Brown c4ef87867b ASoC: Warn rather than set a silly constraint when we can't do symmetry
Symmetric rate configuration can fail if the second stream starting tries
to apply the symmetric constraint before the first stream has got far
enough to pick a rate. Rather than try to enforce a nonsensical rate of
0Hz log a warning and allow the application to carry on. Things might go
wrong later on but the user will know about it and there's unlikely to be
lasting damage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:30 +00:00
Mark Brown 4f333b20ae ASoC: Refactor symmetric_rates check to reduce indentation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:26 +00:00
Mark Brown 63d24b79b6 ASoC: Convert WM9081 SYSCLK configuration to be device wide
Also respace the CODEC ops a bit for legibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:22 +00:00
Mark Brown ec4ee52a8f ASoC: Provide CODEC clocking operations and API calls
When multi component systems use DAIless amplifiers which require clocking
configuration it is at best hard to use the current clocking API as this
requires a DAI even though the device may not even have one. Address this
by adding set_sysclk() and set_pll() operations and APIs for CODECs.

In order to avoid issues with devices which could be used either with or
without DAIs make the DAI variants call through to their CODEC counterparts
if there is no DAI specific operation. Converting over entirely would create
problems for multi-DAI devices which offer per-DAI clocking setup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:16 +00:00
Mark Brown b993f92b99 ASoC: Fix section mismatch warnings in WM8994
Annoying as the __devinitdata is actually correct.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:11 +00:00
Mark Brown 149c7b441b ASoC: Use data based init for WM9081 DAPM
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:08 +00:00
Mark Brown 89b95ac09e ASoC: Add DAPM widget and path data to CODEC driver structure
Allow a slight simplification of CODEC drivers by allowing DAPM routes and
widgets to be provided in a table. They will be instantiated at the end of
CODEC probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:55:51 +00:00
Takashi Iwai a2800300f2 ALSA: asihpi - Use %zd for size_t argument in error message
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 18:20:46 +01:00
Clemens Ladisch 0e82e5fa97 ALSA: control: clean up snd_ctl_hole_check()
The return value of snd_ctl_hole_check() is used only to detect whether
to continue the loop in snd_ctl_find_hole() or not, so we can simplify
the code by changing this return type to a boolean.  Also rename this
function to better show what it actually does.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:00:09 +01:00
Clemens Ladisch 7c73358771 ALSA: control: fix numid conflict check for new controls
The purpose of the snd_ctl_hole_check() function is to find conflicts
between the numerical IDs of the new control and those of any existing
controls.  However, it would fail to detect an existing control whose
count is smaller than the new control's count and whose interval of IDs
is entirely contained in the interval of the new control's IDs.

To fix this, use the correct formula to detect overlapping intervals,
which happens to simplify the condition.

This problem was not encountered so far because ALSA does not yet allow
drivers to allocate specific control IDs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:48 +01:00
Adrian Knoth bdd3255d3a ALSA: hdspm - Add firmware ID for older AES32 cards.
The current AES32 firmware revision ID is 234, however, a user confirmed
that everything works fine with the previous revision, too.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:16 +01:00
Alexander Sverdlin f9c540456a ASoC: Remove warnings in ep93xx-i2s.c
Remove warnings in ep93xx-i2s.c

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 17:32:02 +00:00
Alexander Sverdlin 383f8465d1 ASoC: Extend range of supported sample rates for CS4271 CODEC.
Extend range of supported sample rates for CS4271 CODEC.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 17:32:02 +00:00
Mark Brown 9b74c7d6ba ASoC: Add LM4857 to SND_SOC_ALL_CODECS
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-07 13:14:51 +00:00
Lars-Peter Clausen a077ff9034 ASoC: Add driver for the dfbmcs320 bluetooth module
This patch adds a codec driver for the dfbmcs320 bluetooth module, which is used
on the neo1973 boards.

The patch also modifies the neo1937_wm8753 sound board driver to use the new
driver instead of registering the bluetooth DAI manually.
Previously there was a name mismatch between the bluetooth DAI and the bluetooth
DAI link and the sound card was not instantiated, with this patch the issue is
no longer present and sound support works again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:20:01 +00:00
Lars-Peter Clausen f5c4ffbd65 ASoC: Samsung: Merge neo1937_wm8753 and neo1973_gta02_wm8753 sound board driver
The neo1973(GTA01) and neo1973_gta02(GTA02) have a very similar audio hardware
setup. They both use the same codec with the same routing to the gsm modem and
bluetooth chip. But they do use different AMPs though and there are some minor
differences in the speaker setup.

As a result most of the code of those two drivers is identical.
So from a maintenance point of view it makes sense to merge them into a single
driver. It also reduces the size of kernel images supporting both the GTA01 and
GTA02.

As a side-effect of this merge the GTA01 for example gains support for routing
audio to and from the bluetooth DAI.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:50 +00:00
Lars-Peter Clausen b7874e4490 ASoC: neo1973_gta02_wm8753: Use gpio_request_array to request gpios
Using gpio_request_array instead of requesting and setting up each gpio by hand
makes the code more readable and more compact.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:42 +00:00
Lars-Peter Clausen da70a3e926 ASoC: neo1973_gta02_wm8753: Remove lm4853_{set,get}_state
This patch drops the lm4853_{set,get}_state functions and the "Amp State Switch"
control.
Those were noops which existed to maintain alsa state file compatibility. Since
the control names have changed due to internal changes in the ASoC core and
state file compatibility was broken anyway it makes sense to drop them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:32 +00:00
Lars-Peter Clausen 9b0a25f038 ASoC: neo1973_wm8753: Move lm4857 specefic code to its own module
This patch moves the code for the lm4857 AMP from the neo1973_wm8753 sound
board driver to its own module.
The lm4857 is a generic AMP IC and not specific to the neo1973.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:22 +00:00
Lars-Peter Clausen 004c52e009 ASoC: neo1973_wm8753: Remove scenario management code.
It has been proven to be inflexible to do scenario management in kernel space.

Since actual neo1973 board support has not been merged in mainline and this
patch has been in the neo1973 tree for some time now it should be safe to remove
this functionality without breaking existing userspace.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:12 +00:00
Javier Martin 841a451f68 ASoC: Add machine driver for Visstrim_M10 board.
Visstrim_M10 boards have an external tlcv320aic3205 codec
attached to SSI1. This driver glues together both interfaces.
External amplifier is not supported in this first version.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:48:18 +00:00
Axel Lin 79a54ea1ed ASoC: Constify i2c_device_id table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:46:01 +00:00
Axel Lin 573f26e3c3 ASoC: tlv320dac33: add MODULE_DEVICE_TABLE
The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:45:53 +00:00
Mark Brown a2721fd9fa ASoC: Add missing debugfs conditionals
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-07 11:13:56 +00:00
Mark Brown 20d660653a ASoC: Fix outdated API usage in tlv320aic32x4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-07 11:13:42 +00:00
Linus Torvalds 6277d53a9f 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 - Don't set to D3 in Cirrus errata init verbs
  ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
  ASoC: WM8994: Ensure late enable events are processed for the ADCs
  ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
  ASoC: Fix WM9081 platform data initialisation
  ALSA: hda - Fix unable to record issue on ASUS N82JV
  ALSA: HDA: Realtek: Fixup jack detection to input subsystem
2011-03-06 10:44:49 -08:00
Takashi Iwai 2133991d58 Merge branch 'fix/asoc' into for-linus 2011-03-06 12:37:42 +01:00
Javier Martin 1d471cd126 ASoC: Add TI tlv320aic32x4 codec support.
This patch adds support for tlv320aic3205 and tlv320aic3254 codecs.
It doesn't include miniDSP support for aic3254.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-04 18:21:08 +00:00
Takashi Iwai 38c0764190 ALSA: hda - Don't set to D3 in Cirrus errata init verbs
The errata init verbs for CS42xx codecs contain the verbs to set
the power-state of SPDIF nodes to D3, which seem to break the SPDIF
output on some MacBooks.  Since this is executed during the power-up
initialization, we shouldn't turn them down there.

Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 15:16:33 +01:00
Takashi Iwai cd372fb3be ALSA: hda - Make common input-jack helper functions
Since multiple codec drivers already use the input-jack stuff, let's
make common helper functions to reduce the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 14:40:14 +01:00
Takashi Iwai d207df2df0 Merge branch 'fix/hda' into topic/hda 2011-03-03 12:56:34 +01:00
Richard Samson c8900a0fad ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
Added the missing HDMI codec IDs for new Nvidia stuff.
Note that ID 0x17 isn't assigned to anything so far, as suggested by
Stephen.

[Modified to get rid of 0x17 by tiwai]

Signed-off-by: Richard Samson <samson.richard@gmail.com>
Acked-by: Acked-By: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 12:49:29 +01:00
Mark Brown 28e9ad921d ASoC: Add a late_probe() callback to cards
This is run after the DAPM widgets and routes are added, allowing setup
of things like jacks using the routes. The main card probe() is run before
anything else so can't be used for this purpose.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:35 +00:00
Mark Brown b8ad29debd ASoC: Allow card DAPM widgets and routes to be set up at registration
These will be added after all devices are registered and allow most DAI
init functions in machine drivers to be replaced by simple data.
Regular controls are not supported as the registration function still
works in terms of CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:26 +00:00
Mark Brown e37a4970cd ASoC: Add a per-card DAPM context
This means that rather than adding the board specific DAPM widgets to a
random CODEC DAPM context they can be added to the card itself which is
a bit cleaner. Previously there only was one DAPM context and it was
tied to the single supported CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:16 +00:00
Mark Brown 88e8b9a84b ASoC: Check for a CODEC before dereferencing in DAPM
A CODEC pointer is optional (and is checked for in most contexts within
DAPM) - add checks to the few places where it was missed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:03 +00:00
Mark Brown 12ea2c782e ASoC: Get the card directly from the DAPM context
Rather than indirecting through the CODEC we can look the card up directly
from the card pointer in the DAPM context.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:14:55 +00:00
Mark Brown 1916a2aae5 ASoC: Add TLV information for WM8978 DAC limiter
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:14:45 +00:00
Mark Brown 4955f631a4 Merge branch 'for-2.6.38' into for-2.6.39 2011-03-03 11:13:15 +00:00
Mark Brown c8fb034ccd ASoC: Fix broken bitfield definitions in WM8978
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-03-03 11:12:58 +00:00
Dimitris Papastamos 8959c91088 ASoC: WM8994: Ensure MICBIAS is provided with a clock
The patch 'ASoC: WM8994: Improve Playback Robustness' did not handle
this case properly.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-03 11:12:37 +00:00
Tony Lindgren b2833a0578 Merge branches 'devel-iommu-mailbox', 'devel-mcbsp', 'devel-board' and 'devel-hsmmc' into omap-for-linus
Conflicts:
	arch/arm/mach-omap2/omap_hwmod_44xx_data.c
2011-03-02 17:11:18 -08:00
Tony Lindgren 12d7d4e0ed Merge branch 'devel-cleanup' into omap-for-linus
Conflicts:
	arch/arm/mach-omap2/timer-gp.c
2011-03-02 17:07:14 -08:00
Mark Brown 4a5f7bda8f ASoC: Add platform data for WM9081 IRQ pin configuration
The WM9081 IRQ output can be either active high or active low and can
support either CMOS or open drain modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-01 23:30:53 +00:00
Mark Brown 49542656ad ASoC: Remove module probe announcements from CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-01 23:30:40 +00:00
Javier Martin 0a93421b6a ASoC: Fix burstsize and DSP_B format problems in imx-ssi.
When choosing IMX_DMA flag, burtsizes are set to its default
value (0) which leads to driver malfunction. Change them to 4.

DSP_B interface needs additional flag to match DSP_B formats
as described in several codecs as wm8741 and aic3205.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-01 23:30:14 +00:00
Dimitris Papastamos b462c6e69a ASoC: WM8994: Ensure MICBIAS is provided with a clock
The patch 'ASoC: WM8994: Improve Playback Robustness' did not handle
this case properly.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-01 23:29:12 +00:00
Mark Brown c496ccd5db Merge branch 'for-2.6.38' into for-2.6.39 2011-03-01 23:29:04 +00:00
Dimitris Papastamos 04d286819b ASoC: WM8994: Ensure late enable events are processed for the ADCs
Ensure that the ADCs are provided with a clock as the previous patch
"ASoC: WM8994: Improve playback robustness" did not handle this case
properly.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-03-01 23:27:07 +00:00
Dimitris Papastamos a3cff81ac1 ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
Since we began using the late clock disable functionality, ensure that
we don't disable the clock if any of the ADC or DAC paths are still
enabled.  This happens when we have simultaneous playback and recording.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-03-01 23:27:00 +00:00
Mark Brown 3ee845acba ASoC: Fix WM9081 platform data initialisation
It went AWOL in the multi-component conversion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-03-01 23:10:41 +00:00
Eric Bénard 2c4066cca4 eukrea-tlv320: add MBIMXSD51 support
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-01 14:19:51 +01:00
Chih-Wei Huang c790ad31a2 ALSA: hda - Fix unable to record issue on ASUS N82JV
The codec of N82JV is ALC269VB.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-01 09:01:01 +01:00
Linus Torvalds c4319c7db8 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:
  eukrea-tlv320: fix platform_name
  ASoC: correct pxa AC97 DAI names
  ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
  ALSA: HDA: Add ideapad quirk for two Dell machines
  ALSA: HDA: Add a new Conexant codec 506e (20590)
  ALSA: usb-audio: fix oops due to cleanup race when disconnecting
  ASoC: Hook wm_hubs micbiases up to CLK_SYS
  ASoC: Correct definition of WM8903_VMID_RES_5K
  ASoC: Fix WM8958 default microphone detection argument ordering
  ALSA: HDA: Fix mic initialization in VIA auto parser
  ALSA: fix one memory leak in sound jack
2011-02-28 17:47:09 -08:00
Grant Likely f07eb223a0 dt/sound: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/sound.  The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-02-28 13:22:44 -07:00
David Henningsson f0ce279962 ALSA: HDA: Realtek: Fixup jack detection to input subsystem
This patch fixes an error in the jack detection reporting,
causing the jack detection sometimes not to be reported
correctly to the input subsystem. It should apply to several
Realtek codecs.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 16:23:13 +01:00
Stephen Warren e1412e636e ASoC: Tegra: Fix error handling in DMA channel alloc
tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-28 15:10:03 +00:00
Adrian Knoth 7c7102b7af ALSA: hdspm - Fix midi port initialization
Depending on the model and the presence of a TCO module, the number of
midi ports varies. Some have 1 port (MADIface), some have 2 (default),
with TCO, there are 3.

Don't hardcode the number of midi ports to initialize.

This patch also fixes a boot lockup on MADIface.

[Coding-style fixes by tiwai]

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:58:19 +01:00
Adrian Knoth 5027f347ff ALSA: hdspm - Abort on unknown firmware revision
Don't continue if we cannot detect the real card type, otherwise, all
subsequent functions, especially strcpy(), would fail, leaving the whole
driver in an unusable state.

Without such a protection, dmesg would look like this:

Pid: 1525, comm: modprobe Not tainted 2.6.38-rc6 #1 MSI MS-7250/MS-7250
EIP: 0060:[<c114e700>] EFLAGS: 00010296 CPU: 1
EIP is at strcpy+0x10/0x30
EAX: f4d33e58 EBX: f5990800 ECX: f4d33e58 EDX: 00000000
ESI: 00000000 EDI: f4d33e58 EBP: f5990930 ESP: f3dd3e0c
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
f53d4204 00000000 f90bfc03 00000001 00000001 f3dd3e64 c10fedff f3dd3e7c
f3d854e4 f53d4000 c10307b8 00000001 c10307b8 f5990860 c10307b8 00000001
c10332e5 f59908bc c12f4339 f59908bc f5990860 c11ef207 f4d33e00 f53d4000
[<f90bfc03>] ? snd_hdspm_probe+0x7e7/0x1166 [snd_hdspm]
[<c10fedff>] ? __sysfs_add_one+0x1f/0xf0
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10332e5>] ? add_preempt_count+0xa5/0xd0
[<c12f4339>] ? _raw_spin_lock_irqsave+0x19/0x40
[<c11ef207>] ? pm_runtime_enable+0x17/0x80
[<c1160172>] ? local_pci_probe+0x42/0xb0
[<c1161091>] ? pci_device_probe+0x61/0x80
[<c11e9587>] ? driver_probe_device+0x77/0x180
[<c11600f0>] ? pci_match_device+0xa0/0xc0
[<c11e9709>] ? __driver_attach+0x79/0x80
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8e32>] ? bus_for_each_dev+0x52/0x80
[<c11e9416>] ? driver_attach+0x16/0x20
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8771>] ? bus_add_driver+0xa1/0x220
[<c1160f20>] ? pci_device_remove+0x0/0xf0
[<c11e99a3>] ? driver_register+0x63/0x120
[<c11612bd>] ? __pci_register_driver+0x3d/0xb0
[<c1001132>] ? do_one_initcall+0x32/0x160
[<f90d6000>] ? alsa_card_hdspm_init+0x0/0x14 [snd_hdspm]
[<c10676a9>] ? sys_init_module+0x99/0x1e0
[<c10ade3d>] ? sys_close+0x6d/0xc0
[<c1002c90>] ? sysenter_do_call+0x12/0x26
---[ end trace 239f0661c558378b ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:57:21 +01:00
Adrian Knoth 526ea86778 ALSA: hdspm - Add updated firmware revision for AES32
In contrast to the PCIe version (RME AES), the PCI version (RME AES32)
has a different firmware revision.

This patch adds the missing PCI revision.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:50 +01:00
Adrian Knoth d2d10a2132 ALSA: hdspm - AES32: Use define instead of hardcoded channel count
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:29 +01:00
Mark Brown 61a142b7e4 ASoC: Staticise non-exported symbols in SGTL5000
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-28 14:33:01 +00:00
Zeng Zhaoming 5f83df9a61 ASoC: remove unnecessary header including in SGTL5000 codec driver
Remove unnecessary headers:
 - mach/hardware.h in sgtl5000.c
 - linux/i2c.h in sgtl5000.h

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-28 14:24:35 +00:00
Risto Suominen 8460ae70bb ALSA: powermac - Allow input from microphone on Tumbler
Allow input from microphone on remaining PowerBooks and iBooks with Tumbler.
Tested only with PowerBook G4 Gigabit Ethernet (PowerBook3,3).

[Fixed to use of_machine_is_compatible by tiwai]

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:19:17 +01:00
Justin P. Mattock b6aa63eeb3 sound:core:seq:seq_ports.c Remove one to many n's in a word.
The Patch below removes one to many "n's" in a word..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-27 10:05:53 +01:00
Takashi Iwai 11be6a269d Merge branch 'fix/asoc' into for-linus 2011-02-26 11:27:47 +01:00
Mark Brown ccecc127a8 Merge branch 'for-2.6.38' into for-2.6.39 2011-02-26 09:50:01 +00:00
Eric Bénard 573f89b5f3 ASoC: eukrea-tlv320: add MBIMXSD51 support
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25 12:58:59 +00:00
Mark Brown b3111a9aa8 ASoC: Move WM2000 to dev_pm_ops
There's a general move to use dev_pm_ops rather than bus specific functions
in order to facilitate work on the PM core. Do this conversion to WM2000.
The driver ought to be updated to work better in a multi-component model
but the mechanical conversion ensures that we avoid blocking PM core work
until that happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-25 12:58:36 +00:00
Eric Bénard 43c6318882 eukrea-tlv320: fix platform_name
commit f0fba2ad1b included a mistake
on the name of the platform in the snd_soc_dai_link structure.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-02-25 12:57:49 +00:00
Zeng Zhaoming 9b34e6cc3b ASoC: Add Freescale SGTL5000 codec support
Add Freescale SGTL5000 codec support.
Supported features:
 - line-in and mic input
 - headphone and line-out output
 - line-in bypass ADC and DAC to headphone
 - 16, 20, 24, 32 bit audio
 - 8 ~ 96k sample rates

Signed-off-by: Zeng Zhaoming <zhaoming.zeng@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25 12:09:33 +00:00
Justin P. Mattock ceade6c81b ASoC: remove one to many l's in the word
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25 11:48:45 +00:00
Mark Brown 5448716ba9 Merge branch 'for-2.6.38' into for-2.6.39 2011-02-25 11:45:09 +00:00
Stephen Warren a3cd50deef ASoC: Tegra: Move utilities to separate module
The utilities will be required by every machine driver. Including the
utility object directly into every machine driver causes a build failure
if the modules are actually built into the kernel, since each will define
the symbols exported by the utility file. Solve this by moving the
utility object into a separate module.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25 11:44:46 +00:00
Dimitris Papastamos 67f5ed6e71 ASoC: soc-dapm: Include quotes around contents in debugfs entries
Sometimes the name of the control switch of a dapm route contains
spaces which makes it impossible to distinguish it from the source widget.
Add quotes around the names of the widgets to makes these parsable.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25 11:44:36 +00:00
Mark Brown 2031c0645c ASoC: Remove -codec suffix from WM9081 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-25 11:43:53 +00:00
Dmitry Eremin-Solenikov 4bfc4e2508 ASoC: correct pxa AC97 DAI names
Correct names for pxa AC97 DAI are pxa2xx-ac97 and pxa2xx-ac97-aux. Fix
that for all PXA platforms.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-02-25 11:42:18 +00:00
Justin P. Mattock fb9b5a0eb6 ALSA: emu10k1 - emu10k1_main.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:52:22 +01:00
Justin P. Mattock a2e2bc2874 ALSA: hda - patch_realtek.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:51:59 +01:00
Kishon Vijay Abraham I 2686e07b3e ASoC: McBSP: get hw params from McBSP driver
Removed the use of macros to obtain base address and DMA channel number.
Instead use the McBSP driver API's that passes base address and DMA
channel number to the client driver.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-24 13:04:13 -08:00
Vitaliy Kulikov 4dfb8a45d5 ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
Also fix number of 92HD87 pins to exclude invalid pins.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-24 18:04:56 +01:00
Mark Brown 1d2c27f941 ASoC: Pass the jack to jack notifiers
We're currently not passing anything and this will make the card and so on
more discoverable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-24 09:42:33 +00:00
Takashi Iwai 1aa924e21e Merge branch 'fix/hda' into topic/hda 2011-02-24 10:05:01 +01:00
Łukasz Wojniłowicz 786c51f916 ALSA: hda - 4930g add internal lfe slider
Lately I sent patch that switched lfe with side in mixer for
acer-aspire-4930g. Then I connected 5.1 speaker system and noticed that
lfe slider wasn't working and that old lfe slider worked. What I'm doing
now is:

- reverting old patch
- adding internal lfe slider
- removing side as it is superfluous (ALC888S-VC is 7.1 but in fact
  laptop can only do 5.1 and it is so in drivers for MS Windows)

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-24 10:03:31 +01:00
Russell King aa25afad2c ARM: amba: make probe() functions take const id tables
Make Primecell driver probe functions take a const pointer to their
ID tables.  Drivers should never modify their ID tables in their
probe handler.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-23 16:24:14 +00:00
David Henningsson ebbd224c22 ALSA: HDA: Add ideapad quirk for two Dell machines
These two Dell machines have been reported working well with
the ideapad model.

BugLink: http://bugs.launchpad.net/bugs/723676
Cc: stable@kernel.org
Tested-by: David Chen <david.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 16:00:28 +01:00
David Henningsson 6da8b51657 ALSA: HDA: Add a new Conexant codec 506e (20590)
Conexant 506e/20590 has the same graph as the rest of the 5066 family.

BugLink: http://bugs.launchpad.net/bugs/723672

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 16:00:27 +01:00
Adrian Knoth a7edbd5bf9 ALSA: hdspm - Fix lock/sync reporting on MADI and AES32
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:44 +01:00
Adrian Knoth 4ab69a2b3b ALSA: hdspm - prevent reading unitialized stack memory
Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit
e68d3b316a. I'm copying his text here:

The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged
users to read uninitialized kernel stack memory, because several fields
of the hdspm_config struct declared on the stack are not altered
or zeroed before being copied back to the user.  This patch takes care
of it.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:29 +01:00
Adrian Knoth 7c4a95b5ec ALSA: hdspm - fix sync check on AES32
Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong
frequency and sync detection on AES32. According to him, the provided
patch fixes these issues.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:42 +01:00
Adrian Knoth f6ea805f52 ALSA: hdspm - Remove input selector on MADIface
In contrast to the RME MADI card, coax/optical selection on the MADIface
is done via a physical switch located at the breakout box. Obviously,
the driver cannot switch ports in software.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:06 +01:00
Adrian Knoth 01e9607815 ALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIface
Caused by two typos, no output channel mappings were assigned for
MADI/MADIface at double/quad speed.

The channel mapping is indeed identical to the single speed mapping, the
cards will simply use the first N channels.

Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:30 +01:00
Adrian Knoth 88fabbfcc6 ALSA: hdspm - Restrict channel count on RME AES/AES32
Without calling an appropriate rule, AES/AES32 cards would announce a
theoretical channel count of 64 (HDSPM_MAX_CHANNELS), leading to the
already known bug:

[37422.640481] ------------[ cut here ]------------
[37422.640487] WARNING: at sound/pci/rme9652/hdspm.c:5449
snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm]()
[37422.640489] Hardware name: PRIMERGY RX100 S6
[37422.640490] BUG? (info->channel >= hdspm->max_channels_in)
[37422.640492] Modules linked in: snd_hdspm snd_seq_midi ipmi_watchdog
ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 e1000e
snd_rawmidi power_meter [last unloaded: snd_hdspm]
[37422.640501] Pid: 22231, comm: jackd Tainted: G      D W
2.6.36-gentoo-r5 #5
[37422.640502] Call Trace:
[37422.640508]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[37422.640511]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[37422.640514]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640518]  [<ffffffffa0055763>] snd_hdspm_ioctl+0x18f/0x202
[snd_hdspm]
[37422.640522]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[37422.640525]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[37422.640527]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640531]  [<ffffffff8105be6c>] ? __srcu_read_unlock+0x3b/0x59
[37422.640533]  [<ffffffff81400bce>] snd_pcm_capture_ioctl1+0x20a/0x227
[37422.640537]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[37422.640540]  [<ffffffff81400c15>] snd_pcm_capture_ioctl+0x2a/0x2e
[37422.640543]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[37422.640546]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[37422.640549]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[37422.640552] ---[ end trace 0cd919cd68118082 ]---

We already have all the right values in place, we simply have to inform
the upper layers about this restriction.

Note that snd_hdspm_hw_rule_rate_out_channels and
snd_hdspm_hw_rule_rate_in_channels must not be called on AES32, because
the channel count is always 16, no matter of the samplerate in use.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:05 +01:00
Adrian Knoth 483cee77d2 ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)
Only RayDAT and AIO provide sane buffer pointers that can be used with
HDSPM_BufferPositionMask, on all other cards, this would result in a
wrong HW pointer leading to xruns and these messages:

[260808.916788] BUG: pcmC0D0p:0, pos = 2976, buffer size = 1024, period size = 512
[260808.961124] BUG: pcmC0D0c:0, pos = 4944, buffer size = 1024, period size = 512

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:28 +01:00
Adrian Knoth 432d2500ac ALSA: hpdsm - RME AES(32): Fix missing channel mappings
On RME AES and AES(32), none of the required information
(max_channels_in, max_channels_out, channel mappings, port names) was
set, leading to the BUG below.

This patch adds the missing bits, thus fixing the bug.

125.058768] ------------[ cut here ]------------
[  125.058773] WARNING: at sound/pci/rme9652/hdspm.c:5389
snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm]()
[  125.058775] Hardware name: PRIMERGY RX100 S6
[  125.058777] BUG? (info->channel >= hdspm->max_channels_out)
[  125.058778] Modules linked in: ipmi_watchdog ipmi_poweroff ipmi_si
ipmi_devintf ipmi_msghandler snd_hdspm power_meter e1000e snd_rawmidi
i2c_i801
[  125.058787] Pid: 3652, comm: audacity Tainted: G        W
2.6.36-gentoo-r5 #5
[  125.058788] Call Trace:
[  125.058792]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[  125.058796]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[  125.058800]  [<ffffffffa006761a>] snd_hdspm_ioctl+0x10c/0x1d8
[snd_hdspm]
[  125.058803]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[  125.058806]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[  125.058809]  [<ffffffff810c604c>] ? __do_fault+0x361/0x3a6
[  125.058812]  [<ffffffff81400e23>] snd_pcm_playback_ioctl1+0x20a/0x227
[  125.058815]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[  125.058818]  [<ffffffff81400e6a>] snd_pcm_playback_ioctl+0x2a/0x2e
[  125.058821]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[  125.058824]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[  125.058827]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[  125.058830] ---[ end trace 5bddb08e5d4cbeb1 ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:15 +01:00
Takashi Iwai 382225e62b ALSA: usb-audio: fix oops due to cleanup race when disconnecting
When a USB audio device is disconnected, snd_usb_audio_disconnect()
kills all audio URBs.  At the same time, the application, after being
notified of the disconnection, might close the device, in which case
ALSA calls the .hw_free callback, which should free the URBs too.

Commit de1b8b93a0 "[ALSA] Fix hang-up at disconnection of usb-audio"
prevented snd_usb_hw_free() from freeing the URBs to avoid a hang that
resulted from this race, but this introduced another race because the
URB callbacks could now be executed after snd_usb_hw_free() has
returned, and try to access already freed data.

Fix the first race by introducing a mutex to serialize the disconnect
callback and all PCM callbacks that manage URBs (hw_free and hw_params).

Reported-and-tested-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Cc: <stable@kernel.org>
[CL: also serialize hw_params callback]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 08:15:43 +01:00
Mark Brown 864c4bd248 ASoC: Simplify default WM8958 jack detection code
The default WM8958 jack detection handler implements a full set of buttons
and also support for video detection. Support for multi-button jacks is
fairly system specific and will usually require some tuning for headsets
so simplify the implementation to only report a simple short to ground
button, leaving multi-button headsets to be handled by system specific
code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:42:33 -08:00
Mark Brown 48e028ecca ASoC: Support configuration of WM8958 microphone bias analogue parameters
The WM8958 has a different microphone bias architecture to WM8994 so needs
different configuration to WM8994. Support this in platform data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:42:06 -08:00
Mark Brown 9b7c525dfa ASoC: Support WM8958 direct microphone detection IRQ
Allow direct routing of the WM8958 microphone detection signal to a GPIO
to be used, saving the need to demux the interrupt.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:41:41 -08:00
Mark Brown 7d700ac8d9 ASoC: Mark WM8958 microphone bias registers as readable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:41:19 -08:00
Mark Brown 9d0624a740 ASoC: Run bias level changes for all DAPM contexts in parallel
As bias level changes can be quite time consuming and the bias changes
for multiple devices aren't strongly tied to each other (if anything it
can be advantageous to bring different devices up together) we can improve
the state transition time for multi-component systems by running the bias
level changes for all the devices in parallel. This is very simple to
achieve using the kernel async functionality so use that to schedule the
work.

This should have no practical effect for the overwhelming majority of
systems which have a single DAPM context - we'll bounce into another
thread to do the bias level change but otherwise everything will happen
in exactly the same order as it did before.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:40:54 -08:00
Mark Brown ed5a4c4723 ASoC: Remove card from snd_soc_dapm_set_bias_level()
We can get the card from the DAPM context so don't bother passing it as
an argument.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:39:14 -08:00
Mark Brown 4c090edfbb Merge branch 'for-2.6.38' into for-2.6.39 2011-02-22 10:38:13 -08:00
Mark Brown cea2bc50a3 ASoC: Hook wm_hubs micbiases up to CLK_SYS
The microphone detection functionality requires a clock to work. In any
non-detection case where the MICBIAS is enabled CLK_SYS will be needed
anyway so there is no negative impact on power consumption.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:37:49 -08:00
Mark Brown 8ceed344af ASoC: Correct definition of WM8903_VMID_RES_5K
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:37:48 -08:00
Mark Brown 406e56c9df ASoC: Fix WM8958 default microphone detection argument ordering
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 10:37:32 -08:00
Linus Torvalds 609b06f335 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Ensure supplies are maintained for force enabled widgets
  ASoC: WM8994: Improve playback robustness
  ASoC: WM8994: Improve robustness in some use cases
  ASoC: WM8903: Fix mic detection enable logic
  ASoC: WM8903: Fix mic detection register definitions
  ASoC: CX20442: fix wrong reg_cache_default content
  ASoC: Sync initial widget state with hardware
2011-02-22 08:20:02 -08:00
David Henningsson 3064967617 ALSA: HDA: Fix mic initialization in VIA auto parser
This typo caused some microphone inputs not to be correctly
initialized on VIA codecs.

Reported-By: Mark Goldstein <goldstein.mark@gmail.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-22 14:02:09 +01:00
Jarkko Nikula 9d7e584b3f ASoC: omap: rx51: Add FM transmitter support
Si4713 FM transmitter on Nokia RX-51/N900 is connected to same Line out
signals of TLV320AIC34 than TPA6130 headphone amplifier.

This patch adds route to transmitter and "FM Transmitter" control to keep
route active when needed.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 09:38:50 +00:00
Kukjin Kim b4a5660da0 ASoC: Change dependency of ARCH_EXYNOS4
This patch changes dependency of ARCH_EXYNOS4 from ARCH_S5PV310
according to the change of ARCH name, EXYNOS4.

Acked-by: Jassi Brar <jassi.brar@samsung.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-02-22 13:51:15 +09:00
Lu Guanqun eeda276bef ALSA: fix one memory leak in sound jack
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-21 09:33:49 +01:00
Linus Torvalds 6f576d57f1 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: Do not announce false surround in Conexant auto
  ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
  ALSA: HDA: Add position_fix quirk for an Asus device
  ALSA: caiaq - Fix possible string-buffer overflow
  ALSA: au88x0 - Modify pointer callback to give accurate playback position
2011-02-20 10:15:57 -08:00
Raymond Yau 01cb702158 ALSA - au88x0 - add Playback Volume to 10 bands Equalizer Controls
Add " Playback Volume" to 10 bands Equalizer Controls of au88x0 so that
alsa-lib won't regard them as "Capture Volume".

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-20 10:05:29 +01:00
David Henningsson 89724958e5 ALSA: HDA: Do not announce false surround in Conexant auto
Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.

BugLink: http://bugs.launchpad.net/bugs/721126
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:37 +01:00
David Henningsson 983345e51e ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.

It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.

BugLink: http://bugs.launchpad.net/bugs/719524
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:14 +01:00
Andreas Mohr 6ba9256c09 ALSA: azt3328: hook up new emulated AC97 on AC97 patch side
Make newly created AC97 emulation of azt3328 known to the AC97 layer
side.
- relocate common functions to the top (due to definition after use)
- rename control names
- adjust 3D settings to the card's custom layout of this register

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:03:08 +01:00
Andreas Mohr b5dc20cd21 ALSA: azt3328: add custom AC97 semi-emulation use standard ALSA AC97 layer
Make use of the very flexible ALSA ac97 layer (hooks for custom I/O!)
on this weird AC97 copycat hardware,
via semi-extended I/O translation/emulation.

Some 5kB binary/loaded size saved (well... additional huge AC97 module
penalty not factored in, of course ;-P).
Given that the driver previously had 20kB that's not bad,
but the much more important thing is to have AC97 layer stress-tested
with a thoroughly weird AC97 copycat (or, simply put, if it were not for
this AC97 test aspect, this effort would merely have been a nut job ;).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:02:24 +01:00
Mark Brown 4baafdd76b ASoC: Hook wm_hubs micbiases up to CLK_SYS
The microphone detection functionality requires a clock to work. In any
non-detection case where the MICBIAS is enabled CLK_SYS will be needed
anyway so there is no negative impact on power consumption.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-18 15:05:53 -08:00
Mark Brown 40d2f1592a ASoC: Mark WM8958 microphone detection registers readable
So they show up in codec_reg.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-18 14:47:02 -08:00
Mark Brown 7887ab3a27 ASoC: Allow GPIO jack detection to be configured as a wake source
Some systems wish to use jacks as wake sources. Provide a wake flag in the
GPIO configuration which causes the driver to enable the IRQ as a wake
source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18 09:14:14 -08:00
Mark Brown 5a9f91ca79 ASoC: Log wm_hubs DC servo operation code when reporting a timeout
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18 09:14:04 -08:00
Mark Brown d1118aaad2 ASoC: Remove export of snd_soc_dapm_stream_event()
The only thing that should ever be calling this is soc-core and that is
built as part of the same module so doesn't need the export.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18 09:13:39 -08:00
Mark Brown 4a8d929d14 ASoC: Fix missing space in WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18 09:13:30 -08:00
Andreas Mohr 03c2d87a21 ALSA: ac97: replace open-coded, error-prone stuff with AC97 bit defines
Use AC97 macros (sometimes already existing, or newly added)
instead of error-prone repetition of open-coded values.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-17 18:39:25 +01:00
Tony Lindgren 9238b6d8e8 Merge branches 'devel-cleanup', 'devel-board', 'devel-early-init' and 'devel-ti816x' into omap-for-linus 2011-02-16 11:32:38 -08:00
Vinod Koul 5b499f8bf3 ASoC: sst_platform: fix the pulseaudio error
Pulseaudio doesnt work with current driver and it was root caused to absense of
hw_params function and malloc_pages in it.
This patch adds this and allows pa to work fine with these drivers

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-15 17:59:17 -08:00
Vinod Koul d58198b943 ASoC: mfld_machine: make use of soc_register_card API
This patch removes the old method of soc-audio device creation in mfld machine
and makes use of new soc_register_card API to register the card

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-15 17:59:05 -08:00
Vinod Koul 65e9625e1f ASoC: sn95031: fix the amic tlv scale
The tlv scale is defined as (min, step, mute). The mute is not supported here so
put the value to 0

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-15 17:58:54 -08:00
Vinod Koul a62ffc92e8 ASoC: sn95031: fix the DMIC path routing
This patch makes the DMIC dynamically connect to TX Mux, earlier code had
erroneously made this as static path

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-15 17:58:41 -08:00
Vinod Koul 1461d0630e ASoC: sn95031: make playback rails depend on actual pins they control
This patch makes the codec playback rails (headset and speaker) depend on
actual pins they control. This enables better power management of the codec

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-15 17:58:26 -08:00
Jarkko Nikula 1784061957 ASoC: omap: rx51: Report headset insertion instead of video out cable
It is more usefull to report headset instead of video out cable in response
to jack insertion as this is more usual use-case and because now the headset
feature is supported. Automatic accessory detection is not possible at the
moment so most sensible static accessory type have to be used.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Jarkko Nikula 31164c7cf1 ASoC: omap: rx51: Add headset support
This patch adds support for headset microphone in Nokia RX-51/N900. The mic
signal from audio jack is routed to codec A LINE1L via two switches and the
mic bias is coming from codec B part.

First switch is the tv-out switch that is already supported and the second
switch selects between voltage detection circuit and codecs. As there is
no use for voltage detection at the moment the second switch is connected
statically to codecs in rx51_soc_init.

Headset can be active when control "Jack Function" is set to "Headset".

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Jarkko Nikula d8ec598e5d ASoC: omap: rx51: Use gpio_request_one to configure tvout_sel gpio
Just slight cleanup to be sync with upcoming change.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Jiri Kosina 0a9d59a246 Merge branch 'master' into for-next 2011-02-15 10:24:31 +01:00
David Henningsson b540afc2b3 ALSA: HDA: Add position_fix quirk for an Asus device
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).

Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:52:24 +01:00
Takashi Iwai eaae55dac6 ALSA: caiaq - Fix possible string-buffer overflow
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.

Reported-by: Rafa <rafa@mwrinfosecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:50:46 +01:00
Raymond Yau 2822084607 ALSA: hda - simplify multistreaming playback model of ad1988
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:14:35 +01:00
Raymond Yau 5e5677f239 ALSA: au88x0 - Modify pointer callback to give accurate playback position
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:13:20 +01:00
Daniel Mack 3347b26cab ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case
The number of cases has increased so use switch-case rather than
if-statements.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:11:12 +01:00
Daniel Mack 54a8c500d5 ALSA: usb-audio: add support for Native Instruments MK2 devices
The MK2 generation of Native Instruments' sound cards are in fact
compliant to the USB audio standard of version 2 and other approved USB
standards. However, they come up as vendor-specific device when first
connected but can be told to come up with a new set of descriptors
upon their next enumeration. The interfaces announced by the new
descriptors will be handled by the kernel's class drivers. This is done
by issuing a vendor specific device request and sending the device to
reset.

There are also some vendor-specific USB requests for some mixer elements
that can't be exported in a standard compliant way. The driver now
supports them with quirks handling mechanisms.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:57 +01:00
Daniel Mack df8d81a32f ALSA: snd-usb-caiaq: Add support for Traktor Audio 2
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:45 +01:00
Clemens Ladisch fea952e5cc ALSA: core: sparse cleanups
Change the core code where sparse complains.  In most cases, this means
just adding annotations to confirm that we indeed want to do the dirty
things we're doing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:11 +01:00
Mark Brown f98dedcefd Merge branch 'for-2.6.38' into for-2.6.39 2011-02-13 19:51:04 +00:00
Mark Brown 905f6952c5 ASoC: Warn if WM8903 platform data is used to enable microphone IRQ
The WM8903 interrupts are clear on read so if the WM8903 detection is
enabled from platform data when the IRQ is in use (rather than using a
direct signal from a GPIO) status may be lost during startup. Help users
spot this misconfiguration by adding a WARN_ON().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-13 19:50:20 +00:00
Stephen Warren 8eb34207c8 ASoC: Tegra: Add MODULE_ALIAS
With the appropriate MODULE_ALIAS in place, the audio modules will be
automatically loaded; there is no longer a need for manual modprobes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:10 +00:00
Stephen Warren bf1b132836 ASoC: Tegra: Harmony: Explicitly set mic enables
Harmony has both an external mic (a regular mic jack) and an internal mic
(a 0.1" two-pin header on the board).

The external mic is connected to the WM8903's IN1L pin, and is supported
by the current driver.

The internal mic is connected to the WM8903's IN1R pin, and is not supported
by the current driver.

It appears that no Harmony systems were shipped with any internal mic
connected; users were expected to provide their own. This makes the
internal mic connection less interesting.

The WM8903's Mic Bias signal is used for both of these mics. For each mic,
a GPIO drives a transistor which gates whether the mic bias signal is
actively connected to that mic, or isolated from it.

The dual use of the mic bias for both mics makes a general-purpose complete
implementation of mic detection using the mic bias complex. So, for
simplicity, the internal mic is currently ignored by the driver.

This patch configures the relevant GPIOs to enable the mic bias connection
to the external mic, and disable the mic bias connection to the internal
mic. Note that in practice, this is the default state if these GPIOs aren't
configured.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:10 +00:00
Stephen Warren 0d6cdca719 ASoC: Harmony: Call snd_soc_dapm_nc_pin
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:09 +00:00
Stephen Warren 41b5f9b349 ASoC: Tegra: Harmony: Implement mic detection
* Add jack definition for mic jack
* Request wm8903 to enable mic detection
* Force mic bias on, since it's required for mic detection

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:09 +00:00
Mark Brown 3017358a75 ASoC: Ensure supplies are maintained for force enabled widgets
If a widget has been force enabled then not only do we need to keep the
widget itself enabled, we also need to keep any supplies the widget
requires enabled. The user could force all the individual widgets on but
this requires too much knowledge of device internals.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-13 19:49:47 +00:00
Dimitris Papastamos c52fd021bc ASoC: WM8994: Improve playback robustness
On WM8994 revision D and earlier ensure proper playback robustness
as some rare use cases can trigger issues.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-02-13 19:45:01 +00:00
Dimitris Papastamos 173efa09e4 ASoC: WM8994: Improve robustness in some use cases
Ensure that on disabling certain registers such as AIF1DAC1L,
AIF1DAC1R etc. the AIF1CLK and AIF2CLK remain enabled.  Similarly
when enabling those registers, AIF1CLK and AIF2CLK will remain
disabled.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-02-13 19:44:54 +00:00
Stephen Warren 3088e3b496 ASoC: WM8903: Fix mic detection enable logic
The mic detection HW should be enabled when either mic or short detection
is required, not when only both are required.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-02-13 19:44:46 +00:00
Linus Torvalds d8ed516f82 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 quirk for Ordissimo EVE using a realtek ALC662
  ALSA: hrtimer: remove superfluous tasklet invocation
  ALSA: hrtimer: handle delayed timer interrupts
  ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G
  ALSA: hda - Don't handle empty patch files
  ALSA: hda - Fix missing CA initialization for HDMI/DP
  ALSA: usbaudio - Enable the E-MU 0204 USB
  ALSA: hda - switch lfe with side in mixer for 4930g
  ASoC: Improve WM8994 digital power sequencing
  ASoC: Create an AIF1ADCDAT signal widget to match AIF2
  asoc: davinci: da830/omap-l137: correct cpu_dai_name
  ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
2011-02-13 07:58:50 -08:00
Takashi Iwai 6146124118 Merge branch 'fix/asoc' into for-linus 2011-02-13 10:05:30 +01:00
Takashi Iwai 2b203dbbcb ALSA: hda - Avoid cast with union data for HDMI audio infoframe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 12:18:57 +01:00
Jarkko Nikula 535787b6ae ASoC: Allow use sleeping gpio in soc-jack
It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not
called from interrupt context. This avoids WARN_ON from __gpio_get_value
if sleeping gpio is registered for jack.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-11 11:17:43 +00:00
Vinod Koul 7ae7434086 ASoC: mid-x86: Use the soc-jack apis for jack type detection
This patch modifies the mfld_machine to use the new jack apis for adding the
voltage zones for jack type detection. It also modifed TI sn95031 codec driver
to use these new apis

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-11 11:16:29 +00:00
Mark Brown 4a5aa6e9ea Merge branch 'for-2.6.38' into for-2.6.39 2011-02-11 11:14:20 +00:00
Mark Brown b4d06f456d ASoC: Use explicit sequence for WM8903 bias off
This makes no real difference compared to the write sequencer sequence
that was previously used but can run without a clock being provided.
Also remove the write sequencer support code as this was the last use
of it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:14:05 +00:00
Mark Brown 22f226dd14 ASoC: Don't use write sequencer to power up WM8903
The write sequencer sequencer sequence takes longer than is desirable
as it brings up a full playback path which is not required at this
point. Open coding the sequence cuts the startup time by two thirds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:13:56 +00:00
Mark Brown 66daaa59d5 ASoC: Convert WM8903 bias management to use snd_soc_update_bits()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:13:48 +00:00
Janusz Krzysztofik 8e6bfb9b1f ASoC: CX20442: fix wrong reg_cache_default content
Content of the CX20442's snd_soc_codec_driver.reg_cache_default pointed
area, introduced with my recent NULL pointer dereferece fix (commit
f019ee5feb), occured wrong after further
testing, more thorough than just booting successfully. There are two
problems with it:

1) It should read
	(1 << CX20442_TELOUT) | (1 << CX20442_MIC),
   not
	CX20442_TELOUT | CX20442_MIC.

2) While correctly matching actual codec hardware state on boot when
   fixed per 1), a few more code modifications would still be required
   to reflect that state not only into register cache, but also force
   them into DAPM pins state, otherwise an inconsitency occures which
   may prevent further codec state changes from being applied correctly.
   As a result, the phone stops ringing after reboot, until someone
   picks up the handset for the first time.

Revert that reg_cache_default content to a working, previous de facto
default value of 0, in hope this change can still be accepted as an rc
cycle fix.

Created and tested against linux-2.6.38-rc4

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-11 11:00:30 +00:00
Anisse Astier 965b76d23e ALSA: hda - add quirk for Ordissimo EVE using a realtek ALC662
This netbook has a only one jack output and an internal mic.

By default, mic and jack sense aren't working. Using lenovo-101e
parameters makes both work.

The device seems based on a Sharetronic Q70, so this should fix audio for
this model too.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 08:52:50 +01:00
Clemens Ladisch 2243c4d072 ALSA: hrtimer: remove superfluous tasklet invocation
Commit bb758e9637 removed snd_hrtimer_callback() from the hardware
interrupt handler, thus moving it into a tasklet, but did not tell the
ALSA timer framework about this, so the timer handling would now be done
in the ALSA timer tasklet scheduled from another tasklet.

To fix this, add the flag to tell the ALSA timer framework that the
timer handler is already being invoked in a tasklet.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:53:32 +01:00
Clemens Ladisch b1d4f7f4bd ALSA: hrtimer: handle delayed timer interrupts
If a timer interrupt was delayed too much, hrtimer_forward_now() will
forward the timer expiry more than once.  When this happens, the
additional number of elapsed ALSA timer ticks must be passed to
snd_timer_interrupt() to prevent the ALSA timer from falling behind.

This mostly fixes MIDI slowdown problems on highly-loaded systems with
badly behaved interrupt handlers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:53:29 +01:00
Eliot Blennerhassett 88b27fdac8 ALSA: asihpi - HPI v4.06
Firmware version check depends on hpi version. Update so correct firmware
is accepted.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:41 +01:00
Eliot Blennerhassett c4ed97d9e7 ALSA: asihpi - Fix outstream start trigger for non-mmap adapters.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:40 +01:00
Eliot Blennerhassett 7f41b61b3b ALSA: asihpi - Tighten firmware version requirements.
Difference in major.minor between driver and firmware is an error now.
Release version mismatch give a warning.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:39 +01:00
Eliot Blennerhassett c188dec310 ALSA: asihpi - Ensure all adapter data is cleared on device removal.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett a287ca2ade ALSA: asihpi - Minor define updates
HPI version 4.05.32
Tweak HPI error code for backward compatibility.
Add BUILD to build-related defines.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett bd33c1cad2 ALSA: asihpi - New functions prep for interrupt driven streams.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:37 +01:00
Eliot Blennerhassett 827492acb0 ALSA: asihpi - Use consistent err return variable, change some bad variable names.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:36 +01:00
Eliot Blennerhassett ba3a909962 ALSA: asihpi - Remove unused code and data.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:35 +01:00
Eliot Blennerhassett ee246fc041 ALSA: asihpi - Clarify firmware id selection.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:34 +01:00
Eliot Blennerhassett d6f1c1c364 ALSA: asihpi - Allow adapters with duplicate index jumpers to be discovered.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:33 +01:00
Eliot Blennerhassett fc3a399019 ALSA: asihpi - Add volume mute control.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 1225367a48 ALSA: asihpi - Add snd_card_set_dev to init.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 2f918a6445 ALSA: asihpi - Replace adapter list with single item in subsys response.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:31 +01:00
Eliot Blennerhassett 1d595d2a21 ALSA: asihpi - Cosmetic + a minor comments.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:30 +01:00
Eliot Blennerhassett 4b60221c04 ALSA: asihpi - Remove int flag polling code preparing for stream interrupts.
Interrupt flag used for message handshake will be required for
stream interrupts, so conditionally compiled code without
HPI6205_NO_HSR_POLL defined can never be used;  removing it.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:29 +01:00
Eliot Blennerhassett 4704998e84 ALSA: asihpi - Code cleanup.
Remove unused function.
Simplify hpi_alloc_control_cache.
Remove useless assignment to struct subsequently freed.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:28 +01:00