Commit Graph

9471 Commits (847b2f42be203f3cff7f243fdd3ee50c1e06c882)

Author SHA1 Message Date
Jarkko Nikula 31164c7cf1 ASoC: omap: rx51: Add headset support
This patch adds support for headset microphone in Nokia RX-51/N900. The mic
signal from audio jack is routed to codec A LINE1L via two switches and the
mic bias is coming from codec B part.

First switch is the tv-out switch that is already supported and the second
switch selects between voltage detection circuit and codecs. As there is
no use for voltage detection at the moment the second switch is connected
statically to codecs in rx51_soc_init.

Headset can be active when control "Jack Function" is set to "Headset".

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-15 21:53:59 +00:00
Jarkko Nikula d8ec598e5d ASoC: omap: rx51: Use gpio_request_one to configure tvout_sel gpio
Just slight cleanup to be sync with upcoming change.

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-15 21:53:59 +00:00
Jiri Kosina 0a9d59a246 Merge branch 'master' into for-next 2011-02-15 10:24:31 +01:00
David Henningsson b540afc2b3 ALSA: HDA: Add position_fix quirk for an Asus device
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).

Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:52:24 +01:00
Takashi Iwai eaae55dac6 ALSA: caiaq - Fix possible string-buffer overflow
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.

Reported-by: Rafa <rafa@mwrinfosecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:50:46 +01:00
Raymond Yau 2822084607 ALSA: hda - simplify multistreaming playback model of ad1988
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:14:35 +01:00
Raymond Yau 5e5677f239 ALSA: au88x0 - Modify pointer callback to give accurate playback position
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:13:20 +01:00
Daniel Mack 3347b26cab ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case
The number of cases has increased so use switch-case rather than
if-statements.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:11:12 +01:00
Daniel Mack 54a8c500d5 ALSA: usb-audio: add support for Native Instruments MK2 devices
The MK2 generation of Native Instruments' sound cards are in fact
compliant to the USB audio standard of version 2 and other approved USB
standards. However, they come up as vendor-specific device when first
connected but can be told to come up with a new set of descriptors
upon their next enumeration. The interfaces announced by the new
descriptors will be handled by the kernel's class drivers. This is done
by issuing a vendor specific device request and sending the device to
reset.

