GitHub/LineageOS/android_kernel_motorola_exynos9610.git
13 years agoALSA: hda - Check NO_PRESENCE pincfg default bit
Takashi Iwai [Wed, 2 Nov 2011 06:44:11 +0000 (07:44 +0100)]
ALSA: hda - Check NO_PRESENCE pincfg default bit

HD-audio spec defines a bit in pin default configuration for indicating
that the pin isn't used for jack-detection although the codec is capable
of it.  Better to check this bit as well in jack_is_detectable() helper
function.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: intel8x0 - Fix inclusion of kvm_para.h
Takashi Iwai [Tue, 1 Nov 2011 09:40:50 +0000 (10:40 +0100)]
ALSA: intel8x0 - Fix inclusion of kvm_para.h

<linux/kvm_para.h> should be included instead of <asm/...>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda_hwdep: Fix possible buffer overflow
Alexander Stein [Tue, 1 Nov 2011 08:40:07 +0000 (09:40 +0100)]
ALSA: hda_hwdep: Fix possible buffer overflow

If a line in the firmware file is larger than the given buffer size (and
so the firmware file size), size is set to a value larger than the actual
buffer size. This results in an overflow in the buffer passed.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: intel8x0: Improve performance in virtual environment
Konstantin Ozerkov [Wed, 26 Oct 2011 15:11:01 +0000 (19:11 +0400)]
ALSA: intel8x0: Improve performance in virtual environment

v3: detection code is x86 and KVM specific, hide it under ifdef
v2: add detection for virtual environments (KVM and Parallels)

This patch is intended to improve performance in virtualized environments
like Parallels Desktop or KVM/VirtualBox/QEMU (virtual ICH/AC97 audio).

I/O access is very time-expensive operation in virtual world: VCPU
can be rescheduled and in the worst case we get more than 10ms delay on
each I/O access.

In the virtual environment loop exit rule
(old_civ == current_civ && old_picb == current_picb) is never satisfied,
because old_picb is never the same as current_picb due to delay inspired
by reading current_civ. As a result loop ended by timeout and we get 10x
more I/O operations.

Experimental data from Prallels Desktop 7, RHEL6 guest (I/O ops per
second):

Original code:
In Port    Counter         Callback
   f014      41550         fffff00000179d00 ac97_bm_read_civ+0x000
   f018      41387         fffff0000017a580 ac97_bm_read_picb+0x000

With patch:
In Port    Counter         Callback
   f014       4090         fffff00000179d00 ac97_bm_read_civ+0x000
   f018       1964         fffff0000017a580 ac97_bm_read_picb+0x000

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards
Adrian Knoth [Thu, 27 Oct 2011 19:57:54 +0000 (21:57 +0200)]
ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards

From the Windows INF file, we know the firmware ranges for all RME
cards. For PCIe, a single revision ID per device (RayDAT, MADI, AIO,
AES) is used. Contrary, the older PCI versions use ranges, that is,
one revision ID per firmware version.

Instead of listing all possible revisions individually, match the range.

This commit enables all MADI and AES PCI versions ever shipped.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detection
Adrian Knoth [Thu, 27 Oct 2011 19:57:53 +0000 (21:57 +0200)]
ALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detection

HDSP_VERSION_BIT has to be ORed with HDSP_S_LOAD. This fixes the detection
of at least some RME RPM boxes.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hdspm - Fix MADI channel format in the status ioctl
Adrian Knoth [Thu, 27 Oct 2011 19:57:52 +0000 (21:57 +0200)]
ALSA: hdspm - Fix MADI channel format in the status ioctl

SNDRV_HDSPM_IOCTL_GET_STATUS is supposed to query the current card
status, so we have to return what we receive on the MADI wire (RX), not
what we transmit (TX) to others. The latter is a config item to be
queried via SNDRV_HDSPM_IOCTL_GET_CONFIG.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hwdep: silence integer overflow warning
Dan Carpenter [Fri, 28 Oct 2011 06:46:01 +0000 (09:46 +0300)]
ALSA: hwdep: silence integer overflow warning

Smatch complains that if device is INT_MAX then device + 1 can
overflow.  It just means we would have an annoying loop while we
check all the devices from -2147483648 to SNDRV_MINOR_HWDEPS.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Thu, 27 Oct 2011 15:06:43 +0000 (17:06 +0200)]
Merge branch 'topic/hda' into for-linus

13 years agoALSA: hda - Fix ADC input-amp handling for Cx20549 codec
Takashi Iwai [Fri, 14 Oct 2011 13:26:20 +0000 (15:26 +0200)]
ALSA: hda - Fix ADC input-amp handling for Cx20549 codec

