Commit Graph

7135 Commits

Author SHA1 Message Date
Greg Alexander cfd3d8dcf7 ALSA: hda - Add support for Lenovo IdeaPad U150
Add patch for the Conexant 5066 HDA codec to support the Lenovo IdeaPad U150

Signed-off-by: Greg Alexander <greigs@galexander.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-13 10:16:05 +01:00
Linus Torvalds e99cc290ca Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - use WARN_ON_ONCE() for zero-division detection
2010-02-12 10:12:28 -08:00
Takashi Iwai d6d8bf5493 ALSA: hda - use WARN_ON_ONCE() for zero-division detection
Replace the zero-division warning message with WARN_ON_ONCE() per the
advice by Linus.  This shouldn't happen, but if it happens, it's
possible that the bug happens often due to buggy IRQs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-12 18:20:04 +01:00
Linus Torvalds 0e9695d9a4 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda-intel: Avoid divide by zero crash
2010-02-12 08:48:47 -08:00
Mark Brown 3a66d3877e ASoC: Add WM2000 driver
The WM2000 is a low power, high quality handset receiver speaker
driver with Wolfson myZone™ Ambient Noise Cancellation (ANC). It
provides enhanced voice communication quality in a noisy environment
if the handset acoustics are designed appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-12 10:31:06 +00:00
Guennadi Liakhovetski 6db29675b1 ASoC: fix compile breakage if CONFIG_SH_DMA_API=y && CONFIG_SND_SIU_MIGOR!=n
Audio on Migo-R cannot work if CONFIG_SH_DMA_API=y, but compilation should not
break anyway.

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>
2010-02-12 10:18:52 +00:00
Takashi Iwai a540e13386 Merge remote branch 'alsa/devel' into topic/misc 2010-02-12 10:42:38 +01:00
Thomas Weber 867af973a3 Add ASoC support for Devkit8000
This patch expands the omap3beagle sound soc for the
beagle board clone DevKit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-11 19:49:48 +00:00
Jaroslav Kysela c3a3e040f0 ALSA: usbmixer - add possibility to remap dB values
USB devices tends to represent dB ranges in different way than ALSA expects.
Add possibility to override these values and add guessed values for
SoundBlaster MP3+.

Also rename 'Capture Input Source' control to 'Capture Source' for
SoundBlaster MP3+ and Extigy.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-11 18:00:16 +01:00
Paul Menzel c6848bf566 ASoC: Typo. s/Freecale/Freescale/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 11:14:42 +00:00
Peter Ujfalusi c42a59ea27 ASoC: TWL4030: Add supply for audio serial interface control
The serial interface (TDM/I2S) for the audio block have been
constantly enabled.
Introduce a new DAPM_SUPPLY for handling the AIF_EN bit, so
the interface is only enabled, when there is a need for it.
For example when only the analog loopback is enabled, there
is no need to keep the serial interface active.

I have added the persons who contributed to the Voice path
of twl4030 codec driver, so they might have the ability
to test this patch, and send an update for the Voice path,
if it is necessary

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 11:14:13 +00:00
Daniel Mack c0ff4bcd2e ASoC: cs4270: enable regulators at probe time
Enable the bulk regulators at probe time so we can safely disable them
again when going to suspend without confusing the reference counter.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 10:42:56 +00:00
Mark Brown 22313eafe9 ASoC: add phycore-ac97 sound support
This patch adds sound support for Phytec PhyCORE / PhyCARD
modules in AC97 mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-10 10:42:33 +00:00
Takashi Iwai b2d6efe7fa Merge branch 'fix/hda' into topic/hda 2010-02-09 21:34:18 +01:00
Jody Bruchon fed08d036f ALSA: hda-intel: Avoid divide by zero crash
On my AMD780V chipset, hda_intel.c can crash the kernel with a divide by
zero
for as-yet unknown reasons. A simple check for zero prevents it, though
the problem that causes it remains. Since the workaround is harmless and
won't affect anyone except victims of this bug, it should be safe;
moreover,
because this crash can be triggered by a user-mode application, there are
denial of service implications on the systems affected by the bug without
the patch.

Signed-off-by: Jody Bruchon <jody@nctritech.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 21:33:33 +01:00
Grant Likely 71a157e8ed of: add 'of_' prefix to machine_is_compatible()
machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-09 08:33:00 -07:00
Daniel Mack 3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Alexey Dobriyan cebe41d4b8 sound: use DEFINE_PCI_DEVICE_TABLE
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 11:08:33 +01:00
Takashi Iwai dce17d4ff3 ALSA: hda - Fix default polarity of mute-LED GPIO on 92HD83x/88x codecs
The previous commit caused a regression on HP laptops with 92HD83x/88x
codecs.  The default polarity of mute-LED GPIO is inverted on these
devices.

Reference: Novell bnc#578190
	https://bugzilla.novell.com/show_bug.cgi?id=578190

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 09:25:26 +01:00
Takashi Iwai b99a776d0b ALSA: hda - Remove static gpio_led setup via model
We have now a better mute-LED GPIO detection, and no need to assign the
values statically per model option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:21:09 +01:00
Takashi Iwai c21bd02543 ALSA: hda - Merge HP mute-LED status callback on both IDT 92HD7x and 8x codecs
Merge the mute-LED status callback function for both IDT 92HD7x and 8x
codecs to one function.  Also it's changed to check all DACs, and called
in the initialization to sync with the current status.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:19:51 +01:00
Takashi Iwai 07f804495c ALSA: hda - Detect HP mute-LED GPIO setup from GPIO counts
The GPIO pin number for the mute LED control on HP laptops can be
determined more easily by checking the number of available GPIO pins
of the codec chip.  On a small package with up to 3 GPIOs, GPIO 0 is
used while GPIO 3 is used for others.

This fixes the missing mute GPIO for some HP laptops with new codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-08 15:06:13 +01:00
Takashi Iwai 3e0b33f786 Merge remote branch 'alsa/fixes' into for-linus 2010-02-05 19:57:23 +01:00
Takashi Iwai a26a408888 Merge branch 'fix/asoc' into for-linus 2010-02-05 19:57:16 +01:00
Takashi Iwai db9256c003 Merge branch 'fix/hda' into for-linus 2010-02-05 19:56:55 +01:00
Grazvydas Ignotas c50749de02 ASoC: pandora: Add DAC regulator support
Pandora's external DAC is connected to VSIM TWL4030 supply, so let's
start switching it too to save more power.
Also DAC got it's own DAPM handler.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-05 17:08:16 +00:00
Mark Brown 4f2c120d18 Merge branch 'for-2.6.33' into for-2.6.34 2010-02-05 12:43:50 +00:00
Grazvydas Ignotas 3b9447fb7f ASoC: pandora: Add APLL supply to fix audio output
Pandora's external DAC is using 256*Fs output from the TWL4030
codec, and TWL4030 needs to have APLL enabled for it's 256*Fs
output to function.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-05 12:35:35 +00:00
Jaroslav Kysela 9d4c746445 ALSA: ice1724 - aureon - fix wm8770 volume offset
The volume register is from 0..0x7f and 0..0x1a range is mute.
Also, fix mute combining in wm_vol_put(). The wrong behaviour was
noticed by Peter Christensen.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-05 10:24:25 +01:00
Takashi Iwai 794d620650 Merge branch 'fix/hda' into topic/hda 2010-02-05 09:09:25 +01:00
Maxim Levitsky 9492837a6f ALSA: cosmetic: make hda intel interrupt name consistent with others
This renames the interrupt name in /proc/interrupt.
HDA Intel -> hda_intel

This also eliminates space from the name, probably helping some
parsers.
Don't think anybody depends on this name in userspace

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 09:08:14 +01:00
Maxim Levitsky 1eb6dc7dab ALSA: hda - Delay switching to polling mode if an interrupt was missing
My sound codec seems sometimes (very rarely) to omit interrupts (ALC268)
However, interrupt mode still works.
Thus if we get timeout, poll the codec once.

If we get 3 such polls in a row, then switch to polling mode.

This patch is maybe an bandaid, but this might be a workaround for hardware bug.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 09:07:21 +01:00
Sebastien Alaiwan 350a514787 ALSA: ice1712: fix: lock samplerate when samplerate locking is enabled
I found that the sampling rate locking setting of the ice1712 sound driver
was only half-respected : when the driver was locked to, let's say, 44100Hz,
and a usermode app was requesting 48000Hz playback, the request was succesful
although the soundcard would continue to run at 44100Hz.

