platform/kernel/linux-exynos.git
12 years agoALSA: hda - Load firmware in hda_intel.c
Takashi Iwai [Thu, 9 Aug 2012 10:33:28 +0000 (12:33 +0200)]
ALSA: hda - Load firmware in hda_intel.c

This is a preliminary work for the deferred probing for
request_firmware() errors at init.

This patch moves the call of request_firmware() to hda_intel.c, and
call it in the earlier stage of probing rather than
azx_probe_continue().

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55V
David Henningsson [Thu, 9 Aug 2012 08:56:12 +0000 (10:56 +0200)]
ALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55V

To turn off pin control for the pin was tested, and helped against
this issue.

BugLink: https://bugs.launchpad.net/bugs/1034779
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
David Henningsson [Wed, 8 Aug 2012 06:43:37 +0000 (08:43 +0200)]
ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad

The same ID is twice in the quirk table, so the second one is not used.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
Takashi Iwai [Tue, 7 Aug 2012 16:09:23 +0000 (18:09 +0200)]
ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y

When CONFIG_SND_VERBOSE_PRINTK=y is set, the debug print in
hda_auto_parser.c looks really ugly like:

  ALSA sound/pci/hda/hda_auto_parser.c:331    mono: mono_out=0x0
  ALSA sound/pci/hda/hda_auto_parser.c:334    dig-out=0x12/0x0
  ALSA sound/pci/hda/hda_auto_parser.c:335    inputs:
  ALSA sound/pci/hda/hda_auto_parser.c:339  Mic=0x11ALSA sound/pci/hda/hda_auto_parser.c:339  Line=0x10
  ALSA sound/pci/hda/hda_auto_parser.c:341
  ALSA sound/pci/hda/hda_auto_parser.c:343    dig-in=0x13

Better to put one item at each line.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - remove redundant auto quirks for conexant 506x
David Henningsson [Tue, 7 Aug 2012 12:03:30 +0000 (14:03 +0200)]
ALSA: hda - remove redundant auto quirks for conexant 506x

Now that the auto model is the default, these quirks are redundant
and can be removed.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - remove quirk for Dell Vostro 1015
David Henningsson [Tue, 7 Aug 2012 12:03:29 +0000 (14:03 +0200)]
ALSA: hda - remove quirk for Dell Vostro 1015

This computer is confirmed working with model=auto on kernel 3.2.
Also, parsing fails with hda-emu with the current model.

Cc: stable@kernel.org (3.2+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - add dock support for Thinkpad X230
Felix Kaechele [Mon, 6 Aug 2012 21:02:01 +0000 (23:02 +0200)]
ALSA: hda - add dock support for Thinkpad X230

As with the ThinkPad Models X230 Tablet and T530 the X230 needs a qurik to
correctly set up the pins for the dock port.

Signed-off-by: Felix Kaechele <felix@fetzig.org>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix regression of HDMI codec probing
Takashi Iwai [Mon, 6 Aug 2012 12:49:36 +0000 (14:49 +0200)]
ALSA: hda - Fix regression of HDMI codec probing

The commit c4bfe94a causes a regression on some codecs at probing.
Since this was just a workaround to shut up a kernel warning, it'd be
better to revert and fix properly.  So we ended up with re-adding the
cleanup callback.

Tested-and-reported-by: Matt Horan <matt@matthoran.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - add dock support for Thinkpad T430s
Philipp A. Mohrenweiser [Mon, 6 Aug 2012 11:14:18 +0000 (13:14 +0200)]
ALSA: hda - add dock support for Thinkpad T430s

Add a model/fixup string "lenovo-dock", for Thinkpad T430s, to allow
sound in docking station.

Tested on Lenovo T430s with ThinkPad Mini Dock Plus Series 3

Cc: stable@kernel.org
Signed-off-by: Philipp A. Mohrenweiser <phiamo@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: emu10k1: Avoid access to invalid pages when period=1
Takashi Iwai [Fri, 3 Aug 2012 10:51:21 +0000 (12:51 +0200)]
ALSA: emu10k1: Avoid access to invalid pages when period=1

When period=1, the driver tries to allocate a bit bigger buffer than
requested by the user due to the irq latency tolerance.  This may lead
to accesses over the actually allocated pages.

This patch adds a check of the page index and assigns the silent page
when it's over the given buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: PCM: Fix possible memory leaks in the error path
Takashi Iwai [Fri, 3 Aug 2012 10:48:32 +0000 (12:48 +0200)]
ALSA: PCM: Fix possible memory leaks in the error path

When the first page allocation failed for sgbuf, it leaks the records
that have been formerly allocated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Thu, 2 Aug 2012 16:11:25 +0000 (18:11 +0200)]
Merge tag 'asoc-3.6' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Additional updates for 3.6

A few updates for issues discovered during the merge window, the main
one being the fix for the issues with defaulting to use of regmap
without properly checking if there was I/O in place already.

12 years agoASoC: core: Fix check before defaulting to regmap
Mark Brown [Wed, 1 Aug 2012 19:05:47 +0000 (20:05 +0100)]
ASoC: core: Fix check before defaulting to regmap

Check if the chip has provided a write operation (which is mandatory for
I/O) rather than looking for control data as some of the MFDs use a global
for this. Also skip the attempt if there's no regmap available by device
in case things get confused by the attempt to default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
12 years agoALSA: hda - Support dock on Lenovo Thinkpad T530 with ALC269VC
Takashi Iwai [Thu, 2 Aug 2012 07:04:39 +0000 (09:04 +0200)]
ALSA: hda - Support dock on Lenovo Thinkpad T530 with ALC269VC