It seems that Conexant CX20549 chip handle only a single input-amp even
though the audio-input widget has multiple sources.  This has been never
clear, and I implemented in the current way based on the debug information
I got at the early time -- the device reacts individual input-amp values
for different sources.  This is true for another Conexant codec, but it's
not applied to CX20549 actually.

This patch changes the auto-parser code to handle a single input-amp
per audio-in widget for CX20549.  After applying this, you'll see only a
single "Capture" volume control instead of separate "Mic" or "Line"
captures when the device is set up to use a single ADC.

We haven't tested 20551 and 20561 codecs yet.  If these show the similar
behavior like 20549, they need to set spec->single_adc_amp=1, too.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Keep EAPD turned on for old Conexant chips
Takashi Iwai [Fri, 14 Oct 2011 13:22:34 +0000 (15:22 +0200)]
ALSA: hda - Keep EAPD turned on for old Conexant chips

In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD
may handle both headphone and speaker outputs while it's assigned only
to one of them.  Turning off dynamically leads to the unexpected silent
output in such a configuration with the auto-mute function.

Since it's difficult to know how the EAPD is handled in the actual h/w
implementation, better to keep EAPD on while running for such codecs.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda/realtek - Fix missing volume controls with ALC260
Takashi Iwai [Thu, 27 Oct 2011 14:33:27 +0000 (16:33 +0200)]
ALSA: hda/realtek - Fix missing volume controls with ALC260

ALC260 has multiple mixer widgets connected to the shared DAC, but the
driver currently doesn't check this possibility and ignores when the DAC
is shared with others.  This resulted in the silent output from some
routes because of lack of the amp setup.

This patch adds the workaround for it by checking the route even with the
shared DAC, but also checking the conflict with the existing control for
the very same widget NID.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=726812

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Thu, 27 Oct 2011 08:43:40 +0000 (10:43 +0200)]
Merge branch 'topic/asoc' into for-linus

13 years agoASoC: wm8940: Properly set codec->dapm.bias_level
Axel Lin [Wed, 26 Oct 2011 01:53:41 +0000 (09:53 +0800)]
ASoC: wm8940: Properly set codec->dapm.bias_level

Reported-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
13 years agoMerge branch 'topic/remove-irqf_disable' into for-linus
Takashi Iwai [Wed, 26 Oct 2011 21:51:48 +0000 (23:51 +0200)]
Merge branch 'topic/remove-irqf_disable' into for-linus

13 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Wed, 26 Oct 2011 21:51:43 +0000 (23:51 +0200)]
Merge branch 'topic/misc' into for-linus

13 years agoALSA: hda - Fix pin-config for ASUS W90V
Takashi Iwai [Wed, 26 Oct 2011 21:04:08 +0000 (23:04 +0200)]
ALSA: hda - Fix pin-config for ASUS W90V

The association numbers of surround/CLFE speaker pins aren't correctly
mapped by the auto-parser.  This patch fixes the CLFE speaker pin to the
right assoc value (from 3 to 1).

Tested-by: Nika Topolchanskaya <nanodesuu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix surround/CLFE headphone and speaker pins order
Takashi Iwai [Wed, 26 Oct 2011 14:06:27 +0000 (16:06 +0200)]
ALSA: hda - Fix surround/CLFE headphone and speaker pins order

When 5.1 or more headphone or speaker pins are provided, the parser still
takes as is without fixing the order of channel mapping, which leads in
the unexpected strange channel order by surround outputs.

This patch fixes the issue by applying the same fix-up not only to
line_out_pins[] but also hp_pins[] and speaker_pins[].

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix typo
Alexander Stein [Wed, 26 Oct 2011 07:58:45 +0000 (09:58 +0200)]
ALSA: hda - Fix typo

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: Update the sound git tree URL
Takashi Iwai [Tue, 25 Oct 2011 08:00:22 +0000 (10:00 +0200)]
ALSA: Update the sound git tree URL

Now back to kernel.org but without -2.6 suffix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: HDA: Add new revision for ALC662
David Henningsson [Tue, 18 Oct 2011 12:07:51 +0000 (14:07 +0200)]
ALSA: HDA: Add new revision for ALC662

The revision 0x100300 was found for ALC662. It seems to work well
with patch_alc662.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/877373
Tested-by: Shengyao Xue <Shengyao.xue@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: max98095: Convert codec->hw_write to snd_soc_write
Axel Lin [Sat, 15 Oct 2011 03:46:02 +0000 (11:46 +0800)]
ASoC: max98095: Convert codec->hw_write to snd_soc_write

codec->hw_write is broken now, convert codec->hw_write to snd_soc_write.

