Commit graph

262958 commits

Author SHA1 Message Date
David Henningsson 468c545885 ALSA: hda: Conexant: Allow different output types to share DAC
Headphones has stopped working for the original reported (a regression
compared to 2.6.38). This is because Speaker and Headphones share the
same DAC, in which case no Headphones volume control was created.
This patch fixes so that both Speaker and Headphones volume
controls are created in such scenario.

BugLink: http://bugs.launchpad.net/bugs/817943
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-25 15:08:03 +02:00
Mark Brown b42af319f2 Merge branch 'for-3.1' into for-3.2 2011-08-24 20:22:43 +01:00
Timur Tabi 3bdf28feaf ASoC: MPC5200: replace of_device with platform_device
'struct of_device' no longer exists, and its functionality has been merged
into platform_device.  Update the MPC5200 audio DMA driver (mpc5200_dma)
accordingly.  This fixes a build break.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-08-24 20:22:05 +01:00
Mark Brown 18036b5866 ASoC: Correct element count for WM8996 sidetone HPF
I can count. Honest.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-24 17:36:12 +01:00
Sangbeom Kim dff2836707 ASoC: SAMSUNG: Add Kconfig to support SMDK4212
This patch adds Kconfig to support SMDK4212.
SMDK4212 is based on samsung exynos4212 SoC.
And WM8994 is used for audio codec.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24 10:42:16 +01:00
Mark Brown 0933994df7 Merge branch 'for-3.1' into for-3.2 2011-08-24 10:39:09 +01:00
Stephen Warren ee1a4d4b7f ASoC: Tegra: wm8903 machine driver: Drop Ventana support
Board file support for Ventana is not yet mainlined, and probably won't
ever be given the move to Device-Tree. Consequently, the Ventana entry
is being removed from arch/arm/tools/mach-types in the next merge window,
since it was registered over a year ago.

This will also remove function machine_is_ventana(), which is used by
the ASoC Tegra WM8903 machine driver. This will cause compilation
failures. Drop Ventana support to resolve this.

Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to
configure itself from Device-Tree, and hence we'll be able to re-instate
Ventana support just by creating a .dts file for the board.

Also note that Aebl support is in a similar boat. However, that board
isn't scheduled for deprecation for at least another 5 months, and
perhaps we will have completely removed non-Device-Tree support from
tegra_wm8903.c by then and/or adjusted mach-types policy.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24 10:38:05 +01:00
Sangbeom Kim 250b68512d ASoC: Add samsung maintainer
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24 10:37:57 +01:00
Joseph Pentland 52c49e0156 ASoC: Add Springbank I/O card to Speyside Kconfig
Signed-off-by: Joseph Pentland <jp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24 10:37:48 +01:00
Takashi Iwai 7675535958 ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, too
The ADC-switching can work also in the auto-mic mode, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24 10:53:10 +02:00
Maarten Lankhorst 391e69143d ALSA: ctxfi: Bump playback substreams to 256
There are references in the code to 256 sources, so I tested it with 256 aplays,
of which the first and last with real data and the rest playing /dev/zero .