Lenovo Thinkpad T530 with ALC269VC codec has a dock port but BIOS
doesn't set up the pins properly.  Enable the pins as well as on
Thinkpad X230 Tablet.

Reported-and-tested-by: Mario <anyc@hadiko.de>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: snd-usb: fix clock source validity index
Daniel Mack [Wed, 1 Aug 2012 08:16:53 +0000 (10:16 +0200)]
ALSA: snd-usb: fix clock source validity index

uac_clock_source_is_valid() uses the control selector value to access
the bmControls bitmap of the clock source unit. This is wrong, as
control selector values start from 1, while the bitmap uses all
available bits.

In other words, "Clock Validity Control" is stored in D3..2, not D5..4
of the clock selector unit's bmControls.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Andreas Koch <andreas@akdesigninc.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: wm8962: Allow VMID time to fully ramp
Mark Brown [Mon, 30 Jul 2012 17:24:19 +0000 (18:24 +0100)]
ASoC: wm8962: Allow VMID time to fully ramp

Required for reliable power up from cold.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoASoC: AC97 doesn't use regmap by default
Manuel Lauss [Tue, 31 Jul 2012 12:42:27 +0000 (14:42 +0200)]
ASoC: AC97 doesn't use regmap by default

Since commit 38cbf9598feba97de9f9b43efa9153fd7c1a2ec9
("ASoC: core: Try to use regmap if the driver doesn't set up any I/O")
any ASoC codec which doesn't set codec::control_data is assumed
to use regmap.  That doesn't work with AC97 so this workaround
sets the codec::control_data member to a random value to restore
proper behaviour.

Tested with WM9712.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sgtl5000: enable VAG_POWER for LINE_IN
Dong Aisheng [Fri, 27 Jul 2012 11:18:42 +0000 (19:18 +0800)]
ASoC: sgtl5000: enable VAG_POWER for LINE_IN

LINE_IN also needs VAG_POWER on or we may hear noise when directly
route LINE_IN to Headphone Mux.
Tested on imx28evk.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ab8500: Inform SoC Core that we have our own I/O arrangements
Lee Jones [Tue, 31 Jul 2012 14:45:41 +0000 (15:45 +0100)]
ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements

If codec->control_data is not populated SoC Core assumes we want to
use regmap, which fails catastrophically, as we don't have one:

Unable to handle kernel NULL pointer dereference at virtual address 00000080
pgd = c0004000
[00000080] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1    Not tainted  (3.5.0-rc6-00884-g0b2419e-dirty #130)
PC is at regmap_read+0x10/0x5c
LR is at hw_read+0x80/0x90
pc : [<c01a91b8>]    lr : [<c0216804>]    psr: 60000013

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
Takashi Iwai [Tue, 31 Jul 2012 08:40:05 +0000 (10:40 +0200)]
ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs

The IDT codecs initializes the GPIO setup for mute LEDs via
snd_hda_sync_vmaster_hook().  This works in most cases except for the
very first call, which is called before PCM and control creations.
Thus before Master switch is set manually via alsactl, the mute LED
may show the wrong state, depending on the polarity.

Now it's fixed by calling the LED-status update function manually when
no vmaster is set yet.

Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Add descriptions for missing IDT 92HD83x models
Takashi Iwai [Tue, 31 Jul 2012 08:26:34 +0000 (10:26 +0200)]
ALSA: hda - Add descriptions for missing IDT 92HD83x models

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix polarity of mute LED on HP Mini 210
Takashi Iwai [Tue, 31 Jul 2012 08:16:59 +0000 (10:16 +0200)]
ALSA: hda - Fix polarity of mute LED on HP Mini 210

The commit a3e199732b made the LED working again on HP Mini 210 but
with a wrong polarity.  This patch fixes the polarity for this
machine, and also introduce a new model string "hp-inv-led".

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923

Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: es1688 - freeup resources on init failure
Fengguang Wu [Sun, 29 Jul 2012 11:39:09 +0000 (19:39 +0800)]
ALSA: es1688 - freeup resources on init failure

This will fix the following oops:

[    6.169981] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
[    6.170851] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e9 #14
[    6.170851] Call Trace:
[    6.170851]  [<c1062237>] ? __setup_irq+0x3c7/0x420
[    6.170851]  [<c1062486>] ? request_threaded_irq+0x76/0x140
[    6.170851]  [<c1290220>] ? snd_es1688_ioctl+0x10/0x10
[    6.170851]  [<c10624c2>] ? request_threaded_irq+0xb2/0x140
[    6.170851]  [<c1291196>] ? snd_es1688_create+0x96/0x330
[    6.170851]  [<c138365d>] ? snd_gusextreme_probe+0x18d/0x5a2
[    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.170851]  [<c10db22f>] ? sysfs_create_link+0xf/0x20
[    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.170851]  [<c11d1502>] ? isa_bus_probe+0x12/0x20
[    6.170851]  [<c11c9b95>] ? driver_probe_device+0x55/0x1c0
[    6.170851]  [<c13ae04f>] ? _raw_spin_unlock+0xf/0x30
[    6.170851]  [<c13705ea>] ? klist_next+0x6a/0xe0
[    6.170851]  [<c11d15c1>] ? isa_bus_match+0x21/0x40
[    6.170851]  [<c11c8a24>] ? bus_for_each_drv+0x34/0x70
[    6.170851]  [<c11c9e4b>] ? device_attach+0x7b/0x90
[    6.170851]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.170851]  [<c11c8bff>] ? bus_probe_device+0x5f/0x80
[    6.170851]  [<c11c7493>] ? device_add+0x573/0x620
[    6.170851]  [<c1042820>] ? complete_all+0x40/0x60
[    6.170851]  [<c13ae08a>] ? _raw_spin_unlock_irqrestore+0x1a/0x30
[    6.170851]  [<c11d16c6>] ? isa_register_driver+0xb6/0x150
[    6.170851]  [<c15c9002>] ? alsa_card_gusmax_init+0xf/0xf
[    6.170851]  [<c15a99bc>] ? do_one_initcall+0x7f/0x12b
[    6.170851]  [<c15a9b7a>] ? kernel_init+0x112/0x1a9
[    6.170851]  [<c15a9423>] ? do_early_param+0x77/0x77
[    6.170851]  [<c15a9a68>] ? do_one_initcall+0x12b/0x12b
[    6.170851]  [<c13aefbe>] ? kernel_thread_helper+0x6/0xd
[    6.190170] es1688: can't grab IRQ 5
[    6.190613] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
[    6.191566] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e9 #14
[    6.192394] Call Trace:
[    6.192685]  [<c1062237>] ? __setup_irq+0x3c7/0x420
[    6.193342]  [<c1062486>] ? request_threaded_irq+0x76/0x140
[    6.194081]  [<c1290220>] ? snd_es1688_ioctl+0x10/0x10
[    6.194607]  [<c10624c2>] ? request_threaded_irq+0xb2/0x140
[    6.194607]  [<c1291196>] ? snd_es1688_create+0x96/0x330
[    6.194607]  [<c138365d>] ? snd_gusextreme_probe+0x18d/0x5a2
[    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.194607]  [<c10db22f>] ? sysfs_create_link+0xf/0x20
[    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.194607]  [<c11d1502>] ? isa_bus_probe+0x12/0x20
[    6.194607]  [<c11c9b95>] ? driver_probe_device+0x55/0x1c0
[    6.194607]  [<c13ae04f>] ? _raw_spin_unlock+0xf/0x30
[    6.194607]  [<c13705ea>] ? klist_next+0x6a/0xe0
[    6.194607]  [<c11d15c1>] ? isa_bus_match+0x21/0x40
[    6.194607]  [<c11c8a24>] ? bus_for_each_drv+0x34/0x70
[    6.194607]  [<c11c9e4b>] ? device_attach+0x7b/0x90
[    6.194607]  [<c11c9d80>] ? __driver_attach+0x80/0x80
[    6.194607]  [<c11c8bff>] ? bus_probe_device+0x5f/0x80
[    6.194607]  [<c11c7493>] ? device_add+0x573/0x620
[    6.194607]  [<c1042820>] ? complete_all+0x40/0x60
[    6.194607]  [<c13ae08a>] ? _raw_spin_unlock_irqrestore+0x1a/0x30
[    6.194607]  [<c11d16c6>] ? isa_register_driver+0xb6/0x150
[    6.194607]  [<c15c9002>] ? alsa_card_gusmax_init+0xf/0xf
[    6.194607]  [<c15a99bc>] ? do_one_initcall+0x7f/0x12b
[    6.194607]  [<c15a9b7a>] ? kernel_init+0x112/0x1a9
[    6.194607]  [<c15a9423>] ? do_early_param+0x77/0x77
[    6.194607]  [<c15a9a68>] ? do_one_initcall+0x12b/0x12b
[    6.194607]  [<c13aefbe>] ? kernel_thread_helper+0x6/0xd
[    6.210779] es1688: can't grab IRQ 5
[    6.211305] gusextreme: probe of gusextreme.0 failed with error -16

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Workaround for silent output on VAIO Z with ALC889
Takashi Iwai [Sun, 29 Jul 2012 08:04:08 +0000 (10:04 +0200)]
ALSA: hda - Workaround for silent output on VAIO Z with ALC889

On recent kernels, Realtek codec parser tries to optimize the routing
aggressively and take the headphone output as primary at first.  This
caused a regression on VAIO Z with ALC889, the silent output from the
speaker.

The problem seems that the speaker pin must be connected to the first
DAC (0x02) on this machine by some reason although the codec itself
advertises the flexible routing with any DACs.

This patch adds a fix-up for choosing the speaker pin as the primary
so that the right DAC is assigned on this device.

Reported-and-tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix WARNING from HDMI/DP parser
Takashi Iwai [Fri, 27 Jul 2012 14:01:54 +0000 (16:01 +0200)]
ALSA: hda - Fix WARNING from HDMI/DP parser

The recent fix to converter detaching timing in patch_hdmi.c
leads to a kernel WARNING due to a sanity check when the debug
option is set.  Add a workaround by setting a dummy hinfo->nid.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: omap: Add missing modules aliases to get sound working on omap devices
Guillaume Gardet [Thu, 12 Jul 2012 13:08:16 +0000 (15:08 +0200)]
ASoC: omap: Add missing modules aliases to get sound working on omap devices

This patch add missing modules aliases to get sound working on omap devices.

Tested on Beagleboard xM rev. B.

This patch is against 3.5-rc6 vanilla.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Mans Rullgard <mans.rullgard@linaro.org>
From 18b1ba8becc3dd256bdaad2d825f46b551debda3 Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@oliseo.fr>
Date: Tue, 10 Jul 2012 13:47:16 +0200
Subject: [PATCH] Add missing modules aliases to fix audio on omap devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agosound: tegra_alc5632: Adjust to of_get_named_gpio() change
Roland Stigge [Mon, 18 Jun 2012 16:42:22 +0000 (18:42 +0200)]
sound: tegra_alc5632: Adjust to of_get_named_gpio() change