The hardware has 2 banks of registers sharing a section in I2C register space.
The 1st bank is the primary one and is cached.
The 2nd bank is for loading coefficients only and they do not need cache.
These coefficients registers are therefore direct writes.
Thus we set cache_bypass flag to deal with this before calling snd_soc_write.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: keep pointer to resource so it can be freed
Julia Lawall [Tue, 18 Oct 2011 15:06:39 +0000 (17:06 +0200)]
ASoC: keep pointer to resource so it can be freed

Add a new variable for storing resources accessed subsequent to the one
accessed using request_mem_region, so the one accessed using
request_mem_region can be released if needed.

The resource variable names are also changed to be more descriptive.

This code is also missing some calls to iounmap.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

if (E == NULL)
{
  ... when != if (E == NULL || ...) S1 else S2
      when != E = E1
*E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
Axel Lin [Fri, 21 Oct 2011 01:54:43 +0000 (09:54 +0800)]
ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls

Ensure all mask bits are clear before setting new value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
Axel Lin [Fri, 21 Oct 2011 02:44:07 +0000 (10:44 +0800)]
ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: da7210: Add support for line out and DAC
Ashish Chavan [Fri, 21 Oct 2011 13:36:23 +0000 (19:06 +0530)]
ASoC: da7210: Add support for line out and DAC

DA7210 has three line outputs. OUT1 Left, OUT1 Right and OUT2 (mono).
This patch adds support for gain controls for these three line outs.
It also adds support for overall DAC gain control.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for DAPM
Ashish Chavan [Fri, 21 Oct 2011 12:46:08 +0000 (18:16 +0530)]
ASoC: da7210: Add support for DAPM

This patch adds support for DAPM covering all inputs and outputs
as well as ADC and DAC.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoALSA: hda/realtek - Fix DAC assignments of multiple speakers
Takashi Iwai [Fri, 21 Oct 2011 13:07:42 +0000 (15:07 +0200)]
ALSA: hda/realtek - Fix DAC assignments of multiple speakers

When a device has multiple speakers and still has the auto-mute support,
the driver copies line_outs[] to speaker_outs[].  And then it tries to
assign DACs for both.  This ended up with the assignment only to the
primary DAC to all speakers.

This patch fixes the situation by checking the duplicated LO/SPK case
appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
Axel Lin [Thu, 20 Oct 2011 10:49:29 +0000 (18:49 +0800)]
ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value

We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
use it instead of hardcoded (0x1 << 4) - 1 for the mask.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Set sgtl5000->ldo in ldo_regulator_register
Axel Lin [Thu, 20 Oct 2011 10:32:59 +0000 (18:32 +0800)]
ASoC: Set sgtl5000->ldo in ldo_regulator_register

Otherwise calling ldo_regulator_remove() does not unregister regulator
and free memories.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
Axel Lin [Thu, 20 Oct 2011 04:16:31 +0000 (12:16 +0800)]
ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
Axel Lin [Thu, 20 Oct 2011 04:13:24 +0000 (12:13 +0800)]
ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: rt5631: Remove unused codec field from struct rt5631_priv
Axel Lin [Thu, 20 Oct 2011 03:00:06 +0000 (11:00 +0800)]
ASoC: rt5631: Remove unused codec field from struct rt5631_priv

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4671: Use snd_soc_update_bits for read-modify-write
Axel Lin [Thu, 20 Oct 2011 02:54:13 +0000 (10:54 +0800)]
ASoC: ak4671: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix reg_word_size for ak4104
Axel Lin [Thu, 20 Oct 2011 02:50:03 +0000 (10:50 +0800)]
ASoC: Fix reg_word_size for ak4104

According to the register map in datasheet, the registers are 8 bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k
Axel Lin [Mon, 17 Oct 2011 04:34:31 +0000 (12:34 +0800)]
ASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k

According to the datasheet:
BIT 2:1
        VMID_SEL[1:0] VMID Divider Enable and Select
        00 = VMID disabled
        01 = 2x40k Omh divider
        10 = 2x240k Omh divider
        11 = 2x5k Omh divider

To set VMID 2*240k, we should OR reg with 0x04 instead of 0x40.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4641: Use SND_SOC_DAPM_DAC for Voice Playback stream widget
Axel Lin [Wed, 19 Oct 2011 15:24:54 +0000 (23:24 +0800)]
ASoC: ak4641: Use SND_SOC_DAPM_DAC for Voice Playback stream widget

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for ALC and Noise suppression
Ashish Chavan [Wed, 19 Oct 2011 08:54:37 +0000 (14:24 +0530)]
ASoC: da7210: Add support for ALC and Noise suppression

This patch adds controls to set following ALC parameters,
 - Max gain, Min gain, Noise gain, Attack rate, Release rate and delay

It also adds a switch to enable/disable noise suppression.

As per DA7210 data sheet, ALC and noise suppression can be enabled
only if certain conditions are met. This condition checks are handled
by simply using "_EXT" version of controls to capture change events.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwod <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for mute and zero cross controls
Ashish Chavan [Wed, 19 Oct 2011 08:49:06 +0000 (14:19 +0530)]
ASoC: da7210: Add support for mute and zero cross controls

This patch adds support for below set of controls,
(1) Mute controls for MIC, AUX and ADC
(2) Zero cross controls for head phone, AUX, INPGA and line out
(3) Head phone mode selection - class H or G

It also adds digital_mute() call back.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4641: Remove unused codec field from struct ak4641_priv
Axel Lin [Wed, 19 Oct 2011 15:05:56 +0000 (23:05 +0800)]
ASoC: ak4641: Remove unused codec field from struct ak4641_priv

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Wed, 19 Oct 2011 15:20:08 +0000 (17:20 +0200)]
Merge branch 'fix/hda' into topic/hda