Also increase amount of page tables, so the default aplay size works.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24 10:39:44 +02:00
Lu Guanqun 08ede038a7 ALSA: core: release the constraint check for replace ops
Suppose the ALSA card already has a number of MAX_USER_CONTROLS controls, and
the user wants to replace one, it should not fail at this condition check.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24 10:22:43 +02:00
Lu Guanqun 983929cafc ALSA: core: trivial code style fix
remove trailing tab on the line.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-24 10:22:34 +02:00
Takashi Iwai 1f015f5fdc ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parser
When multiple headphones or speakers are assigned but no individual
DACs are available, the driver should take the first HP/SPK DAC instead
of another primary output.  The patch adds a bit-flag to dac field of
struct pin_dac_pair indicating that it's a slave DAC.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23 14:57:08 +02:00
Takashi Iwai 3c715a9884 ALSA: hda - Update jack-sense info even when no automute is set
The internal states, jack_present and line_jack_present should be
updated upon unsolicited events even if no automute is set.
Otherwise the wrong state is referred when the automute behavior is
changed by the mixer control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23 12:41:09 +02:00
Takashi Iwai 675c1aa3c4 ALSA: hda - Fix output-path initialization for Realtek auto-parser
When the headphone or speaker output has no own DAC, initialize the path
using the primary DAC.  Otherwise the path won't be set properly and
can result in the silence.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-23 12:36:28 +02:00
Dong Aisheng 78a262c871 ASoC: mxs-sgtl5000: add record function
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:36:15 +01:00
Julia Lawall 0bb98ba2b0 sound/soc/mxs/mxs-saif.c: add missing kfree
Move the test on pdev->id before the kzalloc to avoid requiring kfree when
the test fails.  This fix was suggested by Wolfram Sang.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != kfree(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 kfree(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Dong Aisheng <b29396@freescale.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:34:37 +01:00
Dong Aisheng bbe8ff5e25 ASoC: mxs-saif: clear clk gate first before register setting
Saif needs clear clk gate first before writing registers or the write
will not success.

The original xx_get_mclk function clear clk gate after mclk setting
that may cause the former mclk setting unwork, then the real output
mclk maybe inaccurate.
Placing the clear before setting mclk to avoid such an issue.

We also have to clear clk gate in startup instead of in prepare function.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:33:49 +01:00
Mark Brown 09d930ae51 Merge branch 'for-3.1' into for-3.2 2011-08-22 23:33:01 +01:00
Julia Lawall c09f5ca7bd sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put
The first change is to add an of_node_put, since codec_np has previously
been allocated.  The rest of the patch reorganizes the error handling code
so the only code executed is that which is needed.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != of_node_put(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 of_node_put(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:29:17 +01:00
Julia Lawall 178b279b64 sound/soc/fsl/p1022_ds.c: add missing of_node_put
dma_channel_np has been accessed at this point, so decrease its reference
count before leaving the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != of_node_put(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 of_node_put(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:29:16 +01:00
Julia Lawall 5006b31328 sound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
Introduce a new label that includes kfree and jump to that one.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != kfree(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 kfree(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:28:42 +01:00
Julia Lawall 96101bd0bf sound/soc/kirkwood/kirkwood-i2s.c: add missing kfree
Adjust the goto to jump to the error handling code that includes kfree.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != kfree(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 kfree(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:26:56 +01:00
Axel Lin 57cf9d4512 ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew
GFP_ATOMIC is not needed here, use GFP_KERNEL instead.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:26:46 +01:00
Timur Tabi 81a081fff7 sound/soc/fsl/fsl_dma.c: add missing of_node_put
of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:26:33 +01:00
Mark Brown 33c5f969b9 ASoC: Allow idle_bias_off to be specified in CODEC drivers
If devices can unconditionally support idle_bias_off let them flag it in
their driver structure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 23:23:29 +01:00
Mark Brown 1661699aaa ASoC: Convert WM8523 to table based control and DAPM initialization
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 23:23:17 +01:00
Mark Brown fef24d92a6 Merge branch 'for-3.1' into for-3.2 2011-08-22 14:00:08 +01:00
Mark Brown a41619455c ASoC: Clear completions from late WM8996 FLL lock IRQs
In case we have a pending completion, for example due to a problem with
the input clock which got corrected after we timed out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 13:57:35 +01:00
Mark Brown fbf04076ef ASoC: Provide more detail on WM8962 thermal shutdown status
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 13:56:47 +01:00
Mark Brown 4df0cb2fa9 ASoC: Clear any outstanding WM8962 FLL lock completions before waiting
Ensure that we don't spuriously trigger early.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:45:11 +01:00
Mark Brown e6ef58700a ASoC: Report IRQ_NONE when we don't see an interrupt from WM8962
This should never happen with level triggered IRQs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:42:01 +01:00
Mark Brown 6f88a4e578 ASoC: Initial WM8962 DSP2 support
The WM8962 features a DSP providing a number of signal processing
features including HD Bass and Virtual Surround Sound (VSS).  Enable
initial support for this, allowing users to enable and disable the
algorithms using the default coefficient sets.  Further patches will
add support for runtime configuration of the DSP coefficients.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:41:56 +01:00
Mark Brown f79e7ff852 ASoC: Ensure we only run Speyside WM8962 bias level callbacks once
We get called once per DAPM context but only need to run once. When DAPM
was serialized this was a series of noops but now it can run in parallel
we need to take proper care.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:40:31 +01:00
Mark Brown 1ab63da721 ASoC: Add basic WM8962 capture low/high pass filter control
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:39:53 +01:00
Mark Brown 2fde6e80dd ASoC: Optimise WM8996 no interrupt path
This occurs frequently if we are in edge triggered mode as we must poll the
interrupt status register until we get no more interrupts so it's worth
the effort - it means we skip writing null acknowledgements to the chip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:37:59 +01:00
Mark Brown 889c85c550 ASoC: Automatically manage WM8996 MICBIAS regulating mode
For non-audio uses like accessory detection we can use a lower quality,
unregulated microphone bias, saving a little power. As the hardware can
manually enable and disable the biases we can select regulating mode
automatically with supply widgets connected to the biases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:37:27 +01:00
Mark Brown 7691cd74c5 ASoC: Fix configuration of WM8996 input enables
There's no need for separate widgets for the enables (as the map already
shows).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:36:52 +01:00
Mark Brown 4f41adfd8c ASoC: WM8996 record paths need AIFCLK
Make AIFCLK supply the record paths otherwise record will not work unless
there is a simultaneous playback.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:36:20 +01:00
Mark Brown bd20eb541e regmap: Allow drivers to specify register defaults
It is useful for the register cache code to be able to specify the
default values for the device registers. The major use is when restoring
the register cache after suspend, knowing the register defaults allows
us to skip registers that are at their default values when we resume which
can be a substantial win on larger modern devices. For some devices
(mostly older ones) the hardware does not support readback so the only way we
can know the values is from code and so initializing the cache with default
values makes it much easier for drivers work with read/modify/write
updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-21 12:54:54 +01:00
Julia Lawall de75577c8c ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
The label outnodev is only used when kzalloc has not yet taken place or has
failed, so there is no need for the call for kfree under this label.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != kfree(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 kfree(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-20 09:27:04 +02:00
Takashi Iwai 1b004d03d8 ALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.c
snd_hda_get_conn_index() returns a negative value while the current code
stores it in an unsigned int.  It must be stored in a signed integer.

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-20 09:24:54 +02:00
Takashi Iwai b6acf013bd ALSA: hda - Don't spew too many ELD errors
Currently HD-audio driver shows the all error ELD byte as an error
in the kernel message.  This is annoying when the video driver doesn't
set the correct ELD from the beginning. e.g. radeon sends a zero-byte
data, but we still check ELD with the fixed 128 byte as a workaround
for some broken devices, it spews 128-times errors.

For avoiding this, the driver aborts reading when the first byte is
invalid.  In such a case, the whole data is certainly invalid.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-20 09:23:10 +02:00
Takashi Iwai 9fcd0ab130 ALSA: usb-audio - Check the dB-range validity in the later read, too
When the initial check of dB-range failed due to the read error, try to
check again at the later read, too.  When an invalid dB range is found,
remove TLV flags and notify the mixer info change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-19 08:30:53 +02:00
Takashi Iwai b55ac2a116 Merge branch 'fix/misc' into topic/misc 2011-08-19 08:30:38 +02:00
Takashi Iwai 38b65190c6 ALSA: usb-audio - Fix missing mixer dB information
The recent fix for testing dB range at the mixer creation time seems
to cause regressions in some devices.  In such devices, reading the dB
info at probing time gives an error, thus both dBmin and dBmax are still
zero, and TLV flag isn't set although the later read of dB info succeeds.

This patch adds a workaround for such a case by assuming that the later
read will succeed.  In future, a similar test should be performed in a
case where a wrong dB range is seen even in the later read.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-08-19 07:55:10 +02:00
Axel Lin e3d73c1bbf ASoC: sta32x: Move resource allocation and release to the corresponding callback functions
This patch includes below small fixes:

1. Move sta32x_set_bias_level() from sta32x_i2c_remove() to sta32x_remove().
2. Remove a redundant regulator_bulk_free() call in sta32x_i2c_remove(),
   as we will call regulator_bulk_free() in sta32x_remove().
3. Remove unneeded snd_soc_codec_set_drvdata(codec, NULL) in sta32x_i2c_remove.
   The i2c core will set the clientdata to NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Johannes Stezenbach <js@sig21.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-19 01:25:56 +09:00
Mark Brown 3f61293302 Merge branch 'for-3.1' into for-3.2 2011-08-19 01:20:36 +09:00
Jarkko Nikula e574044acb ASoC: omap: Fix build errors in ams-delta
Fix "error: too few arguments to function 'ams_delta_set_bias_level'"
build errors in ams-delta.c that were introduced after commit d4c6005 ("ASoC:
Add context parameter to card DAPM callbacks") by adding dapm context
to ams_delta_set_bias_level calls.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-19 01:19:45 +09:00