Here's a patch that will make those requests to fail.

Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-05 08:58:20 +01:00
Jaroslav Kysela 21956b61f5 ALSA: ctxfi - fix PTP address initialization
After hours of debugging, I finally found the reason why some source
and runtime combination does not work. The PTP (page table pages)
address must be aligned. I am not sure how much, but alignment to
PAGE_SIZE is sufficient. Also, use ALSA's page allocation routines
to ensure proper virtual -> physical address translation.

Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-04 21:48:00 +01:00
Kailang Yang cec27c891b ALSA: hda - Add support of ALC665
- Add support for ALC665
- Add more ASUS model
- Modify common patch for ALC272 ALC273 ALC661 ALC662 ALC663 ALC665

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:18:18 +01:00
Kailang Yang 84898e87cc ALSA: hda - Add ALC269VB support
- Add new models ALC269VB_AMIC ALC269VB_DMIC
- Add alc269vb_laptop_dmic_setup
       The record source index Dmic is 0x6 for ALC269VB.
- Change eeepc words for ALC269
- Modify init_verb tables of patch_alc269 patch_alc662 patch_alc882
- Modify common patch for ALC270 ALC269VB ALC275

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:16:14 +01:00
Kailang Yang 88102f3f84 ALSA: hda - Remove superfluous init verb entries for ALC88[235]
The default values are no need to be set in init_verbs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 14:16:01 +01:00
Peter Ujfalusi cb67286d66 ASoC: TWL4030: Module unloading fix
The module unloading path had several problems:
- it freed up the private structure twice
- it freed up the codec structure, which was allocated as part
  of the private structure
- it did not freed up the reg_cache
- it did not unregistered the dais and the codec

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-04 10:49:04 +00:00
Mark Brown 8c1264740e ASoC: Add WM8912 DAC support
The WM8912 is a DAC only device register compatible with the WM8904
CODEC with ADC portions omitted.  Support it within the WM8904 driver
based on the configured I2C device name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:43:10 +00:00
Mark Brown e4bc669610 ASoC: Optimise WM8904 output stage power control
Handle the output PGAs as part of the output powerup since they can
never be powered separately and reorder things so that we remove the
output shorts after both line and headphone outputs have been brought
up, minimising the opportunity for any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:42:21 +00:00
Mark Brown c133421800 ASoC: Add support for BIAS_OFF when idle to WM8904
As well as disabling the biases of the CODEC the drop into BIAS_OFF will
also disable all the regulators powering the CODEC, allowing even greater
power savings on appropriately configured systems.

Since the regulator API does not currently provide notification when
regulators are disabled we assume that this always happens when we stop
using the regulators. Once 2.6.34 is merged this code can be optimised
to only sync the cache when power was actually removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:42:07 +00:00
Mark Brown cf56f62746 ASoC: Disable WM8993 regulators when turning bias off
While the regulators are disabled we cache all register writes.
Currently we assume that the regulator disable actually takes
effect, after the merge with the regulator tree in 2.6.34 the
regulator API will be able to notify us if the power is actually
removed (due to constraints or regulator sharing it may not be).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:41:54 +00:00
Mark Brown b37e399bfc ASoC: Initial WM8993 regulator API hookup
At the minute the regulators are simply enabled for the entire
lifetime of the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:41:09 +00:00
Mark Brown 3bf6e4217e ASoC: Convert WM8993 to use shared cache I/O code
Saves a little bit of code duplication.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:40:55 +00:00
Mark Brown a3032b47c4 ASoC: Add a cache_sync bit to the CODEC structure
Add a bit to the CODEC structure indicating if a cache sync is required.
By default this will be set if a cache only write is done to a soc-cache
register cache.  This allows us to avoid syncing the cache back after
using cache only writes if there were no changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-04 10:40:45 +00:00
Charles Chin 04b5efe5fa ALSA: hda - Fix docking output for IDT 92HD8xx codecs
This patch fixes docking output support for IDT 92HD81/83/88 family codecs.
Typically one of ports 0xE or 0xF is used for docking output, while only
port 0xF is common on all the three codec families.  We don't want the
pin to select the analog mixer here.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 10:28:02 +01:00
Vitaliy Kulikov a9694faa28 ALSA: hda - Adding support for another IDT 92HD83XXX codec
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 08:58:23 +01:00
Mark Brown 8c961bcca1 ASoC: Allow CODECs to ask soc-cache to suppress physical writes
Currently the soc-cache code will always write to the device, meaning
that we need the device to be powered and active at pretty much all
times the system is active.  Allowing cache only writes lays some
groundwork for future enhancements to allow devices to be put into a
full off state when the audio subsystem is idle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-03 18:03:37 +00:00
Guennadi Liakhovetski 0f69d9782c ASoC: fix compilation breakage in sound/soc/sh/fsi.c
ctrl_outl() has become void at some point, which breaks compilation of fsi.c.
Make writing functions void, as their output is anyway not evaluated, and use
__raw_writel and __raw_readl instead of deprecated ctrl_outl and ctrl_inl
respectively.

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>
2010-02-03 18:03:37 +00:00
Jaroslav Kysela d5e1ca05f7 ALSA: dummy driver - add model parameter
This is a cleanup for the dummy driver. The model kernel module parameter
is introduced to select the soundcard emulation.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-02 17:50:57 +01:00
Daniel Mack 026384d614 ASoC: fix PXA SSP port resume
Unconditionally save the register states when suspending and restore
them again at resume time. Register contents were not preserved over
suspend, and hence the driver takes false assumptions about them.

The clock must be enabled to access the register block.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-02 11:41:53 +00:00
Joe Perches 59cdd9bc05 ASoC: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-02 11:41:47 +00:00
Joonyoung Shim 07cd8ada1a ASoC: Fix BCLK calculation of WM8994
This fixes BCLK calculation and removes unnecessary check code.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-02 11:21:11 +00:00
Mark Brown fead215d1c ASoC: Fix WM8994 dependency
The dependency on MFD_WM8994 rather than I2C went awry.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-02 11:11:34 +00:00
Thadeu Lima de Souza Cascardo c85a400499 ALSA: trivial: sound seq ioctl dbg: print hexadecimal value padded with 0s
Instead of padding with blanks and printing "number=0x a", print
"number=0x0a".

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-02 00:27:47 +01:00
Mark Brown 9e6e96a197 ASoC: Add WM8994 CODEC driver
The WM8994 is a highly integrated ultra-low power hi-fi audio subsystem
designed for smartphones and other portable devices rich in multimedia
features.  It provides advanced digital mixing facilities enabling low
power high quality interconnection of CPU, baseband and other audio
sources through flexible digital and analogue routing, and integrates
a class W headphone driver and stereo class D speaker drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-01 18:37:01 +00:00
Mark Brown be587ef4f2 ASoC: Activate DCS correction for WM8993
Use a two code correction for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-01 18:36:16 +00:00
Mark Brown 3ed7074c4c ASoC: Improved wm_hubs headphone handling
Perform DC servo offset calibration using a series update sequence
rather than startup update sequence, tuning the configuration of the
WM8993 DC servo to make best use of this.