13 years agoASoC: ssm2602: Use snd_soc_update_bits for read-modify-write
Axel Lin [Wed, 19 Oct 2011 06:07:31 +0000 (14:07 +0800)]
ASoC: ssm2602: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM9081 interrupt status register is volatile
Mark Brown [Tue, 18 Oct 2011 18:31:38 +0000 (19:31 +0100)]
ASoC: WM9081 interrupt status register is volatile

Not that we have interrupt handling in the driver at the minute.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: sgtl5000: Fix setting mic bias resistor
Axel Lin [Wed, 19 Oct 2011 03:00:42 +0000 (11:00 +0800)]
ASoC: sgtl5000: Fix setting mic bias resistor

According to the datasheet:
CHIP_MIC_CTRL 0x002A

BITS[9:8] BIAS_RESISTOR
        0x0 = Powerd off
        0x1 = 2.0 kohm
        0x2 = 4.0 kohm
        0x3 = 8.0 kohm

To set mic bias resistor, we need to update bits[9:8] of
SGTL5000_CHIP_MIC_CTRL register.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASK
Axel Lin [Wed, 19 Oct 2011 02:54:56 +0000 (10:54 +0800)]
ASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASK

According to the datasheet:
CHIP_MIC_CTRL 0x002A

BITS[9:8] BIAS_RESISTOR
        0x0 = Powerd off
        0x1 = 2.0 kohm
        0x2 = 4.0 kohm
        0x3 = 8.0 kohm

Thus SGTL5000_BIAS_R_MASK should be defined as 0x0300 instead of 0x0200.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Use snd_soc_update_bits for read-modify-write
Axel Lin [Mon, 17 Oct 2011 22:25:08 +0000 (06:25 +0800)]
ASoC: ad193x: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix prefixing of DAPM controls
Mark Brown [Mon, 17 Oct 2011 23:11:49 +0000 (00:11 +0100)]
ASoC: Fix prefixing of DAPM controls

We don't want to clear the prefix while we're creating the DAPM controls
for the device as the prefix is applied during control creation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Convert WM9081 to table based control init
Mark Brown [Mon, 17 Oct 2011 22:53:37 +0000 (23:53 +0100)]
ASoC: Convert WM9081 to table based control init

At least for the core controls, the optionally selected controls are still
added programatically.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Update WM1811 DCS codes for latest evaluation results
Mark Brown [Mon, 17 Oct 2011 18:38:52 +0000 (19:38 +0100)]
ASoC: Update WM1811 DCS codes for latest evaluation results

Evaluation of larger quantities of material has provided new DCS codes
values to be applied for WM1811.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoALSA: HDA: conexant support for Lenovo T520/W520
Daniel Suchy [Tue, 18 Oct 2011 09:09:44 +0000 (11:09 +0200)]
ALSA: HDA: conexant support for Lenovo T520/W520

This is patch for Conexant codec of Intel HDA driver, adding new quirk
for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
T520 (similar subsystem ID is used also in W520 model) and detects more
mixer features compared to generic (fallback) Lenovo quirk with
hardcoded options in Conexant codec.

Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
problems.

