Commit Graph

9471 Commits (847b2f42be203f3cff7f243fdd3ee50c1e06c882)

Author SHA1 Message Date
Mark Brown 567d6f4875 Merge branch 'for-2.6.38' into for-2.6.39 2011-02-02 20:52:14 +00:00
Janusz Krzysztofik 0962bb217a ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
The .card member of the snd_soc_pcm_runtime structure pointed to by the
snd_soc_dai_link.init() argument used to be initialized before the
function being called. This has changed, probably unintentionally,
after recent refactorings. Since the function implementations are free
to make use of this pointer, move its assignment back before the
function is called to avoid NULL pointer dereferences.

Created and tested on Amstrad Delta againts linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-02 20:52:06 +00:00
Dimitris Papastamos 13fd179f14 ASoC: soc-core: Support debugfs entries larger than PAGE_SIZE bytes
For some codecs with large register maps, it was not possible to dump
all registers via the codec_reg file but only up to PAGE_SIZE bytes.
This patch fixes this problem.

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-02-02 20:48:15 +00:00
Sven Neumann a591e969fa ASoC: PXA: formatting
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-02 20:45:37 +00:00
Takashi Iwai ddfb319926 ALSA: use linux/io.h to fix compile warnings
For helping to reduce Greert's regression list...
  src/sound/drivers/mtpav.c: error: implicit declaration of function 'inb'
  src/sound/drivers/mtpav.c: error: implicit declaration of function 'outb'
  ...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-02 17:49:53 +01:00
Takashi Iwai 70f7db11c4 ALSA: hda - Fix memory leaks in conexant jack arrays
The Conexant codec driver adds the jack arrays in init callback which
may be called also in each PM resume.  This results in the addition of
new jack element at each time.

The fix is to check whether the requested jack is already present in
the array.

Reference: Novell bug 668929
	https://bugzilla.novell.com/show_bug.cgi?id=668929

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-02 17:16:38 +01:00
Mark Brown 88ee1c611d ASoC: Update PM ifdefs for exported suspend/resume
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-02 10:43:26 +00:00
Mark Brown 273de37655 Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into for-2.6.39 2011-02-01 14:55:10 +00:00
Mark Brown 3d8b2ce01b ASoC: Use snd_pcm_format_width() in snd_soc_params_to_frame_size()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-01 14:31:40 +00:00
Dimitris Papastamos 2bc9a81e2a ASoC: soc-core: Ensure codec_reg has fixed length fields
Make the format of the codec_reg file more easily parsable.  Remove
the header field which gives the codec name.  These changes are important
when it comes to extend the debugfs codec_reg file to dump more than
PAGE_SIZE bytes to make it easier to calculate offsets within the
file.

We still need to handle the case when the snd_soc_read() call fails
and <no data: %d> is outputted.

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-02-01 14:26:11 +00:00
Mark Brown 2cfec93fec Merge branches 'for-2.6.38' and 'tegra-arch' into for-2.6.39 2011-02-01 14:21:09 +00:00
Janusz Krzysztofik f019ee5feb ASoC: CX20442: fix NULL pointer dereference
The CX20442 codec driver never provided the snd_soc_codec_driver's
.reg_cache_default member. With the latest ASoC framework changes, it
seems to be referred unconditionally, resulting in a NULL pointer
dereference if missing. Provide it.

Created and tested on Amstrad Delta against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-01 14:13:56 +00:00
Janusz Krzysztofik acd6227677 ASoC: Amstrad Delta: fix const related build error
The Amstrad Delta ASoC driver used to override the digital_mute()
callback, expected to be not provided by the on-board CX20442 CODEC
driver, with its own implementation. While this is still posssible when
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct
after the snd_soc_dai_driver.ops member has been constified, and results
in build error.

Drop this actually not used code path in hope the CX20442 driver never
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-01 14:13:47 +00:00
Stephen Warren f9eabc3dee ASoC: Tegra: Harmony: Remove redundant !!
gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO
driver has been fixed to work this way, so remove the redundant !!
previously required when it didn't accept values >1.

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-02-01 14:12:31 +00:00
Jarkko Nikula 8cda975174 ASoC: omap: rx51: Add earphone support
Earphone in Nokia RX-51/N900 is connected to left HP output of B part of the
TLV320AIC34 dual codec. In RX-51 the codec A is used as a traditional codec
and the codec B as an auxiliary device.