Also introduce currently unused data allowing us to correct for
any systematic errors in the DC servo calibration results and an
alternative startup path for the headphone output which performs
better with some chip revisions.  The alternative setup sequence is
enabled for WM8993.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-01 18:35:46 +00:00
Takashi Iwai 30ede1b9f0 Merge remote branch 'alsa/devel' into topic/misc 2010-02-01 15:46:00 +01:00
Joe Perches 2f1ff6614c ASoC: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-01 14:35:23 +00:00
Guennadi Liakhovetski b058091379 ASoC: improve MCLKDIV calculation in wm8978, when OPCLK is not used
In case, if OPCLK is not used, and PLL is used for driving the codec, the
choice of PLL output frequency could result in a needlessly imprecise
system clock frequency. Use an iterative process to select a precise
configuration.

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>
2010-02-01 14:35:08 +00:00
Clemens Ladisch 6123637faf sound: control: fix minimum TLV length
Allow TLV blocks that do not have any values; the smallest possible TLV
is an empty container or one where the information is only in the tag.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-01 14:12:12 +01:00
Clemens Ladisch a75d7a4cf5 sound: control: actually allow TLV command access
Creating a control with TLV_COMMAND access was not possible because
snd_ctl_new1() forgot to include it in the mask of allowable access
bits.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-01 14:11:52 +01:00
Takashi Iwai f3f1e14ce9 Merge branch 'fix/asoc' into for-linus 2010-01-31 14:41:05 +01:00
Takashi Iwai 74ce25c0ee Merge branch 'fix/hda' into for-linus 2010-01-31 14:40:58 +01:00
Guennadi Liakhovetski b2c3e92311 ASoC: clean up wm8974 and wm8978 clock divider handling
wm8974 and wm8978 codec drivers control DAC and ADC oversampling rates in their
.set_clkdiv() methods, which is wrong, because these are simple boolean
switches and not clock dividers. Move these bits to sound controls. Also remove
manual configuration of the MCLK divider in wm8978, since it is configured
automatically.

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>
2010-01-29 14:32:52 +00:00
Mark Brown 660c63a4a2 Merge branch 'for-2.6.33' into for-2.6.34 2010-01-29 14:31:06 +00:00
Guennadi Liakhovetski 640b796f2c ASoC: remove bogus SLEEP mode from wm8978 driver
Tests showed, that bit 6 of the WM8978_POWER_MANAGEMENT_2 register of wm8978
affects codec clocks. Being useless for suspend / resume, it cannot be used in
bias-level control either. Remove this bit handling.

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>
2010-01-29 14:31:03 +00:00
Guennadi Liakhovetski 9f5b64b767 ASoC: add support for the sh7722 Migo-R board
Add support for audio on sh7722-based Migo-R boards, using SIU and wm8978
codec, recording via external microphone and playback via headphones are
implemented.

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>
2010-01-29 14:31:02 +00:00
Jassi Brar 9e9d04c05f ASoC: AC97: SMDK-WM9713: Convert notes from cset to sset
It's more robust when references are provided in control names
rather than numid.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-29 14:02:34 +00:00
Anuj Aggarwal 5bbd4953a4 ASoC: AM3517: ASoC driver not getting compiled
Commit 761c9d45 (ASoC: Fix build of OMAP sound drivers) changes
CONFIG_MACH_OMAP3517EVM -> CONFIG_SND_OMAP_SOC_OMAP3517EVM in the
Makefile. Whereas the config option defined in Kconfig is
SND_OMAP_SOC_AM3517EVM. Because of this, ASoC driver for AM3517
was not getting compiled.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-29 13:43:51 +00:00
Anuj Aggarwal 3e59aaa7ae ASoC: AIC23: Fixing writes to non-existing registers in resume function
Commit e9ff5eb2 (Fixing infinite loop in resume path) uses wrong AIC23
register in resume function because of which register writes happen
on some non-existing registers.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-29 13:42:37 +00:00
Charles Chin 36706005d9 ALSA: hda - Add support for IDT 92HD88 family codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-29 12:05:51 +01:00
Grant Likely 0ada0a7312 Merge commit 'v2.6.33-rc5' into secretlab/test-devicetree 2010-01-28 14:38:25 -07:00
Grant Likely 6016a363f6 of: unify phandle name in struct device_node
In struct device_node, the phandle is named 'linux_phandle' for PowerPC
and MicroBlaze, and 'node' for SPARC.  There is no good reason for the
difference, it is just an artifact of the code diverging over a couple
of years.  This patch renames both to simply .phandle.

Note: the .node also existed in PowerPC/MicroBlaze, but the only user
seems to be arch/powerpc/platforms/powermac/pfunc_core.c.  It doesn't
look like the assignment between .linux_phandle and .node is
significantly different enough to warrant the separate code paths
unless ibm,phandle properties actually appear in Apple device trees.

I think it is safe to eliminate the old .node property and use
phandle everywhere.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-01-28 14:06:53 -07:00
Vitaliy Kulikov e108c7b79e ALSA: hda - Add mute LED check for HP laptops with IDT 92HD83xxx codec
This patch adds HP mute LED support for IDT 92HD81/3 family of the codecs.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 19:21:07 +01:00
Takashi Iwai 30ed7ed11c ALSA: hda - Fix index of HP Compaq F700 mic amp
The amp used for the mic input on HP Compaq F700 with Cxt5051 codec
has no multiple inputs, thus its index should be 0 instead of 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:11:45 +01:00
Takashi Iwai c893622251 ALSA: hda - Define max number of PCM devices in hda_codec.h
Define the constant rather in the common header file.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:08:53 +01:00
Wei Ni 7b36ea967c ALSA: hda - Change the AZX_MAX_PCMS to 10
In hda_codec.c, it has define
"[HDA_PCM_TYPE_HDMI]  = { 3, 7, 8, 9, -1 },",
it support up to device 9 for HDMI.
But in hda_intel.c, it only define AZX_MAX_PCMS as 8.
So if it have 4 hdmi codecs, when run azx_attach_pcm_stream(),
it will show error "Invalid PCM device number 8", and "... number 9",
and return "-EINVAL".
We should change the AZX_MAX_PCMS to 10.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:06:19 +01:00
Mark Brown 2718625fba ASoC: Set codec->dev for AC97 devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-28 14:35:43 +00:00
Mark Brown e03a8d2cf6 ASoC: Add TLV information and additional volumes to WM9713
Also renames a few things to make volumes and switches match up in
alsamixer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-28 14:35:20 +00:00
Mark Brown fb58a2ff30 ASoC: Remove version display from WM9713
The version isn't being updated or used, the kernel revision
tracking is enough.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-28 14:35:01 +00:00
Peter Ujfalusi c812459396 ASoC: TWL4030: Modify codec default settings
Change the legacy default register configuration, which left some
internal components on.
Now we have either DAPM, or other ways to control these bits,
so there is no need to enable them by default.

The affected parts:
Disable ADCL and ADCR
Disable ARXL2 and ARXR2 analog PGA (playback)
Disable APLL by default

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-28 14:33:10 +00:00
Kuninori Morimoto 8fc176d5ab ASoC: fsi: Add spin lock operation for accessing shared area
fsi_master_xxx function should be protected by spin lock,
because it are used from both FSI-A and FSI-B.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-28 12:44:22 +00:00
Takashi Iwai b09f3e78ee ALSA: hda - Allow override more fields via patch loader
Allow the override of vendor-id, subsystem-id, revision-id and chip name
via patch loading.  Updated the document, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 00:04:21 +01:00
Guennadi Liakhovetski 0d34e91596 ASoC: add a WM8978 codec driver
The WM8978 codec from Wolfson Microelectronics is very similar to
wm8974, but is stereo and also has some differences in pin configuration
and internal signal routing. This driver is based on wm8974 and takes
the differences into account.

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>
2010-01-27 20:55:35 +00:00
Mark Brown 583b2be626 ASoC: Note jumper settings for smdk_wm9713 driver on SMDK6410
The board supports both GPIO sets for the AC97 bus and the analogue
outputs can be switched between this and the WM8580 so add some
comments saying what the setup the standard kernel expects is.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:54:13 +00:00
Jassi Brar 7beba4d50d ASoC: AC97: S3C2443: Remove unused driver
Since, we have generic AC97 controller driver and all the machines
have moved to that, there is no need for old s3c2443-ac97.c to exist.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:50:39 +00:00
Jassi Brar c67d90ffd4 ASoC: AC97: LN2440SBC: Switch to s3c-ac97.c
Switch to use s3c-ac97.c AC97 controller driver.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:50:17 +00:00
Jassi Brar 1ec2963a8c ASoC: AC97: SMDK2443: Switch to s3c-ac97.c
Switch to use s3c-ac97.c AC97 controller driver.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:49:49 +00:00
Jassi Brar ff6e64dabf ASoC: AC97: SMDK: Add wm9713 machine driver
This patch adds the common machine driver for SMDKs that
have a WM9713 codec attched to the AC97 controller.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:49:21 +00:00
Jassi Brar fc93ea2f93 ASoC: AC97: S3C: Add controller driver
Add the AC97 controller driver for Samsung SoCs that have one.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 20:48:58 +00:00
Takashi Iwai 8ce28d6abf ALSA: hda - Add an ASUS mobo to MSI blacklist
Sid Boyce reported that his machine locks up without enable_msi=0 option.
This looks like another ASUS mobo with Nvidia combo.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-27 20:26:08 +01:00
Jaroslav Kysela 7910b4a1db ALSA: pcm_native - fix runtime->boundary calculation
The code in pcm_lib updating runtime->hw_ptr_interrupt expects
that runtime->boundary is divisible with runtime->period_size.
Thanks are going to Clemens Ladisch for the notice.