of_get_named_gpio() was changed to return -EPROBE_DEFER in case of
gpios not probed yet. This patch adjusts tegra_alc5632 to this.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agosound: tegra_wm8903: Adjust to of_get_named_gpio() change
Roland Stigge [Mon, 18 Jun 2012 16:42:21 +0000 (18:42 +0200)]
sound: tegra_wm8903: Adjust to of_get_named_gpio() change

of_get_named_gpio() was changed to return -EPROBE_DEFER in case of
gpios not probed yet. This patch adjusts tegra_wm8903 to this.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mc13783: Provide codec->control_data
Fabio Estevam [Thu, 26 Jul 2012 18:29:03 +0000 (15:29 -0300)]
ASoC: mc13783: Provide codec->control_data

If codec->control_data is not provided, the following crash happens:

Unable to handle kernel NULL pointer dereference at virtual address 00000078
pgd = 80004000
[00000078] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0    Tainted: G        W     (3.5.0-next-20120725+ #1263)
PC is at regmap_read+0x18/0x64
LR is at hw_read+0x50/0x98
pc : [<802bcd90>]    lr : [<803cad18>]    psr: 60000013
...

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - Detach from converter at closing in patch_hdmi.c
Takashi Iwai [Thu, 26 Jul 2012 16:08:14 +0000 (18:08 +0200)]
ALSA: hda - Detach from converter at closing in patch_hdmi.c

The generic HDMI code detaches the converter from the stream when
unused, but it must be done rather in the close callback instead of
the cleanup callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: ux500: Include the correct header files
Lee Jones [Thu, 26 Jul 2012 10:28:38 +0000 (11:28 +0100)]
ASoC: ux500: Include the correct header files

Thought to be another merge error, board-mop500-msp.h has never existed
in the upstream kernel, only msp.h. This patch changes the include files
to match the existing file name.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - Fix mute-LED GPIO setup for HP Mini 210
Takashi Iwai [Thu, 26 Jul 2012 06:17:20 +0000 (08:17 +0200)]
ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210

BIOS on HP Mini 210 doesn't provide the proper "HP_Mute_LED" DMI
string, thus the driver doesn't initialize the GPIO, too.  In the
earlier kernel, the driver falls back to GPIO1, but since 3.3 we've
stopped this due to other wrongly advertised machines.

For fixing this particular case, add a new model type to specify the
default polarity explicitly so that the fallback to GPIO1 is handled.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923

Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: mpu401: Fix missing initialization of irq field
Takashi Iwai [Mon, 23 Jul 2012 09:35:55 +0000 (11:35 +0200)]
ALSA: mpu401: Fix missing initialization of irq field

The irq field of struct snd_mpu401 is supposed to be initialized to -1.
Since it's set to zero as of now, a probing error before the irq
installation results in a kernel warning "Trying to free already-free
IRQ 0".

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44821
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs
Takashi Iwai [Wed, 25 Jul 2012 11:54:55 +0000 (13:54 +0200)]
ALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs

We've got a bug report about the silent output from the headphone on a
mobo with VT2021, and spotted out that this was because of the wrong
D3 state on the DAC for the headphone output.  The bug is triggered by
the incomplete check for this DAC in set_widgets_power_state_vt1718S().
It checks only the connectivity of the primary output (0x27) but
doesn't consider the path from the headphone pin (0x28).

Now this patch fixes the problem by checking both pins for DAC 0x0b.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: wm8994: Hold runtime PM reference while handling mic and jack IRQs
Mark Brown [Tue, 24 Jul 2012 14:48:57 +0000 (15:48 +0100)]
ASoC: wm8994: Hold runtime PM reference while handling mic and jack IRQs

Ensures that we don't interact badly with the power management framework,
especially in the cases where we're doing deferred work or we're using a
direct GPIO for these signals.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probe
Dong Aisheng [Fri, 20 Jul 2012 09:20:26 +0000 (17:20 +0800)]
ASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probe

There's a driver bug that sgtl5000 dapm widget kcontrols do not work.
e.g. can not select capture mux with amixer tool(no error info prompted).

The root cause is that we still call snd_soc_dapm_new_widgets in
codec driver probe function afer converting to table based widgets.
This will cause the card dapm widgets are instantiated before the
dapm_routes are registered.
Then, no available dapm widget pathes can be found during instantiation
which finally will cause soc_dapm_mux_update_power to fail(can not find
correct path with kcontrol) in snd_soc_dapm_put_enum_double function.

Here we remove the unneeded snd_soc_dapm_new_widgets in codec probe
and let the soc core to handle the register sequence properly.
Then we can fix above issue.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mxs-saif: set a base clock rate for EXTMASTER mode work
Dong Aisheng [Fri, 20 Jul 2012 09:20:25 +0000 (17:20 +0800)]
ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work

Set an initial clock rate for the saif internal logic to work
properly. This is important when working in EXTMASTER mode that
uses the other saif's BITCLK&LRCLK but it still needs a basic
clock which should be fast enough for the internal logic.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mxs-saif: fix clock prepare and enable unbalance issue
Dong Aisheng [Fri, 20 Jul 2012 09:20:24 +0000 (17:20 +0800)]
ASoC: mxs-saif: fix clock prepare and enable unbalance issue

Currently we directly call a clock_enable in trigger function without
a clk_prepare as pair first.
This will cause system hang immediately when run capture because
the clock was not prepared(playback does not hang because the clock was
prepared already by get_mclk before), a warning message in clock framework
may cause a deadlock to reclaim clock lock (see: pl011_console_write).

Here we prepare clock first in hw_param, then enable it in trigger
function to guarantee the balance.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Ensure there are enough BCLKs for four channels
Mark Brown [Fri, 22 Jun 2012 16:21:17 +0000 (17:21 +0100)]
ASoC: wm8994: Ensure there are enough BCLKs for four channels

Otherwise if someone tries to use all four channels on AIF1 with the
device in master mode we won't be able to clock out all the data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoMerge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Mon, 23 Jul 2012 12:34:42 +0000 (14:34 +0200)]
Merge tag 'asoc-3.6' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Additional updates for 3.6

A few more fixes for 3.6, some of which are relatively important -
they've all been in -next for at least some time.

- DAPM fixes for the recent locking changes.
- Fix for _PRE and _POST widgets (which have been broken for a few
  releases now).
- A couple of minor driver updates.

12 years agoMerge branch 'for-3.5' into for-3.6
Mark Brown [Mon, 23 Jul 2012 09:45:07 +0000 (10:45 +0100)]
Merge branch 'for-3.5' into for-3.6

12 years agoASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements
Mark Brown [Fri, 20 Jul 2012 16:29:34 +0000 (17:29 +0100)]
ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements

Ever since the DAPM performance improvements we've been marking all widgets
as not dirty after each DAPM run. Since _PRE and _POST events aren't part
of the DAPM graph this has rendered them non-functional, they will never be
marked dirty again and thus will never be run again.

Fix this by skipping them when marking widgets as not dirty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@vger.kernel.org
12 years agoALSA: hda - add dock support for Thinkpad X230 Tablet
David Henningsson [Fri, 20 Jul 2012 08:37:25 +0000 (10:37 +0200)]
ALSA: hda - add dock support for Thinkpad X230 Tablet

Also add a model/fixup string "lenovo-dock", so that other Thinkpad
users will be able to test this fixup easily, to see if it enables
dock I/O for them as well.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1026953
Tested-by: John McCarron <john.mccarron@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
Dylan Reid [Fri, 20 Jul 2012 00:52:58 +0000 (17:52 -0700)]
ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.

Turn on the pin widget's PIN_OUT bit from playback prepare. The pin is
enabled in open, but is disabled in hdmi_init_pin which is called during
system resume.  This causes a system suspend/resume during playback to
mute HDMI/DP. Enabling the pin in prepare instead of open allows calling
snd_pcm_prepare after a system resume to restore audio.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'topic/pm-convert' into for-next
Takashi Iwai [Thu, 19 Jul 2012 06:21:40 +0000 (08:21 +0200)]
Merge branch 'topic/pm-convert' into for-next

This merges the changes for converting to new PM ops for platform
and some other drivers.
Also move some header files to local places from the public
include/sound.

12 years agoMerge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Thu, 19 Jul 2012 06:03:20 +0000 (08:03 +0200)]
Merge tag 'asoc-3.6' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for 3.6

