Marek Vasut [Thu, 14 May 2009 19:52:46 +0000 (20:52 +0100)]
ASoC: Support AC97 link off by default on WM9712
The WM9712 can be configured by resistor strapping GPIO4 to behave like
the WM9713 and default to leaving the AC97 link disabled after cold
reset until a warm reset occurs. In this configuration we need to issue
a warm reset after cold to bring the link up so do so. The warm reset
will be harmless on systems that don't need it.
[Changelog rewritten to document the reasoning. -- broonie]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Karl Beldan [Wed, 13 May 2009 20:16:46 +0000 (22:16 +0200)]
ASoC: pxa2xx-i2s: Handle SACR1_DRPL and SACR1_DREC separately
- hw_params enables both RPL and REC functions each time : Enable the
appropriate function in pxa2xx_i2s_trigger.
- pxa2xx_i2s_shutdown disables i2s anytime one of RPL or REC function is
off : Turn it off only when both functions are off.
Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Karl Beldan [Thu, 14 May 2009 08:25:42 +0000 (10:25 +0200)]
ASoC: pxa2xx-i2s: Proper hw initialization
Make sure we are in a know good state at end of probe :
Reset FIFO logic and registers, and make sure REC and RPL functions
along with FIFO service are disabled (SACR0_RST enables REC and RPL).
Resetting loses current settings so remove reset from stream startup.
Now reset occurs only at probe.
Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Joonyoung Shim [Mon, 11 May 2009 11:36:08 +0000 (20:36 +0900)]
ASoC: TWL4030: change DAPM for analog microphone selection
The inputs of the twl4030 codec can be mixed, so we will use the mixer
DAPM for the analog microphone registers(0x05, 0x06), but if we enable
more than one input at the same time, the input impedance of the input
amplifier will be reduced.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Rapoport [Mon, 11 May 2009 10:11:38 +0000 (13:11 +0300)]
pxa2xx-ac97: fix reset gpio mode setting
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Rapoport [Mon, 11 May 2009 10:04:55 +0000 (13:04 +0300)]
ASoC: soc-core: fix crash when removing not instantiated card
If the card was not instantiated in snd_soc_instantiate_card, calling
soc-remove will crash because some of codec, cpu_dai and card .remove
methods are called twice.
Fix this by returning from soc_remove immediately.
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sat, 9 May 2009 15:22:58 +0000 (16:22 +0100)]
ASoC: Fix up CODEC DAI formats for big endian CPUs
ASoC uses the standard ALSA data format definitions to specify the wire
format used between the CPU and CODEC. Since the ALSA data formats all
include the endianess of the data but this information is not relevant
by the time the data has been encoded onto the serial link to the CODEC
this means that either all the CODEC drivers need to declare both big and
little endian variants or the core needs to fix up the format constraints
specified by CODEC drivers.
For now take the latter approach - this will need to be revisited if any
CODECs are endianness dependant.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 6 May 2009 09:36:34 +0000 (10:36 +0100)]
ASoC: Fix file patterns for PXA sound drivers
The file matches for PXA sound drivers missed the generic AC97 support
and were overly specific within sound/soc/pxa, omitting all machine
drivers and the SSP driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Tue, 5 May 2009 23:26:01 +0000 (01:26 +0200)]
ASoC: cs4270: add power management support
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Tue, 5 May 2009 09:25:00 +0000 (11:25 +0200)]
ASoC: cs4270: introduce CS4270_I2C_INCR
Replace the magic 0x80 value with a suitable macro definition.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Tue, 5 May 2009 05:55:47 +0000 (08:55 +0300)]
ASoC: TWL4030: Add VIBRA output
This patch adds support for the VIBRA output on TWL4030 codec.
The VIBRA output can be driven with audio data or with
local vibrator driver.
Add the needed DAPM elements and routes for the VIBRA output and
controls for the VIBRA driver configuration.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: TWL4030: Add voice digital loopback: sidetone
This patch add voice digital loopback (sidetone) to the twl4030
driver. It mixes voice uplink attenuated (by sidetone gain) with
voice downlink when the codec is working in option2 (voice/audio
mode).
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds voice downlink analog bypass switch. It follows
the same approach as in other analog bypass switches.
DAC switch is moved from 'DAC Voice' to 'Analog Voice Playback Mixer',
that will also allow voice DAC to be powered in digital voice
loopback (sidetone).
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sat, 2 May 2009 11:28:25 +0000 (12:28 +0100)]
ASoC: Remove unused DAI format defines
The defines for TDM and synchronous clocks are not used - they are
mostly a legacy of the automatic clocking configuration. TDM will
require configuration of the number of timeslots and which ones to use
so can't be fit into the DAI format and synchronous mode is handled by
symmetric_rates (and needs to be done by constraints rather than when
the DAI format is being configured).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sat, 2 May 2009 11:24:55 +0000 (12:24 +0100)]
ASoC: Use a shared define for AC97 CODEC data formats
The AC97 wire format is completely fixed so CODECs don't have any choice
about the formats they accept but controllers accept a variety of data
formats and render them down onto the bus. Have a shared define so all
the CODEC drivers will interoperate with any of our controller drivers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 30 Apr 2009 12:13:14 +0000 (13:13 +0100)]
ASoC: Fix boot warnings from S3C IISv2
On startup we try to make sure that the port is quiesced but if the
port is already stopped then this will generate a warning about the
RX/TX mode configuration. Configure the mode before doing the teardown
to suppress these warnings.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 29 Apr 2009 19:29:25 +0000 (20:29 +0100)]
ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit
The data format configuration for S3C64xx IISv2 is completely different
to that for S3C24xx. Instead of a single bit configuration in bit 0 of
IISMOD we have format selection in bits 13 and 14 and bit clock rate
selection in bits 1 and 2. While we're here add support for 24 bit
samples in S3C64xx.
At some point it may be desirable to expose the bit clock rate selection
to users but given the limited configuration options that may not be
required.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: TWL4030: Fix gain control for earpiece amplifier
The gain control for earpiece amplifier uses 0dB ~ 12dB according to the
TRM, but the present code is implemented to -6dB ~ 6dB.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ALSA: pcm core - Avoid jiffies check for devices with BATCH flag
The hardware devices with SNDRV_PCM_INFO_BATCH flag can't give the
precise current position. And such hardwares have often big FIFO
in addition to the ring buffer, and it screws up the jiffies check
in pcm_lib.c.
This patch adds a simple check of info flag so that the driver skips
the jiffies check in snd_pcm_period_elapsed() when BATCH flag is set.
have been deprecated since commit 312b1485fb509c9bc32eda28ad29537896658cb8. After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tim Abbott [Mon, 27 Apr 2009 18:02:26 +0000 (14:02 -0400)]
sparc: cleanup references to deprecated .text.init* sections.
The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead. This patch cleans up a few
uses of .text.init.refok in the sparc architecture.
Also fix a reference to .text.init in a comment that wasn't updated to
.init.text.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tim Abbott [Mon, 27 Apr 2009 18:02:24 +0000 (14:02 -0400)]
powerpc: Use __REF macro instead of old .text.init.refok.
The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead. This patch cleans up a few
uses of .text.init.refok in the powerpc architecture.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tim Abbott [Mon, 27 Apr 2009 18:02:23 +0000 (14:02 -0400)]
powerpc: Use TEXT_TEXT macro in linker script.
Rather than adding .ref.text to the powerpc linker script so that we
can use __REF on the powerpc architecture, it seems simpler to switch
to using the generic TEXT_TEXT macro.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tim Abbott [Mon, 27 Apr 2009 18:02:22 +0000 (14:02 -0400)]
arm: Use __INIT macro instead of .text.init.
arm is placing some code in the .text.init section, but it does not
reference that section in its linker scripts.
This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tim Abbott [Mon, 27 Apr 2009 23:37:53 +0000 (00:37 +0100)]
FRV: Remove unused header asm/init.h.
It seems nothing has included the frv asm/init.h header for some time, and its
actual contents are out of date with include/linux/init.h. So just delete it.
Signed-off-by: Tim Abbott <tabbott@mit.edu> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jon Smirl [Mon, 27 Apr 2009 16:44:41 +0000 (12:44 -0400)]
ASoC: Set the MPC5200 i2s driver to BROKEN status.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Fri, 24 Apr 2009 14:37:45 +0000 (16:37 +0200)]
ASoC: cs4270: add Master Playback Switch
This adds a new control named 'Master Playback Switch' for cs4270
codecs. It is implemented using the new SOC_DOUBLE_EXT macro to catch
the put function and store the information about manually set mute
controls from userspace. When a manual mute is set, we don't want the
soc core to un-mute the outputs.
Renamed cs4270_mute() to cs4270_dai_mute() to avoid confusion.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Fri, 24 Apr 2009 13:00:25 +0000 (15:00 +0200)]
ASoC: cs4270: fix Master Capture Switch polarity
The control modifies the MUTE register, hence the polarity must be
inverted.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-By: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: only save/restore existent registers in the PCIe capability
x86/PCI: don't bother with root quirks if _CRS is used
docbooks: add/fix PCI kernel-doc
PCI: cleanup debug output resources
x86/PCI: set_pci_bus_resources_arch_default cleanups
x86/PCI: Move set_pci_bus_resources_arch_default into arch/x86
x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
PCI quirk: disable MSI on VIA VT3364 chipsets
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: look for acls during btrfs_read_locked_inode
Btrfs: fix acl caching
Btrfs: Fix a bunch of printk() warnings.
Btrfs: Fix a trivial warning using max() of u64 vs ULL.
Btrfs: remove unused btrfs_bit_radix slab
Btrfs: ratelimit IO error printks
Btrfs: remove #if 0 code
Btrfs: When shrinking, only update disk size on success
Btrfs: fix deadlocks and stalls on dead root removal
Btrfs: fix fallocate deadlock on inode extent lock
Btrfs: kill btrfs_cache_create
Btrfs: don't export symbols
Btrfs: simplify makefile
Btrfs: try to keep a healthy ratio of metadata vs data block groups
Chris Mason [Mon, 27 Apr 2009 15:47:50 +0000 (11:47 -0400)]
Btrfs: look for acls during btrfs_read_locked_inode
This changes btrfs_read_locked_inode() to peek ahead in the btree for acl items.
If it is certain a given inode has no acls, it will set the in memory acl
fields to null to avoid acl lookups completely.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason [Mon, 27 Apr 2009 14:49:53 +0000 (10:49 -0400)]
Btrfs: fix acl caching
Linus noticed the btrfs code to cache acls wasn't properly caching
a NULL acl when the inode didn't have any acls. This meant the common
case of no acls resulted in expensive btree searches every time the
kernel checked permissions (which is quite often).
This is a modified version of Linus' original patch:
Properly set initial acl fields to BTRFS_ACL_NOT_CACHED in the inode.
This forces an acl lookup when permission checks are done.
Fix btrfs_get_acl to avoid lookups and locking when the inode acls fields
are set to null.
Fix btrfs_get_acl to use the right return value from __btrfs_getxattr
when deciding to cache a NULL acl. It was storing a NULL acl when
__btrfs_getxattr return -ENOENT, but __btrfs_getxattr was actually returning
-ENODATA for this case.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: Fix Trivial Warnining in sound/pci/cmipci.c
ALSA: snd-usb-caiaq: fix reported elapsed periods
ASoC: s3c-i2s-v2 needs to declare a license for modular builds
ALSA: hda - Fix init verbs of AD1884A mobile model
ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
ASoC: Fix WM8580 volume update handling for large register changes
ASoC: Fix offset of freqmode in WM8580 PLL configuration
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6:
ext2: missing unlock in ext2_quota_write()
quota: remove obsolete comments in fs/quota/Makefile
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: Do not try to validate extents on special files
ext4: Ignore i_file_acl_high unless EXT4_FEATURE_INCOMPAT_64BIT is present
ext4: Fix softlockup caused by illegal i_file_acl value in on-disk inode
Merge branch 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Fix up unsigned syscall_nr in SH-5 pt_regs.
maple: input: fix up maple mouse driver
sh: sh7785lcr: fix defconfig for 29-bit mode
* fix/asoc:
ASoC: s3c-i2s-v2 needs to declare a license for modular builds
ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
ASoC: Fix WM8580 volume update handling for large register changes
ASoC: Fix offset of freqmode in WM8580 PLL configuration
David Howells [Mon, 27 Apr 2009 10:55:23 +0000 (11:55 +0100)]
FRV: Stop gcc from generating uninitialised variable warnings after BUG()
Stop gcc from generating uninitialised variable warnings after BUG().
The problem is that FRV's call into its gdbstub appears to return (if
the function is marked noreturn, then the compiler is under no
obligation to pass it a return address, and so GDB won't know where the
bug happened).
To get around this, we make the do...while wrapper in _debug_bug_trap()
an endless loop from which there's no escape.
Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joel Becker [Tue, 21 Apr 2009 19:38:30 +0000 (12:38 -0700)]
Btrfs: Fix a trivial warning using max() of u64 vs ULL.
A small warning popped up on ia64 because inode-map.c was comparing a
u64 object id with the ULL FIRST_FREE_OBJECTID. My first thought was
that all the OBJECTID constants should contain the u64 cast because
btrfs code deals entirely in u64s. But then I saw how large that was,
and figured I'd just fix the max() call.
Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Fixed the compile warning below by initializatin iomidi variable properly.
sound/pci/cmipci.c: In function ‘snd_cmipci_probe’:
sound/pci/cmipci.c:3017: warning: ‘iomidi’ may be used uninitialized in this function
Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com> Cc: linux-pci <linux-pci@atrey.karlin.mff.cuni.cz> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Chris Mason [Mon, 27 Apr 2009 11:29:05 +0000 (07:29 -0400)]
Btrfs: ratelimit IO error printks
Btrfs has printks for various IO errors, including bad checksums and
mismatches between what we expect the block headers to contain and what
we actually find on the disk.
Longer term we need a real reporting mechanism for this, but for now
printk is going to have to do.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Ball [Mon, 27 Apr 2009 11:29:03 +0000 (07:29 -0400)]
Btrfs: When shrinking, only update disk size on success
Previously, we updated a device's size prior to attempting a shrink
operation. This patch moves the device resizing logic to only happen if
the shrink completes successfully. In the process, it introduces a new
field to btrfs_device -- disk_total_bytes -- to track the on-disk size.
Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Daniel Mack [Mon, 27 Apr 2009 10:18:05 +0000 (12:18 +0200)]
ALSA: snd-usb-caiaq: fix reported elapsed periods
Reset the internal period position counter upon stream startup. This
fixes initial aplay underruns and problems related to latency picky
applications such as pulseaudio.
Bumped the version number to 1.3.14.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Paul Mundt [Mon, 27 Apr 2009 08:05:38 +0000 (17:05 +0900)]
sh: Fix up unsigned syscall_nr in SH-5 pt_regs.
syscall_nr is presently defined as unsigned in the SH-5 pt_regs,
while the syscall restarting code wants it to be signed. Fix this
up, and bring it in line with the other SH parts.
Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Here is a fix for this, keeping an open and close, so reducing
the load on the system when the mouse is not in use, and also properly
referencing the maple device buffer following the recent update.
Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>