]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Fri, 26 Aug 2011 12:13:34 +0000 (14:13 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: usb-audio: add Starr Labs USB MIDI support
Kristian Amlie [Fri, 26 Aug 2011 11:19:49 +0000 (13:19 +0200)]
ALSA: usb-audio: add Starr Labs USB MIDI support

Add support for Starr Labs USB MIDI devices such as the Z7S, which are
based on an FTDI serial UART chip.

Based on a patch by Daniel Mack.

Signed-off-by: Kristian Amlie <kristian@amlie.name>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Thu, 25 Aug 2011 13:08:33 +0000 (15:08 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda: Conexant: Allow different output types to share DAC
David Henningsson [Thu, 25 Aug 2011 11:16:02 +0000 (13:16 +0200)]
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>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Thu, 25 Aug 2011 12:06:59 +0000 (14:06 +0200)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Wed, 24 Aug 2011 19:22:43 +0000 (20:22 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: MPC5200: replace of_device with platform_device
Timur Tabi [Tue, 23 Aug 2011 21:48:26 +0000 (16:48 -0500)]
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
13 years agoASoC: Correct element count for WM8996 sidetone HPF
Mark Brown [Wed, 24 Aug 2011 15:35:32 +0000 (16:35 +0100)]
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>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Wed, 24 Aug 2011 16:09:13 +0000 (18:09 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Remove the rest of ALC662 quirks
Takashi Iwai [Wed, 24 Aug 2011 16:08:07 +0000 (18:08 +0200)]
ALSA: hda - Remove the rest of ALC662 quirks

The rest of ALC662 quirks are only for desktops, and they should work
with the auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Remove ALC662 ASUS eeepc-ep20 model quirk
Takashi Iwai [Wed, 24 Aug 2011 16:05:06 +0000 (18:05 +0200)]
ALSA: hda - Remove ALC662 ASUS eeepc-ep20 model quirk

Since the recent fixes, this device works with the auto-parser well.
Let's kill it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Prefer multi-io to speakers for realtek auto-parser
Takashi Iwai [Wed, 24 Aug 2011 15:57:44 +0000 (17:57 +0200)]
ALSA: hda - Prefer multi-io to speakers for realtek auto-parser

When the multi-io jacks are available, parse them first and assign DACs
before parsing speakers and headphones.  This allows a better chance of
surround I/O in some desktops and laptops with limited DACs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix Center/LFE mixer element creations for Realtek
Takashi Iwai [Wed, 24 Aug 2011 15:27:52 +0000 (17:27 +0200)]
ALSA: hda - Fix Center/LFE mixer element creations for Realtek

The commit 23c09b00900c3fa6672148738cad29d6fc6ded7c
    ALSA: hda - Support multiple speakers by Realtek auto-parser
changes the return value from alc_get_line_out_pfx(), and it breaks
the center/LFE mixer split check.  The caller must test with a string
"CLFE" now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Wed, 24 Aug 2011 14:24:59 +0000 (16:24 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Rewrite Lenovo X200 quirk with pincfg-fix using auto-parser
Takashi Iwai [Wed, 24 Aug 2011 14:22:21 +0000 (16:22 +0200)]
ALSA: hda - Rewrite Lenovo X200 quirk with pincfg-fix using auto-parser

Introduce the pincfg table to patch_conexant.c for fixing up the extra
pin-configuration for auto-parser.  As an example, Lenovo X200 model is
replaced with this new mechanism.  (This also fixes the wrong mixer
elements for docking-station I/O in the previous model quirk
automagically.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: SAMSUNG: Add Kconfig to support SMDK4212
Sangbeom Kim [Tue, 23 Aug 2011 09:59:08 +0000 (18:59 +0900)]
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>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Wed, 24 Aug 2011 09:39:09 +0000 (10:39 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: Tegra: wm8903 machine driver: Drop Ventana support
Stephen Warren [Tue, 23 Aug 2011 17:16:28 +0000 (11:16 -0600)]
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>
13 years agoASoC: Add samsung maintainer
Sangbeom Kim [Tue, 23 Aug 2011 10:36:59 +0000 (19:36 +0900)]
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>
13 years agoASoC: Add Springbank I/O card to Speyside Kconfig
Joseph Pentland [Tue, 23 Aug 2011 09:41:50 +0000 (10:41 +0100)]
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>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Wed, 24 Aug 2011 08:56:39 +0000 (10:56 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Wed, 24 Aug 2011 08:56:06 +0000 (10:56 +0200)]
Merge branch 'fix/hda' into topic/hda

13 years agoALSA: hda/conexant - Enable ADC-switching for auto-mic mode, too
Takashi Iwai [Wed, 24 Aug 2011 08:53:10 +0000 (10:53 +0200)]
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>
13 years agoALSA: hda - Remove ALC662 ASUS M51VA, G71V, H13 and G50V model quirks
Takashi Iwai [Wed, 24 Aug 2011 08:43:36 +0000 (10:43 +0200)]
ALSA: hda - Remove ALC662 ASUS M51VA, G71V, H13 and G50V model quirks

These models work now with the BIOS auto-parser, so let's drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 24 Aug 2011 08:40:06 +0000 (10:40 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: ctxfi: Bump playback substreams to 256
Maarten Lankhorst [Tue, 23 Aug 2011 22:48:59 +0000 (00:48 +0200)]
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>
13 years agoALSA: core: release the constraint check for replace ops
Lu Guanqun [Wed, 24 Aug 2011 06:45:10 +0000 (14:45 +0800)]
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>
13 years agoALSA: core: trivial code style fix
Lu Guanqun [Wed, 24 Aug 2011 03:12:34 +0000 (11:12 +0800)]
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>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Tue, 23 Aug 2011 16:42:02 +0000 (18:42 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Rewrite ALC269 laptop-amic,dmic,&co quirks with fixups
Takashi Iwai [Tue, 23 Aug 2011 16:40:12 +0000 (18:40 +0200)]
ALSA: hda - Rewrite ALC269 laptop-amic,dmic,&co quirks with fixups

Similarly like ALC662 asus-mode* models, rewrite the laptop-amic and
dmic models with the static pin-config tables.

Now we can get rid of all alc269_quirks.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Tue, 23 Aug 2011 16:30:15 +0000 (18:30 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Rewrite ALC662 asus-mode* models with fixups
Takashi Iwai [Tue, 23 Aug 2011 16:27:14 +0000 (18:27 +0200)]
ALSA: hda - Rewrite ALC662 asus-mode* models with fixups

Re-implement the asus-mode[1-8] quirks with the pin-config tables.
They are provided in case where BIOS is broken on the device, so it's
not enabled in PCI SSID lookup table.  User needs to specify it via model
option explicitly if the driver doesn't work with the BIOS setup as is.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Support multiple headphones in Realtek auto-parser
Takashi Iwai [Tue, 23 Aug 2011 16:16:56 +0000 (18:16 +0200)]
ALSA: hda - Support multiple headphones in Realtek auto-parser

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Add multi-headphone NIDs in multiout struct
Takashi Iwai [Tue, 23 Aug 2011 16:16:13 +0000 (18:16 +0200)]
ALSA: hda - Add multi-headphone NIDs in multiout struct

For supporting both the multiple headphones and the multiple speakers,
add the new field in struct hda_multi_out, and evaluate in the standard
setup functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Remove all ALC861 and ALC861-VD quirks
Takashi Iwai [Tue, 23 Aug 2011 15:34:25 +0000 (17:34 +0200)]
ALSA: hda - Remove all ALC861 and ALC861-VD quirks

Let's remove the rest of ALC861 and ALC861-VD quirks.
If any breakage is found, it can be fixed easily via the pin-config
table update.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Restore VREF50 setup for ALC861-VD dallas/hp models
Takashi Iwai [Tue, 23 Aug 2011 15:28:55 +0000 (17:28 +0200)]
ALSA: hda - Restore VREF50 setup for ALC861-VD dallas/hp models

During the cleanup by commit 6727b12669f255dbf65b3d63c32cce1e3e967398,
the specific setups for dallas and hp models, using VREF50 for mic pins,
were lost.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Tue, 23 Aug 2011 13:26:11 +0000 (15:26 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Rename to snd_hda_parse_pin_defcfg()
Takashi Iwai [Tue, 23 Aug 2011 13:24:39 +0000 (15:24 +0200)]
ALSA: hda - Rename to snd_hda_parse_pin_defcfg()

... and add a new bit-flags argument to specify the behavior of the
function.  The older function is kept as is (as a wrapper).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix initialization of multi-speaker output paths for Realtek
Takashi Iwai [Tue, 23 Aug 2011 13:16:22 +0000 (15:16 +0200)]
ALSA: hda - Fix initialization of multi-speaker output paths for Realtek

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Tue, 23 Aug 2011 13:03:08 +0000 (15:03 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 23 Aug 2011 13:02:36 +0000 (15:02 +0200)]
Merge branch 'fix/hda' into topic/hda

Conflicts:
sound/pci/hda/patch_realtek.c

13 years agoALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parser
Takashi Iwai [Tue, 23 Aug 2011 12:57:08 +0000 (14:57 +0200)]
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>
13 years agoALSA: hda - Update jack-sense info even when no automute is set
Takashi Iwai [Tue, 23 Aug 2011 10:41:09 +0000 (12:41 +0200)]
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>
13 years agoALSA: hda - Fix output-path initialization for Realtek auto-parser
Takashi Iwai [Tue, 23 Aug 2011 10:36:28 +0000 (12:36 +0200)]
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>
13 years agoASoC: mxs-sgtl5000: add record function
Dong Aisheng [Sun, 21 Aug 2011 16:02:46 +0000 (00:02 +0800)]
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>
13 years agosound/soc/mxs/mxs-saif.c: add missing kfree
Julia Lawall [Sun, 21 Aug 2011 11:18:45 +0000 (13:18 +0200)]
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>
13 years agoASoC: mxs-saif: clear clk gate first before register setting
Dong Aisheng [Sun, 21 Aug 2011 15:45:40 +0000 (23:45 +0800)]
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>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Mon, 22 Aug 2011 22:33:01 +0000 (23:33 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agosound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put
Julia Lawall [Sat, 20 Aug 2011 07:02:01 +0000 (09:02 +0200)]
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>
13 years agosound/soc/fsl/p1022_ds.c: add missing of_node_put
Julia Lawall [Sat, 20 Aug 2011 07:02:00 +0000 (09:02 +0200)]
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>
13 years agosound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
Julia Lawall [Sat, 20 Aug 2011 06:12:39 +0000 (08:12 +0200)]
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>
13 years agosound/soc/kirkwood/kirkwood-i2s.c: add missing kfree
Julia Lawall [Sat, 20 Aug 2011 06:12:38 +0000 (08:12 +0200)]
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>
13 years agoASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew
Axel Lin [Sat, 20 Aug 2011 03:03:44 +0000 (11:03 +0800)]
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>
13 years agosound/soc/fsl/fsl_dma.c: add missing of_node_put
Timur Tabi [Mon, 22 Aug 2011 14:22:41 +0000 (09:22 -0500)]
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>
13 years agoASoC: Allow idle_bias_off to be specified in CODEC drivers
Mark Brown [Mon, 22 Aug 2011 17:40:30 +0000 (18:40 +0100)]
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>
13 years agoASoC: Convert WM8523 to table based control and DAPM initialization
Mark Brown [Mon, 22 Aug 2011 15:02:43 +0000 (16:02 +0100)]
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>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Mon, 22 Aug 2011 13:00:08 +0000 (14:00 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: Clear completions from late WM8996 FLL lock IRQs
Mark Brown [Tue, 16 Aug 2011 07:57:58 +0000 (16:57 +0900)]
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>
13 years agoASoC: Provide more detail on WM8962 thermal shutdown status
Mark Brown [Sun, 21 Aug 2011 17:07:44 +0000 (18:07 +0100)]
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>
13 years agoASoC: Clear any outstanding WM8962 FLL lock completions before waiting
Mark Brown [Sun, 21 Aug 2011 16:18:52 +0000 (17:18 +0100)]
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>
13 years agoASoC: Report IRQ_NONE when we don't see an interrupt from WM8962
Mark Brown [Sun, 21 Aug 2011 10:47:14 +0000 (11:47 +0100)]
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>
13 years agoASoC: Initial WM8962 DSP2 support
Mark Brown [Wed, 17 Aug 2011 01:03:51 +0000 (10:03 +0900)]
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>
13 years agoASoC: Ensure we only run Speyside WM8962 bias level callbacks once
Mark Brown [Sun, 21 Aug 2011 11:20:00 +0000 (12:20 +0100)]
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>
13 years agoASoC: Add basic WM8962 capture low/high pass filter control
Mark Brown [Sun, 21 Aug 2011 09:54:38 +0000 (10:54 +0100)]
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>
13 years agoASoC: Optimise WM8996 no interrupt path
Mark Brown [Sat, 20 Aug 2011 18:28:59 +0000 (19:28 +0100)]
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>
13 years agoASoC: Automatically manage WM8996 MICBIAS regulating mode
Mark Brown [Sat, 20 Aug 2011 18:00:50 +0000 (19:00 +0100)]
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>
13 years agoASoC: Fix configuration of WM8996 input enables
Mark Brown [Sat, 20 Aug 2011 15:59:27 +0000 (16:59 +0100)]
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>
13 years agoASoC: WM8996 record paths need AIFCLK
Mark Brown [Sat, 20 Aug 2011 09:23:38 +0000 (10:23 +0100)]
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>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Sun, 21 Aug 2011 13:42:48 +0000 (15:42 +0200)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Sat, 20 Aug 2011 07:28:34 +0000 (09:28 +0200)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
Julia Lawall [Sat, 20 Aug 2011 06:12:41 +0000 (08:12 +0200)]
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>
13 years agoALSA: hda - Fix error check from snd_hda_get_conn_index() in patch_cirrus.c
Takashi Iwai [Sat, 20 Aug 2011 07:19:59 +0000 (09:19 +0200)]
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>
13 years agoALSA: hda - Don't spew too many ELD errors
Takashi Iwai [Sat, 20 Aug 2011 07:14:45 +0000 (09:14 +0200)]
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>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Fri, 19 Aug 2011 07:24:23 +0000 (09:24 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda - Remove ALC662 model=levono-101e model quirk
Takashi Iwai [Fri, 19 Aug 2011 07:23:26 +0000 (09:23 +0200)]
ALSA: hda - Remove ALC662 model=levono-101e model quirk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Allow different assoc numbers for multiple speakers
Takashi Iwai [Fri, 19 Aug 2011 07:10:29 +0000 (09:10 +0200)]
ALSA: hda - Allow different assoc numbers for multiple speakers

In snd_hda_parse_pin_def_config(), we checked the associated number
of speaker pins and accepts only one number exclusively.  But many BIOS
seem to give different assoc number for surround speakers, thus we'd
better to accept all speaker pins no matter which assoc number, and sort
like done for the headphone pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Support multiple speakers by Realtek auto-parser
Takashi Iwai [Fri, 19 Aug 2011 07:05:35 +0000 (09:05 +0200)]
ALSA: hda - Support multiple speakers by Realtek auto-parser

Add the support of multiple speakers by Realtek auto-parser.
When all speaker pins have individual DACs, create each speaker volume
control.  Otherwise, create a bind-volume control for all speaker outs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Fri, 19 Aug 2011 06:33:03 +0000 (08:33 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: usb-audio - Check the dB-range validity in the later read, too
Takashi Iwai [Fri, 19 Aug 2011 06:30:53 +0000 (08:30 +0200)]
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>
13 years agoMerge branch 'fix/misc' into topic/misc
Takashi Iwai [Fri, 19 Aug 2011 06:30:38 +0000 (08:30 +0200)]
Merge branch 'fix/misc' into topic/misc

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Fri, 19 Aug 2011 06:01:00 +0000 (08:01 +0200)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: usb-audio - Fix missing mixer dB information
Takashi Iwai [Fri, 19 Aug 2011 05:55:10 +0000 (07:55 +0200)]
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>
13 years agoASoC: sta32x: Move resource allocation and release to the corresponding callback...
Axel Lin [Thu, 18 Aug 2011 07:31:04 +0000 (15:31 +0800)]
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>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Thu, 18 Aug 2011 16:20:36 +0000 (01:20 +0900)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: omap: Fix build errors in ams-delta
Jarkko Nikula [Thu, 18 Aug 2011 12:02:47 +0000 (15:02 +0300)]
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>
13 years agoALSA: hda - Remove ALC662 eeepc-p701 and ecs models
Takashi Iwai [Thu, 18 Aug 2011 14:02:24 +0000 (16:02 +0200)]
ALSA: hda - Remove ALC662 eeepc-p701 and ecs models

These are confirmed to work with the auto-parser with pincfg fixups.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Get rid of left-over chunks by previous cleanups
Takashi Iwai [Thu, 18 Aug 2011 13:47:37 +0000 (15:47 +0200)]
ALSA: hda - Get rid of left-over chunks by previous cleanups

Also update the model description, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Remove ALC861 uniwill-m31, toshiba, asus and asus-laptop models
Takashi Iwai [Thu, 18 Aug 2011 13:43:38 +0000 (15:43 +0200)]
ALSA: hda - Remove ALC861 uniwill-m31, toshiba, asus and asus-laptop models

These are confirmed to work with the auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Thu, 18 Aug 2011 13:15:02 +0000 (15:15 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - Add "PCM" volume to vmaster slave list
Takashi Iwai [Thu, 18 Aug 2011 13:13:17 +0000 (15:13 +0200)]
ALSA: hda - Add "PCM" volume to vmaster slave list

The new parser may use "PCM" volume, but it was missing the vmaster
slave list, thus "Master" volume didn't control it.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=41342

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Wed, 17 Aug 2011 07:34:05 +0000 (16:34 +0900)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: Remove unreachable code in au1xac97c_drvprobe and au1xi2s_drvprobe
Axel Lin [Wed, 17 Aug 2011 07:14:33 +0000 (15:14 +0800)]
ASoC: Remove unreachable code in au1xac97c_drvprobe and au1xi2s_drvprobe

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix check for symmetric rate enforcement
Sascha Hauer [Wed, 17 Aug 2011 07:20:01 +0000 (09:20 +0200)]
ASoC: Fix check for symmetric rate enforcement

The ASoC core tries to not enforce symmetric rates when
two streams open simultaneously. It does so by checking
rtd->rate being zero. This works exactly once after booting
because it is not set to zero again when the streams close.
Fix this by setting rtd->rate when no active stream is left.

[This leads to lots of warnings about not enforcing the symmetry in some
situations as there's a race in the userspace API where we know we've
got two applications but don't know what rates they want to set.
-- broonie ]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: fsl: fix build warning in fsl_dma
Timur Tabi [Wed, 17 Aug 2011 01:58:29 +0000 (21:58 -0400)]
ASoC: fsl: fix build warning in fsl_dma

The previous patch to fsl_dma.c ("fix initialization of DMA buffers")
left behind an unused local variable that causes a build warning.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix backport of WM8994 thermal warning
Mark Brown [Wed, 17 Aug 2011 06:14:17 +0000 (15:14 +0900)]
ASoC: Fix backport of WM8994 thermal warning

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
13 years agoASoC: claim the IRQ when the fsl_ssi device is probed, not opened
Timur Tabi [Tue, 16 Aug 2011 22:47:45 +0000 (18:47 -0400)]
ASoC: claim the IRQ when the fsl_ssi device is probed, not opened

The PowerPC Freescale SSI driver is claiming the IRQ when the IRQ when
the device is opened, which means that the /proc/interrupts entry for
the SSI exists only during playback or capture.  This also meant that
the user won't know that the IRQ number is wrong until he tries to use
the device.  Instead, we should claim the IRQ when the device is probed.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Blackfin: ADAU1373 eval board support
Lars-Peter Clausen [Mon, 15 Aug 2011 18:15:23 +0000 (20:15 +0200)]
ASoC: Blackfin: ADAU1373 eval board support

Add a machine driver to support the EVAL-ADAU1373 board connected to a
Analog Devices BF5XX evaluation board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add ADAU1373 codec support
Lars-Peter Clausen [Mon, 15 Aug 2011 18:15:22 +0000 (20:15 +0200)]
ASoC: Add ADAU1373 codec support

This patch adds support for the Analog Devices ADAU1373 audio codec.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Implement WM8994 thermal warning and shutdown interrupt support
Mark Brown [Tue, 16 Aug 2011 03:01:27 +0000 (12:01 +0900)]
ASoC: Implement WM8994 thermal warning and shutdown interrupt support

ALSA doesn't really have good mechanisms for dealing with these so we just
log them - the hardware already has automatic shutdown support.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add WM8958 noise gate support
Mark Brown [Tue, 16 Aug 2011 01:08:48 +0000 (10:08 +0900)]
ASoC: Add WM8958 noise gate support

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>