This has been a pretty quiet release - very little activity in framework
terms, mostly just a few new drivers and updates:

- Added the ability to add and remove DAPM paths dynamically, mostly for
  reparenting on clock changes.
- New machine drivers for Marvell Brownstone, ST-Ericsson Ux500
  reference platform and ttc-dkp.
- New CPU drivers for Blackfin BF6xx SPORTs in I2S mode, Marvell MMP,
  Synopsis Designware I2S controllers, and SPEAr DMA and S/PDIF
- New CODEC drivers for Dialog DA732x, ST STA529, ST-Ericsson AB8500, TI
  Isabelle and Wolfson Microelectronics WM5102 and WM5110

12 years agoASoC imx-audmux: add MX31_AUDMUX_PORT7_SSI_PINS_7 define
Torben Hohn [Wed, 18 Jul 2012 13:01:17 +0000 (15:01 +0200)]
ASoC imx-audmux: add MX31_AUDMUX_PORT7_SSI_PINS_7 define

The MX31 Audmux also has 7 Ports.
This patch adds the missing define, and makes the debugfs code iterate
over that port too.

Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: littlemill: Add userspace control of the WM1250 I/O
Mark Brown [Wed, 18 Jul 2012 18:16:06 +0000 (19:16 +0100)]
ASoC: littlemill: Add userspace control of the WM1250 I/O

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Update micdet for irqdomain conversion
Mark Brown [Wed, 18 Jul 2012 18:11:30 +0000 (19:11 +0100)]
ASoC: wm8994: Update micdet for irqdomain conversion

The conversion of the core driver to irqdomains means that we don't need
and irq_base to have working interrupts so use wm8994_request_irq() to
deal with looking up the interrupt number for the micdet IRQ.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - make sure alc268 does not OOPS on codec parse
David Henningsson [Wed, 18 Jul 2012 16:02:53 +0000 (18:02 +0200)]
ALSA: hda - make sure alc268 does not OOPS on codec parse

A recent commit made patch_alc268 call snd_hda_pick_fixup with
NULL quirk pointer. Make sure we do not reference that NULL pointer.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 18 Jul 2012 11:53:29 +0000 (13:53 +0200)]
Merge branch 'topic/misc' into for-next

Generic updates for sound 3.6

12 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Wed, 18 Jul 2012 11:53:06 +0000 (13:53 +0200)]
Merge branch 'topic/hda' into for-next

This is a large chunk merge for 3.6 HD-audio things

12 years agoALSA: hda - Add support for Realtek ALC282
David Henningsson [Wed, 18 Jul 2012 05:38:46 +0000 (07:38 +0200)]
ALSA: hda - Add support for Realtek ALC282

This codec has a separate dmic path (separate dmic only ADC),
and thus it looks mostly like ALC275.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1025377
Tested-by: Ray Chen <ray.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix index number conflicts of phantom jacks
Takashi Iwai [Tue, 17 Jul 2012 14:48:27 +0000 (16:48 +0200)]
ALSA: hda - Fix index number conflicts of phantom jacks