There are also some vendor-specific USB requests for some mixer elements
that can't be exported in a standard compliant way. The driver now
supports them with quirks handling mechanisms.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:57 +01:00
Daniel Mack df8d81a32f ALSA: snd-usb-caiaq: Add support for Traktor Audio 2
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:45 +01:00
Clemens Ladisch fea952e5cc ALSA: core: sparse cleanups
Change the core code where sparse complains.  In most cases, this means
just adding annotations to confirm that we indeed want to do the dirty
things we're doing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:11 +01:00
Mark Brown f98dedcefd Merge branch 'for-2.6.38' into for-2.6.39 2011-02-13 19:51:04 +00:00
Mark Brown 905f6952c5 ASoC: Warn if WM8903 platform data is used to enable microphone IRQ
The WM8903 interrupts are clear on read so if the WM8903 detection is
enabled from platform data when the IRQ is in use (rather than using a
direct signal from a GPIO) status may be lost during startup. Help users
spot this misconfiguration by adding a WARN_ON().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-13 19:50:20 +00:00
Stephen Warren 8eb34207c8 ASoC: Tegra: Add MODULE_ALIAS
With the appropriate MODULE_ALIAS in place, the audio modules will be
automatically loaded; there is no longer a need for manual modprobes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:10 +00:00
Stephen Warren bf1b132836 ASoC: Tegra: Harmony: Explicitly set mic enables
Harmony has both an external mic (a regular mic jack) and an internal mic
(a 0.1" two-pin header on the board).

The external mic is connected to the WM8903's IN1L pin, and is supported
by the current driver.

The internal mic is connected to the WM8903's IN1R pin, and is not supported
by the current driver.

It appears that no Harmony systems were shipped with any internal mic
connected; users were expected to provide their own. This makes the
internal mic connection less interesting.

The WM8903's Mic Bias signal is used for both of these mics. For each mic,
a GPIO drives a transistor which gates whether the mic bias signal is
actively connected to that mic, or isolated from it.

The dual use of the mic bias for both mics makes a general-purpose complete
implementation of mic detection using the mic bias complex. So, for
simplicity, the internal mic is currently ignored by the driver.

This patch configures the relevant GPIOs to enable the mic bias connection
to the external mic, and disable the mic bias connection to the internal
mic. Note that in practice, this is the default state if these GPIOs aren't
configured.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:10 +00:00
Stephen Warren 0d6cdca719 ASoC: Harmony: Call snd_soc_dapm_nc_pin
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:09 +00:00
Stephen Warren 41b5f9b349 ASoC: Tegra: Harmony: Implement mic detection
* Add jack definition for mic jack
* Request wm8903 to enable mic detection
* Force mic bias on, since it's required for mic detection

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13 19:50:09 +00:00
Mark Brown 3017358a75 ASoC: Ensure supplies are maintained for force enabled widgets
If a widget has been force enabled then not only do we need to keep the
widget itself enabled, we also need to keep any supplies the widget
requires enabled. The user could force all the individual widgets on but
this requires too much knowledge of device internals.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-13 19:49:47 +00:00
Dimitris Papastamos c52fd021bc ASoC: WM8994: Improve playback robustness
On WM8994 revision D and earlier ensure proper playback robustness
as some rare use cases can trigger issues.

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-02-13 19:45:01 +00:00
Dimitris Papastamos 173efa09e4 ASoC: WM8994: Improve robustness in some use cases
Ensure that on disabling certain registers such as AIF1DAC1L,
AIF1DAC1R etc. the AIF1CLK and AIF2CLK remain enabled.  Similarly
when enabling those registers, AIF1CLK and AIF2CLK will remain
disabled.

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-02-13 19:44:54 +00:00
Stephen Warren 3088e3b496 ASoC: WM8903: Fix mic detection enable logic
The mic detection HW should be enabled when either mic or short detection
is required, not when only both are required.

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>
Cc: stable@kernel.org
2011-02-13 19:44:46 +00:00
Linus Torvalds d8ed516f82 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 - add quirk for Ordissimo EVE using a realtek ALC662
  ALSA: hrtimer: remove superfluous tasklet invocation
  ALSA: hrtimer: handle delayed timer interrupts
  ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G
  ALSA: hda - Don't handle empty patch files
  ALSA: hda - Fix missing CA initialization for HDMI/DP
  ALSA: usbaudio - Enable the E-MU 0204 USB
  ALSA: hda - switch lfe with side in mixer for 4930g
  ASoC: Improve WM8994 digital power sequencing
  ASoC: Create an AIF1ADCDAT signal widget to match AIF2
  asoc: davinci: da830/omap-l137: correct cpu_dai_name
  ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
2011-02-13 07:58:50 -08:00
Takashi Iwai 6146124118 Merge branch 'fix/asoc' into for-linus 2011-02-13 10:05:30 +01:00
Takashi Iwai 2b203dbbcb ALSA: hda - Avoid cast with union data for HDMI audio infoframe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 12:18:57 +01:00
Jarkko Nikula 535787b6ae ASoC: Allow use sleeping gpio in soc-jack
It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not
called from interrupt context. This avoids WARN_ON from __gpio_get_value
if sleeping gpio is registered for jack.

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-02-11 11:17:43 +00:00
Vinod Koul 7ae7434086 ASoC: mid-x86: Use the soc-jack apis for jack type detection
This patch modifies the mfld_machine to use the new jack apis for adding the
voltage zones for jack type detection. It also modifed TI sn95031 codec driver
to use these new apis

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-02-11 11:16:29 +00:00
Mark Brown 4a5aa6e9ea Merge branch 'for-2.6.38' into for-2.6.39 2011-02-11 11:14:20 +00:00
Mark Brown b4d06f456d ASoC: Use explicit sequence for WM8903 bias off
This makes no real difference compared to the write sequencer sequence
that was previously used but can run without a clock being provided.
Also remove the write sequencer support code as this was the last use
of it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:14:05 +00:00
Mark Brown 22f226dd14 ASoC: Don't use write sequencer to power up WM8903
The write sequencer sequencer sequence takes longer than is desirable
as it brings up a full playback path which is not required at this
point. Open coding the sequence cuts the startup time by two thirds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:13:56 +00:00
Mark Brown 66daaa59d5 ASoC: Convert WM8903 bias management to use snd_soc_update_bits()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-11 11:13:48 +00:00
Janusz Krzysztofik 8e6bfb9b1f ASoC: CX20442: fix wrong reg_cache_default content
Content of the CX20442's snd_soc_codec_driver.reg_cache_default pointed
area, introduced with my recent NULL pointer dereferece fix (commit
f019ee5feb), occured wrong after further
testing, more thorough than just booting successfully. There are two
problems with it:

1) It should read
	(1 << CX20442_TELOUT) | (1 << CX20442_MIC),
   not
	CX20442_TELOUT | CX20442_MIC.