Fix the runtime->boundary calculation using buffer_size * period_size
as base and find a least common multiple for 32bit platforms when
the expression might overflow.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-27 18:17:27 +01:00
Barry Song 994dc4245d ASoC: ad1938: use soc-cache framework for codec registers access
Signed-off-by: Barry Song <Barry.Song@analog.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 10:43:09 +00:00
Barry Song 63b62ab0d5 ASoC: ad1836: use soc-cache framework for codec registers access
Signed-off-by: Barry Song <Barry.Song@analog.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-27 10:42:59 +00:00
Takashi Iwai d0d2c38e39 Merge remote branch 'alsa/devel' into topic/misc 2010-01-26 18:13:04 +01:00
Jaroslav Kysela e763692578 ALSA: pcm_lib - return back hw_ptr_interrupt
Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr
update functions" commit:

"It is possible for the status/delay ioctls to be called when the sound
card's pointer register alreay shows a position at the beginning of the
new period, but immediately before the interrupt is actually executed.
(This happens regularly on a SMP machine with mplayer.)  When that
happens, the code thinks that the position must be at least one period
ahead of the current position and drops an entire buffer of data."

Return back the hw_ptr_interrupt variable. The last interrupt pointer
is always computed from the latest hw_ptr instead of tracking it
separately (in this case all hw_ptr checks and modifications might
influence also hw_ptr_interrupt and it is difficult to keep it
consistent).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-26 17:50:50 +01:00
Chaithrika U S e473b84742 ASoC: DaVinci: Fix stream restart error
Sometimes after a suspend-resume cycle, the ALSA application
restarts the stream when resume fails and McASP fails to work
as the clock is not enabled. This patch corrects this bug.

Testes on TI DA850/OMAP-L138 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-26 11:55:54 +00:00
Wei Ni ccc5df058d ALSA: hda - Add support for more the 8 streams
In azx_stream_start() and azx_stream_stop(),
it use azx_readb/azx_writeb to read/write SIE,
it just enable/disable 8 streams.
But according to the HDA spec, it support 30 streams,
and the new HDA controller will support more then 8
streams. So we should use azx_readl/azx_writel to
read/write SIE.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-26 10:40:03 +01:00
Florian Zumbiehl cf944ee55c ALSA: cs46xx: Fix cpu idling with resume
Make sure that capture DMA doesn't stay enabled after system resume
as that potentially prevents the processor from entering deep sleep
states.

Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-26 09:06:14 +01:00
Takashi Iwai 86f2ce0347 Merge branch 'fix/hda' into for-linus 2010-01-25 17:00:01 +01:00
Mark Brown f1487fcbe4 Merge branch 'for-2.6.33' into for-2.6.34 2010-01-25 14:52:48 +00:00
Barry Song 84549d239a ASoC: ad1836: reset and restore clock control mode in suspend/resume entry
tests show frequent suspend/resume(frequent poweroff/on ad1836 internal
components) maybe make ad1836 clock mode wrong sometimes after wakeup.
This patch reset/restore ad1836 clock mode while executing PM, then
ad1836 can always resume to right clock status.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-25 14:52:22 +00:00
Guennadi Liakhovetski 895d4509d0 ASoC: add DAI and platform / DMA drivers for SH SIU
Several SuperH platforms, including sh7722, sh7343, sh7354, sh7367 include
a Sound Interface Unit (SIU). This patch adds DAI and platform / DMA
drivers for this interface.

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>
2010-01-25 14:52:20 +00:00
Takashi Iwai 0aea778efa ALSA: hda - Remove the COEF setup for ALC267/ALC268
The COEF setup for model=auto seems problematic on some laptops,
resulting in the silent speaker output.  Better to disable it for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:45:58 +01:00
Takashi Iwai 95f475f7a2 ALSA: hda - Remove coef output in Realtek proc files
The output of COEF index/value in the proc file for Realtek codecs is
rather useless since the value varies together with the index.
Let's get rid of it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:42:58 +01:00
Guennadi Liakhovetski 40aa7030e5 ASoC: fix a memory-leak in wm8903
Remember to free the temporary register-cache.

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>
Cc: stable@kernel.org
2010-01-25 14:41:05 +00:00
Łukasz Wojniłowicz 973b8cb0ea ALSA: hda - add possibility to choose speakers configuration for 4930g
Now one can choose speaker configuration in e.g. PulseAudio mixer

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 08:00:02 +01:00
Takashi Iwai 23d2df5b0d ALSA: hda - Change headphone pin control with master volume on cx5051
The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a).  Otherwise
the headphone still sounds with master off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:19:27 +01:00
Takashi Iwai ecda0cff9d ALSA: hda - Fix SPDIF output widget for Cxt5051 codec
Fixed the wrongly set up for SPDIF output on Conexant 5051 codec.
It must point to the audio out widget instead of a pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:14:36 +01:00
Takashi Iwai 6953e5524a ALSA: hda - initialize mic port on cxt5051 codec dynamically
Initialize the mic ports B & C on Conexant 5051 codec dynamically
according to the mic jack detection, instead of static init arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:31 +01:00
Takashi Iwai 2c7a3fb3f8 ALSA: hda - Merge playback controls for Cx5051 codec models
All cx5051 codec models have the same Master playback mixer definitions.
Merge them together.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:30 +01:00
Takashi Iwai faddaa5d1c ALSA: hda - Add support for Toshiba Satellite M300
Added the support for Toshiba Satellite M300 with Conexant 5051 codec.
Since the laptop has no port C connection and the pin reports always
the jack sense true, we need to ignore port-C unsol event.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:10 +01:00
Takashi Iwai 4e4ac60030 ALSA: hda - Fix HP dv6736 capture mixer name
Use the standard "Capture" mixer name for HP dv6736 with Cxt5051 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:29:54 +01:00
Takashi Iwai 5f6c3de6a7 ALSA: hda - Minor fixes for Compaq Presario F700 quirk
Minor fixes for HP Compaq Presario F700 quirks with Cxt5051 codec:
- changed the capture mixer elements to the standard name.
- fixed the quirk name string without a space
- sorted the quirk list
- updated the documentation

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:21:31 +01:00
Takashi Iwai 6250b9ced2 Merge branch 'topic/noncached-mmap' into topic/misc 2010-01-21 15:27:28 +01:00
Jaroslav Kysela fd0b092a7b ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)
The SPDIF-input pin 0x1c is muted by default in hardware. Unmute appropriate
pin to get captured samples instead zeros. Tested on Lenovo Thinkstation.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21 14:54:38 +01:00
Takashi Iwai 8b296c8f9f Merge remote branch 'alsa/devel' into topic/misc 2010-01-21 14:27:14 +01:00
Mark Brown 821dd91ec7 ASoC: Use BIAS_OFF when idle for wm_hubs devices
This provides a small power saving when audio is inactive.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-21 12:05:39 +00:00
Mark Brown a96ca33873 ASoC: Support turning off bias when the CODEC is idle
Currently ASoC always maintains the bias of the CODEC while the system
is active.  With older mobile CODECs this is required since the outputs
are referenced to a non-zero voltage and enabling or disabling this
voltage without audible pops or clicks in the output takes too long to
do when starting or stopping audio.