Since some jack controls may be renamed as phantom jacks, the existing
check for index conflicts doesn't work because it simply compares the
name with the last used name, assuming that the controls with the same
name continue.  Thus, it would result in the duplicated controls when
two or more phantom jacks with the very same type exist, and the
driver gives up with an error.

This patch fixes the problem by checking the index number conflicts
more intensively (but dumbly).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: opti9xx: Fix section mismatch by PM support
Takashi Iwai [Tue, 17 Jul 2012 10:14:17 +0000 (12:14 +0200)]
ALSA: opti9xx: Fix section mismatch by PM support

In the previous commit, snd_opti9xx_configure() is called from the
resume handler but it's still marked as __devinit.  Fix it.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: snd-opti9xx: Implement suspend/resume
Ondrej Zary [Tue, 17 Jul 2012 07:16:44 +0000 (09:16 +0200)]
ALSA: snd-opti9xx: Implement suspend/resume

Implement suspend/resume support for Opti 92x and 93x chips.
Tested with Opti 929A+AD1848 and Opti 931.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Add new GPU codec ID to snd-hda
Aaron Plattner [Tue, 17 Jul 2012 00:10:04 +0000 (17:10 -0700)]
ALSA: hda - Add new GPU codec ID to snd-hda

Vendor ID 0x10de0051 is used by a yet-to-be-named GPU chip.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix driver type of Haswell controller to AZX_DRIVER_SCH
Takashi Iwai [Mon, 16 Jul 2012 14:17:10 +0000 (16:17 +0200)]
ALSA: hda - Fix driver type of Haswell controller to AZX_DRIVER_SCH

According to Xingchao,
  This works for HDMI audio, otherwise there's blocking issue.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - add Haswell HDMI codec id
Wang Xingchao [Wed, 13 Jun 2012 02:23:52 +0000 (10:23 +0800)]
ALSA: hda - add Haswell HDMI codec id

0x80862807 is HDMI id for Haswell HDA.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Add DeviceID for Haswell HDA
Wang Xingchao [Wed, 13 Jun 2012 02:23:51 +0000 (10:23 +0800)]
ALSA: hda - Add DeviceID for Haswell HDA

this patch add proper id for Haswell HDA Controller.

[Added AZX_DCAPS_POSFIX_COMBO flag by tiwai]

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: wss_lib: Fix resume on Yamaha OPL3-SAx
Ondrej Zary [Mon, 16 Jul 2012 06:30:18 +0000 (08:30 +0200)]
ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx

Yamaha OPL3-SAx chips don't resume properly when playback is running -
garbage is played after resume. Restoring the CS4231_PLAYBK_FORMAT register
last fixes the problem.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: wss_lib: fix suspend/resume
Ondrej Zary [Thu, 12 Jul 2012 21:30:31 +0000 (23:30 +0200)]
ALSA: wss_lib: fix suspend/resume

By setting SNDRV_PCM_INFO_RESUME, wss_lib claims that it can restore the card
state fully on resume. But in fact, it can't as DMA is not restored so any
playback/capture running during suspend will fail to continue after resume.

Remove SNDRV_PCM_INFO_RESUME flag from pcm info field to fix the problem.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: es1938: replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Clemens Ladisch [Sun, 20 Nov 2011 16:21:34 +0000 (17:21 +0100)]
ALSA: es1938: replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE

Instead of the hard-to-mantain TLV_DB_RANGE_HEAD macro, use
DECLARE_TLV_DB_RANGE, which computes its size automatically.

(Also make this data const on the way.)

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: tlv: add DECLARE_TLV_DB_RANGE()
Clemens Ladisch [Sun, 20 Nov 2011 16:17:35 +0000 (17:17 +0100)]
ALSA: tlv: add DECLARE_TLV_DB_RANGE()

Add a DECLARE_TLV_DB_RANGE() macro so that dB range information
can be specified without having to count the items manually for
TLV_DB_RANGE_HEAD().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: tlv: add DECLARE_TLV_CONTAINER()
Clemens Ladisch [Fri, 2 Dec 2011 22:20:00 +0000 (23:20 +0100)]
ALSA: tlv: add DECLARE_TLV_CONTAINER()

Add the DECLARE_TLV_CONTAINER() macro to allow having static
TLVs containing more than one item.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: tlv: compute TLV_*_ITEM lengths automatically
Clemens Ladisch [Sun, 20 Nov 2011 15:22:24 +0000 (16:22 +0100)]
ALSA: tlv: compute TLV_*_ITEM lengths automatically

Add helper macros with a little bit of preprocessor magic to
automatically compute the length of a TLV item.  This lets us avoid
having to compute this by hand, and will allow to use items that do
not use a fixed length.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Convert S3C2412 I2S driver to gpiolib API
Sylwester Nawrocki [Fri, 13 Jul 2012 17:22:45 +0000 (19:22 +0200)]
ASoC: Convert S3C2412 I2S driver to gpiolib API

The s3c2410_gpio* calls are obsolete and have been scheduled for
removal since several kernel releases. Remove them and use common
gpiolib API.
This patch is a prerequisite for removal of the obsolete S3C24XX
SoC GPIO definitions.

Compile tested only.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert S3C24XX I2S driver to gpiolib API
Sylwester Nawrocki [Fri, 13 Jul 2012 17:22:44 +0000 (19:22 +0200)]
ASoC: Convert S3C24XX I2S driver to gpiolib API