Signed-off-by: Daniel Suchy <danny@danysek.cz>
Cc: <stable@kernel.org> [3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Add position_fix quirk for Dell Inspiron 1010
Takashi Iwai [Tue, 18 Oct 2011 08:44:05 +0000 (10:44 +0200)]
ALSA: hda - Add position_fix quirk for Dell Inspiron 1010

The previous fix for the position-buffer check gives yet another
regression on a Dell laptop.  The safest fix right now is to add a
static quirk for this device (and better to apply it for stable
kernels too).

Reported-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: wm8580: Use snd_soc_update_bits for read-modify-write
Axel Lin [Mon, 17 Oct 2011 03:50:46 +0000 (11:50 +0800)]
ASoC: wm8580: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8900: Use snd_soc_update_bits for read-modify-write
Axel Lin [Sun, 16 Oct 2011 15:30:21 +0000 (23:30 +0800)]
ASoC: wm8900: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8900: Fix the mask defines
Axel Lin [Sun, 16 Oct 2011 15:29:12 +0000 (23:29 +0800)]
ASoC: wm8900: Fix the mask defines

Now we have done bitwise NOT against the mask bits for the defines of
WM8900_REG_CLOCKING1_BCLK_MASK,
WM8900_REG_CLOCKING1_OPCLK_MASK and WM8900_LRC_MASK.

But we don't have the bitwise NOT against the mask bits for the defines of
WM8900_REG_CLOCKING2_DAC_CLKDIV,
WM8900_REG_CLOCKING2_ADC_CLKDIV and WM8900_REG_DACCTRL_AIF_LRCLKRATE.

It is error prone to mix the inconsistent meaning for different mask defines.
So lets make the defines for each mask to be corresponding to the bits
defines in datasheet. Don't add extra "bitwise NOT" to the defines.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE
Axel Lin [Sun, 16 Oct 2011 15:27:55 +0000 (23:27 +0800)]
ASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE

After checking the datasheet, I think what we want to do here is to
clear the WM8900_REG_CLOCKING2_DAC_CLKDIV/WM8900_REG_CLOCKING2_ADC_CLKDIV/
WM8900_REG_DACCTRL_AIF_LRCLKRATE bits and then OR with div value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware
Axel Lin [Mon, 17 Oct 2011 12:16:37 +0000 (20:16 +0800)]
ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8741: Fix setting interface format for DSP modes
Axel Lin [Mon, 17 Oct 2011 12:14:56 +0000 (20:14 +0800)]
ASoC: wm8741: Fix setting interface format for DSP modes

According to the datasheet:
Format Control (05h)
BITS[3:2]
        FMT[1:0] Audio data format selection
                00 = right justified mode
                01 = left justified mode
                10 = I2S mode
                11 = DSP mode
BIT[4]  LRP Polarity selec for LRCLK/DSP mode select
                0 = normal LRCLK poalrity/DSP mode A
                1 = inverted LRCLK poarity/DSP mode B

For SND_SOC_DAIFMT_DSP_A, we should set 0x000C instead of 0x0003.
For SND_SOC_DAIFMT_DSP_B, we should set 0x001C instead of 0x0013.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoMANITAINERS: Add Cragganmore reference platform to Wolfson support
Mark Brown [Fri, 14 Oct 2011 20:09:43 +0000 (21:09 +0100)]
MANITAINERS: Add Cragganmore reference platform to Wolfson support

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for High pass and Voice filters for ADC and DAC
Ashish Chavan [Sat, 15 Oct 2011 09:20:06 +0000 (14:50 +0530)]
ASoC: da7210: Add support for High pass and Voice filters for ADC and DAC

This patch add controls for setting cut-off for high pass and voice
filters of ADC and DAC. There are also switches to enable/disable
these filters.

Also removed hard coded, fixed  values of these parameters used by
previous version of driver.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for ADC & DAC equalizers
Ashish Chavan [Sat, 15 Oct 2011 09:17:56 +0000 (14:47 +0530)]
ASoC: da7210: Add support for ADC & DAC equalizers

This patch adds support for ADC and DAC five band equalizers
available on DA7210 codec.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tegra: sparse cleanup
Olof Johansson [Fri, 14 Oct 2011 22:54:19 +0000 (15:54 -0700)]
ASoC: Tegra: sparse cleanup

Fixes the following sparse warnings:

sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static?

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMAINTAINERS: Add maintainer for Analog Devices sound CODECs
Lars-Peter Clausen [Mon, 17 Oct 2011 18:33:05 +0000 (20:33 +0200)]
MAINTAINERS: Add maintainer for Analog Devices sound CODECs

The MAINTAINERS  entry for the ADI sound CODEC drivers currently only lists the
ADI devices-drivers-devel mailing-list. Add myself as additional contact, since
I'm the person at ADI who is currently doing most of the work on these drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoALSA: hda/realtek - Cache COEF 0 value
Takashi Iwai [Mon, 17 Oct 2011 14:50:59 +0000 (16:50 +0200)]
ALSA: hda/realtek - Cache COEF 0 value

The COEF #0 value represents a sort of device id, so it's supposedly
constant while operation.  Better to use the cached value instead of
reading it at each time from the performance POV.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda/realtek - Clean up codec renames
Takashi Iwai [Mon, 17 Oct 2011 14:39:09 +0000 (16:39 +0200)]
ALSA: hda/realtek - Clean up codec renames

Use a static table for detecting the codec renames.
Also clean up the error paths in each patch_*() function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda/realtek - Use alc_codec_rename()
Takashi Iwai [Mon, 17 Oct 2011 14:07:43 +0000 (16:07 +0200)]
ALSA: hda/realtek - Use alc_codec_rename()

Replaced with alc_codec_rename() in all possible places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - ALC888S-VC remark to ALC886
Kailang Yang [Mon, 17 Oct 2011 14:02:42 +0000 (16:02 +0200)]
ALSA: hda - ALC888S-VC remark to ALC886

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda/realtek - Check the error from alc_codec_rename()
Takashi Iwai [Mon, 17 Oct 2011 14:00:35 +0000 (16:00 +0200)]
ALSA: hda/realtek - Check the error from alc_codec_rename()

Should be a rare case, but...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: twl6040: Request core to inline the DAPM sequence
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:34 +0000 (14:43 +0300)]
ASoC: twl6040: Request core to inline the DAPM sequence