Audio from codec A goes via the codec B to earphone:
MONO_LOUT of A -> LINE2R of B (B interconnects) -> HPLOUT of B -> Earphone.

Take earphone into use by utilizing the recent ASoC auxiliary and
cross-device support.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-01 13:58:52 +00:00
Mark Brown c8059930f0 ASoC: Accept any logical value WM8903 GPIO set()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-31 16:07:32 +00:00
Mark Brown d71bb810be ASoC: Accept any logical value for WM8962 GPIO set()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-31 16:07:12 +00:00
H Hartley Sweeten c800587f65 ASoC: neo1973_wm8753 audio support does not require scoop
This driver does not use any of the functionality provided by the scoop
hardware.  Remove the unneeded header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31 13:31:29 +00:00
Stephen Warren 713dce4e0b ASoC: Tegra: I2S: Use dev_err not pr_err
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-31 13:16:40 +00:00
Stephen Warren d64e57cef0 ASoC: Tegra: utils: Don't use global variables
Instead, have the machine driver provide storage for the utility data
somehow.

For Harmony in particular, store this within struct tegra_harmony, itself
referenced by snd_soc_card's drvdata.

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-31 13:16:29 +00:00
Stephen Warren c244d477b7 ASoC: Tegra: Harmony: Use dev_err not pr_err
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-31 13:16:19 +00:00
Stephen Warren bc72fe0c0e ASoC: Tegra: Harmony: Fix indentation issue.
Indent with TABs not spaces.

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-31 13:16:08 +00:00
Stephen Warren 6e26764504 ASoC: Tegra: Harmony: Support the internal speaker
Add DAPM widget definitions for the internal speaker paths. Currently, this
path is always enabled while playback is active.

Add code to control the speaker amplifier GPIO.

The GPIO is requested during _init, since that's the first time it is
guaranteed that the WM8903 module is loaded, probed, and hence has exported
its GPIO chip.

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-31 13:15:59 +00:00
Stephen Warren 72de2b1a9a ASoC: Tegra: Harmony: Don't use soc-audio platform device
Previously, snd-soc-tegra-harmony internally instantiated a platform device
object whenever the module was loaded. Instead, switch to a more typical model
where arch/arm/mach-tegra defines a platform device, and snd-soc-tegra-harmony
acts as a driver for such a platform device.

Define a new struct tegra_harmony to store driver data in the future.

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-31 13:15:48 +00:00
Stephen Warren 111c6419ff ASoC: Move card list initialization to snd_soc_register_card
All ASoC cards need snd_soc_initialize_card_lists called. Previously, it was
only called for cards backed by a "soc-audio" platform device, via
soc_probe(). However, it's also needed for cards backed by other platform
devices, and registered directly via snd_soc_register_card().

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-31 13:15:35 +00:00
Harsha Priya d316553a0c ASoC: mid-x86: Add support for capture in machine driver
This configures the capture unused pins

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-31 12:11:06 +00:00
Harsha Priya a7bffdf7d8 ASoC: sst_platform: add support for capture stream on headset dai
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-31 12:10:15 +00:00
Harsha Priya fd94eeef06 ASoC: sn95031: add capture support
This patch adds the support for capture path in sn95031 codec.
This codec supports upto 6DMICs, 2 AMICs and Linein. The linein and AMICs
are connected through a MUX to ADC. The TX paths can be assigned to any of the
ADCs or DMICs.

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-31 12:10:00 +00:00
Takashi Iwai 6abb31908f Merge branch 'topic/hda' into fix/hda 2011-01-31 12:04:50 +01:00
Clemens Ladisch efbeb07181 ALSA: oxygen: fix output routing on Xonar DG
This card uses separate I2S outputs for the front speakers and
headphones, and reverses the order of the three speaker outputs.
To work around this, add a model-specific callback to adjust the
controller's playback routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-31 12:00:02 +01:00
Amerigo Wang fdbc5d1b32 sound: silent echo'ed messages in Makefile
Silent these echo's, please.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-31 11:28:53 +01:00
Linus Torvalds 7bfeea05d9 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 automute on Thinkpad L412/L512
  ALSA: HDA: Fix dmesg output of HDMI supported bits
  ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture
  ASoC: correct link specifications for corgi, poodle and spitz
  ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
  ASoC: Fix codec device id format used by some dai_links
  ALSA: azt3328 -  fix broken AZF_FMT_XLATE macro
  ALSA: Xonar, CS43xx: Don't overrun static array
  ASoC: Handle low measured DC offsets for wm_hubs devices
  ASoC: da8xx/omap-l1xx: match codec_name with i2c ids
  ASoC: WM8994: fix wrong value in tristate function
  ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()