The s3c2410_gpio* calls are obsolete and have been scheduled for
removal since several kernel releases. Remove them and use common
gpiolib API.
This patch is a prerequisite for removal of the obsolete S3C24XX
SoC GPIO definitions.

Tested on Micro2440-SDK.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Fix compilation warning
Marek Belisko [Thu, 12 Jul 2012 21:00:16 +0000 (23:00 +0200)]
ASoC: dapm: Fix compilation warning

Fix following:
sound/soc/soc-dapm.c: In function ‘dapm_clock_event’:
sound/soc/soc-dapm.c:1021:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: snd-usb: move calls to usb_set_interface
Daniel Mack [Thu, 12 Jul 2012 11:08:40 +0000 (13:08 +0200)]
ALSA: snd-usb: move calls to usb_set_interface

The rework of the snd-usb endpoint logic moved the calls to
snd_usb_set_interface() into the snd_usb_endpoint implemenation. This
changed the order in which these calls are issued to the device, and
thereby caused regressions for some webcams.

Fix this by moving the calls back to pcm.c for now to make it work again
and use snd_usb_endpoint_activate() to really tear down all remaining
URBs in the flight, consequently fixing another regression caused by USB
packets on the wire after altsetting 0 has been selected.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Philipp Dreimann <philipp@dreimann.net>
Reported-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: wm8962: Redo early init of the part on resume
Mark Brown [Wed, 11 Jul 2012 18:03:48 +0000 (19:03 +0100)]
ASoC: wm8962: Redo early init of the part on resume

Ensure robust startup of the part by going through the reset procedure
prior to resyncing the full register cache, avoiding potential intermittent
faults in some designs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoASoC: Free memory in the error paths of soc_of_parse_audio_routing()
Matthias Kaehlcke [Wed, 11 Jul 2012 15:36:34 +0000 (17:36 +0200)]
ASoC: Free memory in the error paths of soc_of_parse_audio_routing()

Release the memory of the routing table before leaving the function upon errors
in the device tree

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm5110: Add audio CODEC driver
Mark Brown [Mon, 9 Jul 2012 18:09:41 +0000 (19:09 +0100)]
ASoC: wm5110: Add audio CODEC driver

The WM5110 is a highly integrated low power audio subsystem for
smartphones, tablets and other portable audio devices. It combines
an advanced DSP feature set with a flexible, high performance audio
hub CODEC.

This patch adds the audio CODEC driver for the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: STA529: fix an error message
Dan Carpenter [Wed, 11 Jul 2012 06:41:23 +0000 (09:41 +0300)]
ASoC: STA529: fix an error message

GCC complains that "ret" is uninitialized here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Support variable FLL VCO multipliers
Mark Brown [Tue, 10 Jul 2012 16:03:46 +0000 (17:03 +0100)]
ASoC: arizona: Support variable FLL VCO multipliers

Some Arizona chips have a higher frequency for the FLL VCO, support this
in the common code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: tlv320aic3x: add input clock selection
Jiri Prchal [Tue, 10 Jul 2012 12:36:58 +0000 (14:36 +0200)]
ASoC: tlv320aic3x: add input clock selection

This patch adds input selection of main codec clock - from what pin.
Both registers set same value since codec uses clock divider or pll at one time.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: tlv320aic3x: add AGC settings
Jiri Prchal [Tue, 10 Jul 2012 12:35:11 +0000 (14:35 +0200)]
ASoC: tlv320aic3x: add AGC settings

This patch adds AGC target level and times settings for TLV320AIC3x.
Enums uses small arrays of two channels left and right since it uses different registers.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: tlv320aic3x: add deemphasis switch
Jiri Prchal [Mon, 9 Jul 2012 07:48:44 +0000 (09:48 +0200)]
ASoC: tlv320aic3x: add deemphasis switch

This patch adds missing deemphasis switch.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm5102: Fix cut'n'paste for digital volume registers
Mark Brown [Mon, 9 Jul 2012 18:08:23 +0000 (19:08 +0100)]
ASoC: wm5102: Fix cut'n'paste for digital volume registers

The analogue PGA shifts were used; this makes no practical difference as
the values are the same.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Add IN4 to the mixer tables
Mark Brown [Mon, 9 Jul 2012 18:09:01 +0000 (19:09 +0100)]
ASoC: arizona: Add IN4 to the mixer tables

Some devices have four input structures rather than three.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Export dai_ops
Mark Brown [Mon, 9 Jul 2012 11:16:41 +0000 (12:16 +0100)]
ASoC: arizona: Export dai_ops

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-mcpdm: Add missing MODULE_ALIAS
Peter Ujfalusi [Fri, 6 Jul 2012 10:19:10 +0000 (12:19 +0200)]
ASoC: omap-mcpdm: Add missing MODULE_ALIAS

The MODULE_ALIAS() was missing from the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Change DAPM routes for AIF clocks when we change them
Mark Brown [Thu, 5 Jul 2012 16:26:59 +0000 (17:26 +0100)]
ASoC: arizona: Change DAPM routes for AIF clocks when we change them

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Allow routes to be deleted at runtime
Mark Brown [Thu, 5 Jul 2012 16:24:19 +0000 (17:24 +0100)]
ASoC: dapm: Allow routes to be deleted at runtime

Since we're now relying on DAPM for things like enabling clocks when we
reparent the clocks for widgets we need to either use conditional routes
(which are expensive) or remove routes at runtime. Add a route removal
API to support this use case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Mark widgets as dirty when a route is added
Mark Brown [Thu, 5 Jul 2012 16:20:06 +0000 (17:20 +0100)]
ASoC: dapm: Mark widgets as dirty when a route is added