As a result of features such as ground referenced outputs and class D
speaker drivers current generation devices are able to power on and off
much more quickly without these system level issues so provide a new
flag idle_bias_off in snd_soc_codec which will cause the core to turn
off the CODEC bias.  The distinction between STANDBY and OFF is still
maintained.  This is partly for consistency but also allows for
potential future extensions such as per-machine overrides or deferring
the bias removal.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-21 12:04:08 +00:00
Mark Brown b91b8fa024 ASoC: Remove console DAPM debug code
The same information is now visible via debugfs and with large modern
devices dumping everything to the console can be very resource
intensive, causing more harm than good.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-21 11:12:51 +00:00
Jaroslav Kysela c91a988dc6 ALSA: pcm_core: Fix wake_up() optimization
This change fixes the "ALSA: pcm_lib - optimize wake_up() calls for PCM I/O"
commit. New sleeping queue is introduced to separate user space and kernel
space wake_ups. runtime->nowake is renamed to twake (transfer wake).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21 10:32:15 +01:00
Peter Ujfalusi 6aceabb459 ASoC: tlv320dac33: Burst mode BCLK divider configuration
Add possibility to configure the burst mode BCLK divider through platform
data structure.
The BCLK divider changes the actual speed of the serial bus in burst mode,
which is faster than the sampling frequency of the running stream.
In this way platforms can experiment with the optimal burst speed without
the need to modify the codec driver itself.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-20 11:47:49 +00:00
Peter Ujfalusi 6cd6cede8c ASoC: tlv320dac33: BCLK divider fix
The BCLK divider was not configured in case of mode7.
This leads to unpredictable behavior when switching between FIFO modes.
Configure the BCLK divider depending on the fifo_mode (FIFO is in use,
or FIFO bypass).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-20 11:47:49 +00:00
Takashi Iwai dc99be4766 ALSA: hda - Fix HP T5735 automute
This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.

Tested-by: Lee Trager <lee.trager@hp.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-20 08:35:06 +01:00
Takashi Iwai 9e4c84967e Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-01-19 15:53:43 +01:00
Takashi Iwai 3fb4a508b8 ALSA: hda - Turn on EAPD only if available for Realtek codecs
Some codecs disable widgets used for output pins and reserve as vendor-
spec widgets.  Thus we need to check the widget type and pin cap before
actually sending SET_EAPD verbs in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:50:26 +01:00
Takashi Iwai 4feabefe53 ALSA: hda - Fix parsing pin node 0x21 on ALC259
ALC259 has a widget NID 0x21 for the output pin, but it wasn't handled
properly in alc268_new_analog_output().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:38:44 +01:00
Peter Ujfalusi a5b5a0649a ASoC: tlv320dac33: Correct the prefill number of samples
Set the prefill number of samples as the same as the lower
threshold in mode7.
In this way the codec will read the same amount of data on
startup and during the running playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-19 12:36:24 +00:00
Takashi Iwai 88501ce18e Merge remote branch 'alsa/devel' into topic/misc 2010-01-18 18:23:23 +01:00
Clemens Ladisch d1db38c015 sound: virtuoso: add Xonar DS support
Add experimental support for the Asus Xonar DS.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-18 16:38:41 +01:00
Clemens Ladisch a32f66746c sound: seq_timer: simplify snd_seq_timer_set_tick_resolution() parameters
As snd_seq_timer_set_tick_resolution() is always called with the same
three fields of struct snd_seq_timer, it suffices to give that as the
only parameter.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-18 16:38:30 +01:00
Takashi Iwai c32d977b81 ALSA: pcm - Call pgprot_noncached() for vmalloc'ed buffers
pgprot_noncached() can be set for vmalloc'ed buffers safely, and we'd
need non-cached behavior more or less, even for the intermediate ring-
buffers.

Now snd_pcm_lib_mmap_vmalloc() is added as the common PCM mmap callback
that is coupled with snd_pcm_lib_alloc_vmalloc_buffer() & co.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-18 15:00:34 +01:00
Takashi Iwai 3e879d7bac ALSA: pcm - Remove unneeded ifdef pgprot_noncached
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-18 14:49:50 +01:00
Takashi Iwai 6321bd634e Merge branch 'fix/hda' into for-linus 2010-01-18 14:20:55 +01:00
Takashi Iwai 808c569f36 ALSA: Remove warning message for invalid OSS minor ranges
When a card instance with a higher card number is registered, warning
messages are spewed eventually with stack traces due to the invalid minor
number for OSS device registration.  For example, thinkpad-acpi registers
the card number 29 as default, and you'll see always these messages.
This is rather confusing (and worries users), thus better to return
simply the error code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-18 14:18:55 +01:00
Mark Brown 9135f6db09 Merge branch 'mxc-audio' into for-2.6.34
Conflicts:
	arch/arm/plat-mxc/Makefile (dual add)
	sound/soc/imx/mx27vis_wm8974.c (API updates & removal)
2010-01-17 16:47:32 +00:00
Mark Brown b05f5c13d5 ASoC: Mark new i.MX drivers as BROKEN until arch/arm merged
Currently they don't build due to cross tree dependencies, they will be
reenabled once the arch/arm side has merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 16:45:06 +00:00
Takashi Iwai eaa9b3a748 ALSA: hda - Fix capture on Sony VAIO with single input
Sony VAIO VGN-P11G with ALC262 codec has only one input pin, and the
recording doesn't work with model=auto because ALC262 parser sets the
wrong cap NIDs to choose the route and the default route for the sole
input pin wasn't initialized properly.  This patch solves these issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-17 13:09:33 +01:00
Mark Brown e919c24b64 ASoC: Remove old i.MX driver code
This has been superceeded by Sascha's new driver but was not removed in
the patch series due to cutdowns for review.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:10:03 +00:00
Mark Brown d08a68bfca ASoC: i.MX SSI driver does not yet support master mode
The clocks for the SSI block need handling before this can work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:10:02 +00:00
Mark Brown 48dbc41988 ASoC: Convert new i.MX SSI driver to use static DAI array
While dynamically allocated DAIs are the way forward the core doesn't
yet support anything except matching with a pointer to the actual DAI
so convert to doing that so that machine drivers don't have to jump
through hoops to register themselves.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
2010-01-17 11:10:01 +00:00
Mark Brown 157a777c8e ASoC: Fix i.MX audio build for i.MX3x
Don't unconditionally include the i.MX2x DMA driver, the arch/arm
functions it uses aren't available for i.MX3x.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
2010-01-17 11:10:01 +00:00
Sascha Hauer 8380222ec9 ASoC: Add a new imx-ssi sound driver
The old driver has the number of SSI units in the system hardcoded,
does not make use of the device model and works only on i.MX21/27.

This driver replaces it. It works in DMA mode on i.MX21/27 and using
an FIQ handler on other systems. It also supports AC97 mode of
the SSI units.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-17 11:09:46 +00:00
Daniel Mack a421296840 ASoC: support more sample rates on raumfeld devices
Add support for sample rates other than 44100Khz on raumfeld audio
devices. At startup time, call snd_soc_dai_set_sysclk() with 0 as 'freq'
argument so it offers all the sample rates. Later, the function is
called again to give proper constraints.

Use the external audio clock generator to provide double data rate
clocks as the PXA's internal baud generator does anything but what's
described in the datasheets.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-15 17:28:41 +00:00
Daniel Mack 6aababdf20 ASoC: cs4270: allow passing freq=0 in set_dai_sysclk()
For setups with variable MCLKs, the current logic of limiting the
available sampling rates at startup time is not sufficient. We need to
be able to change the setting at a later point, and so the codec must
offer all possible rates until the hw_params are given.

This patches allows that by passing 0 as 'freq' argument to
cs4270_set_dai_sysclk().

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-15 17:28:41 +00:00
Kunal Gangakhedkar d38cce7046 ALSA: hda - Fix mute led GPIO on HP dv-series notebooks
On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.

As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-15 18:15:42 +01:00
Thadeu Lima de Souza Cascardo c181a13a41 ALSA: use subsys_initcall for sound core instead of module_init
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.

Otherwise, registering a card fails.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-14 21:21:47 +01:00
Takashi Iwai c7a8eb1032 ALSA: hda - Fix missing capture mixer for ALC861/660 codecs
The capture-related mixer elements are missing with ALC861/ALC660 codecs
when quirks are present, due to missing call of set_capture_mixer().