We need to have as less time between McPDM shutdown,
and power down of the DAC on the twl6040 codec as possible.
Request core to ignore the pmdown_time for the playback
stream.
Backround: with the McPDM protocol we are sendning not only
the pure audio stream, but OMAP McPDM also transmits
additional information (for example offset cancellation).
If McPDM is stopped prior to the DAC this information will
be not sent to the codec, which can result noise rendered
by the twl6040 codec.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: core: Add flag to ignore pmdown_time at pcm_close
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:33 +0000 (14:43 +0300)]
ASoC: core: Add flag to ignore pmdown_time at pcm_close

With this flag codec drivers can indicate that it is desired
to ignore the pmdown_time for DAPM shutdown sequence when
playback stream is stopped.
The DAPM sequence will be executed without delay in this case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: bugfix for head phone volume control
Ashish Chavan [Fri, 14 Oct 2011 10:55:25 +0000 (16:25 +0530)]
ASoC: da7210: bugfix for head phone volume control

This patch takes care of reserved bits of headphone volume
register by using correct volume range.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
Axel Lin [Fri, 14 Oct 2011 09:01:59 +0000 (17:01 +0800)]
ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK

Current code defines AD193X_PLL_INPUT_MASK as (~0x6) which is quite
different from other MASK defines.
To make it consistent with other mask defines, define AD193X_PLL_INPUT_MASK
as 0x6 and change the code accordingly.
I think this change improves the readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8990: Use snd_soc_update_bits for read-modify-write
Axel Lin [Fri, 14 Oct 2011 06:30:05 +0000 (14:30 +0800)]
ASoC: wm8990: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

This patch also includes a comment fix in wm8990_set_dai_pll(),
if freq_in and freq_out are 0, what we do is to clear WM8990_PLL_ENA bit.
Thus the comment should be "Turn off PLL".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 05:57:48 +0000 (13:57 +0800)]
ASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2

If (fakepower & ((1 << WM8990_INMIXR_PWR_BIT) | (1 << WM8990_AINRMUX_PWR_BIT)))
is false, we should clear WM8990_AINR_ENA bits instead of WM8990_AINL_ENA.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8400: Fix wrong bit setting for WM8400_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 05:56:49 +0000 (13:56 +0800)]
ASoC: wm8400: Fix wrong bit setting for WM8400_POWER_MANAGEMENT_2

If (fakepower & ((1 << WM8400_INMIXR_PWR) | (1 << WM8400_AINRMUX_PWR)))
is false, we should clear WM8400_AINR_ENA bits instead of WM8400_AINL_ENA.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8991: Use snd_soc_update_bits for read-modify-write
Axel Lin [Fri, 14 Oct 2011 04:09:48 +0000 (12:09 +0800)]
ASoC: wm8991: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 04:08:00 +0000 (12:08 +0800)]
ASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2

If (fakepower & ((1 << WM8991_INMIXR_PWR_BIT)|(1 << WM8991_AINRMUX_PWR_BIT))))
is false, we should clear WM8991_AINR_ENA bits instead of WM8991_AINL_ENA.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8961: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:39:14 +0000 (09:39 +0800)]
ASoC: wm8961: Convert codec->hw_read to snd_soc_read