2011-01-31 12:53:12 +10:00
Mark Brown 1166f985d3 Merge branch 'for-2.6.38' into for-2.6.39 2011-01-28 13:22:14 +00:00
Stephen Warren e9cf704933 ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
snd_soc_dapm_put_volsw() has variables for both the unshifted and
shifted mask for updates commit 97404f (ASoC: Do DAPM control updates in
the middle of DAPM sequences) got confused between the two of these.
Since there's no need to keep a copy of the unshifted mask fix this and
simplify the code by using only one mask variable.

[Completely rewrote the changelog to describe the issue -- broonie.]

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-28 13:19:19 +00:00
Jarkko Nikula 70d29331ac ASoC: soc-core: Increment codec and platform driver refcounts before probing
Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers"
moved codec and platform driver refcount increments from soc_bind_dai_link
to more appropriate places.

Adjust a little them so that refcounts are incremented before executing the
driver probe functions.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Harsha Priya <priya.harsha@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-28 12:58:14 +00:00
Manjunathappa, Prakash 0fa63b6928 ASoC: DaVinci: fix kernel panic due to uninitialized platform_data
This patch fixes the Kernel panic issue on accessing davinci_vc in
cq93vc_probe function. struct davinci_vc is part of platform device's
private driver data(codec->dev->p->driver_data) and this is populated
by DaVinci Voice Codec MFD driver.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-28 12:24:50 +00:00
David Henningsson 1959387539 ALSA: HDA: Fix microphone(s) on Lenovo Edge 13
BugLink: http://bugs.launchpad.net/bugs/708521

This Edge 13 model has an internal mic at 0x1a and should
therefore use the asus quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-28 08:54:39 +01:00
Takashi Iwai dcc3c4c016 Merge branch 'fix/asoc' into for-linus 2011-01-28 08:25:43 +01:00
Tony Lindgren 59b479e098 omap: Start using CONFIG_SOC_OMAP
We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest
are nowadays just subcategories of these.

Search and replace the following:

ARCH_OMAP2420		SOC_OMAP2420
ARCH_OMAP2430		SOC_OMAP2430
ARCH_OMAP3430		SOC_OMAP3430

No functional changes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Sourav Poddar <sourav.poddar@ti.com>
2011-01-27 16:39:40 -08:00
Jarkko Nikula 48529b3b7c ASoC: omap: rx51: Add stereo output support to audio jack
Audio jack in Nokia RX-51/N900 is driven by TPA6130 headphone amplifier.
This patch adds support for it and stereo output can be active when
"Jack Function" == "TV-OUT" || "Headphone".

As the TPA6130 can output very high volume levels the output is limited
with snd_soc_limit_volume. Limiting value is found from Maemo kernel sources.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: 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-27 20:48:46 +00:00
Mark Brown 8c9daae2cf Merge branch 'for-2.6.38' into for-2.6.39 2011-01-27 15:16:52 +00:00
Jaroslav Kysela 730a586515 ALSA: hdspm - remove unused arrays, reduce stack usage in hwdep_ioctl
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 13:10:33 +01:00
Mark Brown f85a9e0d26 ASoC: Add subsequence information to seq_notify callbacks
Allows drivers to distinguish which subsequence is being notified when
they get called back.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:59:14 +00:00
Mark Brown aaee8ef146 ASoC: Make cache status available via debugfs
Could just as well live in sysfs but sysfs doesn't have the simple
value export helpers debugfs does.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:57:01 +00:00
Mark Brown 6f8ab4ac29 ASoC: Export card PM callbacks for use in direct registered cards
Allow hookup of cards registered directly with the core to the PM
operations by exporting the device power management operations to
modules, also exporting the default PM operations since it is
expected that most cards will end up using exactly the same setup.

