Archived
14
0
Fork 0
Commit graph

7037 commits

Author SHA1 Message Date
Giuliano Pochini
ad3499f466 ALSA: Echoaudio - Add suspend support #1
Move the controls init code outside the init_hw() function because is must
not be called during resume.

This patch moves the code that initializes the card's controls with
default valued from the init_hw() function into a separated
set_mixer_defaults() function (one for each of the 16 supported
cards). This change is necessary because during resume we must
resurrect the hardware without losing the previous
settings. set_mixer_defaults() must be called only once when the
module is loaded.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:39:22 +01:00
Giuliano Pochini
4f8ada444c ALSA: Echoaudio - Add firmware cache #2
This patch implements a simple cache for the firmware files when CONFIG_PM is defined.

This patch changes get_firmware(), free_firmware() and adds
free_firmware_cache(). The first two functions implement a very
simple cache and the latter is used to actually release all the stored
firmwares when the module is unloaded. 
When CONFIG_PM is not enabled those functions act as before, that is
free_firmware() releases the firmware immediately and
free_firmware_cache() does nothing.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:38:10 +01:00
Giuliano Pochini
19b5006378 ALSA: Echoaudio - Add firmware cache #1
Changes the way the firmware is passed through functions.

When CONFIG_PM is enabled the firmware cannot be released because the
driver will need it again to resume the card. 
With this patch the firmware is passed as an index of the struct
firmware card_fw[] in place of a pointer. That same index is then used
to locate the firmware in the firmware cache.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 10:36:51 +01:00
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
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