Commit Graph

9471 Commits (847b2f42be203f3cff7f243fdd3ee50c1e06c882)

Author SHA1 Message Date
Qiao Zhou 78b3fb4675 ASoC: WM8994: fix wrong value in tristate function
fix wrong value in wm8994_set_tristate func. when updating reg bits,
it should use "value", not "reg".

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-19 14:49:32 +00:00
Dimitris Papastamos a282879255 ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()
In the wm8995_set_tristate() function when updating the register
bits use the value and not the register index as the value argument.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-19 14:49:32 +00:00
Jesper Juhl 42b16b3fbb Kill off warning: ‘inline’ is not at beginning of declaration
Fix a bunch of
	warning: ‘inline’ is not at beginning of declaration
messages when building a 'make allyesconfig' kernel with -Wextra.

These warnings are trivial to kill, yet rather annoying when building with
-Wextra.
The more we can cut down on pointless crap like this the better (IMHO).

A previous patch to do this for a 'allnoconfig' build has already been
merged. This just takes the cleanup a little further.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-19 15:43:08 +01:00
Mark Brown 474b62d6ee ASoC: Provide per widget type callback when executing DAPM sequences
Many modern devices have features such as DC servos which take time to start.
Currently these are handled by per-widget events but this makes it difficult
to paralleise operations on multiple widgets, meaning delays can end up
being needlessly serialised. By providing a callback to drivers when all
widgets of a given type have been handled during a DAPM sequence the core
allows drivers to start operations separately and wait for them to complete
much more simply.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-19 13:02:32 +00:00
Mark Brown 20e4859ded ASoC: Add support for sequencing within
With larger devices there may be many widgets of the same type in series
in an audio path. Allow drivers to specify an additional level of ordering
within each widget type by adding a subsequence number to widgets and then
splitting operations on widgets so that widgets of the same type but
different sequence numbers are processed separately.  A typical example
would be a supply widget which requires that another widget be enabled
to provide power or clocking.

SND_SOC_DAPM_PGA_S() and SND_SOC_DAPM_SUPPLY_S() macros are provided
allowing this to be used with PGAs and supplies as these are the most
commonly affected widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-19 13:02:32 +00:00
Mark Brown 828a842f2e ASoC: Explicitly say if we're powering up or down
Rather than passing the sequence to use for DAPM widgets around by reference
explicitly say if we're powering up or down until the point where we need
the sequence itself. This should make no practical difference in itself but
supports future refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-19 13:02:32 +00:00
Harsha Priya a211701eb1 ASoC: sst_platform porting sst dsp driver interface as per latest in Greg's staging tree
The interface between sst platform driver and intel sst dsp driver
have been changed in Greg's staging tree - next branch

This patch adds the interface changes compatible with the new interface
in Greg's staging tree

Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-19 11:28:11 +00:00
Mark Brown a1926d1745 Merge branch 'for-2.6.38' into for-2.6.39 2011-01-19 11:22:54 +00:00
Mark Brown 52fc43f7c1 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.38 2011-01-19 11:17:12 +00:00
Takashi Iwai 569ed348ec Revert "ALSA: HDA: Create mixers on ALC887"
This reverts commit 03b7a1ab55.

This commit was mistakenly re-introduced.  While the change is harmless
(as ALC887 uses patch_alc888() now), we should get rid of any wrong code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 10:14:46 +01:00
Mark Brown 492e917635 Merge branch 'for-2.6.38' into for-2.6.39 2011-01-18 19:11:23 +00:00
Vinod Koul 065ae6784f ASoC: Add dependency on INTEL_SCU_IPC for Intel MID drivers
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:09:33 +00:00
Peter Ujfalusi 0d00a85752 ASoC: core: Remove dapm_sync call from soc_post_component_init
snd_soc_dapm_new_widgets will call dapm_power_widgets at
the end, so there is no need to call snd_soc_dapm_sync
after snd_soc_dapm_new_widgets.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Reviewed-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:09:10 +00:00
Vasily Khoruzhick c88c2823e8 ASoC: PXA: Fix codec address on Zipit Z2
WM8750 address is 0x1b, not 0x1a. Without this fix ALSA detects no sound
cards on Zipit

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:01:57 +00:00
Vasily Khoruzhick 7cbf70041d ASoC: PXA: Fix jack detection on Zipit Z2
Fix jack detection on Zipit Z2, otherwise it
disables headphones output when jack is connected

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:01:57 +00:00
Barry Song 91056acbcb ASoC: Blackfin: fix DAI/SPORT config dependency issues
While I2S/TDM/AC97 DAI is built-in, others are compiled as modules,
SND_BF5XX_SOC_SPORT will be module, then DAI can't get some symbols.
Except that, SND_BF5XX_AC97 depends on SND_BF5XX_SOC_AC97 too.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:01:57 +00:00
Barry Song 950a95d4e2 ASoC: Blackfin TDM: use external frame syncs
We don't want to use internal frame syncs otherwise we sometimes
get out of sync, so don't enable them when setting up the SPORT.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-18 19:01:57 +00:00
Mike Frysinger e9c2048915 ASoC: Blackfin AC97: fix build error after multi-component update
We need to tweak how we query the active capture/playback state after
the recent overhauls of common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-18 19:01:57 +00:00
Mike Frysinger 15d2e22b82 ASoC: Blackfin TDM: fix missed snd_soc_dai_get_drvdata update
One spot was missed in this driver when converting from
snd_soc_dai.private_data to snd_soc_dai_get_drvdata.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-18 19:01:57 +00:00
Linus Torvalds b7c15e4a1c 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: hda - Fix initialization for HP 2011 notebooks
  ALSA: hda - Add support for VMware controller
  ALSA: hda - consitify string arrays
  ALSA: hda - Add add multi-streaming playback for AD1988
  ASoC: EP93xx: fixed LRCLK rate and DMA oper. in I2S code
  ASoC: WM8990: msleep() takes milliseconds not jiffies
  ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu
  ALSA: constify functions in ac97
  ASoC: WL1273 FM radio: Fix breakage with MFD API changes
  ALSA: hda - More coverage for odd-number channels elimination for HDMI
  ALSA: hda - Store PCM parameters properly in HDMI open callback
  ALSA: hda - Rearrange fixup struct in patch_realtek.c
  ALSA: oxygen: Xonar DG: fix CS4245 register writes
  ALSA: hda - Suppress the odd number of channels for HDMI
  ALSA: hda - Add fixup-call in init callback
  ALSA: hda - Reorganize fixup structure for Realtek
  ALSA: hda - Apply Sony VAIO hweq fixup only once
  ALSA: hda - Apply mario fixup only once
  ALSA: hda - Remove unused fixup entry for ALC262
2011-01-18 08:05:50 -08:00
Brian Bloniarz b8b1a4cb68 ALSA: ice1712 delta - initialize SPI clock
The driver was using an initial value for the clock on the SPI bus
which was read from ICE1712 EEPROM,
ice->eeprom.data[ICE_EEP1_GPIO_STATE] & ICE1712_DELTA_AP_CCLK (0x02)

It appears some cards have it default high, some cards
have it default low. On my Delta 66 rev. E:
$ cat /proc/asound/M66/ice1712 | grep 'GPIO state'
  GPIO state       : 0x70 /* ICE1712_DELTA_AP_CCLK bit is zero */
On my Audiophile 2496:
$ cat /proc/asound/M2496/ice1712 | grep 'GPIO state'
  GPIO state       : 0xfe /* ICE1712_DELTA_AP_CCLK bit is one */

It must be raised before the first SPI write happens, or the write will
fail, leading to:

[   23.248721] invalid CS8427 signature 0x0: let me try again...

I theorize that 4eb4550ab3
is no longer needed, it was a different way to workaround
the problem.

[fixed variable decleration by tiwai]

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 15:25:16 +01:00
Takashi Iwai 27de094f54 Merge branch 'fix/asoc' into for-linus 2011-01-18 14:05:44 +01:00
Takashi Iwai 321051f5da Merge branch 'fix/hda' into for-linus 2011-01-18 07:44:55 +01:00
Vitaliy Kulikov cbbf50b22f ALSA: hda - Fix initialization for HP 2011 notebooks
Fixes for HP 2011 notebooks: enable dock ports and disable BTL
initialization in the driver.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:48 +01:00
Bankim Bhavsar 0f0714c5ed ALSA: hda - Add support for VMware controller
Add the new PCI ID 0x15ad and device ID 0x1977 for VMware HDAudio
Controller.

[changed to use AZX_DRIVER_GENERIC by tiwai]

Signed-off-by: Bankim Bhavsar <bbhavsar@vmware.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:36 +01:00
Takashi Iwai ea73496324 ALSA: hda - consitify string arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:17 +01:00
Raymond Yau c66ddf32dd ALSA: hda - Add add multi-streaming playback for AD1988
Attached a patch which add a new model to support multi-streaming
playback for ad1988.

playback another stereo stream through the front panel headphone on
device 2 while playback through the speakers connected to rear panel
on device 0 at the same time.

Tested with ad1988a rev2 codec on asus P5B-V motherboard.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:05 +01:00
Alexander Sverdlin 7322ce21cd ASoC: EP93xx: fixed LRCLK rate and DMA oper. in I2S code
Changelog:
1. I2S module of EP93xx should be feed by 32bit DMA transfers. This is
hardware limitation and that's the way original Cirrus's driver worked.
This will fix distorted sound playback and make capture actually work in
present ep93xx drivers.

I've found, that author of code, on which modern ep93xx-i2s.c and
ep93xx-pcm.c are based, had faced this problem also in 2007:
http://blog.gmane.org/gmane.linux.ports.arm.cirrus/month=20070101/page=3

Now SoC code uses his developments, but not overcomes the hardware
issues. Some details from EP93xx users guide:

Both I2S transmitter and receiver have similar 16x32bit FIFO, where they
store 8 samples for both left and right channels. The FIFO is always
32bit wide and should be properly aligned if you use samples of other
width. Transmitter and receiver have configuration registers for
selection of I2S word length (16, 24, 32). They are I2STXWrdLen and
I2SRXWrdLen.

Yes, EP93xx DMA can do byte, word and quad-word transfers. The width for
transfers to and from peripherals is selected by particular module
configuration. Lucky AC97 module has such configuration: AC97RXCRx
registers, bit CM (Compact mode enable) switches between 16 and 32 bit
samples. AC97TXCRx registers have the same bits for transmitters.
ep93xx-ac97.c enables this compact mode and so has all the rights to use
S16_LE format.
No one has found such a configuration in I2S module until now in any
Cirrus manuals. I2S module always feeds it's 32bit wide FIFO with 32bit
samples consecutively for left and right channels. You cannot use 32-bit
DMA transfers to transfer two 16-bit samples.

So we can use two formats for AC97, but should remove all but S32_LE for
I2S. Always using 32 bit chunks is not a problem for I2S, the codec I
use uses less bits too (24), it's permitted by I2S standard.

In proposed patch formats list shortened to just S32_LE, this makes all
the DMA transactions right, while ALSA will do all sample format
translation for us.

2. Incorrect setting of LRCLK (2 times slower) in original ep93xx-i2s.c
masks the first problem.

DMA takes two 16 bit samples instead of one, overall sound speed seems
to be normal, but you get actually 4000 sampling rate instead of
requested 8000 and therefore some noise... This is also the reason why
the capture function not worked at all in this driver...