Note that the callbacks require that the driver data for the card be
the snd_soc_card.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:56:34 +00:00
Mark Brown e7361ec499 ASoC: Replace pdev with card in machine driver probe and remove
In order to support cards instantiated without using soc-audio remove
the use of the platform device in the card probe() and remove() ops.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:56:13 +00:00
Mark Brown 70b2ac126a ASoC: Use card rather than soc-audio device to card PM functions
The platform device for the card is tied closely to the soc-audio
implementation which we're currently trying to remove in favour of
allowing cards to have their own devices. Begin removing it by
replacing it with the card in the suspend and resume callbacks we
give to cards, also taking the opportunity to remove the legacy
suspend types which are currently hard coded anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:55:53 +00:00
Adrian Knoth 55a57606b2 ALSA: [hdspm] Move static mapping arrays to .c
As requested by Takashi and Jaroslav, these arrays should not be in the
header file.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:23 +01:00
Adrian Knoth fbcdf3343b ALSA: hdspm - Add RayDAT and AIO strings to Kconfig
Inform users about the newly added support for RayDAT and AIO.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:21 +01:00
Adrian Knoth 0dca179306 ALSA: hdspm - Add support for RME RayDAT and AIO
Incorporate changes by Florian Faber into hdspm.c. Code taken from

   http://wiki.linuxproaudio.org/index.php/Driver:hdspe

Heavily reworked to mostly comply with the coding standard (whitespace
fixes, line width, C++ style comments)

The code was tested and confirmed to be working on RME RayDAT.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:18 +01:00
Jarkko Nikula c73e0c83f5 ASoC: Fix module refcount for auxiliary devices
Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers"
moved codec driver refcount increments from soc_bind_dai_link into
soc_probe_codec.

However, the commit didn't remove try_module_get from soc_probe_aux_dev so
the auxiliary device reference counts are incremented twice as the
soc_probe_codec is called from soc_probe_aux_dev too.

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-26 20:26:54 +00:00
Russell King 5d350cba48 ALSA: AACI: make fifo variables more explanitory
Improve commenting and change fifo variable names to reflect their
meanings.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-26 20:24:52 +00:00
Russell King ea51d0b164 ALSA: AACI: no need to call snd_pcm_period_elapsed() for each period
There is no need to call snd_pcm_period_elapsed() each time a period
elapses - we can call it after we're done once loading/unloading the
FIFO with data.  ALSA works out how many periods have elapsed by
reading the current pointers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-26 20:24:12 +00:00
Russell King c0dea82c3c ALSA: AACI: use snd_pcm_lib_period_bytes()
Use the helper rather than open-coding this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-26 20:24:11 +00:00
Russell King f006d8fc53 ALSA: AACI: clean up AACI announcement printk
Make the AACI announcement printk say which primecell part number
has been found.  Display the revision as an unsigned decimal, and
display only the first 8 hex digits of the base address unless it's
larger.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-26 20:24:10 +00:00
Russell King 58e8a4741b ALSA: AACI: fix channel mask selection
When double-rate mode was selected, we weren't setting the additional
two channel mask bits to allow double-rate to work.  Rearrange the
hw_params code to allow the correct channel mask to be selected.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-26 20:24:10 +00:00
Mark Brown 16af7d60aa ASoC: Staticise non-exported symbols in cs4271
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-26 19:10:49 +00:00
David Henningsson ded9f5238b ALSA: HDA: Fix automute on Thinkpad L412/L512
BugLink: http://bugs.launchpad.net/bugs/707902

More Thinkpad machines with invalid SKU found, that disables
automute between speakers and headphones on these machines.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-26 14:37:53 +01:00
Kuninori Morimoto f17c13ca52 ASoC: sh: fsi: modify selection method of I2S/PCM/SPDIF format
Current format selection of FSI-codecs depended on platform information for FSI,
and chip default settings for codecs. It is not understandable/formal method.
This patch modify FSI and FSI-codecs to use snd_soc_dai_set_fmt.

But FSI can use I2S/PCM and SPDIF format today.
It can be selected to I2S/PCM by snd_soc_dai_set_fmt, but can not select SPDIF.
So, this patch change FSI platform information to have DAI/SPDIF mode.