2) While correctly matching actual codec hardware state on boot when
   fixed per 1), a few more code modifications would still be required
   to reflect that state not only into register cache, but also force
   them into DAPM pins state, otherwise an inconsitency occures which
   may prevent further codec state changes from being applied correctly.
   As a result, the phone stops ringing after reboot, until someone
   picks up the handset for the first time.

Revert that reg_cache_default content to a working, previous de facto
default value of 0, in hope this change can still be accepted as an rc
cycle fix.

Created and tested against linux-2.6.38-rc4

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-11 11:00:30 +00:00
Anisse Astier 965b76d23e ALSA: hda - add quirk for Ordissimo EVE using a realtek ALC662
This netbook has a only one jack output and an internal mic.

By default, mic and jack sense aren't working. Using lenovo-101e
parameters makes both work.

The device seems based on a Sharetronic Q70, so this should fix audio for
this model too.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 08:52:50 +01:00
Clemens Ladisch 2243c4d072 ALSA: hrtimer: remove superfluous tasklet invocation
Commit bb758e9637 removed snd_hrtimer_callback() from the hardware
interrupt handler, thus moving it into a tasklet, but did not tell the
ALSA timer framework about this, so the timer handling would now be done
in the ALSA timer tasklet scheduled from another tasklet.

To fix this, add the flag to tell the ALSA timer framework that the
timer handler is already being invoked in a tasklet.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:53:32 +01:00
Clemens Ladisch b1d4f7f4bd ALSA: hrtimer: handle delayed timer interrupts
If a timer interrupt was delayed too much, hrtimer_forward_now() will
forward the timer expiry more than once.  When this happens, the
additional number of elapsed ALSA timer ticks must be passed to
snd_timer_interrupt() to prevent the ALSA timer from falling behind.

This mostly fixes MIDI slowdown problems on highly-loaded systems with
badly behaved interrupt handlers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:53:29 +01:00
Eliot Blennerhassett 88b27fdac8 ALSA: asihpi - HPI v4.06
Firmware version check depends on hpi version. Update so correct firmware
is accepted.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:41 +01:00
Eliot Blennerhassett c4ed97d9e7 ALSA: asihpi - Fix outstream start trigger for non-mmap adapters.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:40 +01:00
Eliot Blennerhassett 7f41b61b3b ALSA: asihpi - Tighten firmware version requirements.
Difference in major.minor between driver and firmware is an error now.
Release version mismatch give a warning.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:39 +01:00
Eliot Blennerhassett c188dec310 ALSA: asihpi - Ensure all adapter data is cleared on device removal.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett a287ca2ade ALSA: asihpi - Minor define updates
HPI version 4.05.32
Tweak HPI error code for backward compatibility.
Add BUILD to build-related defines.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett bd33c1cad2 ALSA: asihpi - New functions prep for interrupt driven streams.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:37 +01:00
Eliot Blennerhassett 827492acb0 ALSA: asihpi - Use consistent err return variable, change some bad variable names.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:36 +01:00
Eliot Blennerhassett ba3a909962 ALSA: asihpi - Remove unused code and data.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:35 +01:00
Eliot Blennerhassett ee246fc041 ALSA: asihpi - Clarify firmware id selection.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:34 +01:00
Eliot Blennerhassett d6f1c1c364 ALSA: asihpi - Allow adapters with duplicate index jumpers to be discovered.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:33 +01:00
Eliot Blennerhassett fc3a399019 ALSA: asihpi - Add volume mute control.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 1225367a48 ALSA: asihpi - Add snd_card_set_dev to init.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 2f918a6445 ALSA: asihpi - Replace adapter list with single item in subsys response.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:31 +01:00
Eliot Blennerhassett 1d595d2a21 ALSA: asihpi - Cosmetic + a minor comments.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:30 +01:00
Eliot Blennerhassett 4b60221c04 ALSA: asihpi - Remove int flag polling code preparing for stream interrupts.
Interrupt flag used for message handshake will be required for
stream interrupts, so conditionally compiled code without
HPI6205_NO_HSR_POLL defined can never be used;  removing it.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:29 +01:00
Eliot Blennerhassett 4704998e84 ALSA: asihpi - Code cleanup.
Remove unused function.
Simplify hpi_alloc_control_cache.
Remove useless assignment to struct subsequently freed.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:28 +01:00
Eliot Blennerhassett 0a00044d26 ALSA: asihpi - Reduce number of error codes returned to upper layers.
Create and use HPI_ERROR_DSP_COMMUNICATION _DSP_BOOTLOAD, rather than
backend-specific error codes (now returned as data with the error).

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:27 +01:00
Eliot Blennerhassett ba94455c29 ALSA: asihpi - Remove unused subsys pointer from all HPI functions.
asihpi.c don't link playback and capture streams, there is too much
offset between them.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:26 +01:00
Eliot Blennerhassett deb21a2334 ALSA: asihpi - Update error codes.
Some error codes had duplicate meanings. Just use one.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:25 +01:00
Eliot Blennerhassett 1528fbb5dc ALSA: asihpi - Checkpatch line lengths etc.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:25 +01:00
Eliot Blennerhassett 14652e67ff ALSA: asihpi - Add include guard.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:24 +01:00
Eliot Blennerhassett ffdb578746 ALSA: asihpi - Add adapter index to cache info for debug.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:23 +01:00
Eliot Blennerhassett e64b1a28c5 ALSA: asihpi - Rewrite PCM timer function. Update control names.
Reported samples_played from card may be inaccurate, so don't use it.
Update control names to be closer to alsa standard practice.
Also fixed some accidentally lowercased strings.

