]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Tue, 8 Mar 2011 17:17:43 +0000 (18:17 +0100)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Tue, 8 Mar 2011 12:00:57 +0000 (13:00 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: control: clean up snd_ctl_hole_check()
Clemens Ladisch [Mon, 7 Mar 2011 12:24:30 +0000 (13:24 +0100)]
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>
13 years agoALSA: control: fix numid conflict check for new controls
Clemens Ladisch [Mon, 7 Mar 2011 12:22:50 +0000 (13:22 +0100)]
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>
13 years agoALSA: hdspm - Add firmware ID for older AES32 cards.
Adrian Knoth [Mon, 7 Mar 2011 18:10:11 +0000 (19:10 +0100)]
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>
13 years agoASoC: Remove warnings in ep93xx-i2s.c
Alexander Sverdlin [Mon, 7 Mar 2011 17:29:58 +0000 (20:29 +0300)]
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>
13 years agoASoC: Extend range of supported sample rates for CS4271 CODEC.
Alexander Sverdlin [Mon, 7 Mar 2011 17:29:36 +0000 (20:29 +0300)]
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>
13 years agoASoC: Add LM4857 to SND_SOC_ALL_CODECS
Mark Brown [Mon, 7 Mar 2011 12:23:10 +0000 (12:23 +0000)]
ASoC: Add LM4857 to SND_SOC_ALL_CODECS

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Add driver for the dfbmcs320 bluetooth module
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:59 +0000 (08:04 +0100)]
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>
13 years agoASoC: Samsung: Merge neo1937_wm8753 and neo1973_gta02_wm8753 sound board driver
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:58 +0000 (08:04 +0100)]
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>
13 years agoASoC: neo1973_gta02_wm8753: Use gpio_request_array to request gpios
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:57 +0000 (08:04 +0100)]
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>
13 years agoASoC: neo1973_gta02_wm8753: Remove lm4853_{set,get}_state
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:56 +0000 (08:04 +0100)]
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>
13 years agoASoC: neo1973_wm8753: Move lm4857 specefic code to its own module
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:55 +0000 (08:04 +0100)]
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>
13 years agoASoC: neo1973_wm8753: Remove scenario management code.
Lars-Peter Clausen [Mon, 7 Mar 2011 07:04:54 +0000 (08:04 +0100)]
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>
13 years agoASoC: Add machine driver for Visstrim_M10 board.
Javier Martin [Mon, 7 Mar 2011 07:47:09 +0000 (08:47 +0100)]
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>
13 years agoASoC: Constify i2c_device_id table
Axel Lin [Fri, 4 Mar 2011 07:22:03 +0000 (15:22 +0800)]
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>
13 years agoASoC: tlv320dac33: add MODULE_DEVICE_TABLE
Axel Lin [Fri, 4 Mar 2011 07:18:18 +0000 (15:18 +0800)]
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>
13 years agoASoC: Add missing debugfs conditionals
Mark Brown [Mon, 7 Mar 2011 11:09:25 +0000 (11:09 +0000)]
ASoC: Add missing debugfs conditionals

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix outdated API usage in tlv320aic32x4
Mark Brown [Mon, 7 Mar 2011 11:07:24 +0000 (11:07 +0000)]
ASoC: Fix outdated API usage in tlv320aic32x4

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Add TI tlv320aic32x4 codec support.
Javier Martin [Wed, 2 Mar 2011 13:52:32 +0000 (14:52 +0100)]
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>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Thu, 3 Mar 2011 14:16:59 +0000 (15:16 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - Don't set to D3 in Cirrus errata init verbs
Takashi Iwai [Thu, 3 Mar 2011 13:54:19 +0000 (14:54 +0100)]
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>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Thu, 3 Mar 2011 11:51:43 +0000 (12:51 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - add new Fermi 5xx codec IDs to snd-hda
Richard Samson [Thu, 3 Mar 2011 11:46:13 +0000 (12:46 +0100)]
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>
13 years agoASoC: Add a late_probe() callback to cards
Mark Brown [Wed, 2 Mar 2011 18:36:34 +0000 (18:36 +0000)]
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>
13 years agoASoC: Allow card DAPM widgets and routes to be set up at registration
Mark Brown [Wed, 2 Mar 2011 18:35:51 +0000 (18:35 +0000)]
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>
13 years agoASoC: Add a per-card DAPM context
Mark Brown [Wed, 2 Mar 2011 18:21:57 +0000 (18:21 +0000)]
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>
13 years agoASoC: Check for a CODEC before dereferencing in DAPM
Mark Brown [Wed, 2 Mar 2011 18:18:24 +0000 (18:18 +0000)]
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>
13 years agoASoC: Get the card directly from the DAPM context
Mark Brown [Wed, 2 Mar 2011 18:17:32 +0000 (18:17 +0000)]
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>
13 years agoASoC: Add TLV information for WM8978 DAC limiter
Mark Brown [Wed, 2 Mar 2011 11:04:10 +0000 (11:04 +0000)]
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>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Thu, 3 Mar 2011 11:13:15 +0000 (11:13 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Fix broken bitfield definitions in WM8978
Mark Brown [Wed, 2 Mar 2011 11:01:18 +0000 (11:01 +0000)]
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
13 years agoASoC: WM8994: Ensure MICBIAS is provided with a clock
Dimitris Papastamos [Tue, 1 Mar 2011 12:54:39 +0000 (12:54 +0000)]
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>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Wed, 2 Mar 2011 13:47:38 +0000 (14:47 +0100)]
Merge branch 'topic/asoc' into for-next

13 years agoASoC: Add platform data for WM9081 IRQ pin configuration
Mark Brown [Tue, 1 Mar 2011 20:10:46 +0000 (20:10 +0000)]
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>
13 years agoASoC: Remove module probe announcements from CODEC drivers
Mark Brown [Thu, 24 Feb 2011 20:25:45 +0000 (20:25 +0000)]
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>
13 years agoASoC: Fix burstsize and DSP_B format problems in imx-ssi.
Javier Martin [Tue, 1 Mar 2011 14:02:06 +0000 (15:02 +0100)]
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>
13 years agoASoC: WM8994: Ensure MICBIAS is provided with a clock
Dimitris Papastamos [Tue, 1 Mar 2011 12:54:39 +0000 (12:54 +0000)]
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>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Tue, 1 Mar 2011 23:29:04 +0000 (23:29 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: WM8994: Ensure late enable events are processed for the ADCs
Dimitris Papastamos [Tue, 1 Mar 2011 11:47:10 +0000 (11:47 +0000)]
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
13 years agoASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
Dimitris Papastamos [Mon, 28 Feb 2011 17:24:11 +0000 (17:24 +0000)]
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
13 years agoASoC: Fix WM9081 platform data initialisation
Mark Brown [Tue, 1 Mar 2011 20:05:23 +0000 (20:05 +0000)]
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
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Tue, 1 Mar 2011 08:01:17 +0000 (09:01 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - Fix unable to record issue on ASUS N82JV
Chih-Wei Huang [Fri, 25 Feb 2011 03:14:31 +0000 (11:14 +0800)]
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>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Mon, 28 Feb 2011 15:24:56 +0000 (16:24 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: HDA: Realtek: Fixup jack detection to input subsystem
David Henningsson [Mon, 28 Feb 2011 14:58:07 +0000 (15:58 +0100)]
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>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Mon, 28 Feb 2011 15:22:16 +0000 (16:22 +0100)]
Merge branch 'topic/asoc' into for-next

13 years agoASoC: Tegra: Fix error handling in DMA channel alloc
Stephen Warren [Wed, 23 Feb 2011 03:16:34 +0000 (20:16 -0700)]
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>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 28 Feb 2011 14:59:00 +0000 (15:59 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: hdspm - Fix midi port initialization
Adrian Knoth [Mon, 28 Feb 2011 14:14:50 +0000 (15:14 +0100)]
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>
13 years agoALSA: hdspm - Abort on unknown firmware revision
Adrian Knoth [Mon, 28 Feb 2011 14:14:49 +0000 (15:14 +0100)]
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>
13 years agoALSA: hdspm - Add updated firmware revision for AES32
Adrian Knoth [Mon, 28 Feb 2011 14:14:48 +0000 (15:14 +0100)]
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>
13 years agoALSA: hdspm - AES32: Use define instead of hardcoded channel count
Adrian Knoth [Mon, 28 Feb 2011 14:14:47 +0000 (15:14 +0100)]
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>
13 years agoASoC: Staticise non-exported symbols in SGTL5000
Mark Brown [Mon, 28 Feb 2011 14:33:01 +0000 (14:33 +0000)]
ASoC: Staticise non-exported symbols in SGTL5000

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: remove unnecessary header including in SGTL5000 codec driver
Zeng Zhaoming [Sun, 27 Feb 2011 19:45:21 +0000 (03:45 +0800)]
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>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 28 Feb 2011 10:21:11 +0000 (11:21 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: powermac - Allow input from microphone on Tumbler
Risto Suominen [Mon, 28 Feb 2011 08:38:45 +0000 (10:38 +0200)]
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>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Sun, 27 Feb 2011 09:06:18 +0000 (10:06 +0100)]
Merge branch 'topic/misc' into for-next

13 years agosound:core:seq:seq_ports.c Remove one to many n's in a word.
Justin P. Mattock [Sun, 27 Feb 2011 04:34:10 +0000 (20:34 -0800)]
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>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sat, 26 Feb 2011 10:27:47 +0000 (11:27 +0100)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Sat, 26 Feb 2011 10:27:06 +0000 (11:27 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Sat, 26 Feb 2011 09:50:01 +0000 (09:50 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Fri, 25 Feb 2011 15:43:24 +0000 (16:43 +0100)]
Merge branch 'topic/asoc' into for-next

13 years agoASoC: eukrea-tlv320: add MBIMXSD51 support
Eric Bénard [Fri, 25 Feb 2011 12:48:15 +0000 (13:48 +0100)]
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>
13 years agoASoC: Move WM2000 to dev_pm_ops
Mark Brown [Fri, 25 Feb 2011 12:25:18 +0000 (12:25 +0000)]
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>
13 years agoeukrea-tlv320: fix platform_name
Eric Bénard [Fri, 25 Feb 2011 12:47:46 +0000 (13:47 +0100)]
eukrea-tlv320: fix platform_name

commit f0fba2ad1b6b53d5360125c41953b7afcd6deff0 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
13 years agoASoC: Add Freescale SGTL5000 codec support
Zeng Zhaoming [Wed, 23 Feb 2011 18:08:21 +0000 (02:08 +0800)]
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>
13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Fri, 25 Feb 2011 11:58:50 +0000 (12:58 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoASoC: remove one to many l's in the word
Justin P. Mattock [Fri, 25 Feb 2011 06:16:37 +0000 (22:16 -0800)]
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>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Fri, 25 Feb 2011 11:45:09 +0000 (11:45 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Tegra: Move utilities to separate module
Stephen Warren [Wed, 23 Feb 2011 00:23:56 +0000 (17:23 -0700)]
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>
13 years agoASoC: soc-dapm: Include quotes around contents in debugfs entries
Dimitris Papastamos [Thu, 24 Feb 2011 17:09:32 +0000 (17:09 +0000)]
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>
13 years agoASoC: Remove -codec suffix from WM9081 driver
Mark Brown [Thu, 24 Feb 2011 20:26:02 +0000 (20:26 +0000)]
ASoC: Remove -codec suffix from WM9081 driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: correct pxa AC97 DAI names
Dmitry Eremin-Solenikov [Tue, 22 Feb 2011 23:29:11 +0000 (02:29 +0300)]
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
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Fri, 25 Feb 2011 07:52:40 +0000 (08:52 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: emu10k1 - emu10k1_main.c remove one to many l's in the word.
Justin P. Mattock [Fri, 25 Feb 2011 06:15:42 +0000 (22:15 -0800)]
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>
13 years agoALSA: hda - patch_realtek.c remove one to many l's in the word.
Justin P. Mattock [Fri, 25 Feb 2011 06:16:02 +0000 (22:16 -0800)]
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>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Thu, 24 Feb 2011 17:05:12 +0000 (18:05 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
Vitaliy Kulikov [Tue, 22 Feb 2011 23:32:19 +0000 (17:32 -0600)]
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>
13 years agoASoC: Pass the jack to jack notifiers
Mark Brown [Tue, 22 Feb 2011 20:42:35 +0000 (12:42 -0800)]
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>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Thu, 24 Feb 2011 09:04:55 +0000 (10:04 +0100)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - 4930g add internal lfe slider
Łukasz Wojniłowicz [Thu, 24 Feb 2011 09:03:31 +0000 (10:03 +0100)]
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>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Wed, 23 Feb 2011 15:00:46 +0000 (16:00 +0100)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: HDA: Add ideapad quirk for two Dell machines
David Henningsson [Wed, 23 Feb 2011 12:15:56 +0000 (13:15 +0100)]
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>
13 years agoALSA: HDA: Add a new Conexant codec 506e (20590)
David Henningsson [Tue, 8 Feb 2011 06:16:06 +0000 (07:16 +0100)]
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>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 23 Feb 2011 14:56:56 +0000 (15:56 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: hdspm - Fix lock/sync reporting on MADI and AES32
Adrian Knoth [Wed, 23 Feb 2011 10:43:15 +0000 (11:43 +0100)]
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>
13 years agoALSA: hdspm - prevent reading unitialized stack memory
Adrian Knoth [Wed, 23 Feb 2011 10:43:14 +0000 (11:43 +0100)]
ALSA: hdspm - prevent reading unitialized stack memory

Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit
e68d3b316ab7b02a074edc4f770e6a746390cb7d. 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>
13 years agoALSA: hdspm - fix sync check on AES32
Adrian Knoth [Wed, 23 Feb 2011 10:43:13 +0000 (11:43 +0100)]
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>
13 years agoALSA: hdspm - Remove input selector on MADIface
Adrian Knoth [Wed, 23 Feb 2011 10:43:12 +0000 (11:43 +0100)]
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>
13 years agoALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIface
Adrian Knoth [Wed, 23 Feb 2011 10:43:11 +0000 (11:43 +0100)]
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>
13 years agoALSA: hdspm - Restrict channel count on RME AES/AES32
Adrian Knoth [Wed, 23 Feb 2011 10:43:10 +0000 (11:43 +0100)]
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>
13 years agoALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)
Adrian Knoth [Wed, 23 Feb 2011 10:43:09 +0000 (11:43 +0100)]
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>
13 years agoALSA: hpdsm - RME AES(32): Fix missing channel mappings
Adrian Knoth [Wed, 23 Feb 2011 10:43:08 +0000 (11:43 +0100)]
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>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Wed, 23 Feb 2011 07:16:32 +0000 (08:16 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: usb-audio: fix oops due to cleanup race when disconnecting
Takashi Iwai [Tue, 22 Feb 2011 09:21:18 +0000 (10:21 +0100)]
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 de1b8b93a0ba "[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>
13 years agoASoC: Simplify default WM8958 jack detection code
Mark Brown [Tue, 22 Feb 2011 04:51:13 +0000 (20:51 -0800)]
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>
13 years agoASoC: Support configuration of WM8958 microphone bias analogue parameters
Mark Brown [Tue, 22 Feb 2011 01:11:59 +0000 (17:11 -0800)]
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>
13 years agoASoC: Support WM8958 direct microphone detection IRQ
Mark Brown [Fri, 18 Feb 2011 04:05:44 +0000 (20:05 -0800)]
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>
13 years agoASoC: Mark WM8958 microphone bias registers as readable
Mark Brown [Sat, 19 Feb 2011 00:57:22 +0000 (16:57 -0800)]
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>