If platform selects DAI mode (default),
FSI-codecs can select I2S/PCM by snd_soc_dai_set_fmt,
and if it is SPDIF mode, FSI become SPDIF format.

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>
2011-01-26 11:25:47 +00:00
Kuninori Morimoto d7c5762bc7 ASoC: sh: fsi: free from NULL pointer of struct sh_fsi_platform_info
Current FSI driver assumed master->info is not NULL.
This patch allow NULL in master->info

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>
2011-01-26 11:25:33 +00:00
Kuninori Morimoto 160afa7f05 ASoC: sh: fsi: move chan_num from fsi_stream to fsi_priv
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>
2011-01-26 11:25:21 +00:00
Russell King e831d80b45 ALSA: AACI: fix number of channels for record
AC'97 codecs only support two channels for recording, so we shouldn't
advertize that there are up to six channels available.  Limit the
selection of 4 and 6 channel audio to playback only.

As this adds additional SNDRV_PCM_STREAM_PLAYBACK conditionals, we can
combine some resulting in the elimination of __aaci_pcm_open() entirely,
and making the code easier to read.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-25 21:20:23 +00:00
Russell King b60fb519d7 ALSA: AACI: fix multiple IRQ claiming
Claiming the IRQ each time a playback or capture interface is opened
is wasteful; the second copy of the registered handler is identical to
the first and just wastes resources.  Track the number of opens and
only register the handler when necessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-25 21:20:22 +00:00
Russell King 250c7a61c3 ALSA: AACI: fix timeout duration
Relying on the access time of peripherals is unreliable - it depends
on the speed of the CPU and the bus.  On Versatile Express, these
timeouts were expiring, causing the driver to fail.

Add udelay(1) to ensure that they don't expire early, and adjust
timeouts to give a reasonable margin over the response times.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-25 21:18:05 +00:00
Russell King 69058cd6d1 ALSA: AACI: fix timeout condition checking
Ensure that a timeout coincident with the condition being waited for
results in success rather than failure.  This helps avoid timeout
conditions being inappropriately flagged.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-01-25 21:18:05 +00:00
David Henningsson d757534ed1 ALSA: HDA: Fix dmesg output of HDMI supported bits
This typo caused the dmesg output of the supported bits of HDMI
to be cut off early.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-25 20:06:16 +01:00
Hans-Christian Egtvedt fd76804f3f ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture
This patch fixes the non-compiling AC97C driver for AVR32 architecture by
include mach/hardware.h only for AT91 architecture. The AVR32 architecture does
not supply the hardware.h include file.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
CC: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-25 18:07:10 +01:00
Mark Brown 16f9e062a7 Merge branch 'for-2.6.38' into for-2.6.39 2011-01-25 15:19:29 +00:00
Dmitry Eremin-Solenikov a3adfa00e8 ASoC: correct link specifications for corgi, poodle and spitz
ASoC DAI link descriptions for Corgi, Poodle and Spitz platforms
contained incorrect names for cpu_dai and codec, which effectievly disabled sound
on theese platforms. Fix that errors.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-25 15:18:42 +00:00
Alexander Sverdlin 0d42e6e77f ASoC: cs4271.c: improve error handling
CS4271 CODEC driver adapted to recently introduced error handling in
snd_soc_update_bits().
Added snd_soc_cache_sync() error handling.

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-25 15:16:57 +00:00
Kuninori Morimoto 3f25c9ccb7 ASoC: sh: fsi-hdmi: Add FSI port and HDMI selection
This patch add platform_device_id which can control
PortA/PortB for FSI2-HDMI from platform data.

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-25 15:15:24 +00:00
Lars-Peter Clausen 518aa59f6e ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
During the multi-component patch the s3c24xx i2s driver was renamed from
"s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not
updated to reflect this change as well.

As a result there is no match between the dai_link and the i2s driver and no
sound card is instantiated.

This patch fixes the problem by updating the sound board drivers to use
"s3c24xx-iis" for the cpu_dai_name.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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>
Cc: stable@kernel.org
2011-01-25 15:12:44 +00:00
Lars-Peter Clausen 81d7da5404 ASoC: Fix codec device id format used by some dai_links
The id part of an I2C device name is created with the "%d-%04x" format string.