If we take a look into I2S specification, we will figure that LRCLK MUST
be equal to sample rate, if we are talking about stereo (in mono too,
but it's not our case at all).

In proposed patch SCLK and LRCLK rates are corrected, assuming we always
send 32 bits * 2 channels to codec.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-17 14:10:00 +00:00
Dimitris Papastamos 7ebcf5d602 ASoC: WM8990: msleep() takes milliseconds not jiffies
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-17 14:09:44 +00:00
Dimitris Papastamos 219d8df868 ASoC: WM8995: Add regulator handling code
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-17 13:59:50 +00:00
Mark Brown a1b3b5eeee ASoC: Avoid direct register cache access when setting defaults
Directly accessing the register cache means that we can't use anything
except a flat register cache so use snd_soc_update_bits().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-17 13:59:39 +00:00
Dimitris Papastamos 203db22071 ASoC: WM8991: Add initial WM8991 driver
The WM8991 is a highly integrated ultra-low power hi-fi CODEC designed for
handsets rich in multimedia features such as GPS, mobile TV, digital audio
playback and gaming.

This driver was originally written by Graeme Gregory and has been maintained
out of tree by Mark Brown and Dimitris Papastamos.

Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-17 13:50:20 +00:00
Vinod Koul 70a7ca34db ASoC: soc core allow machine driver to register the card
The machine driver can't register the card directly and need to do this thru
soc-audio device creation

This patch allows the register and unregister card to be directly called by
machine drivers

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-17 13:50:08 +00:00
Raymond Yau d9ab344336 ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu
Fix playback/capture channels patch to change supported playback
channels of au8830 to 1,2,4 and capture channels to 1,2.
This prevent oops when oss emulation use SNDCTL_DSP_CHANNELS to
set 3 Channels

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-17 11:04:01 +01:00
Hanno Boeck 3e8b3b90fe ALSA: constify functions in ac97
Signed-off-by: Hanno Boeck <hanno@hboeck.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 19:14:47 +01:00
Linus Torvalds d73b388459 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Report wakeup events before resuming devices
  PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
  PCI: sysfs: Update ROM to include default owner write access
  x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
  x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
  PCI/ACPI: Request _OSC control once for each root bridge (v3)
  PCI: enable pci=bfsort by default on future Dell systems
  PCI/PCIe: Clear Root PME Status bits early during system resume
  PCI: pci-stub: ignore zero-length id parameters
  x86/PCI: irq and pci_ids patch for Intel Patsburg
  PCI: Skip id checking if no id is passed
  PCI: fix __pci_device_probe kernel-doc warning
  PCI: make pci_restore_state return void
  PCI: Disable ASPM if BIOS asks us to
  PCI: Add mask bit definition for MSI-X table
  PCI: MSI: Move MSI-X entry definition to pci_regs.h

Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the
meantime been converted to not use legacy PCI power management, and thus
no longer use pci_restore_state() at all (and that caused trivial
conflicts with the "make pci_restore_state return void" patch)
2011-01-14 09:29:05 -08:00
Stephen Warren 62ffac4d70 ASoC: tegra: Add DAPM widgets/routes for Harmony
With this change, I can capture from a microphone plugged into the
mic jack on Harmony (after unmuting Left Input PGA, and maybe turning
up the gain there too).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-14 12:30:40 +00:00
Stephen Warren b0ee5fbab7 ASoC: tegra: Remove TEGRA_I2S_AUDIO from Kconfig
That config variable doesn't exist in the mainline kernel, and hence
the dependency shouldn't either.

In linux-tegra-2.6.36, the dependency did exist to avoid a conflict with
the old non-ALSA Tegra I2S driver. However, this isn't and won't be
upstreamed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-14 12:30:29 +00:00
Matti J. Aaltonen 228dd54514 ASoC: WL1273 FM radio: Fix breakage with MFD API changes
These changes are needed to keep up with the changes in the
MFD core and V4L2 parts of the wl1273 FM radio driver.

Use function pointers instead of exported functions for I2C IO.
Also move all preprocessor constants from the wl1273.h to
include/linux/mfd/wl1273-core.h.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-14 12:29:40 +00:00
Takashi Iwai 4fe2ca1467 ALSA: hda - More coverage for odd-number channels elimination for HDMI
The commit ad09fc9d21 didn't cover the
case for Intel and Nvidia HDMIs, where hdmi_pcm_open() is called.
Put the hw_constraint there, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 10:33:26 +01:00
Takashi Iwai 639cef0eb6 ALSA: hda - Store PCM parameters properly in HDMI open callback
In hdmi_pcm_open(), the evaluated PCM hw parameters are stored in
hinfo, but these aren't properly set back to the current runtime
record since these have been set beforehand in azx_pcm_open().
This patch fixes the behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 10:30:46 +01:00
Takashi Iwai 361fe6e908 ALSA: hda - Rearrange fixup struct in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:55:32 +01:00
Clemens Ladisch f8fe80e438 ALSA: oxygen: Xonar DG: fix CS4245 register writes
Accidentally exchanging register addresses and register values leads to
many strange errors ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:50:01 +01:00
Takashi Iwai ad09fc9d21 ALSA: hda - Suppress the odd number of channels for HDMI
It looks like that HDMI codecs don't support the odd number of channels
although HD-audio spec doesn't have the restriction.  Add the
hw_constraint to limit to only the even number of channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:42:27 +01:00
Vinod Koul 4e10bda05d ASoC: soc core add inline to handle card list initialzation
Currently the soc_probe initializes the card hence it does the card list
initialzation. But if machines directly register the card they would need to
do these steps, so putting them as inline would save lot of code

This patch adds an inline to do list initialzation

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <harsha.priya@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 23:28:01 +00:00
Vinod Koul 150dd2f8c4 ASoC: soc core move the card debugfs initialization
The card debugfs initialization is done in soc_probe but would be better if it
is done when the card in registered

This patch moves the debugfs initialization to register_card()

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <harsha.priya@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 23:28:01 +00:00
Vinod Koul b0e264855c ASoC: soc core move card cleanup from soc_remove()
In soc_remove() the card resources are cleaned up.
This can also be done in card_unregister()

This patch move this cleanup into a new function and calls it from
card_unregister. This paves way for further work to allow card registartion
from machine.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 23:28:01 +00:00
Linus Torvalds 66dc918d42 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: (348 commits)
  ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
  ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
  ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
  ALSA: oxygen: fix Xonar DG input
  ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
  ALSA: hda - Fix missing EAPD for Acer 4930G
  ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
  ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
  ALSA: hda - Don't refer ELD when unplugged
  ASoC: tpa6130a2: Fix compiler warning
  ASoC: tlv320dac33: Add DAPM selection for LOM invert
  ASoC: DMIC codec: Adding a generic DMIC codec
  ALSA: snd-usb-us122l: Fix missing NULL checks
  ALSA: snd-usb-us122l: Fix MIDI output
  ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
  ASoC: Fix section mismatch in wm8995.c
  ALSA: oxygen: add S/PDIF source selection for Claro cards
  ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
  ASoC: fix migor audio build
  ALSA: include delay.h for msleep in Xonar DG support
  ...
2011-01-13 10:32:54 -08:00
Linus Torvalds 008d23e485 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  Documentation/trace/events.txt: Remove obsolete sched_signal_send.
  writeback: fix global_dirty_limits comment runtime -> real-time
  ppc: fix comment typo singal -> signal
  drivers: fix comment typo diable -> disable.
  m68k: fix comment typo diable -> disable.
  wireless: comment typo fix diable -> disable.
  media: comment typo fix diable -> disable.
  remove doc for obsolete dynamic-printk kernel-parameter
  remove extraneous 'is' from Documentation/iostats.txt
  Fix spelling milisec -> ms in snd_ps3 module parameter description
  Fix spelling mistakes in comments
  Revert conflicting V4L changes
  i7core_edac: fix typos in comments
  mm/rmap.c: fix comment
  sound, ca0106: Fix assignment to 'channel'.
  hrtimer: fix a typo in comment
  init/Kconfig: fix typo
  anon_inodes: fix wrong function name in comment
  fix comment typos concerning "consistent"
  poll: fix a typo in comment
  ...

Fix up trivial conflicts in:
 - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
 - fs/ext4/ext4.h

Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-13 10:05:56 -08:00
Takashi Iwai 5870112021 ALSA: hda - Add fixup-call in init callback
In some cases, the fix-up is required in the init callback to be called
both at the first initialization and at the resume.  The new action type
ALC_FIXUP_ACT_INIT is used for this case.

So far, only ALC275_FIXUP_SONY_HWEQ uses this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 15:42:53 +01:00
Takashi Iwai b5bfbc6702 ALSA: hda - Reorganize fixup structure for Realtek
Instead of keeping various data types in a single record, put the
type field and keep a single value in each entry, but allows chaining
multiple fixup entries.  This allows more flexible data management
(see ALC275_FIXUP_SONY_HWEQ for example).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 15:34:30 +01:00
Stephen Warren 422650e65a ASoC: tegra: s/IS_ERR_OR_NULL/IS_ERR/ for clk_get_sys
A recent discussion on linux-arm-kernel noted that the value returned by
clk_get_sys is an opaque token, and not strictly a pointer; it is
meaningful only to the clock API, clients should not dereference the value,
and the clock API must accept any non-IS_ERR value it returned.

Hence, only IS_ERR is appropriate to interpret the result, not
IS_ERR_OR_NULL.

I checked that clk_get_sys in both ASoC's for-next and Tegra's for-next
do behave as described; NULL is not returned in the case of error.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 14:18:03 +00:00
Dimitris Papastamos 1500b7b5ff ASoC: Automatically assign the default readable()/volatile() functions
Ensure that all calls to readable_register()/volatile_register() go via
the snd_soc_codec function pointers.

If the default register access table has been given but no functions
for handling readable()/volatile() registers, use the default ones provided
by soc-cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 14:17:53 +00:00
Dimitris Papastamos d4754ec91c ASoC: Update users of readable_register()/volatile_register()
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 14:17:43 +00:00
Dimitris Papastamos 066d16c3e8 ASoC: soc-cache: Add support for default readable()/volatile() functions
For common scenarios, device drivers can provide a table of all the
registers that are at least either readable/writable/volatile.  The idea
is that if a register lookup fails, all of its read/write/vol members
will be zero and will be treated as default.  This also reduces the
size of the register access array.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13 14:17:32 +00:00
Mark Brown 3e8e2cc45c Merge branch 'for-2.6.38' into for-2.6.39 2011-01-13 13:58:23 +00:00
Takashi Iwai 9fb1ef25f4 ALSA: hda - Apply Sony VAIO hweq fixup only once
This should be applied also only once as a part of the initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:44:37 +01:00
Takashi Iwai 6fc398cb30 ALSA: hda - Apply mario fixup only once
The amp-override is necessary only once at initialization time.
Also fixed a coding style issue.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:37:14 +01:00
Takashi Iwai 74dc8909c1 ALSA: hda - Remove unused fixup entry for ALC262
... and a minor cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:14:41 +01:00
Takashi Iwai 6db9a0f326 Merge branch 'topic/asoc' into for-linus 2011-01-13 08:37:24 +01:00
Takashi Iwai c400c9e23f Merge branch 'topic/hda' into for-linus 2011-01-13 08:37:19 +01:00
Takashi Iwai e38302f782 Merge branch 'topic/misc' into for-linus 2011-01-13 08:37:14 +01:00
Takashi Iwai 80c678526d ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
When only one mic is available and it's an analog mic, the current
IDT/STAC parser may give an Oops.

Reference: bko#25692
	https://bugzilla.kernel.org/show_bug.cgi?id=25692

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-13 08:29:12 +01:00
Kuninori Morimoto a193436c5d ASoC: sh: fsi-ak4642: fixup platform device id
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-12 23:21:18 +00:00
Dimitris Papastamos aea170a099 ASoC: soc-cache: Add reg_size as a member to snd_soc_codec
Simplify the use of reg_size, by calculating it once and storing it in
the codec structure for later reference.  The value of reg_size is
reg_cache_size * reg_word_size.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-12 14:55:23 +00:00
Dimitris Papastamos d779fce5d7 ASoC: soc-cache: Ensure flat compression uses a copy of the defaults cache
With the addition of the cache fallback functionality, it is necessary
to ensure that if the register defaults cache was marked as __devinitconst
and the LZO compression is not compiled in the kernel, the fallback to
flat compression will still use a copy of the defaults cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-12 14:55:12 +00:00
Takashi Iwai 18b022eb11 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2011-01-12 12:26:24 +01:00
Takashi Iwai 700b65cee9 ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
With GPIO2-fixup, another fixup for NID 0x19 was missing because the
fixup is applied only once.  Add the corresponding verb to the entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-12 09:03:05 +01:00
Kailang Yang 1a99d4a46c ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
SONY VAIO ALC275 default BIOS verb set the hardware EQ to disable.
Enable it when driver is loading.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-12 09:01:23 +01:00
Clemens Ladisch c386735264 ALSA: oxygen: fix Xonar DG input
Apparently, this card uses the other I2S input.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-12 08:32:44 +01:00
Kailang Yang 357f915ece ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
Lenovo NB 0x9e54 use the external AMP in an inverted manner.
Set EAPD to low will enable the AMP.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-12 08:12:52 +01:00
Takashi Iwai e2e93296c5 ALSA: hda - Fix missing EAPD for Acer 4930G
The proper initializatio of NID 0x15 EAPD is missing in the quirk for
Acer 4930G.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-12 08:03:39 +01:00
Nitin Daga 393004b2ea ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
Added hardware constraint in patch_hdmi.c to disable
channels 4/6 which are not supported by some older
NVIDIA GPUs.

Signed-off-by: Nitin Daga <ndaga@nvidia.com>
Acked-By: Stephen Warren <swarren@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-12 07:46:23 +01:00
Takashi Iwai 0ebaa24c6b ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
The dynamic PCM restriction based on ELD information may lead to the
problem in some cases, e.g. when the receiver is turned off.  Then it
may send a TV HDMI default such as channels = 2.  Since it's still
plugged, the driver doesn't know whether it's the right configuration
for future use.  Now, when an app opens the device at this moment,
then turn on the receiver, the app still sends channels=2.

The right solution is to implement some kind of notification and
automatic re-open mechanism.  But, this is a goal far ahead.

This patch provides a workaround for such a case by providing a new
module option static_hdmi_pcm for snd-hda-codec-hdmi module.  When
this is set to true, the driver doesn't change PCM parameters per
ELD information.  For users who need the static configuration like
the scenario above, set this to true.

The parameter can be changed dynamically via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-12 07:46:06 +01:00
Takashi Iwai 6661702f2e ALSA: hda - Don't refer ELD when unplugged
When unplugged, we shouldn't refer to ELD information for PCM open
any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-12 07:45:47 +01:00
Takashi Iwai 2f55eaab56 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-01-12 07:20:30 +01:00
Peter Ujfalusi 559a8cd629 ASoC: tpa6130a2: Fix compiler warning
sound/soc/codecs/tpa6130a2.c: In function 'tpa6130a2_add_controls':
sound/soc/codecs/tpa6130a2.c:342: warning: unused variable 'dapm'

Introduced by commit 39646871a4 ("ASoC:
tpa6130a2: Replace DAPM code with direct interface").

The DAPM code has been removed from the driver, but the
dapm struct remained.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-12 00:53:03 +00:00
Peter Ujfalusi 399b82e493 ASoC: tlv320dac33: Add DAPM selection for LOM invert
The L/R LOM line can be invertined side of the
corresponding DAC, or inverted from the corresponding
LOP.
Add control for user space to select the source of the
LOM inversion.
When only the analog bypass is enabled, and the LOM
is inverted from DAC output, we need to power the
corresponding DAC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-12 00:48:45 +00:00
David Lambert a710770e05 ASoC: DMIC codec: Adding a generic DMIC codec
This codec is to be used by the DMIC driver to
control the DMIC codec.  This driver will be used on future
implementations of the DMIC driver to support codec specific
features.

At this time, the codec driver just registers the codec DAI.

Signed-off-by: David Lambert <dlambert@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-12 00:48:45 +00:00
Karsten Wiese cdce2db74e ALSA: snd-usb-us122l: Fix missing NULL checks
Fix missing NULL checks in usb_stream_hwdep_poll() and usb_stream_hwdep_ioctl().
Wake up poll waiters before returning from usb_stream_hwdep_ioctl().

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 19:50:28 +01:00
Karsten Wiese 921eebdc18 ALSA: snd-usb-us122l: Fix MIDI output
The US-122L always reads 9 bytes per urb unless they are set to 0xFD.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 19:48:58 +01:00
Mark Brown 9f040c7941 ASoC: Fix indentation in soc_remove()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-11 18:30:16 +00:00
Dimitris Papastamos 861f2faf4f ASoC: soc-core: Simplify compress_type overriding functionality
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 18:30:06 +00:00
Dimitris Papastamos 1321e8838b ASoC: soc-cache: Clean up the cache manipulation code
Use Takashi's clean up code to make the cache manipulation code more
readable.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 18:29:56 +00:00
Dimitris Papastamos 04f8fd176c ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
The size of the lzo syncing bitmap was incorrectly set to the size
of the cache times the word size, however, the correct size is the
size of the cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 18:27:08 +00:00
Takashi Iwai 03cfbdf9f7 ASoC: Fix section mismatch in wm8995.c
__devinitconst can't be used for data referred in driver struct.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 17:58:55 +01:00
Clemens Ladisch d1d7093f3f ALSA: oxygen: add S/PDIF source selection for Claro cards
Add a mixer control to switch between the optical and coaxial S/PDIF
inputs on the HT-Omega Claro and Claro halo cards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 17:54:15 +01:00
Clemens Ladisch 5fc5152474 ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
Enable the X-Meridian's CD input and the X-Meridian 2G's potential
MIDI ports.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 17:54:11 +01:00
Seungwhan Youn 0378b6acc8 ASoC: SAMSUNG: Clean-up header includes
This patch remove including unnecessary/duplicated headers which relative
with Samsung SoCs.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 11:28:33 +00:00
Timur Tabi 180c329d6b ASoC: let snd_soc_update_bits() return an error code
Update snd_soc_update_bits() so that it returns a negative error code if the
the read or write operation fails.

Note that currently, a lot of the lower-level read functions have an unsigned
integer return type (and some of them even try to return a negative number),
but this code still appears to work in those cases.

An examination of the code shows that all current callers are compatible with
this change.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 11:04:07 +00:00
Dimitris Papastamos 4fde768ecf ASoC: WM8995: Remember to flush the cache on resume
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 11:03:58 +00:00
Harsha Priya 5c68536f32 ASoC: sst_platform created helper functions
Few funtions can be modularized in this driver to make them look cleaner
like managing the stream status with locks and filling pcm parameters.

This patch adds helper functions to do the same.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 11:03:24 +00:00
Guennadi Liakhovetski f4fd58d65e ASoC: fix migor audio build
Commit 6d803ba736 "ARM: 6483/1: arm & sh:
factorised duplicated clkdev.c" broke compilation of migor audio. Use the
correct header to fix the problem.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11 11:00:55 +00:00
Stephen Rothwell e92d457514 ALSA: include delay.h for msleep in Xonar DG support
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 07:38:42 +01:00
Timur Tabi 11b8fca53a ASoC: cs4270: use the built-in register cache support
Update the CS4270 driver to use ASoC's internal codec register cache feature.
This change allows ASoC to perform the low-level I2C operations necessary to
read the register cache.  Support is also added for initializing the register
cache with an array of known power-on default values.

The CS4270 driver was handling the register cache itself, but somwhere along
the conversion to multi-compaonent, this feature broke.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:32:24 +00:00
Mark Brown 8a9dab1a55 ASoC: Update name of debugfs root symbol to snd_soc_
Everything else is using snd_soc_ so we should use it here too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-10 22:25:21 +00:00
Stephen Warren 8b75d714a6 ASoC: tegra: Kconfig and Makefile
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:21:09 +00:00
Stephen Warren a8bf1ba1c8 ASoC: tegra: Harmony machine support
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:58 +00:00
Stephen Warren a50a399b8b ASoC: tegra: Machine utility code
Many portions of Tegra ASoC machine drivers will be similar or identical.
To avoid cut/paste, this file will act as a repository for all that common
code. For now, it solely includes code to reprogram the audio PLL for
44.1KHz- vs. 48KHz-based sample rates.

Signed-Off-By: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:47 +00:00
Stephen Warren 71f78e2214 ASoC: tegra: Add tegra-i2s driver
This provides an ASoC DAI interface for Tegra's I2S controller.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:39 +00:00
Stephen Warren 7605eb5bc3 ASoC: tegra: Add tegra-pcm driver
This provides an ASoC platform driver that manages Tegra's APB DMA
controller.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:29 +00:00
Stephen Warren f0d8af4f52 ASoC: tegra: Add tegra-das driver
The DAS (Digital Audio Switch) is a mux/crossbar which sits between
the DACs (Digital Audio Controllers) and the DAPs (Digital Audio
Ports). Audio data may be routed between DACs and DAPs in various
combinations as required by board design/application.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:20 +00:00
Stephen Warren faff4bb067 ASoC: Export debugfs root dentry
A couple Tegra ASoC drivers will create debugfs entries. Mark requested
these by under debugfs/asoc/ not just debugfs/. To enable this, export
the dentry representing debugfs/asoc/.

Also, rename debugfs_root -> asoc_debugfs_root now it's exported to
prevent potential symbol name clashes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:20:04 +00:00
Dimitris Papastamos 2aa86323d8 ASoC: soc-core: Add support for NULL default register caches
The infrastructure for handling NULL default register maps is already
included in the soc-cache code, just ensure that we don't try to dereference
a NULL pointer while accessing a NULL register cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 22:19:31 +00:00
Clemens Ladisch a4b1696916 ALSA: oxygen: add some card names
Instead of the generic Oxygen, use the actual card name, if known.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:28 +01:00
Clemens Ladisch a1f80fcfd5 ALSA: oxygen: do not show chip revision in card longname
Apparently, the revision is 2 on all sold sound cards, so this
information is not actually useful.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:24 +01:00
Clemens Ladisch 64878dfbf7 ALSA: oxygen: X-Meridian: add S/PDIF source selection
Add a mixer control to select between the on-board and extension board
S/PDIF inputs for the X-Meridian (2G).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:21 +01:00
Clemens Ladisch 860cffd57a ALSA: oxygen: add digital input validity check switch
Add a mixer control to prevent capturing S/PDIF samples that are not
marked as valid (non-audio or corrupted samples).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:17 +01:00
Clemens Ladisch 061b869eca ALSA: usb-audio: add Edirol SD-90 PCM support
Add support for the 24-bit audio I/Os of the Edirol SD-90 interface.

Reported-any-tested-by: Jim Grusendorf <alsa-user@grusendorf.ca>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:10 +01:00
Clemens Ladisch 2a1803a729 ALSA: usb-audio: use enum control info helper
Simplify info callbacks by using the snd_ctl_enum_info() helper function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:07 +01:00
Clemens Ladisch bed6896d0b ALSA: ymfpci: use enum control info helper
Simplify the info callback by using the snd_ctl_enum_info() helper function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:03 +01:00
Clemens Ladisch 60c4ce4a0c ALSA: cmipci: use enum control info helper
Simplify info callbacks by using the snd_ctl_enum_info() helper function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:47:00 +01:00
Clemens Ladisch dd1224aa3e ALSA: bt87x: use enum control info helper
Simplify the info callback by using the snd_ctl_enum_info() helper function.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:56 +01:00
Clemens Ladisch 9600732b6c ALSA: core, oxygen, virtuoso: add an enum control info helper
Introduce the helper function snd_ctl_enum_info() to fill out the
elem_info fields for an enumerated control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:53 +01:00
Clemens Ladisch b532d6b8d3 ALSA: virtuoso: add Xonar HDAV1.3 Slim support
Add experimental support for the Asus Xonar HDAV1.3 Slim sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:49 +01:00
Clemens Ladisch 66410bfdf1 ALSA: oxygen: add Xonar DG support
Add experimental support for the Asus Xonar DG sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:46 +01:00
Clemens Ladisch 8443d2eb81 ALSA: oxygen: add X-Meridian 2G support
Add support for the AuzenTech X-Meridian 7.1 2G sound card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:42 +01:00
Clemens Ladisch 8c50b75979 ALSA: oxygen: add more PCI IDs
Add PCI IDs for some unknown models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:38 +01:00
Clemens Ladisch ce2c492090 ALSA: virtuoso: reduce MCLK in double rate modes
For the CSxxxx and AKxxxx DAC/ADC chips, the MCLK factor in double rate
modes (64-96 kHz) can be reduced to 128x without reducing sound quality.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:35 +01:00
Clemens Ladisch 5b8bf2a54f ALSA: oxygen: simplify model-specific MCLK handling
Replace the get_i2s_mclk callback with tables of MCLK values.  This
simplifies the MCLK-handling code in both the framework and the model-
specific drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:31 +01:00
Clemens Ladisch bc29e262c3 ALSA: virtuoso: use headphone gain setting only on front DAC
Do not apply the headphone gain offset to any but the front DAC.  These
DACs would not be used in headphone mode, so this saves a few register
writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:28 +01:00
Clemens Ladisch c97e2dc484 ALSA: virtuoso: handle DAC oversampling automatically
Remove the DAC Oversampling mixer control because this setting does not
make much sense.

For cards with the H6 daughterboard, 128x oversampling was disabled
anyway because these high MCLK frequency would not be compatible with
the connector cable.

For cards without the H6 daughterboard, 128x gives a slightly higher
output quality; there is no reason to reduce it to 64x except for saving
power, but then these cards have not been designed to be power efficient
anyway (the D2's blinkenlights cannot be disabled).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:24 +01:00
Clemens Ladisch 00b8dd7dd7 ALSA: virtuoso: use lower master clock with H6 daughterboard
Because of the unshielded connector cable, it is important to use as low
a master clock frequency as possible with the H6.

For double rate modes (64-96 kHz), the MCLK rate is unconditionally
lowered from 512x to 256x because the higher rate would not improve
anything.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:21 +01:00
Clemens Ladisch d353eaa9a8 ALSA: virtuoso: configure correct master clock frequency on the CS2000
The clock output of the CS2000, which is used as master clock for the
DACs, was using half the actual master clock frequency for some reason.
Using the theoretically correct frequency seems also to work in practice.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:17 +01:00
Clemens Ladisch dd203fa97b ALSA: virtuoso: remove non-working controls on Essence ST Deluxe
On the Xonar Essence ST Deluxe, remove all mixer controls that would
require I2C communication with the third DAC, which does not work
because of an addressing conflict with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:14 +01:00
Clemens Ladisch 03ff959dd4 ALSA: virtuoso: change PCM1796 format to I2S
Change the PCM format used for the PCM1796 from left-justified to I2S to
ensure that the correct format is used even for the Essence ST Deluxe's
center/LFE DAC, where I2C does not work because of an address conflict
with the CS2000 chip.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:10 +01:00
Clemens Ladisch 79815e004c ALSA: virtuoso: wait for PCM1796 clock to become stable
The PCM1796 needs the master clock for I2C communication to work, so
add delays after clock changes to ensure that the clock is stable when
we try to write the DACs' registers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:07 +01:00
Clemens Ladisch 4106055ced ALSA: virtuoso: do not use fast I2C speed
To make the I2C communication reliable when using the H6 daughterboard,
reduce the I2C clock frequency.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:03 +01:00
Clemens Ladisch 5ea310ff8d ALSA: oxygen: fix SPI clocks slower than 6.25 MHz
Fix wrong register bits for SPI clock cycle times longer than 160 ns,
and adjust the polling loop timeout for these speeds.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:46:00 +01:00
Clemens Ladisch d2119c05e9 ALSA: oxygen: remove oxygen_model::private_data field
The number of DACs can now be deduced from the dac_channels_mixer field,
so the private_data field is no longer needed.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:45:56 +01:00
Clemens Ladisch 1f4d7be729 ALSA: oxygen: allow different number of PCM and mixer channels
For cards like the Xonar HDAV1.3, differentiate between the number of
PCM channels that can be played and the number of channels whose volume
can be adjusted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 16:45:53 +01:00
Takashi Iwai bcb2f0f517 ALSA: hda - Add support for multiple headphone/speaker controls for Realtek
So far, Realtek auto-parser assumed that the multiple pins are only for
line-outs, and assigned the channel names like Front, Surround, etc for
the multiple outputs.  But, there are devices that have multiple
headphones, and these can be better controlled with the corresponding
control-name like "Headphone" with indicies.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 15:45:23 +01:00
Takashi Iwai b2d0576055 ALSA: hda - Fix multi-headphone handling for Realtek codecs
When multiple headphone pins are defined without line-out pins, the
driver takes them as primary outputs.  But it forgot to set line_out_type
to HP by assuming there is some rest of HP pins.  This results in some
mis-handling of these pins for Realtek codec parser.  It takes as if
these are pure line-out jacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-01-10 14:51:32 +01:00
Vasily Khoruzhick b60fc60cea ASoC: RX1950: Enable Mic Jack during glue driver init
Enable Mic Jack during glue driver init, otherwise capture will not work.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:47:49 +00:00
Mark Brown 0d51a9cbb6 ASoC: Taint the kernel if debugfs is used to write directly to CODECs
Since direct register writes may confuse the drivers and are supposed
to be used only in diagnostic situations discourage their use in
production by tainting the kernel when we do a write.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-10 11:41:07 +00:00
Seungwhan Youn 9c6df19e55 ASoC: SAMSUNG: Move PCM specific definitions into pcm.c
This patch moves PCM specific definitions, they doesn't need to be
shared, into 'pcm.c' from 'pcm.h'.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:38:22 +00:00
Seungwhan Youn f7f741810f ASoC: SAMSUNG: Clean-up DMA header file
This patch moves DMA specific definitions, they doesn't need to be
shared, into 'dma.c' from 'dma.h'. And remove unnecessery definitions
on 'dma.h'.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:38:16 +00:00
Seungwhan Youn 4f644ea70d ASoC: SAMSUNG: Remove AC97 header file
This patch moves AC97 specific definitions, they doesn't need to be shared,
into 'ac97.c' from 'ac97.h'. This patch also remove header file, 'ac97.h',
and remove includes on machine drivers.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:38:00 +00:00
Vinod Koul fd0d08d9ed ASoC: mid-x86 - remove the flag in makefile
previous commit e62255f2ad introduced DDEBUG flag in Makefile
This causes all debug statemenets to be ON.

This patch removes this flag

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:36:02 +00:00
Vinod Koul f5c6b2aa33 ASoC: sst platform - fix the style inconsistency
this patch fixes the style inconsistency by removing empty space in MODULE_ALIAS
also removes a redundant return statement

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:35:53 +00:00
Vinod Koul b22dab8883 ASoC: sn95031 fix the code style and format inconsistencies
this patch fixes inconsistencies commented by Mark.
This also fixes few other style things in audio_map & header file

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10 11:35:41 +00:00
Jesper Juhl 3daa7ea650 ALSA: Don't leak in sound/core/oss/pcm_oss.c::snd_pcm_hw_param_near()
snd_pcm_hw_param_near() will leak the memory allocated to 'save' if the
call to snd_pcm_hw_param_max() returns less than zero.
This patch makes sure we never leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 11:13:42 +01:00
Daniel T Chen ca6cd851d7 ALSA: hda: Use vostro model quirk for Dell Vostro 1014
BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5184

A user reported on the alsa-devel mailing list that he needs to use
the vostro model quirk to have audible playback, so apply it for his
PCI SSID.

Reported-and-tested-by: Fernando Lemos <fernandotcl@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 11:11:52 +01:00
David Henningsson 22f21d51bb ALSA: HDA: Add Lenovo vendor quirk for Conexant 205xx
BugLink: http://bugs.launchpad.net/bugs/689036

Many new Lenovos need the ideapad quirk. Also, since the
auto parser for this chip is far from optimal, the regression
risk is low (although not zero).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 11:11:23 +01:00
David Henningsson 5322bf2790 ALSA: HDA: Fix volume control indices for Mics (Realtek)
If more than one mic is present with different locations,
e g "Front Mic" and "Rear Mic", they can use the same index (0),
since their names are different.

Previous behavior was to have "Front Mic" as index 1, causing it
to be ignored by e g PulseAudio.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:57:24 +01:00
David Henningsson 5f99f86a80 ALSA: HDA: Rename "Mic Boost" to "Mic Boost Volume"
BugLink: http://bugs.launchpad.net/bugs/697240

If the "Volume" suffix is not given, alsa-lib gets confused and
loses the dB information at the simple element level.

Boosts generally affects both playback and capture, as they are
applied early in the chain. Hence no "Playback" or "Capture" in
the suffix.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:53:34 +01:00
David Henningsson bdfe6f452f ALSA: HDA: Add internal mic for IDT 92HD88B
BugLink: http://bugs.launchpad.net/bugs/696493

According to datasheet (and real-world testing), IDT 92HD88B can
have internal mics at NID 0x11 and 0x20, so enable them accordingly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-10 10:49:26 +01:00
Takashi Iwai 70c673a480 Merge branch 'fix/hda' into topic/hda 2011-01-10 10:49:13 +01:00
Linus Torvalds 021db8e2bd Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (77 commits)
  spi/omap: Fix DMA API usage in OMAP MCSPI driver
  spi/imx: correct the test on platform_get_irq() return value
  spi/topcliff: Typo fix threhold to threshold
  spi/dw_spi Typo change diable to disable.
  spi/fsl_espi: change the read behaviour of the SPIRF
  spi/mpc52xx-psc-spi: move probe/remove to proper sections
  spi/dw_spi: add DMA support
  spi/dw_spi: change to EXPORT_SYMBOL_GPL for exported APIs
  spi/dw_spi: Fix too short timeout in spi polling loop
  spi/pl022: convert running variable
  spi/pl022: convert busy flag to a bool
  spi/pl022: pass the returned sglen to the DMA engine
  spi/pl022: map the buffers on the DMA engine
  spi/topcliff_pch: Fix data transfer issue
  spi/imx: remove autodetection
  spi/pxa2xx: pass of_node to spi device and set a parent device
  spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
  spi/pxa2xx: Add chipselect support for Sodaville
  spi/pxa2xx: Consider CE4100's FIFO depth
  spi/pxa2xx: Add CE4100 support
  ...
2011-01-07 17:08:46 -08:00
Vinod Koul e62255f2ad ASoC: sst v2: Add makefiles and kconfigs changes
This patch adds the makefile and kconfig changes for mid asoc drivers:
platform and machine driver which are introduced in 2 preceeding patches

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-06 13:49:24 +00:00
Vinod Koul 55c720369d ASoC sst v2: Add medfield machine driver
This patch adds the medfield machine driver
Machine driver glues the sn95031 codec driver and sst_platform driver to form the asoc sound driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-06 13:49:16 +00:00
Vinod Koul d927fdae5c ASoC: sst v2: Add mid platform driver
This patch adds the platform driver for mid asoc drivers.  This platfrom
driver sends commands to sst dsp engine driver for the dai operations.
For this purpose it depends on intel_sst driver which is currently in
staging tree

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-06 13:48:58 +00:00
Vinod Koul 4dc69be221 ASoC: sst v2: Add sn95031 codec driver
This patch adds the sn95031 asoc codec driver. This driver currently
supports only playback.  Capture and jack detection to be added later

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-06 13:47:15 +00:00
Harsha Priya f6c2ed5dd6 ASoC: Fix the device references to codec and platform drivers
The soc-core takes the platform and codec driver reference during probe. Few of
these references are not released during remove. This cause the platform and
codec driver module unload to fail.

This patch fixes by the taking only one reference to platform and codec module
during probe and releases them correctly during remove. This allows load/unload
properly

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-05 11:29:00 +00:00
Jarkko Nikula 5e79d64b03 ASoC: Remove needless inclusion of tlv320aic3x.h from machine drivers
After multi-component conversion these machine drivers don't actually need
anything from sound/soc/codecs/tlv320aic3x.h so don't include it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-05 11:28:50 +00:00
Mark Brown 8c1b5306f0 ASoC: Change Samsung Kconfig from ASOC_ to SND_SOC_
The rest of ASoC is using SND_SOC_ as the prefix for all the Kconfig
symbols so do so for the new Samsung drivers too, rather than using
ASOC_ as they currently are.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-05 09:45:32 +00:00
Stefan Weil 9380f2af16 Fix spelling milisec -> ms in snd_ps3 module parameter description
Instead of replacing 'milisec' by 'millisec', I decided to use
the more common SI unit. Other drivers use 'milliseconds'
or 'ms', too ('millisec' is never used).

Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-03 13:54:21 +01:00
Linus Torvalds a1a54303d1 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: hda: Use LPIB quirk for Dell Inspiron m101z/1120
  sound: Prevent buffer overflow in OSS load_mixer_volumes
  ASoC: codecs: wm8753: Fix register cache incoherency
  ASoC: codecs: wm9090: Fix register cache incoherency
  ASoC: codecs: wm8962: Fix register cache incoherency
  ASoC: codecs: wm8955: Fix register cache incoherency
  ASoC: codecs: wm8904: Fix register cache incoherency
  ASoC: codecs: wm8741: Fix register cache incoherency
  ASoC: codecs: wm8523: Fix register cache incoherency
  ASoC: codecs: max98088: Fix register cache incoherency
  ASoC: codecs: Add missing control_type initialization
2011-01-02 10:43:51 -08:00
Kuninori Morimoto e9d3f95159 ASoC: sh: fsi-da7210: remove unnecessary format settings
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-02 13:48:09 +00:00
Andreas Mohr 689c69120e ALSA: azt3328: improve snd_azf3328_codec_setdmaa()
- add some WARN_ONCE
- add multi-I/O helper (and use helper struct)
- fix off-by-1 DMA length bug
- better variable naming

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:11:38 +01:00
Andreas Mohr da237f35a8 ALSA: azt3328: use proper private_data hookup for codec identification
- much improved implementation due to clean codec hierarchy
- preparation for potential per-codec spinlock change

NOTE: additionally removes a chip->pcm[codec_type] NULL ptr check
(due to it requiring access to external chip struct),
however I believe this to be ok since this condition should not occur
and most drivers don't check against that either.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:11:24 +01:00
Andreas Mohr 345855951a ALSA: azt3328: use a helper variable to remove one indirection in hotpath
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:09:43 +01:00
Andreas Mohr 9fd8d36caa ALSA: azt3328: cosmetics: use a helper variable for codec setup
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:09:18 +01:00
Andreas Mohr 8d9a114e6d ALSA: azt3328: _setfmt() update
- use a separate variable for the frequency part, don't always "or" it
- use a "clever"(?) macro to shorten the code

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:08:09 +01:00
Andreas Mohr adf5931f8c ALSA: azt3328: cosmetics, minor updates
- correct samples to be POSIX shell compatible
- add logging of jiffies value in _pointer()
- several comments
- cleanup

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-02 11:07:45 +01:00
Takashi Iwai ea78484bd5 Merge branch 'fix/asoc' into for-linus 2011-01-02 11:01:55 +01:00
Daniel T Chen e03fa055bc ALSA: hda: Use LPIB quirk for Dell Inspiron m101z/1120
Sjoerd Simons reports that, without using position_fix=1, recording
experiences overruns. Work around that by applying the LPIB quirk
for his hardware.

Reported-and-tested-by: Sjoerd Simons <sjoerd@debian.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-30 13:26:19 +01:00
Dan Rosenberg d81a12bc29 sound: Prevent buffer overflow in OSS load_mixer_volumes
The load_mixer_volumes() function, which can be triggered by
unprivileged users via the SOUND_MIXER_SETLEVELS ioctl, is vulnerable to
a buffer overflow.  Because the provided "name" argument isn't
guaranteed to be NULL terminated at the expected 32 bytes, it's possible
to overflow past the end of the last element in the mixer_vols array.
Further exploitation can result in an arbitrary kernel write (via
subsequent calls to load_mixer_volumes()) leading to privilege
escalation, or arbitrary kernel reads via get_mixer_levels().  In
addition, the strcmp() may leak bytes beyond the mixer_vols array.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-30 13:20:55 +01:00
Mark Brown 7116f452c8 ASoC: Yet more x86 tracepoint workarounds
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-29 13:06:18 +00:00
Grant Likely 94a544a4e8 Merge branch 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next
* 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next
  spi/pxa2xx: register driver properly
  spi/pxa2xx: add support for shared IRQ handler
  spi/pxa2xx: Use define for SSSR_TFL_MASK instead of plain numbers
  arm/pxa2xx: reorgazine SSP and SPI header files
  spi/pxa2xx: Add CE4100 support
  spi/pxa2xx: Consider CE4100's FIFO depth
  spi/pxa2xx: Add chipselect support for Sodaville
  spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
  spi/pxa2xx: pass of_node to spi device and set a parent device
2010-12-29 01:05:50 -07:00
Mark Brown 22a756ee89 Merge branch 'for-2.6.37' into for-2.6.38 2010-12-28 23:42:53 +00:00
Lars-Peter Clausen 839d271c50 ASoC: codecs: Remove unused reg_cache fields from device structs
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but there are quite a few drivers left which now have an unused reg_cache field in
their private device struct.
This patch removes these unused fields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-28 23:37:21 +00:00
Lars-Peter Clausen 776065e36d ASoC: codecs: wm8753: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8753 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Furthermore the generic cache uses zero-based numbering while the wm8753 cache
uses one-based numbering.
Thus we end up with two from each other incoherent caches, which leads to undefined
behaviour and crashes.
This patch fixes the issue by changing the wm8753 driver to use the generic
register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-28 23:22:37 +00:00
Lars-Peter Clausen da280f51d0 ASoC: codecs: wm9090: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm9090 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm9090 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:20:22 +00:00
Lars-Peter Clausen 7f87e30ef2 ASoC: codecs: wm8962: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8962 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8962 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:20:12 +00:00
Lars-Peter Clausen 715920d04c ASoC: codecs: wm8955: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8955 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8955 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:20:00 +00:00
Lars-Peter Clausen f578a188e8 ASoC: codecs: wm8904: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8904 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8904 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:19:36 +00:00
Lars-Peter Clausen 52ca353bc8 ASoC: codecs: wm8741: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8741 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8741 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:19:27 +00:00
Lars-Peter Clausen beebca3120 ASoC: codecs: wm8523: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8523 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8523 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:19:17 +00:00
Lars-Peter Clausen d24eb0db9c ASoC: codecs: max98088: Fix register cache incoherency
The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the max98088 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the max98088 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:19:06 +00:00
Lars-Peter Clausen 7f984b55ac ASoC: codecs: Add missing control_type initialization
Some codec drivers do not initialize the control_type field in their private
device struct, but still use it when calling snd_soc_codec_set_cache_io.
This patch fixes the issue by properly initializing it in the drivers probe
functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28 23:18:43 +00:00
Mark Brown 6dc47e97a0 ASoC: One more x86 typo fix
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-28 02:14:25 +00:00
Mark Brown a164612eb6 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38 2010-12-27 17:51:52 +00:00
Mark Brown 8b08c0fe95 ASoC: Fix double comment start
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-27 15:35:17 +00:00
Mark Brown 3f1c63261b ASoC: Fix typo in x86 workaround
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-27 15:34:50 +00:00
Jesper Juhl c521dde6a6 sound, ca0106: Fix assignment to 'channel'.
The assignment to the local variable 'channel' in
snd_ca0106_pcm_pointer_capture() is a little crazy.  Order of assignment is
undefined. This fixes it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-12-27 15:09:53 +01:00
Mark Brown 617eecdb3d ASoC: Remove WM8995 write sequencer bitfield definitions
They're very verbose and extremely repetitive so bulk up the kernel more
than is ideal. If required we can readd with WRITE_SEQUENCER_n type
definitions that cover the entire register bank in a few defines.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-24 11:32:45 +00:00
Mark Brown 524d7692bc ASoC: Remove incorrect WM8903 erratum workaround
Due to a typographical error in the erratum workaround it was never
functional so just remove it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-24 11:32:26 +00:00
Linus Torvalds 08861c713c 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: hda - Fix GPIO2-fixup for Sony laptops
  ALSA: hda - Try to find an empty control index when it's occupied
  ALSA: hda - Fix conflict of d-mic capture volume controls
  ALSA: hda - Don't apply ALC269-specific initialization to ALC275
  ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
  ALSA: pcm: remember to always call va_end() on stuff that we va_start()
  ALSA: HDA: Add auto-mute for Thinkpad SL410/SL510
2010-12-23 16:04:32 -08:00
Jon Mason 1d3c16a818 PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in
having it return any value.  Also, a large majority of the callers do
not check the return code of pci_restore_state.  Make the
pci_restore_state a void return and avoid the overhead.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-12-23 12:53:09 -08:00
Takashi Iwai 7693457547 Merge branch 'fix/hda' into for-linus 2010-12-23 16:37:31 +01:00
Takashi Iwai 7039c74cb5 ALSA: hda - Fix GPIO2-fixup for Sony laptops
The fix-up entries by the commit 2785591a97
     ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
weren't applied in the right position.  They had to be before the quirk
entry matching to all Sony devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 16:35:34 +01:00
Peter Ujfalusi 0d99d2b036 ASoC: tlv320dac33: Add 32/24 bit audio support
Add support for 24 bit audio (with S32_LE msbits 24).
The reason to limit the msbits to 24, is that the FIFO
can be configured for 16 or 24 bit layout.
It is unknown how the codec would downsample from 32 to
24 bit, if the interface is configured to receive 32
bit data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:34 +00:00
Peter Ujfalusi 549675ed65 ASoC: tlv320dac33: Some cleanup for 32/24 bit support
Change the structure of FIFO handling in order to
pave the way for adding 32/24 bit audio support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:33 +00:00
Peter Ujfalusi 3591f4cd53 ASoC: tlv320dac33: Remove manual FIFO configuration
The manual FIFO configuration was the first version to enable
the use of the FIFO in the codec.
It had served it's purpose as debugging aid, but the automatic
FIFO configuration is much safer to use.
The removal of the manual controls, and configuration makes
it easier to add new features for the codec later, since
the manual mode neded different ways to calculate, and
protect against misconfiguration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:33 +00:00
Olaya, Margarita f769bdf2a7 ASoC: twl6040: Convert HF and HS drivers to use DAPM OUT_DRV widget
Make the phoenix HS and HF drivers use the new DAPM driver
widget in order to guarantee power ON/OFF order sequence.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:32 +00:00
Jorge Eduardo Candelaria d4686c654b ASoC: mcbsp: Add McBSP support for OMAP4
This patch adds McBSP support for the OMAP4 CPU

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:05 +00:00
Takashi Iwai d08935711b Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2010-12-23 13:39:59 +01:00
Takashi Iwai 5058cbf2c4 Merge branch 'fix/misc' into for-linus 2010-12-23 10:28:26 +01:00
Takashi Iwai 1afe206ab6 ALSA: hda - Try to find an empty control index when it's occupied
When a mixer control element was already created with the given name,
try to find another index for avoiding conflicts, instead of breaking
with an error.  This makes the driver more robust.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 10:22:55 +01:00
Takashi Iwai 2d7ec12b90 ALSA: hda - Fix conflict of d-mic capture volume controls
When the d-mics are assigned to the same purpose of another analog mic
pins, the driver doesn't compute the index properly, resulting in an
error with "existing control".  This patch fixes it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-23 10:16:05 +01:00
Mark Brown 1435b9402f ASoC: ifdef out trace points from modules for x86
No idea why this works on ARM but not x86.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-23 02:07:23 +00:00
Jiri Kosina 4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
Dimitris Papastamos 6a504a7511 ASoC: Add initial WM8995 driver
The WM8995 is a digital audio hub CODEC designed for smartphones.
The current driver supports most of the basic functionality of the
WM8995.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-22 13:37:12 +00:00
Takashi Iwai 9d01df063e ASoC: don't pass the string as the format arguemtn for dev_info()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-22 14:08:40 +01:00
Seungwhan Youn f49be89bb4 ASoC: SAMSUNG: Debug wrong parameter
snd_soc_jack_new()'s first parameter was changed from snd_soc_card to
snd_soc_codec after Multi-Component support patches. So, this patch
fixes parameter that we missed.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-22 11:09:15 +00:00
Mark Brown 1c9e9795b5 ASoC: Add jack IRQ trace to 88pm860x driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 11:09:05 +00:00
Mark Brown 2bbb5d6679 ASoC: Trace Wolfson jack detection IRQs
Add jack detection interrupt trace to Wolfson CODEC drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 11:08:55 +00:00
Mark Brown 6d3c26bcb7 ASoC: Use delayed work to debounce WM8350 jack IRQs
This avoids blocking the IRQ thread and allows further bounces to extend
the debounce time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 11:08:45 +00:00
Kuninori Morimoto 722bc28384 ASoC: sh: fsi: modify improper dependent
FSI-AK4642 and FSI-DA7210 are depend on I2C, not I2C_SH_MOBILE

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-21 23:22:47 +00:00
Mark Brown 68d44ee0bc ASoC: Make LZO cache compression optional
Make LZO cache compression optional as it pulls in the kernel wide LZO
implementation and rbtree compression is generally more efficient for
typical register maps, especially in terms of CPU performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-21 23:17:18 +00:00
Mark Brown be4fcddd17 ASoC: If we can't find a cache compression type default to flat
This makes it easier to make cache types build time configurable as we
don't have a hard dependency on a given cache being built in.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-21 23:17:05 +00:00
Mark Brown 458350b31f ASoC: Fix WM8994/58 3D stereo control definitions
Cut'n'paste in the register names.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-21 12:43:01 +00:00
Mark Brown 0bb140f8d9 ASoC: Remove some unused defines from WM8903
These would have been used if we'd done manual clock divider setup,
but we didn't.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-21 12:42:36 +00:00
Kailang Yang c793bec550 ALSA: hda - Don't apply ALC269-specific initialization to ALC275
ALC275 doesn't require the ALC269 (and its variants) specific init
sequences.  Add the check of codec id.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-21 09:14:13 +01:00
Kailang Yang 2785591a97 ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
Set GPIO2 for some Sony VAIO with ALC275 to fix speaker output.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-21 09:13:11 +01:00
Jesper Juhl 87a1c8aaa0 ALSA: pcm: remember to always call va_end() on stuff that we va_start()
The Coverity checker spotted that we do not always remember to call
va_end() on 'args' in failure paths in snd_pcm_hw_rule_add().
Here's a patch to fix that up (compile tested only) - it also removes
some annoying trailing whitespace that caught my eye while I was in the
area..

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-21 08:03:09 +01:00
David Henningsson 10528020d7 ALSA: HDA: Rename "e-Mic" and "i-Mic" to "Mic" and "Internal Mic"
Change non-standard mic control names to standard control names
to clean up the namespace.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:43 +01:00
David Henningsson 8607f7c424 ALSA: HDA: Rename "Ext Mic" and "External Mic" to "Mic"
Usually external microphones are just labelled "Mic", so rename
"Ext Mic" and "External Mic" to "Mic" to clear up the namespace.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:32 +01:00
David Henningsson 28c4edb71d ALSA: HDA: Rename "Int Mic" to "Internal Mic"
"Int Mic" and "Internal Mic" both mean the same thing, so rename
the former to the latter in order to clean up the namespace a little.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 14:59:16 +01:00
Jassi Brar 96657d33b9 ASoC: SMDKV310: Add I2S support
Add ASoC machine driver for SMDKV310/C210 boards that have
a WM8994 attached to I2S-0.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:27 +00:00
Jassi Brar 4d81acff40 ASoC: SMDKV310: Enable AC97 device
Enable AC97 audio device on SMDKV310/C210.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:23 +00:00
Jassi Brar 40d2482993 ASoC: SMDKC110: Enable I2S device
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:18 +00:00
Jassi Brar e3bd3e182d ASoC: SMDKV210: Enable I2S device
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:14 +00:00
Jassi Brar dc6ee06393 ASoC: SMDK6442: Enable I2S device
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:09 +00:00
Jassi Brar de4987ab10 ASoC: SMDK6450: Enable I2S device
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:46:04 +00:00
Jassi Brar c6ccc596ca ASoC: SMDK6440: Enable I2S device
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:45:59 +00:00
Jassi Brar 72685f27b1 ASoC: SMDK_WM8580: Make I2S0 as default dai
Since most newer SMDKs have I2S0 routed to the WM8580's Primary DAI,
future changes can be minimized if the default CPU DAIs are set to
0, rather than 2.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:45:52 +00:00
Jassi Brar 775bc97131 ASoC: Samsung: I2S: Flush FIFO after stop
Flush the FIFO while stopping the channel rather than starting.
This saves time during stream start and keeps the FIFOs clean
when the channel is idling.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:45:48 +00:00
Jassi Brar 6ce534aac2 ASoC: Samsung: Set default rclk source rate
Since the rclk_srcrate is cleared upon startup, it should be
initialized upon second and later 'open' calls to the device
with same root-clock source. The bug is otherwise visible in
Codec-Slave mode.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-20 13:45:27 +00:00
Takashi Iwai 67c6dc4df1 Merge branch 'fix/hda' into topic/hda 2010-12-20 10:28:51 +01:00
David Henningsson 022c92befa ALSA: HDA: Add auto-mute for Thinkpad SL410/SL510
BugLink: http://launchpad.net/bugs/580006

SKU turns off auto-mute for these machines, so ignore the SKU.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-20 10:28:29 +01:00
Mark Brown 67c7efad9a Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38 2010-12-17 17:37:28 +00:00
Dimitris Papastamos 24ff33ac69 ASoC: soc-dapm: Introduce the new snd_soc_dapm_virt_mux type
This new type is a virtual version of snd_soc_dapm_mux.  It is used
when a backing register value is not necessary for deciding which
input path to connect.  A simple virtual enumeration control e.g.
SOC_DAPM_ENUM_VIRT() can be exposed to userspace which will be used
to choose which path to connect.

The snd_soc_dapm_virt_mux type ensures that during the initial
path setup, the first (which is also the default) input path will
be connected.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-17 17:36:28 +00:00
Linus Torvalds 74280817e5 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: hda - Fix conflict of Mic Boot controls
  ALSA: HDA: Enable subwoofer on Asus G73Jw
  ALSA: HDA: Fix auto-mute on Lenovo Edge 14
  ASoC: Fix bias power down of non-DAPM codec
  ASoC: WM8580: Fix R8 initial value
  ASoC: fix deemphasis control in wm8904/55/60 codecs
2010-12-17 09:27:30 -08:00
Takashi Iwai 991e02b446 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-12-17 16:43:17 +01:00
Takashi Iwai 5aad6c5f77 Merge branch 'fix/asoc' into for-linus 2010-12-17 15:28:37 +01:00
Takashi Iwai 8cd1fd2526 Merge branch 'fix/hda' into for-linus 2010-12-17 15:28:33 +01:00
Takashi Iwai 53e8c3239b ALSA: hda - Fix conflict of Mic Boot controls
Due to the recent change for multiple mics assignment, we need to handle
the index of each Mic Boost control respectively.  Otherwise the driver
gets the control element conflicts, and gives the unsable state.

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

Reported-and-tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-17 15:23:41 +01:00
Kuninori Morimoto 1ec9bc35a6 ASoC: sh: fsi: Add over/under run counter
Current FSI driver had printed under/over run error
if status register have its error bit.
But runtime print cause the next error
because print out is slow.
This patch add error counter and print error when sound stop

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-17 12:57:14 +00:00
Kuninori Morimoto 9e261bbcba ASoC: sh: fsi: move fsi_irq_enable function to fsi_dai_trigger
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-17 12:56:59 +00:00
Mark Brown 97404f2e03 ASoC: Do DAPM control updates in the middle of DAPM sequences
Attempt to minimise audible effects from mixer and mux updates by
implementing the actual register changes between powering down widgets
that have become unused and powering up widgets that are newly used.

This means that we're making the change with the minimum set of widgets
powered, that the input path is connected when we're powering up widgets
(so things like DC offset correction can run with their signal active)
and that we bring things down to cold before switching away.  Since
hardware tends to be designed for the power on/off case more than for
dynamic reconfiguration this should minimise pops and clicks during
reconfiguration while active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-17 11:18:04 +00:00
Takashi Iwai 30fac30103 ALSA: hda - Clean up dead code in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-16 17:56:00 +01:00
Anisse Astier eeb433876c ALSA: hda - factorize an automute_mic realtek quirk function
Multiple quirk functions were using the exact same code to verify if the Mic
jack was plugged and mute the Mic accordingly

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-16 17:19:42 +01:00
Margarita Olaya Cabrera 1bf84759bd ASoC: twl6040: Add ramp up/down volume for HS and HF
Add ramp functions for the headset and handsfree outputs
in order to reduce the pops during power on/off sequences.

In order to give more control to volume ramp, step size and delay
between steps can be specified.

The patches are based on wm8350 implementation from Liam
Girdwood.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-16 12:02:34 +00:00
Olaya, Margarita 65b7cecc85 ASoC: twl6040: Set default gains to minimun value
Updated default values to improve power consumption.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-15 21:35:57 +00:00
Jarkko Nikula 7be31be880 ASoC: Extend DAPM to handle power changes on cross-device paths
Power change event like stream start/stop or kcontrol change in a
cross-device path originates from one device but codec bias and widget power
changes must be populated to another devices on that path as well.

This patch modifies the dapm_power_widgets so that all the widgets on a
sound card are checked for a power change, not just those that are specific
to originating device. Also bias management is extended to check all the
devices. Only exception in bias management are widgetless codecs whose bias
state is changed only if power change is originating from that context.

DAPM context test is added to dapm_seq_run to take care of if power sequence
extends to an another device which requires separate register writes.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-15 18:01:34 +00:00
Jarkko Nikula 97c866defc ASoC: Move widgets from DAPM context to snd_soc_card
Decoupling widgets from DAPM context is required when extending the ASoC
core to cross-device paths. Even the list of widgets are now kept in
struct snd_soc_card, the widget listing in sysfs and debugs remain sorted
per device.

This patch makes possible to build cross-device paths but does not extend
yet the DAPM to handle codec bias and widget power changes of an another
device.

Cross-device paths are registered by listing the widgets from device A in
a map for device B. In case of conflicting widget names between the devices,
a uniform name prefix is needed to separate them. See commit ead9b91
"ASoC: Add optional name_prefix for kcontrol, widget and route names" for
help.

An example below shows a path that connects MONO out of A into Line In of B:

static const struct snd_soc_dapm_route mapA[] = {
	{"MONO", NULL, "DAC"},
};

static const struct snd_soc_dapm_route mapB[] = {
	{"Line In", NULL, "MONO"},
};

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-15 18:01:01 +00:00
Jarkko Nikula 8ddab3f510 ASoC: Move DAPM paths from DAPM context to snd_soc_card
Decoupling DAPM paths from DAPM context is a first prerequisite when
extending ASoC core to cross-device paths. This patch is almost a nullop and
does not allow to construct cross-device setup but the path clean-up part in
dapm_free_widgets is prepared to remove cross-device paths between a device
being removed and others.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-15 18:00:41 +00:00
David Henningsson ac61240793 ALSA: HDA: Enable subwoofer on Asus G73Jw
Set default association/sequence right on pin 0x17 in order for
the automatic parser to recognize the subwoofer correctly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-15 09:45:36 +01:00
David Henningsson fe67b24010 ALSA: HDA: Fix auto-mute on Lenovo Edge 14
BugLink: http://launchpad.net/bugs/690530

The SKU value of this machine dictates that auto-mute should be
disabled. Since the SKU value is similar to the PCI SSID, the most
likely conclusion is that the SKU value should be ignored.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-15 08:17:30 +01:00
Linus Torvalds f9ae3e125c 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: HDA: Quirk for Dell Vostro 320 to make microphone work
  ALSA: hda - Reset sample sizes and max bitrates when reading ELD
  ALSA: hda - Always allow basic audio irrespective of ELD info
  ALSA: hda - Do not wrongly restrict min_channels based on ELD
  ASoC: Correct WM8962 interrupt mask register read
  ASoC: WM8580: Debug BCLK and sample size
  ASoC: Fix resource leak if soc_register_ac97_dai_link failed
  ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()
  ASoC: Fix swap of left and right channels for WM8993/4 speaker boost gain
  ASoC: Fix off by one error in WM8994 EQ register bank size
  ALSA: hda: Use position_fix=1 for Acer Aspire 5538 to enable capture on internal mic
  ALSA: hda - Enable jack sense for Thinkpad Edge 13
  ALSA: hda - Fix ThinkPad T410[s] docking station line-out
  ALSA: hda: Use model=lg quirk for LG P1 Express to enable playback and capture
2010-12-14 13:32:40 -08:00
Misael Lopez Cruz 53a9ef15df ASoC: twl6040: Use correct offset for LineInAmp Right
Gain for LineInAmp Right uses LINEGAIN[5:3], which means that
offset for right channel should be 4.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:38:43 +00:00
Olaya, Margarita 9020808b4d ASoC: twl6040: Fix TLV dB step values for gains
Some gains were incorrectly configured for dB values.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:37:11 +00:00
Jorge Eduardo Candelaria cbd9cb5de3 ASoC: twl6040: Increase timeout for power up
After coming back from suspend, the timeout waiting for Phoenix
chip to complete its power up sequence is not enough, which leaves
the codec cache value for some registers in an outdated state.

Increase the timeout value to wait for the power up sequence
to correclty complete.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:59 +00:00
Misael Lopez Cruz 4f44ee1f49 ASoC: twl6040: Enable plug detection interrupts
Enable plug detection interrupt mask in order to get headset
PLUGINT/UNPLUGINT interrupts.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:59 +00:00
Jorge Eduardo Candelaria f1f489a6aa ASoC: twl6040: Clear interrupt status at boot time
On Phoenix 1.1, the INTID register default value is an invalid
one, causing the interrupt handler to think the phoenix power on
sequence is ready before it actually finishes.

This causes some i2c errors when trying to configure twl.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:58 +00:00
Olaya, Margarita 99903ea236 ASoC: twl6040: Enable automatic power for phoenix 1.1
Phoenix 1.1 supports automatic power on sequence, a
verification is added to use it with new revision of
the chip.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:47 +00:00
Francois Mazard cb973d78f8 ASoC: twl6040: Fix analog Mic L & R mux controls
The mux control has 4 elements not 3

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:38 +00:00
Olaya, Margarita 60ea4cecdd ASoC: twl6040: Support other sample rates.
The twl6040 can support more sample rates other than 88.2 and 96k.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:38 +00:00
Olaya, Margarita 4e624d0609 ASoC: twl6040: Fix PCM error handling ops
This patch moves all the PCM error handling for clock config
out of trigger() and startup() and into prepare().

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:37 +00:00
Olaya, Margarita 6c311041c1 ASoC: twl6040: Restore bias level at resume
This patch restores the CODEC bias level at resume().

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:37 +00:00
Jorge Eduardo Candelaria 370a0314ff ASoC: twl6040: Add headset and handset mux controls
This patch adds support for the twl6040 headset and handset
MUX controls.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:37 +00:00
Olaya, Margarita cf370a5a0e ASoC: twl6040: Modify the IRQ handler
Multiples interrupts can be received. The irq handler is modified
to attend all of them.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:37 +00:00
Olaya, Margarita 0dec1ec723 ASoC: twl6040: Update twl IO macro
Update the codec to use the new twl core register macros

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:36:37 +00:00
Jorge Eduardo Candelaria 96dc227c90 ASoC: sdp4430: Add Jack support
Use jack framework to enable detection for the headset microphone
and stereo output in the sdp4430.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:31:55 +00:00
Jorge Eduardo Candelaria a2d2362edf ASoC: twl6040: Add jack support for headset and handset
This patch adds support for reporting twl6040 headset and
handset jack events.

The machine driver retrieves and report the status  through
twl6040_hs_jack_detect.

A workq is used to debounce of the irq.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:31:54 +00:00
Peter Ujfalusi dcdeda4a60 ASoC: TWL4030: Fix 24bit support
twl4030 series of codecs supports S32_LE with msbits=24.
Replace the S24_LE with S32_LE format, and add constraint
for 24msbit in case of 32 S32_LE format.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 19:59:50 +00:00
Dimitris Papastamos 465d7fcc91 ASoC: soc-cache: A few minor stylistic changes
Remove redundant parentheses/spaces in the use of the sizeof
operator.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-14 18:15:34 +00:00
Mark Brown 83b6542533 ASoC: Explicitly clear WM8993 ramp controls on power down
This helps ensure that the ramp logic is reset when powering back up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 18:10:39 +00:00
Olaya, Margarita d88429a695 ASoC: dapm: Add output driver widget
In some cases it was not possible to follow the appropiate power
ON/OFF sequence like in cases where the PGA needs to be enabled
before the driver and disabled before the PGA for pop reduction.

Add a widget to support output driver (speaker, haptic, vibra, etc)
drivers where power ON/OFF ordering is important.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-14 11:12:11 +00:00
Joe Perches a8cc0f421b ALSA: ml403-ac97cr: Use vsprintf extension %pR for struct resource
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-14 10:45:15 +01:00
Mark Brown 7d8316df44 ASoC: Fix AC'97 registration unwind
soc_unregister_ac97_dai_link() takes a CODEC as an argument, not a
rtd like the registration function, so give it what it's looking for.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-13 17:35:41 +00:00
Jarkko Nikula 0f0e25282b ASoC: Fix build error caused by merging a fix for 2.6.37 into 2.6.38
Fix "ASoC: Fix bias power down of non-DAPM codec" for 3.6.37 will cause a
build error when merging into ASoC for-2.6.38. Fix the issue by doing a
change that commit ce6120c "ASoC: Decouple DAPM from CODECs" would do.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-13 16:49:22 +00:00
Mark Brown 90986dc98d Merge branch 'for-2.6.37' into for-2.6.38 2010-12-13 16:48:38 +00:00
Jarkko Nikula 862af8adbe ASoC: Fix bias power down of non-DAPM codec
Currently bias of non-DAPM codec will be powered down (standby/off) whenever
there is a stream stop. This is wrong in simultaneous playback/capture since
the bias is put down immediately after stopping the first stream.

Fix this by using the codec->active count when figuring out the needed bias
level after stream stop.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-13 16:47:48 +00:00
Mark Brown 474b9c86b0 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38 2010-12-13 15:53:31 +00:00
Takashi Iwai fdea0571dd ASoC: Fix merge errors with flush_scheduled_work() removal
delayed_work was moved to dapm in the commit
ce6120cca2
    ASoC: Decouple DAPM from CODECs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-13 12:58:59 +01:00
Takashi Iwai fbb5bb5639 ALSA: hda - Mute speakers when line-out jack is plugged with Conexant auto mode
Mute speakers when a line-out jack is plugged as well as headphone jacks
with the new Conexant codec parser in the auto mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-13 12:50:25 +01:00
Mark Brown 49db7e7b99 ASoC: Fix widgets for WM8994/58 AIF2 source control
The compiler really ought to have been warning about unreferenced
variables...

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-13 11:33:14 +00:00
Takashi Iwai 354d14b3f5 Merge branch 'topic/workq-update' into topic/misc 2010-12-13 09:29:52 +01:00
Takashi Iwai 20aeeb356b Merge branch 'topic/workq-update' into topic/asoc
Conflicts:
	sound/soc/codecs/wm8350.c
	sound/soc/codecs/wm8753.c
	sound/soc/sh/fsi.c
	sound/soc/soc-core.c
2010-12-13 09:28:43 +01:00
Tejun Heo 5b84ba26a9 sound: don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.

* cancel[_delayed]_work() + flush_scheduled_work() ->
  cancel[_delayed]_work_sync().

* wm8350, wm8753 and soc-core use custom code to cancel a delayed
  work, execute it immediately if it was pending and wait for its
  completion.  This is equivalent to flush_delayed_work_sync().  Use
  it instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-13 09:22:44 +01:00
Mark Brown 69fff9bbbc ASoC: Automatically manage WM8903 deemphasis rate
Provide the user with a boolean control then automatically select
the deemphasis filter most closely matching the sample rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-11 12:43:52 +00:00
Mark Brown f2c1fe0900 ASoC: Remove open coded symmetry implementation from WM8903
We're already flagged as using symmetric rates so we don't need to
have a custom implementation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-11 12:43:48 +00:00
Mark Brown dcf9ada3bc ASoC: Implement WM8903 oversampling rate controls
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-11 12:43:45 +00:00
Mark Brown 460f4aae8f ASoC: Implement WM8903 high pass filter support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-11 12:43:41 +00:00
Peter Ujfalusi a6cea9655b ASoC: tlv320dac33: Power down digital parts, when not needed
If the following scenario has been followed:
1. Enable analog bypass
amixer sset 'Analog Left Bypass' on
amixer sset 'Analog Right Bypass' on

2. Start playback
aplay -fdat -d3 /dev/zero

After the playback stopped (3 sec), and the soc timeout (5 sec),
the digital parts of the codec will remain powered up.
This means that the DAI clocks are continue to run, the
oscillator remain operational, etc.

Use the SND_SOC_DAPM_POST_PMD widget to get notification
about the stopped stream, and power down the digital
part of the codec.
If the analog bypass is enabled, than the codec will remain in
BIAS_ON level, and things will work correctly.
In case, if the bypass is disabled, than the codec will
fall to BIAS_STANDBY than to BIAS_OFF level, as it used
to.

The digital part of DAC33 is initialized at every stream start
(DAPM_PRE:PRE_PMU event), so subsequent streams (within 5 sec)
will have working DAI.
When the codec is coming out from BIAS_OFF, the full power-up
sequence followed by the same DAPM_PRE widget event will power up
the digital part.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-10 22:50:12 +00:00
Vasily Khoruzhick 1957668be9 ASoC: Add HP iPAQ H1940 support
Add glue driver to make s3c24xx-i2s and uda1380 produce some sound on
H1940.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-10 17:40:15 +00:00
Mark Brown 154b26aa9e ASoC: Implement WM8994/58 DAC and ADC oversampling control
The oversampling rate of the DAC and ADC can be controlled to optimise
for either low power consumption or maximum performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-10 17:39:54 +00:00
Mario Becroft 249c5156b8 ASoC: Optimise WM9081 FLL performance
Tune the FLL gain for optimal performance according to evaluation
results.

Signed-off-by: Mario Becroft <mb@gem.win.co.nz>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-10 17:38:21 +00:00
Axel Lin 5144c534d1 ALSA: aoa: Remove wrong i2c_set_clientdata in onyx_i2c_remove()
It does not make sense to set clientdata to onyx in onyx_i2c_remove()
as we are going to kfree onyx.
What we really want here is i2c_set_clientdata(client, NULL);
Since the i2c core will take care of it now, so this patch just removes it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-10 12:15:05 +01:00
Mark Brown 07a9e2b2fb Merge branch 'for-2.6.37' into for-2.6.38 2010-12-09 11:29:13 +00:00
Alexander Sverdlin fb67afda49 ASoC: EP93xx: sampling rate range extended
Changes to both I2S and PCM code:
- Rates list extended up to 96kHz, it's tested on EDB9302 and works for both capture and
  playback.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-09 11:10:17 +00:00
Seungwhan Youn a096862809 ASoC: WM8580: Fix R8 initial value
Acc to WM8580 manual, the default value for R8 is 0x10, not 0x1c.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-12-09 10:55:56 +00:00
Dmitry Artamonow 3f343f8512 ASoC: fix deemphasis control in wm8904/55/60 codecs
Deemphasis control's .get callback should update control's value instead
of returning it - return value of callback function is used for indicating
error or success of operation.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-12-09 10:55:37 +00:00
Jorge Eduardo Candelaria 23ac3b6133 ASoC: sdp4430: Enable FM stereo pins
Add FM stereo pins to the machine driver and add them as a
dapm widget.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09 09:46:05 +00:00
Peter Ujfalusi 3ee4fe15ab ASoC: tlv320dac33: Fix compillation error
Fix the compilation error introduced by patch:
ASoC: tlv320dac33: Avoid multiple soft power up

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09 09:44:48 +00:00
Peter Ujfalusi 76eac39ce5 ASoC: tlv320dac33: Move DAC LR power on to a supply widget
The power for the DACs need to be enabled, even when only
the analog bypass is in use with the codec, otherwise
the audio is going to be distorted.
Make sure that the DACs are powered all the time, when
there is audio activity.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09 09:31:35 +00:00
Peter Ujfalusi 9e87186fff ASoC: tlv320dac33: Rename outpup amplifier widget
Use better name for the widget, and remove the 'Power'
from it's name.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09 09:31:35 +00:00
Brian Bloniarz 93430096f9 ALSA: ice1712 - working M-Audio Delta 66E support
Rev. E of the M-Audio Delta 66 is partially supported (commit
ef2cd2ccad), but the layout of the GPIO
pins was still unclear. This patch adds the GPIO definitions so that
communication to the CS8247 & 2x AK4524 works correctly.

ALSA bug#3327 has more details; users cap & jhunt report there that the
GPIO wiring is similar to the Digigram VX442 (chip select: pin 4 =
CS8427, pin 5 = AK4524 #0, pin 6 = AK4524 #1).  There has been a lot of
conflicting information in the bug, but given these definitions, my
Delta 66E works; I tested analog in&out at 44.1kHz & 96kHz, analog gain
settings, S/PDIF clock sync, and S/PDIF in&out at 44.1kHz.

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 08:40:01 +01:00
Takashi Iwai d70ab7f7ee Merge branch 'fix/asoc' into for-linus 2010-12-09 08:24:32 +01:00
Takashi Iwai 58936b29c4 Merge branch 'fix/hda' into for-linus 2010-12-09 08:24:25 +01:00
David Henningsson 8a96b1e020 ALSA: HDA: Quirk for Dell Vostro 320 to make microphone work
BugLink: http://launchpad.net/497546

Confirmed that the ideapad model works better than the current
quirk for Dell Vostro 320.

Cc: stable@kernel.org (2.6.35+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 08:23:31 +01:00
Todd Broch 6be7948ff4 ALSA: hda: Add fixup for mario system
create fixup function for the mario model and override amp capabilities
for NID 0x2

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 07:33:36 +01:00
Todd Broch e1eb5f1006 ALSA: hda: Add modelname lookup and fixup for realtek codecs
Facilitate fixup for realtek codecs via modelname lookup of fixup
data.  Fallback to quirk based lookup in absence of model definition.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-09 07:23:01 +01:00
Uk Kim 146fd574ec ASoC: Add ADC high pass filter support to WM8994
Signed-off-by: Uk Kim <w0806.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-08 15:46:49 +00:00
Mark Brown b1e43d933a ASoC: Support WM8994 mono AIF configurations
The WM8994 supports mono signals - enable this in the driver. With DSP
mode an automatic data channel selector is available, activate this
when in mono mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-08 13:56:31 +00:00
Dimitris Papastamos e4f078d8c0 ASoC: soc-core: Fix null pointer dereference
In case the codec driver did not provide a read/write function,
codec->driver->read|write will be NULL.  Ensure that we use the one
specified in codec->read|write to avoid oopsing when we access
the debugfs entries.  This is achieved by using snd_soc_read() and
snd_soc_write().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-08 13:55:17 +00:00
Mark Brown 5a4cfce73b Merge branch 'for-2.6.37' into for-2.6.38
Conflicts:
	sound/soc/soc-core.c

Axel's fix on two different branches.
2010-12-08 13:54:33 +00:00
David Henningsson 116dcde638 ALSA: HDA: Remove unconnected PCM devices for Intel HDMI
Some newer chips have more than one HDMI output, but usually not
all of them are exposed as physical jacks. Removing the unused
PCM devices (as indicated by BIOS in the pin config default) will
reduce user confusion as they currently have to choose between
several HDMI devices, some of them not working anyway.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-08 09:13:43 +01:00
Takashi Iwai d0fa15e098 Merge branch 'fix/hda' into topic/hda 2010-12-08 09:07:38 +01:00
Anssi Hannula 0bbaee3a58 ALSA: hda - Reset sample sizes and max bitrates when reading ELD
When a new HDMI/DP device is plugged in, hdmi_update_short_audio_desc()
is called for every SAD (Short Audio Descriptor) in the ELD data. For
LPCM coding type SAD defines the supported sample sizes. For several
other coding types (such as AC-3), a maximum bitrate is defined.

The maximum bitrate and sample size fields are not always cleared.
Therefore, if a device is unplugged and a different one is plugged in,
and the coding types of some SAD positions differ between the devices,
the old max_bitrate or sample_bits values will persist if the new SADs
do not define those values.

The leftover max_bitrate and sample_bits do not cause any issues other
than wrongly showing up in eld#X.Y procfs file and kernel log.

Fix that by always clearing sample_bits and max_bitrate when reading
SADs.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-08 08:36:20 +01:00
Anssi Hannula 3dc8642903 ALSA: hda - Always allow basic audio irrespective of ELD info
Commit bbbe33900d added functionality to restrict PCM parameters
based on ELD info (derived from EDID data) of the audio sink.

However, according to CEA-861-D no SAD is needed for basic audio
(32/44.1/48kHz stereo 16-bit audio), which is instead indicated with a
basic audio flag in the CEA EDID Extension.

The flag is not present in ELD. However, as all audio capable sinks are
required to support basic audio, we can assume it to be always
available.

Fix allowed audio formats with sinks that have SADs (Short Audio
Descriptors) which do not completely overlap with the basic audio
formats (there are no reports of affected devices so far) by always
assuming that basic audio is supported.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-07 20:13:22 +01:00
Anssi Hannula 4b0dbdb17f ALSA: hda - Do not wrongly restrict min_channels based on ELD
Commit bbbe33900d added functionality to restrict PCM parameters
based on ELD info (derived from EDID data) of the audio sink.

However, it wrongly assumes that the bits 0-2 of the first byte of
CEA Short Audio Descriptors mean a supported number of channels. In
reality, they mean the maximum number of channels (as per CEA-861-D
7.5.2). This means that the channel count can only be used to restrict
max_channels, not min_channels.

Restricting min_channels causes us to deny opening the device in stereo
mode if the sink only has SADs that declare larger numbers of channels
(like Primare SP32 AV Processor does).

Fix that by not restricting min_channels based on ELD information.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Reported-by: Jean-Yves Avenard <jyavenard@gmail.com>
Tested-by: Jean-Yves Avenard <jyavenard@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-07 20:12:58 +01:00
Mark Brown 2a7b1a0020 ASoC: Correct WM8962 interrupt mask register read
Fix mismerge from the out of tree BSP where this support was developed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07 15:49:42 +00:00
Jassi Brar 6b464321d2 ASoC: WM8580: Debug BCLK and sample size
In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32,
rather than WM8580_AIF_LENGTH_24.
Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07 15:49:18 +00:00
Axel Lin 6b3ed78535 ASoC: Fix snd_soc_instantiate_card error path
Properly free the resources in the case of snd_card_register failure
and soc_register_ac97_dai_link failure.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07 15:27:14 +00:00
Axel Lin 681e369247 ASoC: Fix resource leak if soc_register_ac97_dai_link failed
Properly free the resources in the case of soc_register_ac97_dai_link failure.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07 14:51:15 +00:00
Dimitris Papastamos 0b9a214a60 ASoC: soc-core: Remove useless inline function construct
There is no need to mark this function as inline.  Inline functions
usually are small and concise functions that benefit from not needing
to set up a stack frame and undergo a call/ret sequence upon each
invocation.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 19:15:16 +00:00
Dimitris Papastamos 58818a77cd ASoC: soc-core: Replace use of strncpy() with strlcpy()
By using strncpy() if the source string does not have a null byte in the
first n bytes, then the destination string is not null-terminated.
This can be fixed in a two-step process by manually null-terminating the
array after the use of strncpy() or by using strlcpy().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 19:15:03 +00:00
Jarkko Nikula 589c3563f6 ASoC: Merge common code in DAI link and auxiliary codec probing/removal
Commit 2eea392 "ASoC: Add support for optional auxiliary dailess codecs"
added much of code that can be shared with DAI link codec probing/removal.
Merge now this common code into new soc_probe_codec, soc_remove_codec and
soc_post_component_init functions.

Error prints in these functions are converted to use dev_err and to print
the error code.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 19:14:46 +00:00
Jeffrin Jose d0359c6fac sound: Fixed line limit issue in sound/ac97_bus.c
This is a patch to the sound/ac97_bus.c file that fixes up a 80 character
line limit issue found by the checkpatch.pl tool.

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 16:09:49 +01:00
Mark Brown 0afc8c733e Merge branch 'for-2.6.37' into for-2.6.38
Conflicts:
	include/linux/mfd/wm8994/pdata.h
2010-12-06 14:14:47 +00:00
Dimitris Papastamos 0d735eaa2c ASoC: soc-cache: Add optional cache name member to snd_soc_cache_ops
Added an optional name member to snd_soc_cache_ops to enable more
sensible diagnostic messages during cache init, exit and sync.

Remove redundant newline in source code.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 14:13:46 +00:00
Seungwhan Youn 9545cd85a6 ASoC: SAMSUNG: Remove duplicated snd_card on smdk_spdif
This patch remove duplicated snd_card defination on smdk_spdif.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 14:13:45 +00:00
Seungwhan Youn b0d8bef417 ASoC: SAMSUNG: Fix initial return value
This patch fixed intial return value to be a '0' as asuccess on
set_audio_clock_heirachy(). This avoids unintended error on initialize.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 14:13:44 +00:00
Mark Brown 3028eb8c51 ASoC: Add trace events for jack detection
As jack detection can trigger DAPM and the latency in debouncing can create
confusing windows in operation provide some trace events which will hopefully
help in diagnostics. The soc-jack core traces all reports that it gets and
the resulting notifications to upper layers. An event for jack IRQs is also
provided for instrumentation of debounce, and used in the GPIO jack code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-06 14:13:42 +00:00
Clemens Ladisch de66493693 ALSA: oxygen: update hardware comments
Reformat and update the comments that describe the hardware connections
on the various models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:43 +01:00
Clemens Ladisch e2943efa4f ALSA: oxygen: show correct package ID
Instead of the hardcoded "CMI8788", show the actual chip name.

Note: This is neither what the chip is (it's always the same),
      nor what the chip is actually called.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:34 +01:00
Clemens Ladisch 9719fcaa6a ALSA: oxygen: allow to dump codec registers
To help with debugging, add the registers of the model-specific
codecs to the controller and AC97 register dump in the proc file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:15 +01:00
Clemens Ladisch e96f38f732 ALSA: virtuoso: fix front panel routing for D1/DX/ST(X)
The "Front Panel" switch on the Xonar D1/DX actually switches only the
output direction, so mark it appropriately.

The front panel microphone is controlled by the FMIC2MIC bit of the
CM9780.  It was unconditionally enabled on the D1/DX and never set on
the ST(X); add a control for it.  Selecting the front panel microphone
as source does not actually disable the microphone jack, but this is
bug-compatible with the Windows driver, and users rely on it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:48:08 +01:00
Clemens Ladisch 2509ec623d ALSA: virtuoso: add HDMI enable switch for HDAV1.3
The GPIO bit that enables analog output on the Xonar HDAV1.3 also
disables the HDMI audio output, so we better add a switch for it.
Hopefully, this is sufficient to make the HDMI output work.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:58 +01:00
Clemens Ladisch f7e4bad74e ALSA: virtuoso: initialize unknown GPIO bits
Initialize the configuration of some unknown GPIO output bits (that
might not be used at all) to be the same as in the Windows driver, just
to be sure.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 14:47:50 +01:00
Axel Lin 1dcb4f38e5 ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()
As the comments of snd_soc_instantiate_cards() said,
snd_soc_instantiate_cards() must be called with client_mutex.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06 12:53:43 +00:00
Uk Kim ed8cc471d7 ASoC: Fix swap of left and right channels for WM8993/4 speaker boost gain
SPKOUTL_BOOST start from third bit, SPKOUTLR_BOOST start from 0 bit.

Signed-off-by: Uk Kim <w0806.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-12-06 12:43:13 +00:00
Mark Brown 1badabd980 ASoC: Add post-CODEC bias level callback for machine driver
Currently the machine driver can only do bias level configuration before
the CODEC bias level is brought up. This means that the machine cannot do
any configuration which depends on the CODEC bias level being maintained.
Provide a post-CODEC callback which allows the machine driver to do things
like enable the FLL on a CODEC which is brought down to BIAS_OFF when idle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-06 12:41:30 +00:00
Daniel T Chen dd5a089edf ALSA: hda: Use position_fix=1 for Acer Aspire 5538 to enable capture on internal mic
BugLink: https://launchpad.net/bugs/685161

The reporter of the bug states that he must use position_fix=1 to enable
capture for the internal microphone, so set it for his machine's PCI
SSID.  Verified using 2.6.35 and the 2010-12-04 alsa-driver build.

Reported-and-tested-by: Ralph Wabel <rwabel@gmx.net>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-06 10:34:09 +01:00
Anssi Hannula 36e9c135e2 ALSA: hda - use generic hdmi parser for ATI R6xx codec
Switch to the generic hdmi parser for codec id 1002:aa01 (ATI R6xx
HDMI), as the codec appears to work fine with it.

Note that the codec is still limited to stereo output only, despite it
reportedly being multichannel capable. Some as of yet unknown quirks
will be needed to get that working.

Testing was done on 2.6.36 by John Ettedgui.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: John Ettedgui <john.ettedgui@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-05 11:52:22 +01:00
Manoj Iyer ef61d4e6d8 ALSA: hda - Enable jack sense for Thinkpad Edge 13
Added a quirk to cxt5066_cfg_tbl to enable jack sense for ThinkPad Edge 13.

Reference: http://launchpad.net/bugs/685015

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-04 08:58:36 +01:00
Mark Brown 28216bf48b Merge branch 'for-2.6.37' into for-2.6.38 2010-12-03 17:28:29 +00:00
Linus Torvalds 9cd6315357 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:
  ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency
  ALSA: hda: Use "alienware" model quirk for another SSID
  ASoC: WM8731: Fix incorrect mask for bypass path disable
  s6105-ipcam: fix compilation
  s6000-pcm: fix compilation
  s6000-i2s: fix compilation
  ASoC: Fix missing spin_unlock_irqrestore
  ALSA: Fix SNDCTL_DSP_RESET ioctl for OSS emulation
  ASoC: Add missing dev_set_drvdata in p1022_ds_probe
  ASoC: Add missing dev_set_drvdata in mpc8610_hpcd_probe
  ASoC: Remove unneeded !! operations while checking return value of nuc900_checkready
  ASoC: Fix compile error for nuc900-pcm.c
  ASoC: Fix prototype for nuc900_ac97_probe and nuc900_ac97_remove
  ASoC: Fix compile error for nuc900-ac97.c
  ALSA: hda: Use BIOS auto-parsing instead of existing model quirk for MEDION MD2
2010-12-03 09:20:41 -08:00
Mark Brown 4514e8997f ASoC: When disabling WM8994 FLL force a source selection
When we disable the WM8994 FLL code path sharing means that we end up
writing out a configuration. Currently this is the currently active
input and output frequency (which causes snd_soc_update_bits() to
suppress actual writes both immediately and in the common case where
we reenable the same configuration later) but we allow machine drivers
to pass through a source of zero. Since the register values written
are one less than the source constants this causes corruption of other
bitfields in the register.

Fix this by using the most recently configured FLL source when none is
provided.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-12-03 16:45:12 +00:00
Jassi Brar 062869382b ASoC: WM8580: Debug interface index
We want the index of DAI's driver here.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 16:39:10 +00:00
Mark Brown 001ae4c035 ASoC: Constify struct snd_soc_codec_driver
Allow the CODEC driver structure to be marked const by making all
the APIs that use it do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03 16:37:55 +00:00
Dimitris Papastamos fdf0f54dab ASoC: soc-core: Allow machine drivers to override compress_type
This patch allows machine drivers to override the compression type
provided by the codec driver.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 16:37:32 +00:00
Dimitris Papastamos 3335ddca93 ASoC: soc-cache: Use reg_def_copy instead of reg_cache_default
Make sure to use codec->reg_def_copy instead of codec_drv->reg_cache_default
wherever necessary.  This change is necessary because in the next patch we
move the cache initialization code outside snd_soc_register_codec() and by that
time any data marked as __devinitconst such as the original reg_cache_default
array might have already been freed by the kernel.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 16:37:06 +00:00
Dimitris Papastamos ff819b8357 ASoC: soc-core: Generalize snd_soc_prefix_map and rename to snd_soc_codec_conf
The snd_soc_codec_conf struct now holds codec specific configuration
information.

A new configuration option has been added to allow machine drivers to
override the compression type set by the codec driver.

In the absence of providing an snd_soc_codec_conf struct or when providing
one but not setting the compress_type member to anything, the one supplied
by the codec driver will be used instead.  In all other cases the one
set in the snd_soc_codec_conf struct takes effect.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 16:36:45 +00:00
Dimitris Papastamos 23bbce34f4 ASoC: Add compress_type as a member to snd_soc_codec
We need to keep a copy of the compress_type supplied by the codec driver
so that we can override it if necessary with whatever the machine driver
has provided us with.  The reason for not modifying the codec->driver
struct directly is that ideally we'd like to keep it const.

Adjust the code in soc-cache and soc-core to make use of the compress_type
member in the snd_soc_codec struct.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 16:36:03 +00:00
Takashi Iwai 1db7ccdb2e ALSA: hda - Fix beep-tone on IDT 92HD87/88 codecs
It sounds like a non-linear beep tone on my test machines...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 15:42:28 +01:00
Takashi Iwai 1e1675e9c1 ALSA: hda - Enable beep for IDT92HD87 / 88 codecs
These codecs have the digital beep widget in NID 0x21.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 14:58:37 +01:00
Jarkko Nikula 676ad98a06 ASoC: Don't oops in soc_probe_aux_dev in case of missing codec
Blind copy of codec finding algorithm from soc_bind_dai_link does not work
in soc_probe_aux_dev if matching codec name is not found. In that case the
code falls through and tries to start the probing procedure with invalid
codec pointer.

Fix this and add an error print showing the codec name that cannot be found.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:26:42 +00:00
Axel Lin 4bd3a1f415 ASoC: Fix inconsistent meaning of default case while checking alc5623->id
In alc5623_i2c_probe(),
the default case for checking alc5623->id behaves the same as case 0x23.
However, In alc5623_probe() the default case for checking alc5623->id
becomes to be the same as case 0x21.
This makes the meaning of default case inconsistent.

Since we have checked codec id in alc5623_i2c_probe() by comparing
vid2 with id->driver_data, it is not possible to run into the default case now.

In case we may add more supported devices to alc5623_i2c_table in the future,
this patch changes the default case return -EINVAL to let people know that
they should not run into this case. They should also add a new case accordingly
for the new id.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:25:24 +00:00
Kuninori Morimoto 43fa95caab ASoC: sh: fsi: remove runtime register check from fsi_master_xxx
Current FSI driver was checking register range on fsi_master_xxx function.
This runtime check was added to avoid an illegal access
from wrong/mistake implementation.
But it is useless check under the correct implementation.
This patch escape runtime check by using macro technique.
If there is wrong implementation, it will be compile error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:24:15 +00:00
Kuninori Morimoto e8c8b6318c ASoC: sh: fsi: remove runtime register check from fsi_reg_xxx
Current FSI driver was checking register range on fsi_reg_xxx function.
This runtime check was added to avoid an illegal access
from wrong/mistake implementation.
But it is useless check under the correct implementation.
This patch escape runtime check by using macro technique.
If there is wrong implementation, it will be compile error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:24:02 +00:00
Kuninori Morimoto 2b0e73025f ASoC: sh: fsi: change fsi->mst_ctrl to master->a/b_mclk
There was a strange part where fsi->xxx had been used
for fsi_master_xxx function instead of master->xxx in current FSI.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:23:34 +00:00
Kuninori Morimoto 48d78e5879 ASoC: sh: fsi: remove fsi_master_write
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:23:24 +00:00
Kuninori Morimoto f7d711e3bb ASoC: sh: fsi: clean up SPDIF defines
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03 12:23:14 +00:00
Mark Brown c3acec2671 ASoC: Move active copy of CODEC read and write into runtime structure
We shouldn't be assigning to the driver structure (which really ought
to be const, further patch to follow) though there's unlikely to be any
actual problem except in the unlikely case that two devices with the
same driver but different bus types appear in the same system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03 12:18:17 +00:00
Mark Brown a00f90f930 ASoC: Apostrophe patrol in soc-core.c
Silly little grammar nit but it bugs the hell out of me.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03 11:47:21 +00:00
Takashi Iwai a3de8ab885 ALSA: hda - Clean up cxt5066 port-D handling & co
Instead of hard-coded magic numbers, properly define and use macros
for improve the readability.  Also, dell_automute is handled samely
as thinkpad, since it also sets port_d_mode, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 12:32:02 +01:00
Takashi Iwai 4c98ec1170 Merge branch 'fix/hda' into topic/hda 2010-12-03 12:27:47 +01:00
John Baboval 3a253445e3 ALSA: hda - Fix ThinkPad T410[s] docking station line-out
On the docking station for the Lenovo T410 and T410s, the line-out 
doesn't work. The trouble seems to be that it generates a plug event, 
but then doesn't report that the jack is connected. So automute mutes 
the jack when you plug something into it. The following patch (next 
message) fixes it.

Signed-off-by: John Baboval <john.baboval at virtualcomputer.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 12:27:11 +01:00
Daniel T Chen 77c4d5cdb8 ALSA: hda: Use model=lg quirk for LG P1 Express to enable playback and capture
BugLink: https://launchpad.net/bugs/595482

The original reporter states that audible playback from the internal
speaker is inaudible despite the hardware being properly detected.  To
work around this symptom, he uses the model=lg quirk to properly enable
both playback, capture, and jack sense.  Another user corroborates this
workaround on separate hardware.  Add this PCI SSID to the quirk table
to enable it for further LG P1 Expresses.

Reported-and-tested-by: Philip Peitsch <philip.peitsch@gmail.com>
Tested-by: nikhov
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-03 11:28:01 +01:00
Takashi Iwai 2ff38c9fba Merge branch 'fix/asoc' into for-linus 2010-12-02 17:33:53 +01:00
Takashi Iwai af745bd724 Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc 2010-12-02 17:31:18 +01:00
Takashi Iwai c949e3d685 Merge branch 'fix/hda' into for-linus 2010-12-02 17:14:50 +01:00
Mark Brown 8bc3c2c207 ASoC: Tune performance of WM8958 revision A
Update some of the default configuration for the device to improve
the performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 13:03:53 +00:00
Mark Brown dd31b310b9 ASoC: Automatically manage WM8731 deemphasis
The deemphasis filter should be selected based on sample rate for
optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 12:00:20 +00:00
Mark Brown 59f7297014 ASoC: Split WM8731 enumeration array into individual enums
This is much more maintainable than the array.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 12:00:12 +00:00
Mark Brown d921184e82 ASoC: Provide WM8731 microphone boost TLV information
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 11:59:59 +00:00
Axel Lin fbe609e41b ASoC: Remove unused aic3x_i2c_init and aic3x_i2c_exit functions
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 11:50:07 +00:00
Peter Ujfalusi 39646871a4 ASoC: tpa6130a2: Replace DAPM code with direct interface
The use of DAPM widgets, and extra routing can cause ordering
problems in the system.
Machine drivers should use the exported direct interface with
SND_SOC_DAPM_HP's event callback to manage the state of the
amplifier.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 11:50:07 +00:00
Jarkko Nikula 0ffd22b694 ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency
Not all omap boards use kernel based pin multiplexing so
CONFIG_SND_OMAP_SOC_N810 should not select it by default as it can make
harm to other boards in multi-board kernels.

Therefore put CONFIG_OMAP_MUX as a dependency to N810 ASoC machine driver.

Thanks to Tony Lindgren <tony@atomide.com> for noticing.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 11:42:30 +00:00
Daniel T Chen 0defe09ca7 ALSA: hda: Use "alienware" model quirk for another SSID
BugLink: https://launchpad.net/bugs/683695

The original reporter states that headphone jacks do not appear to
work.  Upon inspecting his codec dump, and upon further testing, it is
confirmed that the "alienware" model quirk is correct.

Reported-and-tested-by: Cody Thierauf
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-02 08:06:00 +01:00
Axel Lin cca67a3668 ASoC: ak4535: Improve readability for setting mute
The mute/unmute is controled by SMUTE (Soft Mute Control bit):
        0: Normal Operation (Default)
        1: DAC outputs soft-muted

I think this change improves readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01 11:50:09 +00:00
Kuninori Morimoto 806bfedfb1 ASoC: sh: fsi-ak4642: midify card name
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01 11:49:58 +00:00
Kuninori Morimoto 437f6a2b25 ASoC: sh: fsi-ak4642: tidyup unnecessary variables
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01 11:49:46 +00:00
Mark Brown 131d81061e ASoC: Allow user-specified WM8958 multiband compressor configurations
The paramters of the WM8958 multiband compressor can be tuned by the
user for their system using a graphical configuration tool on the host.
Allow the user to specify a set of such paramters in platform data and
select between them at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-01 11:47:29 +00:00
Mark Brown b2822a8c22 ASoC: Correct event flags for WM8958 AIF DACs
We need a post notification as we need to shut down the MBC after the
data stops flowing rather than before.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-01 11:46:10 +00:00
Mark Brown 97884b7a78 Merge branch 'for-2.6.37' into for-2.6.38 2010-12-01 11:34:27 +00:00
Jarkko Nikula 06c6f4d34a ASoC: Fix build failure in soc-core.c
Commit 2eea392 "ASoC: Add support for optional auxiliary dailess codecs"
causes a build failure in soc-core.c: soc_probe_aux_dev since code tries to
access non-existing struct snd_soc_dapm_context and struct snd_soc_card
members.

Root cause for this was a double accident. Author sent the RFC patch from
top of another patch set and the RFC got committed. Fix the build failure
by removing the code line that depends on that another patch set.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01 11:33:58 +00:00
Dimitris Papastamos 2062ea522b ASoC: WM8731: Fix incorrect mask for bypass path disable
According to the datasheet the bypass path enable/disable is
bit 3 therefore we need 0x8 and not 0x4.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01 11:26:40 +00:00
Sebastian Andrzej Siewior 8348c259dd arm/pxa2xx: reorgazine SSP and SPI header files
The PXA-SPI driver relies on some files / defines which are arm specific
and are within the ARM tree. The CE4100 SoC which is x86 has also the
SPI core.
This patch moves the ssp and spi files from arm/mach-pxa and plat-pxa to
include/linux where the CE4100 can access them.

This move got verified by building the following defconfigs:
   cm_x2xx_defconfig corgi_defconfig em_x270_defconfig ezx_defconfig
   imote2_defconfig pxa3xx_defconfig spitz_defconfig zeus_defconfig
   raumfeld_defconfig magician_defconfig

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
2010-12-01 12:18:33 +01:00
Florian Faber 28b26e1553 ALSA: hdsp - Add support for RPM io box
Add support for the RME HDSP RPM IO box. Changes have been made in the identification of the IO box and the neccessary controls have been added.

Signed-off-by: Florian Faber <faberman@linuxproaudio.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-12-01 12:14:47 +01:00
Peter Ujfalusi 1bb5ec6a6a ASoC: tpa6130a2: Add stereo DAPM path
New DAPM widgets, and paths to enable both channels at the
same time (for stereo output).
With this path the switch time difference can be avoided
between left and right channels.
The original DAPM paths can be still used, if only one of
TPA's output has been connected to a speaker, but for most of
the cases, switching to the stereo path is better.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:39:39 +00:00
Peter Ujfalusi 8cc14e13d1 ASoC: tpa6130a2: Use one event handler for PGA_E
Reduce the amount of duplicated code by using single
event handler for PGA_E to enable the needed channel.
Use the w->shift to pass the channel information to
the handler function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:39:39 +00:00
Peter Ujfalusi d534bacd91 ASoC: tpa6130a2: Defer SW enable from power enable
Do not enable the amplifier right after the power has been
restored to the amplifier.
The DAPM_SUPPLY widget turns on the amp early in the DAPM
power walk, and the unmuting of channel happens quite late.
Keeping the amp in SW reset state ensures better muting.
In this way the pop noise coming from other components (codec)
can be filtered out.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:39:39 +00:00
Peter Ujfalusi d5876ce124 ASoC: tpa6130a2: Simplify power state management
Use simpler way to avoid setting the same power state
for the amplifier.
Simplifies the check introduced by patch:
ASoC: tpa6130a2: Fix unbalanced regulator disables

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:39:39 +00:00
Peter Ujfalusi 3e202345ab ASoC: tlv320dac33: Avoid multiple soft power up
During playback start the codec has been already powered at
BIAS_ON event time, so there's no need to enable the codec again.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:37:39 +00:00
Peter Ujfalusi 18f454047b ASoC: tlv320dac33: Do not enable the codec in init_chip
No need to enable the codec at this time.
The codec will be enabled  later by other events

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-30 15:37:39 +00:00
Jarkko Nikula 2eea392d0a ASoC: Add support for optional auxiliary dailess codecs
This makes possible to register auxiliary dailess codecs in a machine
driver. Term dailess is used here for amplifiers and codecs without DAI or
DAI being unused.

Dailess auxiliary codecs are kept in struct snd_soc_aux_dev and those codecs
are probed after initializing the DAI links. There are no major differences
between DAI link codecs and dailess codecs in ASoC core point of view. DAPM
handles them equally and sysfs and debugfs directories for dailess codecs
are similar except the pmdown_time node is not created.

Only suspend and resume functions are modified to traverse all probed codecs
instead of DAI link codecs.

Example below shows a dailess codec registration.

struct snd_soc_aux_dev foo_aux_dev[] = {
	{
		.name = "Amp",
		.codec_name = "codec.2",
		.init = foo_init2,
	},
};

static struct snd_soc_card card = {
	...
	.aux_dev = foo_aux_dev,
	.num_aux_devs = ARRAY_SIZE(foo_aux_dev),
};

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 14:39:00 +00:00
Dimitris Papastamos 09c74a9d0b ASoC: soc-cache: Fix memory overflow in LZO initialization
The bitmap_zero() nbits argument was improperly set to reg_size
but the underlying buffer was bmp_size long.  This caused the memset
to zero past the end of the allocated buffer and into the kernel heap
causing strange kernel crashes sometimes by overwriting critical
kernel structures.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 12:51:51 +00:00
Mark Brown dfa7c70b04 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-30 11:35:43 +00:00
Axel Lin 551102762e ASoC: Simplify pm860x_probe error handling
Simplify pm860x_probe error handling and return actual error code we got.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:35:07 +00:00
Kuninori Morimoto c8d6bf9a7b ASoC: sh: fsi-ak4642: Add FSI port and ak464x selection
Current FSI-Ak4642 device had niche settings which were
FSI2-A-AK4643 and FSI-A-AK4642.
This patch add platform_device_id which can control
FSI/FSI2, PortA/PortB, AK4642/AK4643 from platform data.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:34:44 +00:00
Daniel Glöckner b76fb39d49 s6105-ipcam: fix compilation
When the s6105-ipcam ASoC driver had been converted to the
multi-component API, a single reference to a former structure
element remained, blocking successful compilation.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:26:15 +00:00
Daniel Glöckner 9e4ea718d3 s6000-pcm: fix compilation
s6000_soc_platform has lost its forward declaration and there no
longer is a name element in it, so use a string constant when
calling request_irq.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:26:05 +00:00
Daniel Glöckner b1d36b1c35 s6000-i2s: fix compilation
A semicolon was missing.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:25:53 +00:00
Axel Lin 3f1af9d26f ASoC: Fix missing spin_unlock_irqrestore
In nuc900_dma_hw_params(), if snd_pcm_lib_malloc_pages failed
it returns without calling spin_unlock_irqrestore().

Since snd_pcm_lib_malloc_pages() does not touch struct nuc900_audio,
we don't need to hold the lock while calling snd_pcm_lib_malloc_pages().
Fix it by moving spin_lock_irqsave() down to after snd_pcm_lib_malloc_pages().

In nuc900_dma_prepare(), spin_unlock_irqrestore() is missing in the error path.
Fix it by removing the return in default case.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:09:24 +00:00
Takashi Iwai 60686aa008 ALSA: Fix SNDCTL_DSP_RESET ioctl for OSS emulation
In OSS emulation, SNDCTL_DSP_RESET ioctl needs the reset of the internal
buffer state in addition to drop of the running streams.  Otherwise the
succeeding access becomes inconsistent.

Tested-by: Amit Nagal <helloin.amit@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-30 08:18:58 +01:00
Mark Brown 649e5fb033 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-29 18:33:47 +00:00
Axel Lin 39a545559f ASoC: Add missing dev_set_drvdata in p1022_ds_probe
Otherwise, calling dev_get_drvdata in p1022_ds_remove returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin 67bd489aa3 ASoC: Add missing dev_set_drvdata in mpc8610_hpcd_probe
Otherwise, calling dev_get_drvdata in mpc8610_hpcd_remove returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin 3f90e5028a ASoC: Remove unneeded !! operations while checking return value of nuc900_checkready
I think this unneededd !! operations just reduce the readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin a7a9820bae ASoC: Fix compile error for nuc900-pcm.c
This patch fixes below error:

  CC      sound/soc/nuc900/nuc900-pcm.o
sound/soc/nuc900/nuc900-pcm.c: In function 'nuc900_dma_open':
sound/soc/nuc900/nuc900-pcm.c:267: error: 'nuc900_ac97_data' undeclared (first use in this function)
sound/soc/nuc900/nuc900-pcm.c:267: error: (Each undeclared identifier is reported only once
sound/soc/nuc900/nuc900-pcm.c:267: error: for each function it appears in.)
sound/soc/nuc900/nuc900-pcm.c: At top level:
sound/soc/nuc900/nuc900-pcm.c:337: error: expected ',' or ';' before 'static'
sound/soc/nuc900/nuc900-pcm.c:354: error: 'nuc900_soc_platform_probe' undeclared here (not in a function)
make[3]: *** [sound/soc/nuc900/nuc900-pcm.o] Error 1
make[2]: *** [sound/soc/nuc900] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin e3edefbd4a ASoC: Fix prototype for nuc900_ac97_probe and nuc900_ac97_remove
This patch fixes below compile warning:

  CC      sound/soc/nuc900/nuc900-ac97.o
sound/soc/nuc900/nuc900-ac97.c:300: warning: initialization from incompatible pointer type
sound/soc/nuc900/nuc900-ac97.c:301: warning: initialization from incompatible pointer type

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin 5a8f1d4701 ASoC: Fix compile error for nuc900-ac97.c
Fix below compile error by add a missing ';'.

  CC      sound/soc/nuc900/nuc900-ac97.o
sound/soc/nuc900/nuc900-ac97.c:300: warning: initialization from incompatible pointer type
sound/soc/nuc900/nuc900-ac97.c:301: warning: initialization from incompatible pointer type
sound/soc/nuc900/nuc900-ac97.c:318: error: expected ',' or ';' before 'static'
sound/soc/nuc900/nuc900-ac97.c:405: error: 'nuc900_ac97_drvprobe' undeclared here (not in a function)
make[3]: *** [sound/soc/nuc900/nuc900-ac97.o] Error 1
make[2]: *** [sound/soc/nuc900] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:52 +00:00
Dimitris Papastamos df0701bb86 ASoC: soc-cache: Ensure consistent cache naming
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 12:43:52 +00:00
Dimitris Papastamos 7a33d4ce82 ASoC: soc-cache: Add error checking in the *_cache_sync functions
Ensure that we report any errors encountered during reads/writes
in the cache syncing functions.

Remove redundant newline in the source code.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 12:43:49 +00:00
Axel Lin d482337eab ASoC: Fix resource leak in smdk_spdif.c
Properly free allocated resources in smdk_init() error path.
Add missing platform_device_unregister() in smdk_exit().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 11:01:06 +00:00
Axel Lin 3790f20546 ASoC: Add missing gpio_free(S3C64XX_GPK(12)) in smartq_exit()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 11:01:02 +00:00
Axel Lin b6a11f4973 ASoC: Fix resource leak in neo1973_gta02_init() error path
Properly free allocated resources in neo1973_gta02_init() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 11:00:55 +00:00
Axel Lin 853dc30274 ASoC: Fix resource leak in goni_wm8994.c
Properly free allocated resources in goni_init() error path.
Add missing snd_soc_unregister_dai() in goni_exit().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 10:59:03 +00:00
Takashi Iwai dc42717075 ALSA: hda - Remove dead md2 quirk code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-29 08:12:43 +01:00
Takashi Iwai ca19e77e44 Merge branch 'fix/hda' into topic/hda 2010-11-29 07:44:01 +01:00
Daniel T Chen ac70eb1305 ALSA: hda: Use BIOS auto-parsing instead of existing model quirk for MEDION MD2
BugLink: https://launchpad.net/bugs/682199

A 2.6.35 (Ubuntu Maverick) user, burningphantom1, reported a regression
in audio: playback was inaudible through both speakers and headphones.
In commit 272a527c04 of sound-2.6.git, a new model was added with this
machine's PCI SSID.  Fortunately, it is now sufficient to use the auto
model for BIOS auto-parsing instead of the existing quirk.

Playback, capture, and jack sense were verified working for both
2.6.35 and the alsa-driver snapshot from 2010-11-27 when model=auto is
used.

Reported-and-tested-by: burningphantom1
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-29 07:41:09 +01:00
Linus Torvalds 0f639a3c5c 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: (30 commits)
  ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
  ASoC: Fix resource reclaim for osk5912
  ASoC: tlv320aic3x - fix variable may be used uninitialized warning
  ASoC: davinci-vcif - fix a memory leak
  ASoC: phycore-ac97: fix resource leak
  ASoC: imx-ssi: fix resource leak
  ASoC: simone: fix resource leak in simone_init error path
  ASoC: sam9g20_wm8731: fix resource leak in at91sam9g20ek_init error path
  ASoC: snd-soc-afeb9260: remove unneeded platform_device_del in error path
  ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
  ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
  ASoC: Call snd_soc_unregister_dais instead of snd_soc_unregister_dai in sh4_soc_dai_remove
  ASoC: fix SND_PXA2XX_LIB Kconfig warning
  ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers
  ALSA: HDA: Add an extra DAC for Realtek ALC887-VD
  ASoC: nuc900-ac97: fix a memory leak
  ASoC: Return proper error for omap3pandora_soc_init
  ASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <= 16500000
  ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode
  ALSA: hda - Fix Acer 7730G support
  ...
2010-11-27 12:42:15 -08:00
Mark Brown 39fb51a123 ASoC: Implement runtime PM for WM8994/58
This allows us to communicate our power management state back to the
parent device, allowing it to do a full power down when the device is
idle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:14 +00:00
Mark Brown 2e19b0c8c2 ASoC: Enable rbtree compression for WM8994/58 register cache
The WM8994 and WM8958 register map is relatively sparse so benefits
from compression. The rbtree compression gives better results than
LZO for both memory and CPU consumption on a map as sparse as this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:14 +00:00
Mark Brown ca9aef5072 ASoC: Convert WM8994 to use soc-cache.c cache functions
In the process we convert the driver to read registers one at a time
when initialising the cache. This has the effect of working around
limitations in the sizes of I2C transactions which can be done by some
CPUs. Due to the sparseness of the register map the overhead from this
should be minimual unless I2C transactions are very expensive to start.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:14 +00:00
Mark Brown 821edd2fb5 ASoC: Add WM8958 microphone detection support
The WM8958 contains an advanced accessory detection feature which allows
detection of up to seven different impedence levels on the microphone
bias output, including detection of video outputs. Since some of the
more involved accessory interfaces may involve noticable interactions
with external components a simple detection scheme is provided by
default with the option to provide custom handling of accessory detect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:13 +00:00
Mark Brown d6addcc9d8 ASoC: Add WM8958 Multi-band compressor support
The WM8958 features a multi-band compressor which can be enabled on
any of the AIF inputs. The MBC allows different gains to be applied to
differnt audio bands, providing an improvement in perceived loudness
of the signal by avoiding overdriving the output transducers. This
patch enables support for the MBC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:13 +00:00
Mark Brown c4431df050 ASoC: Implement support for enhanced AIF3 on WM8958
Additional audio routing options are available on the WM8958 audio
interface 3. Add support for these.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:13 +00:00
Mark Brown 3a42315740 ASoC: Initial WM8958 audio configuration
The WM8958 is a WM8994 derivative. This patch merely ensures that some
revision specific configuration for WM8994 is not enabled on WM8994,
additional patches will add support for the new features introduced on
the WM8958.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:13 +00:00
Mark Brown 11cef5f07b ASoC: Use DC servo startup mode when not doing DCS correction
Devices which do not have a DCS correction applied can use the explicit
DC servo startup mode for optimal startup performance. This most
immediately affects the WM8958.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-27 10:32:13 +00:00
Takashi Iwai 37fa84d8e6 Merge branch 'fix/asoc' into for-linus 2010-11-26 17:17:42 +01:00
Takashi Iwai 5a8cfb4e8a ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
When SKU assid gives no valid bits for 0x38, the driver didn't take
any action, so far.  This resulted in the missing initialization for
external amps, etc, thus the silent output in the end.

Especially users hit this problem on ALC888 newly since 2.6.35,
where the driver doesn't force to use ALC_INIT_DEFAULT any more.

This patch sets the default initialization scheme to use
ALC_INIT_DEFAULT when no valid bits are set for SKU assid.

Reference:
	https://bugzilla.redhat.com/show_bug.cgi?id=657388

Reported-and-tested-by: Kyle McMartin <kyle@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-26 17:11:18 +01:00
Mark Brown ccf1fa403e ASoC: Remove redundant hw_write initialisation in WM8737
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-26 15:16:19 +00:00
Mark Brown fdc1f5d060 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-25 21:16:52 +00:00
Axel Lin 25436180ee ASoC: Fix resource reclaim for osk5912
In current implementation, there are resources leak in the error path.
This patch properly reclaims the allocated resources in the error path.

Also adds a missing clk_put in osk_soc_exit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 21:15:49 +00:00
Axel Lin fe99b55994 ASoC: tlv320aic3x - fix variable may be used uninitialized warning
If aic3x_read failed , val is used uninitialized.
Fix it by initializing val to 0.

This patch fixes below compile warning:
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_get_gpio':
sound/soc/codecs/tlv320aic3x.c:1183: warning: 'val' may be used uninitialized in this function
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_headset_detected':
sound/soc/codecs/tlv320aic3x.c:1211: warning: 'val' may be used uninitialized in this function
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_button_pressed':
sound/soc/codecs/tlv320aic3x.c:1219: warning: 'val' may be used uninitialized in this function

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 21:15:35 +00:00
Mark Brown fcd02e261b ASoC: Add WM8737 ALC support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-25 11:18:51 +00:00
Mark Brown 38533698dc ASoC: Make SMDK WM8580 driver unloadable
Supply a module exit function so that the driver can be unloaded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-25 11:17:48 +00:00
Mark Brown 2c54c1586c Merge branch 'for-2.6.37' into for-2.6.38 2010-11-25 11:17:24 +00:00
Axel Lin b26bb71f61 ASoC: smdk_wm9713: fix resource leak in smdk_init error path
Fix the error path to properly free allocated resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:15:00 +00:00
Axel Lin 74bd21e9b3 ASoC: Fix compile error for smartq_wm8987.c
Fix below compile error:

  CC      sound/soc/samsung/smartq_wm8987.o
sound/soc/samsung/smartq_wm8987.c: In function 'smartq_hifi_hw_params':
sound/soc/samsung/smartq_wm8987.c:42: error: 'struct snd_soc_pcm_runtime' has no member named 'dai'
sound/soc/samsung/smartq_wm8987.c:43: error: 'struct snd_soc_pcm_runtime' has no member named 'dai'
sound/soc/samsung/smartq_wm8987.c: In function 'smartq_wm8987_init':
sound/soc/samsung/smartq_wm8987.c:192: warning: passing argument 1 of 'snd_soc_jack_new' from incompatible pointer type
sound/soc/samsung/smartq_wm8987.c: At top level:
sound/soc/samsung/smartq_wm8987.c:216: warning: initialization from incompatible pointer type
make[3]: *** [sound/soc/samsung/smartq_wm8987.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:14:05 +00:00
Axel Lin 8ce28bfcf2 ASoC: neo1973_gta02_wm8753: fix wrong parameter for snd_soc_register_dai and snd_soc_unregister_dai
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:14:05 +00:00
Axel Lin 8b6b30ab66 ASoC: davinci-vcif - fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:12:34 +00:00
Axel Lin 09de953334 ASoC: phycore-ac97: fix resource leak
Fix imx_phycore_init() error path and imx_phycore_exit() to properly free
allocated resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:10:11 +00:00
Axel Lin ac8f924af5 ASoC: imx-ssi: fix resource leak
Fix imx_ssi_probe() error path and imx_ssi_remove() to properly free
allocated resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:09:50 +00:00
Axel Lin 14abca3dfc ASoC: simone: fix resource leak in simone_init error path
Fix the error path to properly free allocated resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:09:30 +00:00
Axel Lin c7a734e58e ASoC: sam9g20_wm8731: fix resource leak in at91sam9g20ek_init error path
Fix the error path to properly free allocated resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:09:19 +00:00
Axel Lin b193deead8 ASoC: snd-soc-afeb9260: remove unneeded platform_device_del in error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:09:04 +00:00
Axel Lin 917dac0ff1 ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:08:25 +00:00
Axel Lin 4e1f865097 ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:08:13 +00:00
Axel Lin 3b6bc354cb ASoC: Call snd_soc_unregister_dais instead of snd_soc_unregister_dai in sh4_soc_dai_remove
We call snd_soc_register_dais() in sh4_soc_dai_probe(),
thus we should call snd_soc_unregister_dais() in sh4_soc_dai_remove().

Otherwise, we got "too many arguments to function 'snd_soc_unregister_dai'"
error message.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:07:28 +00:00
Dmitry Artamonow 846172dfe3 ASoC: fix SND_PXA2XX_LIB Kconfig warning
Fix following warning observed when SND_PXA2XX_SOC is set and SND_ARM isn't:

warning: (SND_PXA2XX_AC97 && SOUND && !M68K && SND && SND_ARM && ARCH_PXA ||
SND_PXA2XX_SOC && SOUND && !M68K && SND && SND_SOC && ARCH_PXA) selects
SND_PXA2XX_LIB which has unmet direct dependencies (SOUND && !M68K && SND &&
SND_ARM)

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:07:10 +00:00
Herton Ronaldo Krzesinski 7167594a3d ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers
The mixer nids passed to alc_auto_create_input_ctls are wrong: 0x15 is
a pin, and 0x09 is the ADC on both ALC660-VD/ALC861-VD. Thus with
current code, input playback volume/switches and input source mixer
controls are not created, and recording doesn't work. Select correct
mixers, 0x0b (input playback mixer) and 0x22 (capture source mixer).

Reference: https://qa.mandriva.com/show_bug.cgi?id=61159

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-25 08:23:07 +01:00
David Henningsson cc1c452e50 ALSA: HDA: Add an extra DAC for Realtek ALC887-VD
The patch enables ALC887-VD to use the DAC at nid 0x26,
which makes it possible to use this DAC for e g Headphone
volume.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-24 15:17:45 +01:00
Mark Brown ab4e57446f Merge branch 'for-2.6.37' into for-2.6.38 2010-11-24 11:57:43 +00:00
Mark Brown 2a9ae13a26 ASoC: Add initial WM8737 driver
The WM8737 is a low power, flexible stereo ADC designed for portable
applications. This driver supports most of the functionality of the
WM8737, though some features such as the ALC are not yet implemented.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-24 11:33:12 +00:00
Axel Lin d6f443ae4c ASoC: nuc900-ac97: fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-24 11:31:18 +00:00
Mark Brown a1c1f770e3 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38 2010-11-24 11:26:39 +00:00
Mark Brown 59e2102028 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.37 2010-11-24 11:22:55 +00:00
Axel Lin 5c12d20145 ASoC: Return proper error for omap3pandora_soc_init
Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-24 11:22:45 +00:00
Axel Lin 2f7dceeda4 ASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <= 16500000
MCLKDIV bit of Register 04h Clocking1:
	0 : Divide by 1
	1 : Divide by 2

Thus in the case of freq <= 16500000, we should clear MCLKDIV bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-11-24 11:22:44 +00:00
Axel Lin 08b1a38465 ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode
DACSLOPE bit of Register 06h ADC and DAC Control 2:
        0: Normal mode
        1: Sloping stop-band mode

Thus in the case of normal mode, we should clear DACSLOPE bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2010-11-24 11:22:43 +00:00
Kuninori Morimoto 22de4e1fe4 ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642
Current AP4 FSI didn't use set_rate for ak4642,
and used dummy rate when init.
And FSI driver was modified to always call set_rate.

The user which are using FSI set_rate is only AP4 now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:31:00 +09:00
Kuninori Morimoto d4bc99b977 ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI
Current AP4 FSI set_rate function used bogus clock process
which didn't care enable/disable and clk->usecound.
To solve this issue, this patch also modify FSI driver to call
set_rate with enough options.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:29:56 +09:00
Denis Kuplyakov d94772070a ALSA: hda - Fix Acer 7730G support
Fixes automatic EAPD configuration on Acer 7730G laptop.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-24 06:04:12 +01:00
Kay Sievers 03cfe6f57d ALSA: support module on-demand loading for seq and timer
If CONFIG_SND_DYNAMIC_MINORS is used, assign /dev/snd/seq and
/dev/snd/timer the usual static minors, and export specific
module aliases to generate udev module on-demand loading
instructions:

  $ cat /lib/modules/2.6.33.4-smp/modules.devname
  # Device nodes to trigger on-demand module loading.
  microcode cpu/microcode c10:184
  fuse fuse c10:229
  ppp_generic ppp c108:0
  tun net/tun c10:200
  uinput uinput c10:223
  dm_mod mapper/control c10:236
  snd_timer snd/timer c116:33
  snd_seq snd/seq c116:1

The last two lines instruct udev to create device nodes, even
when the modules are not loaded at that time.

As soon as userspace accesses any of these nodes, the in-kernel
module-loader will load the module, and the device can be used.

The header file minor calculation needed to be simplified to
make __stringify() (supports only two indirections) in
the MODULE_ALIAS macro work.

This is part of systemd's effort to get rid of unconditional
module load instructions and needless init scripts.

Cc: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-24 05:53:25 +01:00
Linus Torvalds ea49b1669b 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: (41 commits)
  ALSA: hda - Identify more variants for ALC269
  ALSA: hda - Fix wrong ALC269 variant check
  ALSA: hda - Enable jack sense for Thinkpad Edge 11
  ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"
  ALSA: hda - Fixed ALC887-VD initial error
  ALSA: atmel - Fix the return value in error path
  ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
  ALSA: snd-atmel-abdac: test wrong variable
  ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
  ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
  ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
  ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
  ALSA: sound/ppc: Use printf extension %pR for struct resource
  ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
  ASoC: uda134x - set reg_cache_default to uda134x_reg
  ASoC: Add support for MAX98089 CODEC
  ASoC: davinci: fixes for multi-component
  ASoC: Fix register cache setup WM8994 for multi-component
  ASoC: Fix dapm_seq_compare() for multi-component
  ASoC: RX1950: Fix hw_params function
  ...
2010-11-24 08:23:56 +09:00
Mark Brown d50a87402e Merge branch 'for-2.6.37' into for-2.6.38 2010-11-23 14:30:41 +00:00
Axel Lin 24fb2b1174 ASoC: wm8994 - fix memory leaks
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:30:12 +00:00
Axel Lin cd70978cb5 ASoC: wm8904 - fix memory leaks
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:30:00 +00:00
Axel Lin bc5954f00e ASoC: max98088 - fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:29:51 +00:00
Axel Lin 7a479b0284 ASoC: Do not update the cache if write to hardware failed
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:29:11 +00:00
Jesper Juhl 92a5288501 ASoC: MPC5200: Eliminate duplicate include of of_device.h
Eliminate duplicate  #include <linux/of_device.h>  from
sound/soc/fsl/mpc5200_dma.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:28:39 +00:00
Jassi Brar 5033f43c66 ASoC: Samsung: Rename from s3c24xx to samsung
Finally, move the 's3c24xx' directory to 'samsung'

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:13:04 +00:00
Jassi Brar a964f34d8b ASoC: Samsung: Generalize Kconfig symbols
Move prefixes to repesent the nature of Samsung ASoC suitably.
        SND_S3C24XX_SOC -> ASOC_SAMSUNG
        SND_S3C_SOC_PCM -> SND_SAMSUNG_PCM
        SND_S3C_SOC_AC97 -> SND_SAMSUNG_AC97
        SND_S5P_SOC_SPDIF -> SND_SAMSUNG_SPDIF
        SND_S3C24XX_SOC_I2S -> SND_S3C24XX_I2S
        SND_S3C64XX_SOC_SMARTQ -> ASOC_SMARTQ
        SND_SOC_SMDK_SPDIF -> ASOC_SAMSUNG_SMDK_SPDIF
        SND_SOC_SMDK_WM8580 -> ASOC_SAMSUNG_SMDK_WM8580
        SND_SOC_SMDK_WM9713 -> ASOC_SAMSUNG_SMDK_WM9713
        SND_SOC_GONI_AQUILA_WM8994 -> ASOC_GONI_AQUILA_WM8994

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:08:43 +00:00
Jassi Brar b0f39c25a1 ASoC: SMDK_WM8580: Enable for SMDKC100
Enable the ASoC Machine driver to run on SMDKC100 as well.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:08:15 +00:00
Jassi Brar d98ce6cf03 ASoC: SMDK64XX: Rename for other platforms
We plan to use the same ASoC Machine driver for most of
latest SMDK platforms. So rename the 64XX specific driver
to generic named.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:08:00 +00:00
Jassi Brar 03e6a88897 ASoC: S3C64XX: Remove obsoleted I2S drivers
Now that we have better I2S CPU drivers and no need for the old
ones, discard them.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:07:46 +00:00
Jassi Brar 0fff21a86c ASoC: SMDK64XX: Move to use new I2S driver
Modify the smdk64xx_wm8580.c to use new i2s controller driver.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:07:35 +00:00
Jassi Brar fcd8c742b9 ASoC: GONI: Move to use new I2S driver
Modify the goni_wm8994.c to use new i2s controller driver.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:07:24 +00:00
Jassi Brar b9493d6c33 ASoC: SMARTQ: Move to use new I2S driver
Modify the smartq_wm8987.c to use new i2s controller driver.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:07:13 +00:00
Jassi Brar 1c7ac01807 ASoC: Samsung: Add common I2S driver
The I2S controllers since S3C64XX are incremental revisions, with
a new feature added to the last one. The programming i/f doesn't
conflict between these revisions, so it is possible to have one
common driver that could manage various versions of I2S (v3, 4 & 5)

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:06:58 +00:00
Jassi Brar 0068402c58 ASoC: Samsung: Rename s3c64xx I2S device
Since the I2S of S3C64XX and newer SoCs are incremental
versions of each other with changes managable in a single
driver, rename the 's3c64xx-iis' -> 'samsung-i2s'

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:06:47 +00:00
Jassi Brar c3f2028b5b ASoC: Samsung: Generalize DMA driver namespace
Remove S3C,s3c from static defines.
	s3c_dma_ -> dma_
	s3c24xx_runtime_ -> runtime_
	s3c24xx_audio_ -> audio_
	s3c_preallocate_ -> preallocate_
	s3c24xx_soc_platform -> samsung_asoc_platform
	s3c24xx_pcm_driver -> asoc_dma_driver
	snd_s3c24xx_pcm_ -> samsung_asoc_

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:06:38 +00:00
Jassi Brar 158a782843 ASoC: Samsung: Rename PCM driver
Rename Samsung PCM Controller driver
	s3c-pcm.[c/h] -> pcm.[c/h]

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:06:27 +00:00
Jassi Brar 99ce3a3f37 ASoC: Samsung: Rename AC97 driver
Rename Samsung AC97 driver
	s3c-ac97.[c/h] -> ac97.[c/h]

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:05:42 +00:00
Jassi Brar e6104673d2 ASoC: Samsung: Rename AC97 platform device
Call the AC97 controller devices found in S3C, S5P and newer
SoCs as 'samsung-ac97' rather than 's3c-ac97'.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:05:29 +00:00
Jassi Brar 4b640cf309 ASoC: Samsung: Rename ASoC DMA driver
Rename Samsung ASoC DMA driver
	s3c-dma.[c/h] -> dma.[c/h]

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:05:08 +00:00
Jassi Brar 58bb407213 ASoC: Samsung: Rename DMA device
Some Samsung SoCs have a PCM(DSP) controller. So the name
s3c24xx-pcm-audio for DMA driver is not very appropraite.
This patch moves :-
	s3c24xx-pcm-audio -> samsung-audio

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:04:19 +00:00
Jassi Brar 3a56d0ca72 ASoC: Samsung: Remove redundant AQUILA driver
AQUILA and GONI are essentially the same h/w w.r.t ASoC.
They only differ by the fact that GONI has stereo speaker-out
whereas AQUILA has mono.

The difference can easily be handled in the same MACHINE driver
by making machine-specific runtime changes.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:02:11 +00:00
Takashi Iwai 2ab46c9390 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc
Conflicts:
	sound/soc/codecs/tpa6130a2.c
2010-11-23 12:45:05 +01:00
Takashi Iwai 9e8c32cac9 Merge branch 'fix/asoc' into for-linus 2010-11-23 12:41:17 +01:00
Takashi Iwai bf86f07e84 Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc 2010-11-23 12:40:15 +01:00
Kailang Yang 48c88e820f ALSA: hda - Identify more variants for ALC269
Give more correct chip names for ALC269-variant codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 08:56:16 +01:00
Kailang Yang 1657cbd871 ALSA: hda - Fix wrong ALC269 variant check
The refactoring commit d433a67831
    ALSA: hda - Optimize the check of ALC269 codec variants
introduced a wrong check for ALC269-vb type.  This patch corrects it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 08:55:11 +01:00
Manoj Iyer 6027277e77 ALSA: hda - Enable jack sense for Thinkpad Edge 11
Add a quirk entry for Thinkpad Edge 11 as well as other TP Edge models.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 07:43:44 +01:00
Takashi Iwai d090f5976d ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"
This reverts commit f41cc2a85d.

The patch broke the digital mic pin handling wrongly.
Reference: bko#23162
	https://bugzilla.kernel.org/show_bug.cgi?id=23162

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-23 07:39:58 +01:00
Mark Brown cbe80def41 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-22 20:33:12 +00:00
Axel Lin c7b642911e ASoC: Fix a memory leak in alc5623_i2c_probe error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 20:31:14 +00:00
Mark Brown eba19fdd81 ASoC: Restore WM8994 volatile and readable register operations
They went AWOL during the multi-component merge.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-22 20:30:04 +00:00
Mark Brown f71a4734b1 ASoC: Fix multi-component mismerge in WM8523
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-22 20:27:49 +00:00
Vasiliy Kulikov b3915d1fb6 ASoC: atmel: test wrong variable
After clk_get() mclk is checked second time instead of pllb check.
In patch v1 Jarkko Nikula noticed that PTR_ERR() is also has wrong argument.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 20:26:44 +00:00
Jarkko Nikula 0d911baebf ASoC: Do not include soc-dai.h
There is no need to include soc-dai.h since soc.h includes it. Convert
drivers to include only soc.h.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:04:53 +00:00
Jarkko Nikula 505fb824e7 ASoC: Do not include soc-dapm.h
There is no need to include soc-dapm.h since soc.h includes it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:04:41 +00:00
Jarkko Nikula 1c8f2c4287 ASoC: Fix compile breakage in jz4740.c and smartq_wm8987.c
Commit ce6120c require that soc-dapm.h cannot be included before soc.h but
these two drivers were not checked. Fix them by including only soc.h as it
includes soc-dapm.h.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:04:05 +00:00
Axel Lin 13a2e06c58 ASoC: stac9766 - set reg_cache_default to stac9766_reg
Looks like this is missing during multi-component conversion.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:03:35 +00:00
Vasiliy Kulikov 8575d93386 ASoC: s3c24xx: test wrong variable
After clk_get() mclk is checked three times instead of mout_epll
and sclk_spdif checks.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:03:22 +00:00
Takashi Iwai 9d57883f08 ALSA: hda - Add a generic fixup callback for Realtek codecs
Add a generic callback function for fixup elements.  This can be used
to do some unusual things like overriding the AMP cache, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 13:29:19 +01:00
Kailang Yang 01e0f1378c ALSA: hda - Fixed ALC887-VD initial error
ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:59:36 +01:00
Takashi Iwai 1beded5d9c ALSA: atmel - Fix the return value in error path
In the commit c0763e687d
    ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:57:17 +01:00
Daniel T Chen 673f7a8984 ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
BugLink: https://launchpad.net/bugs/677652

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers.  Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality.  Testing was done
with an alsa-driver build from 2010-11-21.

Reported-and-tested-by: Joan Creus
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:54 +01:00
Vasiliy Kulikov c0763e687d ALSA: snd-atmel-abdac: test wrong variable
After clk_get() pclk is checked second time instead of sample_clk check.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:53 +01:00
Andreas Mohr 78ac07b0d2 ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
. Fix PulseAudio "ALSA driver bug" issue
  (if we have two alternated areas within a 64k DMA buffer, then max
  period size should obviously be 32k only).
  Back references:
   http://pulseaudio.org/wiki/AlsaIssues
   http://fedoraproject.org/wiki/Features/GlitchFreeAudio
. In stop timer function, need to supply ACK in the timer control byte.
. Minor log output correction

When I did my first PA testing recently, the period size bug resulted
in quite precisely observeable half-period-based playback distortion.

PA-based operation is quite a bit more underrun-prone (despite its
zero-copy optimizations etc.) than raw ALSA with this rather spartan
sound hardware implementation on my puny Athlon.

Note that even with this patch, azt3328 still doesn't work for both
cases yet, PA tsched=0 and tsched
(on tsched=0 it will playback tiny fragments of periods, leading to tiny
stuttering sounds with some pauses in between, whereas with
timer-scheduled operation playback works fine - minus some quite increased
underrun trouble on PA vs. ALSA, that is).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:53 +01:00
Daniel T Chen a0e90acc65 ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
BugLink: https://launchpad.net/bugs/677830

The original reporter states that the subwoofer does not mute when
inserting headphones.  We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

Reported-and-tested-by: i-NoD
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:52 +01:00
Clemens Ladisch 109fef9edc ALSA: timer: automatically load the high-resolution timer
Increase the default timer limit so that snd-hrtimer.ko can be
automatically loaded when needed, e.g., when used as the default
sequencer timer.  This replaces the check for the obsolete
CONFIG_SND_HPET.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:14:31 +01:00
Clemens Ladisch 47228e48ae ALSA: pcm: optimize xrun detection in no-period-wakeup mode
Add a lightweight condition on top of the xrun checking so that we can
avoid the division when the application is calling the update function
often enough.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:14:17 +01:00
Clemens Ladisch 59ff878ffb ALSA: pcm: detect xruns in no-period-wakeup mode
When period wakeups are disabled, successive calls to the pointer update
function do not have a maximum allowed distance, so xruns cannot be
detected with the pointer value only.

To detect xruns, compare the actually elapsed time with the time that
should have theoretically elapsed since the last update.  When the
hardware pointer has wrapped around due to an xrun, the actually elapsed
time will be too big by about hw_ptr_buffer_jiffies.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:14:06 +01:00
Clemens Ladisch 075140ea8b ALSA: oxygen: support for period wakeup disabling
Allow disabling period wakeup interrupts for all PCM streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:13:54 +01:00
Clemens Ladisch 7bb8fb70c4 ALSA: hda-intel: support for period wakeup disabling
Allow disabling period wakeup interrupts for HDA PCM streams.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:13:34 +01:00
Clemens Ladisch ab69a4904b ALSA: pcm: support for period wakeup disabling
This patch allows to disable period interrupts which are
not needed when the application relies on a system timer
to wake-up and refill the ring buffer. The behavior of
the driver is left unchanged, and interrupts are only
disabled if the application requests this configuration.
The behavior in case of underruns is slightly different,
instead of being detected during the period interrupts the
underruns are detected when the application calls
snd_pcm_update_avail, which in turns forces a refresh of the
hw pointer and shows the buffer is empty.

More specifically this patch makes a lot of sense when
PulseAudio relies on timer-based scheduling to access audio
devices such as HDAudio or Intel SST. Disabling interrupts
removes two unwanted wake-ups due to period elapsed events
in low-power playback modes. It also simplifies PulseAudio
voice modules used for speech calls.

To quote Lennart "This patch looks very interesting and
desirable. This is something have long been waiting for."

Support for this in hardware drivers is optional.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 08:13:16 +01:00
Takashi Iwai d2b88e4c10 Merge branch 'fix/misc' into topic/misc 2010-11-22 08:11:10 +01:00
Daniel T Chen a1d71a2c91 ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
BugLink: https://launchpad.net/bugs/677652

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers.  Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality.  Testing was done
with an alsa-driver build from 2010-11-21.

Reported-and-tested-by: Joan Creus
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:55:43 +01:00
Vasiliy Kulikov 5ad57d20c9 ALSA: snd-atmel-abdac: test wrong variable
After clk_get() pclk is checked second time instead of sample_clk check.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:55:20 +01:00
Andreas Mohr 7974150c85 ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
. Fix PulseAudio "ALSA driver bug" issue
  (if we have two alternated areas within a 64k DMA buffer, then max
  period size should obviously be 32k only).
  Back references:
   http://pulseaudio.org/wiki/AlsaIssues
   http://fedoraproject.org/wiki/Features/GlitchFreeAudio
. In stop timer function, need to supply ACK in the timer control byte.
. Minor log output correction

When I did my first PA testing recently, the period size bug resulted
in quite precisely observeable half-period-based playback distortion.

PA-based operation is quite a bit more underrun-prone (despite its
zero-copy optimizations etc.) than raw ALSA with this rather spartan
sound hardware implementation on my puny Athlon.

Note that even with this patch, azt3328 still doesn't work for both
cases yet, PA tsched=0 and tsched
(on tsched=0 it will playback tiny fragments of periods, leading to tiny
stuttering sounds with some pauses in between, whereas with
timer-scheduled operation playback works fine - minus some quite increased
underrun trouble on PA vs. ALSA, that is).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:54:45 +01:00
Daniel T Chen 86cbbad2b6 ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
BugLink: https://launchpad.net/bugs/677830

The original reporter states that the subwoofer does not mute when
inserting headphones.  We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

Reported-and-tested-by: i-NoD
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:52:56 +01:00
David Henningsson 03b7a1ab55 ALSA: HDA: Create mixers on ALC887
BugLink: http://launchpad.net/bugs/669092

ALC887 does not have any volume control ability on the mixer NIDs,
so put the volume controls on the dac NIDs instead. Without this
patch, ALC887 users cannot use alsamixer at all.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:45:08 +01:00
Joe Perches 5dbea6b1f2 ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:42:10 +01:00
Joe Perches c80c1d5427 ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:41:49 +01:00
Joe Perches 2fb50f135a ALSA: sound/ppc: Use printf extension %pR for struct resource
Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:41:25 +01:00
Daniel T Chen 0613a59456 ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
BugLink: https://launchpad.net/bugs/669279

The original reporter states: "The Master mixer does not change the
volume from the headphone output (which is affected by the headphone
mixer). Instead it only seems to control the on-board speaker volume.
This confuses PulseAudio greatly as the Master channel is merged into
the volume mix."

Fix this symptom by applying the hp_only quirk for the reporter's SSID.
The fix is applicable to all stable kernels.

Reported-and-tested-by: Ben Gamari <bgamari@gmail.com>
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 07:39:40 +01:00
Axel Lin 5b3b0fa8fb ASoC: Move kfree(twl4030) to twl4030_soc_remove()
As we allocate memory for twl4030 in twl4030_codec_probe(),
twl4030_codec_remove() is a better place to free the memory.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-19 12:14:47 +00:00
Mark Brown 9e18e1869f Merge branch 'next-samsung-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into for-2.6.38 2010-11-19 11:49:35 +00:00
Mark Brown 04af964f9c Merge branch 'for-2.6.37' into for-2.6.38 2010-11-19 11:45:05 +00:00
Mark Brown 7b306dae22 ASoC: Move WM8994 read/write access data into separate file
Makes the WM8994 driver file itself substantially smaller.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-19 11:44:41 +00:00
Axel Lin 2811fe2beb ASoC: uda134x - set reg_cache_default to uda134x_reg
After checking the code in 2.6.36,
I found this is missing during multi-component conversion.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-19 11:19:38 +00:00
Mark Brown 96b101efae ASoC: Provide ADC left/right channel source selection on WM8994
Allow the application to choose if the ADC data presented on the left
and right channels is sourced from the internal left or right channel.
This allows a mono recording to be presented as stereo on the external
bus.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-19 11:17:27 +00:00
Jesse Marroquin fb762a5b37 ASoC: Add support for MAX98089 CODEC
This patch adds initial support for the MAX98089 CODEC.

Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-18 10:56:04 +00:00
Mark Brown 3df94756fe Merge branch 'for-2.6.37' into for-2.6.38 2010-11-17 18:59:19 +00:00
Chris Paulson-Ellis bedad0ca3f ASoC: davinci: fixes for multi-component
Multi-component commit f0fba2ad broke a few things which this patch should
fix. Tested on the DM355 EVM. I've been as careful as I can, but it would be
good if those with access to other Davinci boards could test.

--

The multi-component commit put the initialisation of
snd_soc_dai.[capture|playback]_dma_data into snd_soc_dai_ops.hw_params of the
McBSP, McASP & VCIF drivers (davinci-i2s.c, davinci-mcasp.c & davinci-vcif.c).
The initialisation had to be moved from the probe function in these drivers
because davinci_*_dai changed from snd_soc_dai to snd_soc_dai_driver.

Unfortunately, the DMA params pointer is needed by davinci_pcm_open (in
davinci-pcm.c) before hw_params is called. I have moved the initialisation to
a new snd_soc_dai_ops.startup function in each of these drivers. This fix
indicates that all platforms that use davinci-pcm must have been broken and
need to test with this fix.

--

The multi-component commit also changed the McBSP driver name from
"davinci-asp" to "davinci-i2s" in davinci-i2s.c without updating the board
level references to the driver name. This change is understandable, as there
is a similarly named "davinci-mcasp" driver in davinci-mcasp.c.

There is probably no 'correct' name for this driver. The DM6446 datasheet
calls it the "ASP" and describes it as a "specialised McBSP". The DM355
datasheet calls it the "ASP" and describes it as a "specialised ASP". The
DM365 datasheet calls it the "McBSP". Rather than fix this problem by
reverting to "davinci-asp", I've elected to avoid future confusion with the
"davinci-mcasp" driver by changing it to "davinci-mcbsp", which is also
consistent with the names of the functions in the driver. There are other
fixes required, so it was never going to be as simple as a revert anyway.

--

The DM365 only has one McBSP port (of the McBSP platforms, only the DM355 has
2 ports), so I've changed the the id of the platform_device from 0 to -1.

--

In davinci-evm.c, the DM6446 EVM can no longer share a snd_soc_dai_link
structure with the DM355 EVM as they use different cpu DAI names (the DM355
has 2 ports and the EVM uses the second port, but the DM6446 only has 1 port).
This also means that the 2 boards need different snd_soc_card structures.

--

The codec_name entries in davinci-evm.c didn't match the i2c ids in the board
files. I have only checked and fixed the details of the names used for the
McBSP based platforms. Someone with a McASP based platform (eg DA8xx) should
check the others.

Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-17 18:36:40 +00:00
Mark Brown 11e713a07e ASoC: Fix register cache setup WM8994 for multi-component
During the multi-component conversion the WM8994 register cache init
got lost.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-17 18:32:51 +00:00
Arnd Bergmann 451a3c24b0 BKL: remove extraneous #include <smp_lock.h>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-17 08:59:32 -08:00
Mark Brown 84dab5671b ASoC: Use DAPM context rather than CODEC when constructing sequences
DAPM widgets may be associated with non-CODEC devices so compare based
on the DAPM context rather than the CODEC pointer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-16 11:40:14 +00:00
Axel Lin ce0df3d79a ASoC: Fix incorrect kfree in wm8962_probe error path
We allocated memory for wm8962 in wm8962_i2c_probe,
and will free the memory in either wm8962_i2c_probe error path
or wm8962_i2c_remove.

Thus we should not call kfree(wm8962) in wm8962_probe, otherwise
we have double free of wm8962.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 11:24:16 +00:00
Axel Lin 01cbea3293 ASoC: Fix incorrect kfree in wm8731_probe error path
We allocated memory for wm8731 in wm8731_spi_probe / wm8731_i2c_probe,
and will free the memory in either wm8731_spi_probe / wm8731_i2c_probe
error path or wm8731_spi_remove / wm8731_i2c_remove.

Thus we should not call kfree(wm8731) in wm8731_probe, otherwise
we have double free of wm8731.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 11:24:04 +00:00
Axel Lin 4ab867d276 ASoC: Fix incorrect kfree in aic3x_probe error path
We allocated memory for aic3x in aic3x_i2c_probe,
and will free the memory in either aic3x_i2c_probe error path or
aic3x_i2c_remove.

Thus we should not call kfree(aic3x) in aic3x_probe, otherwise
we have double free of aic3x.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 11:23:50 +00:00
Axel Lin 50d0ac2e1e ASoC: Fix incorrect kfree in ad193x_probe error path
We allocated memory for ad193x in ad193x_spi_probe,
and will free the memory in either ad193x_spi_probe error path or
ad193x_spi_remove.

Thus we should not call kfree(ad193x) in ad193x_probe, otherwise
we have double free of ad193x.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 11:23:39 +00:00
Axel Lin af353d8a13 ASoC: Fix incorrect kfree in ad1836_probe error path
We allocated memory for ad1836 in ad1836_spi_probe,
and will free the memory in either ad1836_spi_probe error path or
ad1836_spi_remove.

Thus we should not call kfree(ad1836) in ad1836_probe, otherwise
we have double free of ad1836.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 11:23:24 +00:00
Joe Perches ef995e3a91 ASoC: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-15 17:20:34 +00:00
Jarkko Nikula ead9b9199c ASoC: Add optional name_prefix for codec kcontrol, widget and route names
There is a need to prefix codec kcontrol, widget and internal route names in
an ASoC machine that has multiple codecs with conflicting names. The name
collision would occur when codec drivers try to registering kcontrols with
the same name or when building audio paths.

This patch introduces optional prefix_map into struct snd_soc_card. With it
machine drivers can specify a unique name prefix to each codec that have
conflicting names with anothers. Prefix to codec is matched with codec
name.

Following example illustrates a machine that has two same codec instances.
Name collision from kcontrol registration is avoided by specifying a name
prefix "foo" for the second codec. As the codec widget names are prefixed
then second audio map for that codec shows a prefixed widget name.

static const struct snd_soc_dapm_route map0[] = {
	{"Spk", NULL, "MONO"},
};

static const struct snd_soc_dapm_route map1[] = {
	{"Vibra", NULL, "foo MONO"},
};

static struct snd_soc_prefix_map codec_prefix[] = {
	{
		.dev_name = "codec.2",
		.name_prefix = "foo",
	},
};

static struct snd_soc_card card = {
	...
	.prefix_map = codec_prefix,
	.num_prefixes = ARRAY_SIZE(codec_prefix),
};

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-15 15:24:58 +00:00
Mark Brown 6ccd744123 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-15 13:20:12 +00:00
Mark Brown bcbb243396 ASoC: Fix dapm_seq_compare() for multi-component
Ensure that we keep all widget powerups in DAPM sequence by making
the CODEC the last thing we compare on rather than the first thing.
Also fix the fact that we're currently comparing the widget pointers
rather than the CODEC pointers when we do the substraction so we
won't get stable results.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-15 13:19:32 +00:00
Arnaud Patard (Rtp) 3c9e28e751 ASoC: Add support for OpenRD Ultimate
OpenRD Ultimate & Client are similar machines so enable OpenRD client sound
support on Ultimate too

Tested-by: Robas Teodor <teodor.robas@gmail.com>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-15 12:27:57 +00:00
Vasily Khoruzhick ccb3b84fa0 ASoC: RX1950: Fix hw_params function
Unfortunatelly, I misunderstood datasheet, and on s3c244x-iis
when MPLLin source for master clock is selected, prescaler has
no effect. Remove dividor calculation for 44100 rate; remove 88200
rate at all, rx1950 can't do it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-15 12:27:08 +00:00
Mark Brown f9a67059d4 ASoC: Prevent system suspend while debouncing wakeup capable GPIO jacks
If the device associated with a GPIO jack is wakeup capable then disable
suspend while we're debouncing the jack so that we skip suspends that race
with the jack.

Note that currently the GPIO based jack has a CODEC associated with it
which we're using right now. These jacks should be reparented against the
card itself and this code adjusted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-15 11:44:43 +00:00