codec->hw_read is broken now, let's covert to snd_soc_read.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:37:00 +0000 (09:37 +0800)]
ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read

codec->hw_read is broken now, let's covert to snd_soc_read.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: alc5623: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:35:20 +0000 (09:35 +0800)]
ASoC: alc5623: Convert codec->hw_read to snd_soc_read

codec->hw_read is broken now, let's covert to snd_soc_read.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic23: convert to soc-cache
Axel Lin [Thu, 13 Oct 2011 07:06:43 +0000 (15:06 +0800)]
ASoC: tlv320aic23: convert to soc-cache

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert DA7210 to table based DAPM init
Mark Brown [Fri, 14 Oct 2011 19:18:49 +0000 (20:18 +0100)]
ASoC: Convert DA7210 to table based DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic32x4: Use snd_soc_update_bits for read-modify-write
Axel Lin [Thu, 13 Oct 2011 14:56:34 +0000 (22:56 +0800)]
ASoC: tlv320aic32x4: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Rename the Earphone Driver event handler
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:44 +0000 (15:05 +0300)]
ASoC: twl6040: Rename the Earphone Driver event handler

Since the event handler is only used by the Earphone Driver, it is better
to rename it from twl6040_power_mode_event to twl6040_ep_drv_event.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Change event ordering for Earphone driver
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:43 +0000 (15:05 +0300)]
ASoC: twl6040: Change event ordering for Earphone driver

It is better to switch HS Power Mode (if it was in low power mode) before
we enable the Earpiece driver. The switched off EP driver can filter out
noise coming from the Low Power to High Performance transition on the
HSL DAC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Remove PLL usage restrictions
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:42 +0000 (15:05 +0300)]
ASoC: twl6040: Remove PLL usage restrictions

There is no limitation dictated by outputs or inputs regarding to the
selected PLL (LP/HP).
Remove the checks for this, and allow all path with any PLL configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Remove Capture restriction for 17.64MHz sysclk
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:41 +0000 (15:05 +0300)]
ASoC: twl6040: Remove Capture restriction for 17.64MHz sysclk

Capture is supported in all PLL configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Update WM5100 accessory detection for revision A
Mark Brown [Wed, 12 Oct 2011 17:39:53 +0000 (18:39 +0100)]
ASoC: Update WM5100 accessory detection for revision A

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4535: fixup cache register table
Axel Lin [Thu, 13 Oct 2011 09:17:06 +0000 (17:17 +0800)]
ASoC: ak4535: fixup cache register table

ak4535_reg should be 8bit, but cache table is defined as 16bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: ak4642: fixup cache register table
Kuninori Morimoto [Thu, 13 Oct 2011 09:03:54 +0000 (02:03 -0700)]
ASoC: ak4642: fixup cache register table

ak4642 register was 8bit, but cache table was defined as 16bit.
ak4642 doesn't work correctry without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: sta32x: Write the register default value to cache for reserved registers
Axel Lin [Thu, 13 Oct 2011 06:57:31 +0000 (14:57 +0800)]
ASoC: sta32x: Write the register default value to cache for reserved registers

Chip documentation explicitly requires that the reset values
of reserved register bits are left untouched.

codec->hw_read is broken now.
Here we use below trick to avoid writing to reserved registers while resume.
Write the register default value to cache for reserved registers,
so the write to the these registers are suppressed by the cache
restore code when it skips writes of default registers.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sta32x: Set reg_cache_default to sta32x_regs
Axel Lin [Thu, 13 Oct 2011 06:40:08 +0000 (14:40 +0800)]
ASoC: sta32x: Set reg_cache_default to sta32x_regs

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: pxa: Remove redundant snd_soc_dapm_sync() calls from machine drivers
Axel Lin [Wed, 12 Oct 2011 23:38:56 +0000 (07:38 +0800)]
ASoC: pxa: Remove redundant snd_soc_dapm_sync() calls from machine drivers

The core will sync DAPM as part of the card initialization, there is no
need for machine drivers to do so during their setup.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoALSA: usb-audio - Fix possible access over audio_feature_info[] array
Takashi Iwai [Thu, 13 Oct 2011 06:19:09 +0000 (08:19 +0200)]
ALSA: usb-audio - Fix possible access over audio_feature_info[] array

The audio_feature_info[] array should contain all entries for UAC2_FU_*,
but currently a few last entries are missing.  Even though, the driver
tries to probe these entries in parse_audio_feature_unit() and may
access the range over the array.  This patch fixes the bug by limiting
the loop size properly using ARRAY_SIZE() instead of a hard-coded
magic number.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-usb-caiaq: Add support for Maschine
William Light [Mon, 10 Oct 2011 15:54:23 +0000 (15:54 +0000)]
ALSA: snd-usb-caiaq: Add support for Maschine