So for example for an I2C device which is connected to the adapter with the id 0
and has its address set to 0x1a the id part of the devices name would be
"0-001a".

Currently some sound board drivers have the id part the codec_name field of
their dai_link structures set as if it had been created by a "%d-0x%x" format
string. For example "0-0x1a" instead of "0-001a".

As a result there is no match between the codec device and the dai_link and no
sound card is instantiated.

This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-01-25 15:12:36 +00:00
Mark Brown 181e055e6b ASoC: Fix type for snd_soc_volatile_register()
We generally refer to registers as unsigned ints (including in the
underlying CODEC driver operation).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-25 14:14:31 +00:00
Andreas Mohr c9ba374d24 ALSA: azt3328 - fix broken AZF_FMT_XLATE macro
Cleanly revert to non-macro implementation of
snd_azf3328_codec_setfmt(), to fix last-minute functionality breakage
induced by following checkpatch.pl recommendations without giving them
their due full share of thought ("revolting computer, ensuing PEBKAC").

I would like to thank Jiri Slaby for his very timely (in -rc1 even)
and unexpected (uncommon hardware) "recognition of the dangerous situation"
due to his very commendable static parser use. :)

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-25 08:10:56 +01:00
Torsten Schenk c6d43ba816 ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB
What is working: Everything except SPDIF
- Hardware Master volume
- PCM 44-192kHz@24 bits, 6 channels out, 4 channels in (analog)
- MIDI in/out
- firmware loading after cold start
- phono/line switching

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-24 18:45:30 +01:00
Andy Robinson f6a2491ca2 ALSA: HDA: cxt5066 - Use asus model for Asus U50F, select correct SPDIF output
Changed the Asus A52J quirk to use the asus model instead of the
hp_laptop model, which fixes the external mic input. Added an Asus
U50F quirk to use the asus model. For the cxt5066 codecs, added
checking of the digital output pins to determine which digital output
nodes to use instead of always using node 0x21, since some systems
have node 0x12 connected to a SPDIF out jack.

[A slight modification for better readability by tiwai]

Signed-off-by: Andy Robinson <ajr55555@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-24 17:42:27 +01:00
Alexander Sverdlin 86c3304181 ASoC: EDB93xx machine sound driver with CS4271
Added support for EDB93xx sound with CS4271 CODEC.
Features:
- Playback, Capture
- Sample rates from 8kHz to 96kHz tested

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-24 12:05:15 +00:00
David Henningsson a1d6906e2d ALSA: HDA: Add a new model "asus" for Conexant 5066/205xx
BugLink: http://bugs.launchpad.net/bugs/701271

This new model, named "asus", is identical to the "hp_laptop" model,
except for the location of the internal mic, which is at pin 0x1a.
It is used for Asus K52JU and Lenovo G560.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:29:22 +01:00
David Henningsson 02b6b5b640 ALSA: HDA: Refactor some redundant code for Conexant 5066/205xx
Four very similar procedures - one for each model - now
refactored into one. This isn't all duplicated code, but a step
in the right direction.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:28:28 +01:00
Jesper Juhl 233d84c46c ALSA: Xonar, CS43xx: Don't overrun static array
'cs4398_regs' in 'struct xonar_cs43xx' is an array of 'u8' with a size of
8. So, this code in sound/pci/oxygen/xonar_cs43xx.c::dump_d1_registers()

    		for (i = 2; i <= 8; ++i)
	  			snd_iprintf(buffer, " %02x", data->cs4398_regs[i]);

will overrun the array when 'i == 8'.