Reference: Novell bnc#567340
	http://bugzilla.novell.com/show_bug.cgi?id=567340

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-14 12:39:02 +01:00
Thomas Weber 738ada47cf ASoC: TWL4030: Fix typo in comment in header file
Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-14 10:36:52 +00:00
Takashi Iwai 408bffd01c ALSA: ctxfi - Add subsystem option
Added a new option "subsystem" to override the PCI SSID for identifying
the card type.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-14 09:23:10 +01:00
Takashi Iwai d1458279bf ALSA: Add snd_pci_quirk_lookup_id()
Added a new function to look up a quirk entry with the given PCI SSID
instead of a pci device pointer.  This can be used when the searched ID
is overridden for debugging or such a purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-14 09:18:48 +01:00
Alex Murray a76221d47e ALSA: hda - Improved MacBook (Pro) 5,1 / 5,2 support
This patch adds support for automatically muting the speakers when headphones
are inserted, as well as relabelling the headphone widgets from the
non-standard "HP" to the standard "Headphone" for the mb5 model.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 18:58:38 +01:00
Takashi Iwai 4dee8baa18 ALSA: hda - Fix Toshiba NB20x quirk entry
The alc664-mode4 model doesn't seem to fit with Toshiba NB205 correctly.
NB205 uses the pin 0x17 connected with the mixer 0x0f for the speaker
output, which isn't controlled by mode4 model at all.
Rather model=auto works fine as is on the latest driver, so let it back
again.

Tested-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 17:22:40 +01:00
Daniel Mack 617b14c50e ASoC: ak4104: allow more sample rates
The transmitter supports all sample rates up to 192KHz, so the driver
should not give a limit.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-13 13:23:00 +00:00
Peter Ujfalusi fd63df2264 ASoC: TWL4030: Replace comma with semicolon in probe function
The codec structure initialization statements should be
separated by semicolons.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-13 13:22:55 +00:00
Seth Heasley d2f2fcd254 ALSA: hda_intel: ALSA HD Audio patch for Intel Cougar Point DeviceIDs
This patch adds the Intel Cougar Point (PCH) HD Audio Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 08:34:34 +01:00
Takashi Iwai 47e9134845 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-01-13 08:32:53 +01:00
Jaroslav Kysela ed69c6a8ee ALSA: pcm_lib - fix wrong delta print for jiffies check
The previous jiffies delta was 0 in all cases. Use hw_ptr variable to
store and print original value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-13 08:12:31 +01:00
Takashi Iwai f59bb4b64e Merge branch 'fix/asoc' into for-linus 2010-01-12 17:50:06 +01:00
Takashi Iwai c96350a298 Merge branch 'fix/hda' into for-linus 2010-01-12 17:50:03 +01:00
Mark Brown 735fe4cfbc ASoC: Add missing __devexit and __devinit annotations
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-12 14:13:00 +00:00
Mark Brown 03e7a35c0e Revert "ASoC: ad1836: reset and restore clock control mode in suspend/resume entry"
This reverts commit afe1c2cd71 since it
doesn't build.
2010-01-12 14:01:19 +00:00
Takashi Iwai 9c0afc861a ALSA: hda - Fix ALC861-VD capture source mixer
The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().

References: Novell bnc#568305
	http://bugzilla.novell.com/show_bug.cgi?id=568305

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-12 14:02:13 +01:00
Mark Brown 163849ea9b Merge branch 'for-2.6.33' into for-2.6.34 2010-01-12 12:59:05 +00:00
Alan Cox 6b98515a62 sound_oss: remove use of old BKL ioctl path
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-12 09:58:23 +01:00
Takashi Iwai dba9532388 Merge remote branch 'alsa/fixes' into fix/misc 2010-01-12 09:40:48 +01:00
Takashi Iwai a29fb94ff4 Merge commit alsa/devel into topic/misc
Conflicts:
	include/sound/version.h
2010-01-12 09:40:08 +01:00
Ilkka Koskinen 2138301e16 ASoC: tpa6130a2: Support for tpa6140's regulators
tpa6140a2 uses different names for the regulators.

Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-11 17:13:11 +00:00
Krzysztof Helt c68db7175f ALSA: ac97: add AC97 STMicroelectronics' codecs
Add the STMicroelectronics ST7597 codec and an unknown codec
from the same manufacturer found on the Creative SB 128 card (CT4810).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:03:09 +01:00
Daniel T Chen af9a75dd1a ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense' muted
for audible playback, so just add it to the ad1981 jack sense blacklist.

Cc: stable@kernel.org
Tested-by: Pete <x41215201@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:01:12 +01:00
Mark Brown 5ee518ecbc ASoC: Fix WM8350 DSP mode B configuration
We need to set the LRCLK inversion bit to select DSP mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-01-08 16:21:56 +00:00
Krzysztof Helt edf12b4af6 sbawe: fix memory detection part 2
The patch "sbawe: fix memory detection" fixed detection
for memoryless SB32 cards but broke detection of memory
above 512KB. This patch fixes the regression.

The patch has been tested on the SB32 card (CT3670) with
0MB, 2MB and 8MB memory installed.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:27:23 +01:00
Jaroslav Kysela 1cb4f624ea Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into fixes 2010-01-08 09:26:34 +01:00
Dan Carpenter 444c1953d4 sound: oss: off by one bug
The problem is that in the original code sound_nblocks could go up to 1024
which would be an array overflow.

This was found with a static checker and has been compile tested only.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:17:51 +01:00
Daniel Drake c4cfe66c4c ALSA: hda - support OLPC XO-1.5 DC input
The XO's audio hardware is wired up to allow DC sensors (e.g. light
sensors, thermistors, etc) to be plugged in through the microphone jack.

Add sound mixer controls to allow this mode to be enabled and tweaked.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:14:07 +01:00
Daniel Drake 75f8991d0e ALSA: hda - Configure XO-1.5 microphones at capture time
The XO-1.5 has a microphone LED designed to indicate to the user when
something is being recorded.

This light is controlled by the microphone bias voltage and it is
currently coming on all the time.

This patch defers the microphone port configuration until when recording
is actually taking place, fixing the behaviour of the LED.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:11:34 +01:00
Jaroslav Kysela a4ad68d57e Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-01-08 09:11:18 +01:00
Ken Prox cd9d95a555 ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700
Added patch for Hewlett-Packard Company Device Subsystem id - 103c:30ea.

Signed-off-by: Ken Prox <kprox@users.sourceforge.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:07:50 +01:00
Krzysztof Helt dd3533eca8 ALSA: ac97_codec: merge WM9703 and WM9705 ops
The WM9705 and WM9703 ops are the same actually so use
the same code for both.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 08:53:16 +01:00
Jaroslav Kysela 7b3a177b0d ALSA: pcm_lib: fix "something must be really wrong" condition
When runtime->periods == 1 or when pointer crosses end of ring buffer,
the delta might be greater than buffer_size.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 08:46:45 +01:00
Jaroslav Kysela 1250932e48 ALSA: pcm_lib - optimize wake_up() calls for PCM I/O
As noted by pl bossart <bossart.nospam@gmail.com>, the PCM I/O routines
(snd_pcm_lib_write1, snd_pcm_lib_read1) should block wake_up() calls
until all samples are not processed.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07 15:48:13 +01:00
Jaroslav Kysela f240406bab ALSA: pcm_lib - cleanup & merge hw_ptr update functions
Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them.
The main change is hw_ptr_interrupt variable removal to simplify code
logic. This variable can be computed directly from hw_ptr.

Ensure that updated hw_ptr is not lower than previous one (it was possible
with old code in some obscure situations when interrupt was delayed or
the lowlevel driver returns wrong ring buffer position value).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07 15:47:38 +01:00
Jaroslav Kysela 4d96eb255c ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer positions
In some debug cases, it might be usefull to see previous ring buffer
positions to determine position problems from the lowlevel drivers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07 15:47:24 +01:00
Jaroslav Kysela 741b20cfb9 ALSA: pcm_lib.c - convert second xrun_debug() parameter to use defines
To increase code readability, convert send xrun_debug() argument to
use defines.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07 15:47:10 +01:00
Linus Torvalds f843b0fcc7 Merge branch 'for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6
* 'for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6:
  ASoC: fixup oops in generic AC97 codec glue
  ASoC: fix params_rate() macro use in several codecs
  ASoC: fsi-ak4642: Remove ak4642_add_i2c_device
