pandora-kernel.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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.

11 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

11 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
11 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>
11 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>
11 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.

11 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

11 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>
11 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>
11 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>
11 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>
11 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

11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoASoC: arizona: Rename current rates tables to bclk_rates
Mark Brown [Wed, 4 Jul 2012 17:58:04 +0000 (18:58 +0100)]
ASoC: arizona: Rename current rates tables to bclk_rates

They're the rates for the BCLK, not for the sample rate, so rename so that
we don't confuse ourselves.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: dwc: Staticise non-exported i2s_start()
Mark Brown [Wed, 4 Jul 2012 18:04:11 +0000 (19:04 +0100)]
ASoC: dwc: Staticise non-exported i2s_start()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: SPEAr spdif_out: Add spdif out support
Vipin Kumar [Wed, 4 Jul 2012 10:41:13 +0000 (16:11 +0530)]
ASoC: SPEAr spdif_out: Add spdif out support

This patch implements the spdif out driver for ST peripheral. This
peripheral implements IEC60958 standard

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: STA529: Add support for STA529 Audio Codec
Rajeev Kumar [Wed, 4 Jul 2012 10:41:12 +0000 (16:11 +0530)]
ASoC: STA529: Add support for STA529 Audio Codec

The STA529 is a digital stereo class-D audio amplifier. It includes an
audio DSP, an ST proprietary high-efficiency class-D driver and CMOS
power output stage. It is intended for high-efficiency
digital-to-power-audio conversion for portable applications.

Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: tlv320aic3x: extending registers cache
Jiri Prchal [Wed, 4 Jul 2012 06:12:51 +0000 (08:12 +0200)]
ASoC: tlv320aic3x: extending registers cache

Adds missing register default values to cache.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: tlv320aic3x: add missing registers and bits
Jiri Prchal [Wed, 4 Jul 2012 06:12:50 +0000 (08:12 +0200)]
ASoC: tlv320aic3x: add missing registers and bits

Adds register and bit shift definitions in header file.
Changes are for TLV320AIC310x based on data sheet.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoMerge branch 'topic/hda-beep' into topic/hda
Takashi Iwai [Wed, 4 Jul 2012 07:12:50 +0000 (09:12 +0200)]
Merge branch 'topic/hda-beep' into topic/hda

11 years agoASoC: wm8994: Don't suspend accessory detection
Mark Brown [Tue, 26 Jun 2012 10:06:53 +0000 (11:06 +0100)]
ASoC: wm8994: Don't suspend accessory detection

Leave it up to the machine driver to disable accessory detection if
desired, the common pattern is to have accessory detection be a wake
source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: core: Try to use regmap if the driver doesn't set up any I/O
Mark Brown [Fri, 22 Jun 2012 12:04:02 +0000 (13:04 +0100)]
ASoC: core: Try to use regmap if the driver doesn't set up any I/O

Since most new drivers are expected to use regmap and since frequently the
only thing we need to do in the CODEC probe function is configure the I/O
try to initialise the register I/O using regmap if the driver hasn't done
so after probe().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
11 years agoASoC: wm8962: Log AIF configuration requested by hw_params()
Mark Brown [Mon, 2 Jul 2012 17:19:58 +0000 (18:19 +0100)]
ASoC: wm8962: Log AIF configuration requested by hw_params()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: dapm: Fix dapm_set_path_status() connect
Benoît Thébaudeau [Mon, 2 Jul 2012 11:45:21 +0000 (13:45 +0200)]
ASoC: dapm: Fix dapm_set_path_status() connect

dapm_set_path_status() sets connect incorrectly in the case max > 1 with invert.
In that case, the raw disconnect value should be max, which corresponds to the
userspace value 0.

This use case currently does not appear upstream, but it could break
SOC_DAPM_SINGLE() or SOC_DAPM_SINGLE_TLV() elsewhere or in the future.

This patch completes commit 3a9abe8.

Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <alsa-devel@alsa-project.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: tegra: use dmaengine based dma driver
Laxman Dewangan [Fri, 29 Jun 2012 11:34:33 +0000 (17:04 +0530)]
ASoC: tegra: use dmaengine based dma driver

Use the dmaengine based Tegra APB DMA driver for
data transfer between SPI fifo and memory in
place of legacy Tegra APB DMA.

Because generic soc-dmaengine-pcm uses the DMAs API
based on dmaengine, using the exported APIs provided
by this generic driver.

The new driver is selected if legacy driver is not
selected and new dma driver is enabled through config
file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: dapm: Remove incomplete stereo code
Benoît Thébaudeau [Tue, 3 Jul 2012 18:18:17 +0000 (20:18 +0200)]
ASoC: dapm: Remove incomplete stereo code

Stereo is not yet supported by dapm widgets, so remove stereo code from
snd_soc_dapm_get_volsw(), and warn if stereo controls are detected.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoASoC: smdk_wm8994: Convert to use snd_soc_register_card()
Sachin Kamat [Tue, 3 Jul 2012 08:34:04 +0000 (14:04 +0530)]
ASoC: smdk_wm8994: Convert to use snd_soc_register_card()

Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoALSA: hda - Avoid possible race of beep on/off
Takashi Iwai [Tue, 3 Jul 2012 15:36:35 +0000 (17:36 +0200)]
ALSA: hda - Avoid possible race of beep on/off