I guess that what's needed to fix it is the trivial patch below, but I
must admit that I have no idea about this code, so I may very well be
wrong. Additionally, I have no way to actually test this, so all I know is
that the below compiles. Someone who actually knows this code should take
a look before anything is comitted - consider the below (not much more
than) a bug report.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Clemens Ladisch <clemens@ladisch.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:24:30 +01:00
Kuninori Morimoto 4d805f7b66 ASoC: sh: fsi: Add snd_soc_dai_set_fmt support
This patch add snd_soc_dai_ops :: set_fmt to FSI driver and
select master/slave clock mode by snd_soc_dai_set_fmt on
fsi-xxx.c instead of platform infomation code.
This patch remove fsi_is_master function which is no longer needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-21 19:01:47 +00:00
Kuninori Morimoto 0d032c19e7 ASoC: sh: fsi: Add fsi_get_priv_frm_dai function
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-21 19:01:47 +00:00
Kuninori Morimoto cb9c130aa9 ASoC: ak4642: add SND_SOC_DAIFMT_FORMAT support
This patch support LEFT_J / I2S only for now

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-21 19:01:46 +00:00
Mark Brown 477adb06bf Merge branch 'for-2.6.38' into for-2.6.39 2011-01-21 18:30:55 +00:00
Dimitris Papastamos c358e640a6 ASoC: soc-cache: Add trace event for snd_soc_cache_sync()
This patch makes it easy to see when the syncing process begins and
ends.  You can also enable the snd_soc_reg_write tracepoint to see
which registers are being synced.

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-21 18:30:51 +00:00
Alexander Sverdlin 67b22517d8 ASoC: CS4271 codec support
Added support for CS4271 codec to ASoC.

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-21 18:30:50 +00:00
Mark Brown 20a4e7fc7e ASoC: Handle low measured DC offsets for wm_hubs devices
The DC servo codes are actually signed numbers so need to be treated as
such.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-01-21 18:20:16 +00:00
Rajashekhara, Sudhakar dc5a460a1b ASoC: da8xx/omap-l1xx: match codec_name with i2c ids
The codec_name entry for da8xx evm in sound/soc/davinci/davinci-evm.c
is not matching with the i2c ids in the board file. Without this fix the
soundcard does not get detected on da850/omap-l138/am18x evm.

Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Tested-by: Dan Sharon <dansharon@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37)
2011-01-21 18:19:56 +00:00
Stephen Warren 7cfe56172a ASoC: wm8903: Expose GPIOs through gpiolib
Also, update platform_data GPIO handling to have an explicit "don't
touch this pin" option.

Add #defines for the GPIO pin functions.

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-21 18:15:13 +00:00
Mark Brown 64ed983650 ASoC: Staticise twl6040_hs_jack_report()
It's an internal function so shouldn't be exported (as sparse points
out).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-21 16:44:44 +00:00
Takashi Iwai 842a209700 Merge branch 'fix/asoc' into for-linus 2011-01-21 08:10:14 +01:00
Takashi Iwai 2f36f5e1ff Merge branch 'fix/misc' into for-linus 2011-01-21 08:10:09 +01:00
Dimitris Papastamos 9978007bef ASoC: soc-cache: Apply the cache_bypass option
Incorporate the use of the cache_bypass functionality in the
syncing functions.  The snd_soc_flat_cache_sync() need not be
hooked as there is no performance benefit from using the
cache_bypass option.

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-20 13:41:01 +00:00
Dimitris Papastamos dad8e7aeeb ASoC: soc-cache: Introduce the cache_bypass option
This is primarily needed to avoid writing back to the cache
whenever we are syncing the cache with the hardware.  This gives a
performance benefit especially for large register maps.

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-20 13:40:30 +00:00
Anisse Astier d2ebd47987 ALSA: hda - Fix EAPD to low on CZC P10T tablet computer with ALC662
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-20 12:39:34 +01:00
David Henningsson fb228af706 ALSA: HDA: Add SKU ignore for another Thinkpad Edge 14
BugLink: http://bugs.launchpad.net/bugs/705323

Thinkpad Edge 14 has one more SSID that suffers from disabled auto-mute.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-20 10:39:21 +01:00
Takashi Iwai aa1d0c5261 ALSA: hda - Fix "unused variable" compile warning
sound/pci/hda/patch_realtek.c: In function ‘alc_apply_fixup’:
  sound/pci/hda/patch_realtek.c:1724:14: warning: unused variable ‘modelname’

snd_printdd() is evaluated only when CONFIG_SND_DEBUG_VERBOSE=y.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 17:27:58 +01:00
Takashi Iwai 5734a07cbb ALSA: hda - Add quirk for HP Z-series workstation
It seems working well with model=hp-bpc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 17:07:12 +01:00
Mark Brown e66ef2f81f Merge branch 'for-2.6.38' into for-2.6.39 2011-01-19 14:50:22 +00:00
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