This adds partial support for the Maschine controller by Native Instruments.
Supported now are the 1x1 MIDI interface and the 41 buttons, 11 endless
rotary encoders, and 16 pressure-sensitive drum pads. Still to work on are the
dimmable LEDs and the two monochrome screens.

Signed-off-by: William Light <wrl@illest.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-usb-caiaq: Fix NULL dereference in input.c
William Light [Mon, 10 Oct 2011 15:54:22 +0000 (15:54 +0000)]
ALSA: snd-usb-caiaq: Fix NULL dereference in input.c

There was a case where a newly-registered input device could be opened before
a necessary variable in the device structure was set. When code tried to use
the variable in the URB reply callback, it would cause an Oops.

This fix sets the aforementioned variable before calling input_register_device.

Signed-off-by: William Light <wrl@illest.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: HDA: Fixup Realtek headphone pin initialization
David Henningsson [Wed, 12 Oct 2011 17:26:03 +0000 (19:26 +0200)]
ALSA: HDA: Fixup Realtek headphone pin initialization

This typo caused headphone pins not to be initialized correctly.

BugLink: https://bugs.launchpad.net/bugs/871582
Reported-by: Effenberg
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Remove bad code for IDT 92HD83 family patch
Charles Chin [Thu, 13 Oct 2011 05:54:09 +0000 (07:54 +0200)]
ALSA: hda - Remove bad code for IDT 92HD83 family patch

The purpose of this patch is to remove a section of "bad" code that
assigns the last DAC to ports E or F in order to support notebooks
with docking in earlier days, around ALSA 1.0.19 - 21.  This is not
necessary now and actually breaks some configurations that use these
ports as other devices.  This have been tested on several different
configurations to make sure that it is working for different combinations.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: Make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X
Axel Lin [Wed, 12 Oct 2011 13:43:08 +0000 (21:43 +0800)]
ASoC: Make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X

In saarb_pm860x_init() and evb3_pm860x_init(), we call
pm860x_hs_jack_detect() and pm860x_mic_jack_detect() which in turn
calls pm860x_set_bits().
Thus make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X.

This patch fixes below build error if CONFIG_MFD_88PM860X is not configured.

  LD      .tmp_vmlinux1
sound/built-in.o: In function `pm860x_write_reg_cache':
last.c:(.text+0x29e9c): undefined reference to `pm860x_reg_write'
sound/built-in.o: In function `pm860x_set_bias_level':
last.c:(.text+0x29ecc): undefined reference to `pm860x_set_bits'
last.c:(.text+0x29f00): undefined reference to `pm860x_reg_write'
last.c:(.text+0x29f18): undefined reference to `pm860x_reg_write'
sound/built-in.o: In function `pm860x_read_reg_cache':
last.c:(.text+0x29f40): undefined reference to `pm860x_reg_read'
sound/built-in.o: In function `pm860x_probe':
last.c:(.text+0x2a034): undefined reference to `pm860x_bulk_read'
sound/built-in.o: In function `pm860x_codec_handler':
last.c:(.text+0x2a344): undefined reference to `pm860x_reg_read'
last.c:(.text+0x2a354): undefined reference to `pm860x_reg_read'
sound/built-in.o: In function `pm860x_mic_jack_detect':
last.c:(.text+0x2a450): undefined reference to `pm860x_set_bits'
sound/built-in.o: In function `pm860x_hs_jack_detect':
last.c:(.text+0x2a4d0): undefined reference to `pm860x_set_bits'
last.c:(.text+0x2a4f8): undefined reference to `pm860x_set_bits'
last.c:(.text+0x2a510): undefined reference to `pm860x_set_bits'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for other DAI word lengths, format and mode
Ashish Chavan [Wed, 12 Oct 2011 15:03:21 +0000 (20:33 +0530)]
ASoC: da7210: Add support for other DAI word lengths, format and mode

This patchs adds support for following,
(1) DAI 20 and 32 bit word sizes
(2) DAI left and right justified formats
(3) DAI slave mode

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Workaround for headset DC offset caused pop noise
Peter Ujfalusi [Wed, 12 Oct 2011 11:46:02 +0000 (14:46 +0300)]
ASoC: twl6040: Workaround for headset DC offset caused pop noise

Both Headset DAC need to be turned on/off at the same time before
any of the output drivers are enabled (HS Left/Right, Earpiece).
Move the HS DAC enable code to sequenced DAPM_SUPPLY, and attach
it to the DACs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>