Call cancel_work_sync() when turning off the beep switch so that the
mute call is executed in a proper order.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Get rid of superfluous beep->mode field
Takashi Iwai [Tue, 3 Jul 2012 15:35:05 +0000 (17:35 +0200)]
ALSA: hda - Get rid of superfluous beep->mode field

It's no longer necessary since beep_mode=2 option was dropped.
It can be checked simply via codec->beep != NULL.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Move beep helper functions to hda_beep.c
Takashi Iwai [Tue, 3 Jul 2012 15:27:57 +0000 (17:27 +0200)]
ALSA: hda - Move beep helper functions to hda_beep.c

Move snd_hda_mixer_amp_switch_put_beep() to hda_beep.c as a clean up
to remove one more ifdef.

Also add the corresponding get callback to return consistently the
digital beep state independently from the mixer amp value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Remove beep_mode=2
Takashi Iwai [Tue, 3 Jul 2012 14:58:48 +0000 (16:58 +0200)]
ALSA: hda - Remove beep_mode=2

The beep_mode=2 option was introduced to make the beep mixer
controlling the beep input allocation/deallocation dynamically, so
that a user can switch between HD-audio codec digital beep and the
system beep only via mixer API.  This was necessary because the
keyboard driver took only the first input beep instance at that time.

However, the recent keyboard driver already processes the multiple
input instances, thus there is no point to keep this mode.

Let's remove it.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Move some headers to local directories from include/sound
Takashi Iwai [Mon, 2 Jul 2012 14:37:05 +0000 (16:37 +0200)]
ALSA: Move some headers to local directories from include/sound

This is a bit clean up of public sound header directory.
Some header files in include/sound aren't really necessary to be
located there but can be moved to their local directories gracefully.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: pdaudiocf: Remove superfluous pm_message_t argument from suspend
Takashi Iwai [Mon, 2 Jul 2012 13:42:33 +0000 (15:42 +0200)]
ALSA: pdaudiocf: Remove superfluous pm_message_t argument from suspend

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Convert to new pm_ops for PCI drivers
Takashi Iwai [Mon, 2 Jul 2012 13:20:37 +0000 (15:20 +0200)]
ALSA: Convert to new pm_ops for PCI drivers

Straightforward conversion to the new pm_ops from the legacy
suspend/resume ops.

Since we change vx222, vx_core and vxpocket have to be converted,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: convert PM ops of platform_driver to new pm ops
Takashi Iwai [Mon, 2 Jul 2012 09:22:40 +0000 (11:22 +0200)]
ALSA: convert PM ops of platform_driver to new pm ops

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: Add missing .owner=THIS_MODULE to platform_driver definitions
Takashi Iwai [Mon, 2 Jul 2012 08:50:24 +0000 (10:50 +0200)]
ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: mioa701: convert to snd_soc_register_card API
Robert Jarzmik [Sat, 30 Jun 2012 17:25:08 +0000 (19:25 +0200)]
ASoC: mioa701: convert to snd_soc_register_card API

The mioa701 board code is converted to the snd_soc_register_card()
and snd_soc_unregister_card() APIs.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoLinux 3.5-rc5 v3.5-rc5
Linus Torvalds [Sat, 30 Jun 2012 23:08:57 +0000 (16:08 -0700)]
Linux 3.5-rc5

11 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 30 Jun 2012 23:01:50 +0000 (16:01 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Another week, another batch of fixes.

  All are small, contained, targeted fixes for explicit problems --
  mostly build and boot failures across i.MX, OMAP, Renesas/Shmobile and
  Samsung."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: imx6q: fix suspend regression caused by common clk migration
  ARM: OMAP4470: Fix OMAP4470 boot failure
  ARM: EXYNOS: Fix EXYNOS_DEV_DMA Kconfig entry
  ARM: OMAP2+: nand: fix build error when CONFIG_MTD_ONENAND_OMAP2=n
  ARM: shmobile: r8a7779: Route all interrupts to ARM
  ARM: shmobile: kzm9d: use late init machine hook
  ARM: shmobile: kzm9g: use late init machine hook
  ARM: mach-shmobile: armadillo800eva: Use late init machine hook
  ARM: SAMSUNG: Fix for S3C2412 EBI memory mapping
  ARM: mach-shmobile: add missing GPIO IRQ configuration on mackerel
  ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
  ARM: shmobile: sh7372: bugfix: chclr_offset base
  ARM: shmobile: sh73a0: bugfix: SY-DMAC number
  ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL

11 years agoprintk.c: fix kernel-doc warnings
Randy Dunlap [Sat, 30 Jun 2012 22:37:24 +0000 (15:37 -0700)]
printk.c: fix kernel-doc warnings

Fix kernel-doc warnings in printk.c: use correct parameter name.

  Warning(kernel/printk.c:2429): No description found for parameter 'buf'
  Warning(kernel/printk.c:2429): Excess function parameter 'line' description in 'kmsg_dump_get_buffer'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>