[Removed adriver.h inclusion for external module builds by tiwai]

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:48:51 +01:00
Eliot Blennerhassett 3285ea10e9 ALSA: asihpi - Interrelated HPI tidy up.
Remove many unused functions.
Update some message and cache structs.
Use pci info directly from pci_dev.
Allow control cache elements with variable size, and handle
large message/response from dsp.
hpi6000 and hpi6205: fix error path when adapter bootload fails.
hpimsgx.c get rid of code duplicated in hpicmn.c

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:22:40 +01:00
Eliot Blennerhassett ad210ad10e ALSA: asihpi - HPI 4.05.14
All enum values numeric for easier finding, particularly error codes.
Remove many unused declarations.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:22:08 +01:00
Eliot Blennerhassett f0dcad41ac ALSA: asihpi - Simplify debug logging.
Log HPI messages and responses in consistent numeric format,
which can be post-processed to get strings.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:21:36 +01:00
Eliot Blennerhassett 0a1602c02b ALSA: asihpi - Poison adapter_index in message. Remove unused function.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:21:05 +01:00
Eliot Blennerhassett 5ed15dafa3 ALSA: asihpi - Switch to dev_printk.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:20:39 +01:00
David Henningsson a6c47a85b8 ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G
According to the reporter, node 0x15 needs to be muted for subwoofer
to stop sounding. This pin is marked as unused by BIOS, so fix that.

BugLink: http://bugs.launchpad.net/bugs/715877