If we add a new route at runtime then we'll need to recheck the connections
to the affected widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dpcm: Allow FE to be opened without valid BE routes.
Liam Girdwood [Fri, 6 Jul 2012 16:07:00 +0000 (17:07 +0100)]
ASoC: dpcm: Allow FE to be opened without valid BE routes.

Some userspace will open a PCM device and then configure mixers
for routing before triggering. This patch allows userspace to do
this sequence.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: twl6040: fix spelling mistake
Simon Wilson [Fri, 6 Jul 2012 16:04:17 +0000 (17:04 +0100)]
ASoC: twl6040: fix spelling mistake

Fix spelling mistake in "High-Performance" option of twl6040 power mode.

Signed-off-by: Simon Wilson <simonwilson@google.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Make sure all dapm contexts are updated
Liam Girdwood [Fri, 6 Jul 2012 15:56:16 +0000 (16:56 +0100)]
ASoC: dapm: Make sure all dapm contexts are updated

Make sure we set the bias level for all DAPM contexts when
changing level.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: pcm: Clean up logging in soc_new_pcm()
Liam Girdwood [Fri, 6 Jul 2012 15:54:52 +0000 (16:54 +0100)]
ASoC: pcm: Clean up logging in soc_new_pcm()

Use dev_ style logging throughout soc_new_pcm()

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Fix locking during codec shutdown
Liam Girdwood [Fri, 6 Jul 2012 15:57:05 +0000 (16:57 +0100)]
ASoC: dapm: Fix locking during codec shutdown

Codec shutdown performs a DAPM power sequence that might cause conflicts
and/or race conditions if another stream power event is running simultaneously.
Use card's dapm mutex to protect any potential race condition between them.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoALSA: usb-audio: Fix the first PCM interface assignment
Takashi Iwai [Fri, 6 Jul 2012 06:11:43 +0000 (08:11 +0200)]
ALSA: usb-audio: Fix the first PCM interface assignment

In the new PCM streaming logic, the interface number is assigned to
usb stream instance (subs->interface) after the format and rate setups
are succeeded, but some codes are still passing subs->interface as the
reference to helper functions.  This leads to initializing with an
invalid iface number (-1).

This patch replaces the wrong references with the ones from the target
fmt correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: wm1250-ev1: Flag all supported rates in the DAI
Mark Brown [Thu, 5 Jul 2012 13:30:59 +0000 (14:30 +0100)]
ASoC: wm1250-ev1: Flag all supported rates in the DAI

Not previously noticed due to normal usage being with CODEC<->CODEC links.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm5102: Allow routing through the ASRCs
Mark Brown [Wed, 4 Jul 2012 19:07:03 +0000 (20:07 +0100)]
ASoC: wm5102: Allow routing through the ASRCs

This enables common telephony use cases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Enable ASYNCCLK domain for audio interfaces
Mark Brown [Wed, 4 Jul 2012 19:05:57 +0000 (20:05 +0100)]
ASoC: arizona: Enable ASYNCCLK domain for audio interfaces

If an audio interface is configured to use ASYNCCLK then update the
asynchronous sample rate rather than one of our primary sample rates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-mc13783: Add audmux settings for mx27pdk
Fabio Estevam [Tue, 3 Jul 2012 18:44:58 +0000 (15:44 -0300)]
ASoC: imx-mc13783: Add audmux settings for mx27pdk

mx27pdk board also has a mc13783 codec.

Add support for it and do a run-time machine type check to perform the correct
audiomux settings.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: remove unneeded AUDMUX register setting from imx-sgtl5000
Hui Wang [Wed, 4 Jul 2012 07:38:27 +0000 (15:38 +0800)]
ASoC: fsl: remove unneeded AUDMUX register setting from imx-sgtl5000

If we don't set IMX_AUDMUX_V2_PTCR_TCLKDIR in the AUDMUX PTCR
register (means Tx clock pin is input), we don't need to set
IMX_AUDMUX_V2_PTCR_TCSEL as well. Since both i.MX35, i.MX51 and
i.MX6 datasheet says "When Tx clock pin set as an input, the TCSEL
settings are ignored".

Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: pcm: Make constraints lists const
Mark Brown [Thu, 5 Jul 2012 11:15:01 +0000 (12:15 +0100)]
ALSA: pcm: Make constraints lists const

They aren't modified by the core so the drivers can declare them const.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Always call standard unsolicited event for Realtek codecs
David Henningsson [Thu, 5 Jul 2012 10:00:12 +0000 (12:00 +0200)]
ALSA: hda - Always call standard unsolicited event for Realtek codecs

With the model parsers out of the way, we have no custom unsol
events to worry about, we can therefore simplify the code.

In addition, this fixes a bug on the ASUS TC710, which has only
a headphone jack and a mic jack, but no internal mic or speakers.
Therefore the unsol_event pointer was not set, and as a result,
the jack kcontrols were not correctly updated.

BugLink: https://bugs.launchpad.net/bugs/1021192
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: arizona: Be more forgiving in BCLK selection
Mark Brown [Wed, 4 Jul 2012 18:07:09 +0000 (19:07 +0100)]
ASoC: arizona: Be more forgiving in BCLK selection

Allow any BCLK which can be divided down to generate LRCLK, not just the
lowest possible BCLK to clock out the samples.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: arizona: Implement AIF clock configuration
Mark Brown [Wed, 4 Jul 2012 16:32:05 +0000 (17:32 +0100)]
ASoC: arizona: Implement AIF clock configuration

Allow the user to select which of the system clocks each AIF is referenced
to and constran the DAI to the set of frequencies which can be generated
from that clock.

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