2010-01-05 15:59:56 -08:00
Mark Brown 53242c6833 ASoC: Implement suspend and resume for WM8993
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-04 21:51:13 +00:00
Mark Brown 10505634bf ASoC: Only restore non-default registers for WM8961
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-04 21:50:58 +00:00
Mark Brown e0fb28e079 ASoC: Only restore non-default registers for WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-04 21:50:43 +00:00
Mark Brown d11c5ab186 ASoC: Only restore non-default registers for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-04 21:50:23 +00:00
Mark Brown 5baf831541 ASoC: Fix variable shadowing warning in TLV320AIC3x
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-01-04 21:49:53 +00:00
Manuel Lauss ecbec24296 ASoC: fixup oops in generic AC97 codec glue
Initialize the glue by calling snd_soc_new_ac97_codec() as is done
in other ASoC AC97 codecs.  Fixes an oops caused by dereferencing
uninitialized members in snd_soc_new_pcms().

Run-tested on Au1250.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-04 18:30:01 +00:00
Ilkka Koskinen a126fd5691 ASoc: tpa6130a2: Remove unnecessary variable
Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-01-04 18:28:23 +00:00
Mark Brown 40ca114265 ASoC: Use snprintf() when generating stream names
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-12-31 12:44:43 +00:00
Mark Brown 633154d3a7 ASoC: Remove unneeded suspend checks from CODEC drivers
Better integration of the core with the device model means that we now
no longer get the ASoC suspend and resume callbacks without the card
having been set up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-12-31 12:44:28 +00:00
Peter Ujfalusi adcb8bc02d ASoC: tlv320dac33: Safety check for codec slave mode
The currently available FIFO modes (mode1 and mode7) require master
mode from the codec.
Do not allow the slave configuration when the FIFO is in use.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:28 +00:00
Peter Ujfalusi 28e05d9870 ASoC: tlv320dac33: Add new FIFO mode: mode 7
Mode 7 of tlv320dac33 operates in the following way:
The codec is in master mode.
Host configures upper and lower thresholds in tlv320dac33
During playback the codec will clock in the data until the
upper threshold is reached in FIFO. At this point the codec
stops the colocks on the serial bus.
When the FIFO fill is reaching the lower threshold limit the
codec will enable the clocks on the serial bus, and clocks
in data till the upper threshold is reached.

In this mode, we can also request interrupts for threshold
events (upper, lower and alarm), which could be used for
power management.

At this point the interrupts are not enabled for this mode,
but it can be taken into use in the future, when the surrounding
code makes it possible to use it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.oc.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:28 +00:00
Peter Ujfalusi aec242dc37 ASoC: tlv320dac33: Clean up the hardware configuration code
Use switch instead of if statements to configure FIFO bypass
and mode1.
With this change adding new FIFO mode is going to be easier,
and cleaner.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:27 +00:00
Peter Ujfalusi d4f102d437 ASoC: tlv320dac33: Introduce prefill and playback state handlers
Ensure that the code is going to be readable, when new FIFO modes
are introduced later.
Move the prefill and playback state handling to inlined
functions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:27 +00:00
Peter Ujfalusi 7427b4b9a6 ASoC: tlv320dac33: Change nsample switch to FIFO mode enum
In order to have support for more FIFO modes supported by
tlv320dac33, the switch for enabling/disabling the FIFO
use has to be replaced with an enum.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:26 +00:00
Barry Song 8998c89907 ASoC: soc-cache: cleanup training whitespace and coding style
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-31 11:54:16 +00:00
Kuninori Morimoto 59c3b003dd ASoC: fsi: Add over/under run error settlement
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:31:09 +00:00
Kuninori Morimoto 142e8174b3 ASoC: fsi: Add fsi_get_dai to get snd_soc_dai
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:31:09 +00:00
Kuninori Morimoto 1c418d1f62 ASoC: fsi: Add over_period flag to prevent the misunderstanding
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:31:08 +00:00
Barry Song 5b61735534 ASoC: ad1938: let soc-core dapm handle PLL power
PM architecture of ad1938 is simple, we don't need a bundle of functions like
ad1938_pll_powerctrl, ad1938_set_bias_level for only PLL. A dapm supply will
handle on/off of PLL.
Since soc-core can poweron/off PLL on-demand, we don't need to poweron/off PLL
in suspend/resume entries too.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:30:34 +00:00
Barry Song 08ba864e27 ASoC: ad1938: fix typo, rename mask to rx_mask for ad1938_set_tdm_slot
Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:30:27 +00:00
Barry Song afe1c2cd71 ASoC: ad1836: reset and restore clock control mode in suspend/resume entry
Tests show frequent suspend/resume(frequent poweroff/on ad1836 internal
components) maybe make ad1836 clock mode wrong sometimes after wakeup.
This patch reset/restore ad1836 clock mode while executing PM, then
ad1836 can always resume to right clock status.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-30 18:30:11 +00:00
John S. Gruber 52a7a58351 ALSA: usb-audio: use usbquirk.h for detection of HVR-950Q/850
Detect the HVR-950Q HVR-850 urb data alignment quirk using usbquirk.h
rather than using a case statement in snd_usb_audio_probe.

Signed-off-by: John S. Gruber <JohnSGruber@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:30:57 +01:00
John S. Gruber 98e89f606c ALSA: usb-audio: relax urb data align. restriction HVR-950Q and HVR-850 only
Addressing audio quality problem.

In sound/usb/usbaudio.c, for the Hauppage HVR-950Q and HVR-850 only, change
retire_capture_urb to allow transfers on audio sub-slot boundaries rather
than audio slots boundaries.

With these devices the left and right channel samples can be split between
two different urbs. Throwing away extra channel samples causes a sound
quality problem for stereo streams as the left and right channels are
swapped repeatedly, perhaps many times per second.

Urbs unaligned on sub-slot boundaries are still truncated to the next
lowest stride (audio slot) to retain synchronization on samples even
though left/right channel synchronization may be lost in this case.

Detect the quirk using a case statement in snd_usb_audio_probe.

BugLink: https://bugs.launchpad.net/ubuntu/+bug/495745

Signed-off-by: John S. Gruber <JohnSGruber@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:30:41 +01:00
Clemens Ladisch adc8d31326 ALSA: usb-audio: make buffer pointer based on bytes instead on frames
Since there are devices that do not align the size of their data packets
to frame boundaries, the driver needs to be able to keep track of
partial frames.  This patch prepares for support for such devices by
changing the hwptr_done variable from a frame counter to a byte counter.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:29:46 +01:00
Sergiy Kovalchuk 7d2b451e65 ALSA: usb-audio - Added functionality for E-mu 0404USB/0202USB/TrackerPre
Added functionality:
1) Extension Units support (all XU settings now available at alsamixer,
   kmix, etc):
- "AnalogueIn soft limiter" switch;
- "Sample rate" selector (values 0,1,2,3,4,5 corresponds to 44.1 48 ...
  192 kHz);
- "DigitalIn CLK source" selector (internal/external) (**);
- "DigitalOut format SPDIF/AC3" switch (**);
(**)E-mu-0404usb only.

2) Automatic device sample rate adjustment depending on substream
   samplerate for both capture and playback substream.

[minor coding-style fixes by tiwai]

Signed-off-by: Sergiy Kovalchuk <cnb_zerg@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:29:39 +01:00
Takashi Iwai 78b8d5d2ee ALSA: usb-audio - Avoid Oops after disconnect
As the release of substreams may be done asynchronously from the
disconnection, close callback needs to check the shutdown flag before
actually accessing the usb interface.

Reference: Novell bnc#505027
	http://bugzilla.novell.com/show_bug.cgi?id=565027

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:24:22 +01:00
Daniel T Chen c97259df3f ALSA: hda: Refactor powerdown for Realtek HDA codecs
This patch converts the alc889 Aspire-specific powerdown to a generic
one. Like the previous effort, it currently only handles Front and PCM
but can be easily extended to cover other nids. The existing hook for
alc889 Aspire-specific remains enabled. Upon further testing, I've added
its use for ALC861_AUTO as well. Following patches will enable them for
other quirks.