Cc: stable@kernel.org (2.6.37+)
Reported-by: Hans Peter
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 17:41:39 +01:00
Takashi Iwai 41a63f18d3 ALSA: hda - Don't handle empty patch files
When an empty string is passed to patch option, the driver should
ignore it.  Otherwise it gets an error by trying to load it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 17:39:20 +01:00
Mark Brown c5b6a9feae ASoC: Actively manage WM8903 DC servo configuration
Explicitly cache the DC servo offsets for digital paths in the driver,
allowing them to be preserved over suspend and resume, and ensure that
we recalibrate analogue outputs paths when they are in use so that we
cover any changes in the input offset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-10 10:45:05 +00:00
Vinod Koul fa9879edeb ASoC: add support for multiple jack types
This patch adds soc-jack support for adding voltage zones and for
detecting jack type

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-02-09 23:02:43 +00:00
Mark Brown 866fd9366a Merge branch 'for-2.6.38' into for-2.6.39 2011-02-09 22:52:08 +00:00
Mark Brown b66a70d5e9 ASoC: Sync initial widget state with hardware
ASoC generally uses the register defaults for everything, but in some
cases the hardware will default to enabling some of the DAPM widgets
(clocks for example). Ensure that DAPM knows about the actual widget
state at initialisation by reading the enable bits after instantiating
the widgets so they don't get left enabled needlessly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:51:12 +00:00
Mark Brown e12adab002 ASoC: Fix WM8903 DAC mute default
The WM8903 register map does not mute the DAC by default at startup
so we need to explicitly do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:50:16 +00:00
Mark Brown 2c8be5a26e ASoC: Dynamically manage CLK_SYS in WM8903
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:50:03 +00:00
Mark Brown 13a9983eb1 ASoC: Convert WM8903 to use PGA_S for output stage enables
This simplfies the code and slightly reduces the startup time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:49:52 +00:00
Mark Brown 1e113bf9e0 ASoC: Add support for AIF channel muxing on WM8903
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:48:26 +00:00
Mark Brown 1d8d62d637 ASoC: Display WM8903 chip revision alphabetically
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:48:17 +00:00
Mark Brown 4b592c919c ASoC: Remove redundant -codec from WM8903 driver name
It causes noisy -codecs to appear in things like .codec_name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09 22:47:56 +00:00
Vaibhav Bedia 4f82f02852 ASoC: Davinci: Replace usage of IO_ADDRESS with ioremap()
This patch modifies the Davinci i2s and mcasp drivers to make use of
ioremap() instead of IO_ADDRESS()

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09 22:33:32 +00:00
Vaibhav Bedia eef6d7b8c2 ASoC: Davinci: Call clk_disable() and clk_put() in case of error
In case of any error in probe() function, clk_disable() and clk_put()
should be called if clk_enable() and clk_get() went through.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09 22:33:16 +00:00
Vaibhav Bedia d852f446b7 ASoC: Davinci: Use resource_size() helper function
This patch modifies the Davinci i2s and mcasp drivers
to make use of the resource_size() helper function for readability.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09 22:33:03 +00:00
Vinod Koul 36633237be ASoC: sn95031: Add support for reading mic bias
This patch adds support to read the mic bias voltage
when a jack is inserted. It uses ADC to measure.

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-02-09 22:32:53 +00:00
Vinod Koul 42aee9b43e ASoC: mfld_machine: Add support for jack detection
This patch adds support for registering jack interupt
and registering jack with core

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-02-09 22:32:39 +00:00
Vinod Koul 1e2f5932e4 ASoC: sn95031: Add jack support in the codec
This patch adds support for jack detection and reporting in the codec
It however is not fully functional as it doesn't measure adc to figure
out what got inserted which will 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-02-09 22:32:26 +00:00
Stephen Warren 3d8bc39010 ASoC: Tegra: Harmony: Add switch control for speaker
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-09 12:11:05 +00:00
Stephen Warren f7d3e403d7 ASoC: Tegra: Harmony: Add headphone jack detection
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-09 12:10:53 +00:00
Takashi Iwai 11839aed21 ALSA: hda - Fix missing CA initialization for HDMI/DP
The commit 53d7d69d8f
    ALSA: hdmi - support infoframe for DisplayPort
dropped the initialization of CA field accidentally.
This resulted in only two-channel LPCM mode on Nvidia machines.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-02-08 17:29:28 +01:00
Dan Carpenter 46fdaa3bec ASoC: soc-cache: dereferencing before checking
The patch c358e640a6 "ASoC: soc-cache: Add trace event for
snd_soc_cache_sync()" introduced a dereference of "codec->cache_ops"
before we had checked it for NULL.

I pulled the check forward, and then pulled everything in an indent
level.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-08 11:27:45 +00:00
Alexander Sverdlin a98a0bc6c9 ASoC: CS4271: Move Chip Select control out of the CODEC code.
Move Chip Select control out of the CODEC code for CS4271.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Reviewed-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-02-08 11:26:14 +00:00
Joseph Teichman 1cdfa9f34a ALSA: usbaudio - Enable the E-MU 0204 USB
Signed-off-by: Joseph Teichman <josteich@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-08 08:36:04 +01:00
Russell King 1f63b9546a Merge branch 'fixes' 2011-02-07 19:07:10 +00:00
Dan Carpenter 8121d91c02 ALSA: USB: 6fire: signedness bug in usb6fire_pcm_prepare()
rt->rate is an unsigned char so it's never equal to -1.  It's not a huge
problem because the invalid rate is caught inside the call to
usb6fire_pcm_set_rate() which returns -EINVAL.  But if we fix the test
then it prints out the correct error message so that's good.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 18:30:10 +01:00
Russell King 7c289385b8 ALSA: AACI: allow writes to MAINCR to take effect
The AACI TRM requires the MAINCR enable bit to be held zero for two
bitclk cycles plus three apb_pclk cycles.  Use a delay of 1us to
ensure this.