Tested-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:47 +01:00
Daniel T Chen ea52bf260e ALSA: hda: Add powerdown for Analog Devices HDA codecs
This patch ports powerdown fixes to AD198x. Currently we only turn off
Front and HP for suspend, but this is easily extended for additional
nids.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:17 +01:00
Roel Kluin 9980c6209e ALSA: test off by one in setsamplerate()
With `while (i++ < MAX_WRITE_RETRY)' i reaches MAX_WRITE_RETRY + 1 after the loop

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:14:39 +01:00
Daniel T Chen dfb12eeb0f ALSA: atiixp: Specify codec for Foxconn RC4107MA-RS2
BugLink: https://bugs.launchpad.net/ubuntu/+bug/498863

This mainboard needs ac97_codec=0.

Cc: stable@kernel.org
Tested-by: Apoorv Parle <apparle@yahoo.co.in>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:14:07 +01:00
Takashi Iwai 014c41fce1 ALSA: hda - Use strict_strtoul()
Rewrite the codes to use strict_strtoul() instead of simple_strtoul().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:53:24 +01:00
Takashi Iwai b82855a0d7 ALSA: hda - Add sanity check for storing the user-defined pin configs
Check whether the given NID is a pin widget before storing the
user-defined pin configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:25 +01:00
Takashi Iwai a4e09aa3cf ALSA: hda - Fix click noises at suspend/free with Realtek codecs
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:24 +01:00
Takashi Iwai 92ee6162c4 ALSA: hda - Add snd_hda_shutup_pins() helper function
Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:14 +01:00
Takashi Iwai cc0db22afd Merge branch 'fix/hda' into for-linus 2009-12-27 13:36:25 +01:00
Takashi Iwai 54f7190b23 ALSA: hda - Fix Oops at reloading beep devices
The recent change for supporting dynamic beep device allocation caused
a problem resulting in Oops at reloading the driver.  Also, it ignores
the error from input device registration.

This patch fixes the wrong check in snd_hda_detach_beep_device(), and
returns an error when the input device registration fails properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:34:01 +01:00
Takashi Iwai 411fe85c76 ALSA: hda - Don't cache beep controls
The beep control verbs don't need to be cached for resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 10:44:02 +01:00
Mark Brown 7f50548abb Merge commit 'v2.6.33-rc2' into for-2.6.33 2009-12-26 14:52:54 +00:00
Takashi Iwai 043958e602 ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26 10:36:12 +01:00
Peter Huewe 903b0eb39e ALSA: sound/arm: Fix build failure caused by missing struct aaci definition
This patch fixes a build failure introduced by the patch
  ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params [1]
by adding/moving the aaci struct to the right position.

The patch mentioned above merged common source parts into one function,
but unfortunately left out the aaci struct and consequently caused a
build failure e.g. for arm versatile_config [2]

References:
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d3aee7996c30f928bbbbfd0994148e35d2e83084
[2] http://kisskb.ellerman.id.au/kisskb/buildresult/1893605/

Patch against Linus' tree.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26 10:16:07 +01:00
Takashi Iwai a252c81a69 ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c
Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:56:20 +01:00
Takashi Iwai 729d55ba97 ALSA: hda - Disable tigger at pin-sensing on AD codecs
Analog Device codecs seem to have problems with the triggering of
pin-sensing although their pincaps give the trigger requirements.
Some reported that constant CPU load on HP laptops with AD codecs.

For avoiding this regression, add a flag to codec struct to notify
explicitly that the codec doesn't suppot the trigger at pin-sensing.

Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:49:01 +01:00
Takashi Iwai 15e7f8b92a Merge branch 'fix/hda' into topic/hda 2009-12-25 14:17:48 +01:00
Wu Fengguang ef18beded8 ALSA: hda - HDMI sticky stream tag support
When we run the following commands in turn (with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0),

	speaker-test -Dhw:0,3 -c2 -twav  # HDMI
	speaker-test -Dhw:0,0 -c2 -twav  # Analog

The second command will produce sound in the analog lineout _as well as_
HDMI sink. The root cause is, device 0 "reuses" the same stream tag that
was used by device 3, and the "intelhdmi - sticky stream id" patch leaves
the HDMI codec in a functional state. So the HDMI codec happily accepts
the audio samples which reuse its stream tag.

The proposed solution is to remember the last device each azx_dev was
assigned to, and prefer to
1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used
2) or assign a never-used azx_dev for HDMI

With this patch and the above two speaker-test commands,
HDMI codec will use stream tag 8 and Analog codec will use 5.

The stream tag used by HDMI codec won't be reused by others, as long
as we don't run out of the 4 playback azx_dev's. The legacy Analog
codec will continue to use stream tag 5 because its device id is 0
(this is a bit tricky).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:17:36 +01:00
Krzysztof Helt 44eba3e82b ALSA: jazz16: refine dma and irq selection
Narrow the dma and irq selection after the DOS driver.

Add ALSA configuration description as well.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:15:41 +01:00
Takashi Iwai 52e04ea89d Merge branch 'fix/misc' into topic/misc 2009-12-25 14:15:31 +01:00
Guennadi Liakhovetski 8b90ca0882 ALSA: Fix indentation in pcm_native.c
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:12:52 +01:00
Guennadi Liakhovetski b3172f222a ASoC: fix params_rate() macro use in several codecs
Sevelar ASoC codec drivers wrongly assume, that the params_rate() macro
returns one of SNDRV_PCM_RATE_* defines instead of the actual numerical
sampling rate. Fix them.

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>
Cc: stable@kernel.org
2009-12-24 11:41:21 +00:00
Kuninori Morimoto 18f98ab547 ASoC: fsi-ak4642: Remove ak4642_add_i2c_device
I2C devices should be registered when platform board setting
in latest ASoC.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-24 11:41:18 +00:00
Takashi Iwai 54a26089a2 Merge branch 'fix/hda' into for-linus 2009-12-23 18:50:17 +01:00
Takashi Iwai 3095b165a1 Merge branch 'fix/asoc' into for-linus 2009-12-23 18:50:13 +01:00
Takashi Iwai 4dc2ec09b8 Merge branch 'fix/misc' into for-linus 2009-12-23 18:49:55 +01:00
Anisse Astier 95e70e8753 ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 18:49:22 +01:00
Eric Millbrandt 48e3cbb3f6 ASoC: Do not write to invalid registers on the wm9712.
This patch fixes a bug where "virtual" registers were being written to the ac97
bus.  This was causing unrelated registers to become corrupted (headphone 0x04,
touchscreen 0x78, etc).

This patch duplicates protection that was included in the wm9713 driver.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-12-23 15:20:56 +00:00
Takashi Iwai f62faedbed ALSA: hda - Set mixer name after codec patch
Postpone the mixer name setup after the codec patch since the codec
patch may change the codec name string in itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 09:27:51 +01:00
Takashi Iwai 21949f00a0 ALSA: hda - Fix NID association for capture mixers
Fix the wrong implementation of NID <-> kctl mapping for capture mixers
introduced by the ocmmit 5b0cb1d850.
So far, the driver returns an error at probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 08:38:28 +01:00
Takashi Iwai 524027916e Merge branch 'fix/hda' into topic/hda 2009-12-23 08:38:23 +01:00
Guennadi Liakhovetski 1628af5adf ASoC: add missing parameter to mx27vis_hifi_hw_free()
Commit 2ccafed4 added an extra parameter to the DAI .set_pll() method, but
it missed this call in sound/soc/imx/mx27vis_wm8974.c.

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>
2009-12-22 12:33:56 +00:00
Uwe Kleine-König b6aa179334 ASoC: sh: FSI:: don't check platform_get_irq's return value against zero
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-22 12:33:56 +00:00
Takashi Iwai 75d1aeb9d6 ALSA: hda - Add Bass Speaker switch for HP dv7
The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 11:56:32 +01:00
Takashi Iwai 41116e926c ALSA: cs46xx - Fix suspend/resume with new DSP
Fix the basic suspend/resume of snd-cs46xx drivers with new DSP.

References:
	https://bugzilla.redhat.com/show_bug.cgi?id=498287
	https://bugzilla.redhat.com/show_bug.cgi?id=160751

Tested-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 09:00:14 +01:00
Florian Fainelli a9605391cf ALSA: sound/core/pcm_timer.c: use lib/gcd.c
Make sound/core/pcm_timer.c use lib/gcd.c

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:24:35 +01:00
Takashi Iwai 9dc8398bab ALSA: hda - Add MSI blacklist
A machine with AMD CPU with Nvidia board doesn't work with MSI.

Reported-by: Robert J. King <peritus@gurunetwork.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:15:01 +01:00