Ensure that writes to MAINCR to change the addressed codec only happen
when required, and that they take effect in a similar manner to the
above, otherwise we seem to occasionally have stuck slot busy bits.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-07 15:15:26 +00:00
Łukasz Wojniłowicz 460c92fa38 ALSA: hda - switch lfe with side in mixer for 4930g
Built-in sub-woofer can now be controlled by lfe slider instead of
side slider on Acer Aspire 5930g

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 13:14:33 +01:00
Lars-Peter Clausen 338ee25393 ASoC: codecs: wm8753: Fix DAI mode switching
The wm8753 codec supports switching between different DAI modes.
The current drivers tries to implement this by changing the DAI driver at
runtime. But to properly work this would require support from the ASoC core.

So this patch takes a different approch on how the DAI mode switching is
implemented.

The only difference, from a driver point of view, between the different DAI modes
is how to program the DAI format to the hardware. So what this patch is, it
stores the current format for each DAI in the drivers private struct and when
the DAI mode is changed the format gets simply reprogrammed according to the
new DAI mode.

Futhermore this patch restricts the changing of the DAI format to when the
codec is inactive.

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>
2011-02-07 12:02:49 +00:00
Vinod Koul 480b08d0bb ASoC: mid-x86: Fix dependency on intel_sst driver
Enabling medfield asoc driver causes compliation error when intel_sst
is not selected
ERROR: "register_sst_card" [sound/soc/mid-x86/snd-soc-sst-platform.ko]
undefined!

This patch puts proper dependency to elimate build error

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-07 11:23:45 +00:00
Linus Torvalds 585a7c666e 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: use linux/io.h to fix compile warnings
  ALSA: hda - Fix memory leaks in conexant jack arrays
  ASoC: CX20442: fix NULL pointer dereference
  ASoC: Amstrad Delta: fix const related build error
  ALSA: oxygen: fix output routing on Xonar DG
  sound: silent echo'ed messages in Makefile
  ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
  ASoC: DaVinci: fix kernel panic due to uninitialized platform_data
  ALSA: HDA: Fix microphone(s) on Lenovo Edge 13
  ASoC: Fix module refcount for auxiliary devices
  ALSA: HDA: cxt5066 - Use asus model for Asus U50F, select correct SPDIF output
  ALSA: HDA: Add a new model "asus" for Conexant 5066/205xx
  ALSA: HDA: Refactor some redundant code for Conexant 5066/205xx
2011-02-06 12:02:42 -08:00
Takashi Iwai 00e6a31984 Merge branch 'fix/asoc' into for-linus 2011-02-04 17:08:53 +01:00
Mika Westerberg 10b6089a69 ASoC: ep93xx-ac97: remove extra empty line
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-04 14:36:30 +00:00
Mark Brown 7d7a7e0438 Merge branch 'for-2.6.38' into for-2.6.39 2011-02-03 20:17:54 +00:00
Mark Brown 6ed8f1485f ASoC: Improve WM8994 digital power sequencing
On WM8994 revision D and earlier ensure optimal sequencing with
simultaneous usage of AIF1 and AIF2 by tying the signals together
so if paths through both are connected the streams are started
simultaneously.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-02-03 20:17:13 +00:00
Mark Brown 7f94de483f ASoC: Create an AIF1ADCDAT signal widget to match AIF2
Due to the different routing for AIF1 and AIF2 we weren't using a
single widget to represent the ADCDAT signal. For consistency add
one.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-02-03 20:16:46 +00:00
Vaibhav Bedia f9eb9dd14c asoc: davinci: da830/omap-l137: correct cpu_dai_name
McASP1 is used on the DA830/OMAP-L137 platform for the codec.
This is different from the DA850/OMAP-L138 platform which uses McASP0.

This is fixed by adding a new snd_soc_dai_link struct.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-03 20:16:09 +00:00
Mark Brown c45bfccfa2 ASoC: Sort ALC5623 in Kconfig and Makefile
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-03 20:13:48 +00:00
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