Archived
14
0
Fork 0
Commit graph

7037 commits

Author SHA1 Message Date
Kailang Yang
61c2d2b5e7 ALSA: hda - Add/fix ALC269 FSC and Quanta models
Specify proper quirk models for FSC and Quanta machines with ALC269 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:49:06 +01:00
Kailang Yang
6227cdced0 ALSA: hda - Add ALC670 codec support
- Fixed alc_subsystem_id( ) typo and add new function.
   - !(ass & 0x100000)) ==> Delete this check. It is unnecessary check.
   - Add porti
- ALC670 support

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:48:44 +01:00
Zhang, Rui
dd2b4a7abf ALSA: hda - remove unnecessary msleep on power state transitions
This will save ~15ms boot time.

The first 10ms sleep was introduced in commit d2595d86e5 for (buggy)
Cxt codecs, so better to limit the sleep to the problem hardware.

For the second 10ms sleep, the HDA spec says:

Power State[1:0]:
00: Node Power state (D0) is fully on.
01: Node Power state (D1) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms, excepting analog pass through circuits (e.g., CD analog
playback) which must remain fully on.
10: Node Power state (D2) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms. For modems, this is the "wake on ring" power state.
11: Node Power state (D3) allows for (does not require) lowest possible power consuming state under software
control. Note that any low power state set by software must retain sufficient operational capability to properly
respond to subsequent software Power State command.

So 10ms is actually the max wait time. It should be safe to
remove/reduce it and rely on the loop of 1ms-sleeps.

CC: Marc Boucher <marc@linuxant.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-24 09:12:57 +01:00
Ilkka Koskinen
83905c1345 ASoC: OMAP-McBSP: ASoC interface for McBSP sidetone
Add ASoC interface for OMAP McBSP2 and McBSP3 sidetones.

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>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-23 10:57:39 -08:00
Kuninori Morimoto
47fc9a0a80 ASoC: fsi: Modify over/under run error settlement
In current FSI driver, playback function cares only overrun,
and capture function cares only underrun.

But playback function should had cared about underrun,
and capture function should had cared about overrun too.

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-02-23 10:42:07 +00:00
Misael Lopez Cruz
db72c2f897 ASoC: OMAP4: Add McPDM platform driver
McPDM platform driver is configured to use sDMA in order to transfer
to/from memory. Support for interfacing with ABE will be added later.

McPDM dai currently supports up to 4 downlink channels and 2 uplink
channels simultaneously, as well as 88.2 and 96 KHz, and a sample
size of 32 bits.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Margarita Olaya <x0080101@ti.com>
Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-23 10:41:05 +00:00
Candelaria Villareal, Jorge
b3b0b4580b ASoC: OMAP4: Add support for McPDM
McPDM is the interface between Phoenix audio codec
and the OMAP4430 processor. It enables data to be transfered
to/from Phoenix at sample rates of 88.4 or 96 KHz.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya <x0080101@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-23 10:39:48 +00:00
Misael Lopez Cruz
e17dd32f34 ASoC: OMAP: data_type and sync_mode configurable in audio dma
Allow client drivers to set the data_type (16, 32) and the
sync_mode (element, packet, etc) of the audio dma transferences.

McBSP dai driver configures it for a data type of 16 bits and
element sync mode.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-02-23 10:38:52 +00:00
Reimundo Heluani
76e6f5a9ef ALSA: add support for Macbook Air 2,1 internal speaker
Add support for Macbook Air 2,1 (late 2008) internal speaker and
headphones. Create a "mba21" model for snd-hda-intel.

Signed-off-by: Reimundo Heluani <rheluani@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 10:55:03 +01:00
Daniel Mack
de48c7bc6f ALSA: usbaudio: consolidate header files
Use the definitions from linux/usb/audio.h all over the ALSA USB audio
driver and add some missing definitions there as well.

Use the endpoint attribute macros from linux/usb/ch9 and remove the own
things from sound/usb/usbaudio.h.

Now things are also nicely prefixed which makes understanding the code
easier.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:51:56 +01:00
Daniel Mack
7b8a043f26 ALSA: usbmixer: bail out early when parsing audio class v2 descriptors
This is just a quick hack that needs to be removed once the new units
defined by the audio class v2.0 standard are supported.

However, it allows using these devices for now, without mixer support.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:40:26 +01:00
Daniel Mack
53ee98fe8a ALSA: usbaudio: implement basic set of class v2.0 parser
This adds a number of parsers for audio class v2.0. In particular, the
following internals are different and now handled by the code:

* the number of streaming interfaces is now reported by an interface
  association descriptor. The old approach using a proprietary
  descriptor is deprecated.

* The number of channels per interface is now stored in the AS_GENERAL
  descriptor (used to be part of the FORMAT_TYPE descriptor).

* The list of supported sample rates is no longer stored in a variable
  length appendix of the format_type descriptor but is retrieved from
  the device using a class specific GET_RANGE command.

* Supported sample formats are now reported as 32bit bitmap rather than
  a fixed value. For now, this is worked around by choosing just one of
  them.

* A devices needs to have at least one CLOCK_SOURCE descriptor which
  denotes a clockID that is needed im the class request command.

* Many descriptors (format_type, ...) have changed their layout. Handle
  this by casting the descriptors to the appropriate structs.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:40:24 +01:00
Daniel Mack
8fee4aff8c ALSA: usbaudio: introduce new types for audio class v2
This patch adds some definitions for audio class v2.

Unfortunately, the UNIT types PROCESSING_UNIT and EXTENSION_UNIT have
different numerical representations in both standards, so there is need
for a _V1 add-on now. usbmixer.c is changed accordingly.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:40:20 +01:00
Daniel Mack
28e1b77308 ALSA: usbaudio: parse USB descriptors with structs
In preparation of support for v2.0 audio class, use the structs from
linux/usb/audio.h and add some new ones to describe the fields that are
actually parsed by the descriptor decoders.

Also, factor out code from usb_create_streams(). This makes it easier to
adopt the new iteration logic needed for v2.0.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:40:12 +01:00
Seth Heasley
32679f95ca ALSA: hda - enable snoop for Intel Cougar Point
This patch enables snoop, eliminating static during playback.
This patch supersedes the previous Cougar Point audio patch.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:15:37 +01:00
Takashi Iwai
d01aecdf90 ALSA: hda - Remove identical definitions for macmini3 model
The channel mode definitions for macmini3 model are identical with mb5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:07:15 +01:00
Takashi Iwai
ad6cfc2ac7 Merge remote branch 'alsa/fixes' into fix/misc 2010-02-22 18:45:34 +01:00
Peter Ujfalusi
b9dd94a87e ASoC: core: On resume also check the soc device state
Check the card->codec on soc_resume to detect if the soc
device is properly initialized.
If the card->codec is NULL, than do not continue the resume
operation, since the device is not initialized properly.

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-22 14:39:42 +00:00
Clemens Ladisch
bf30a4309d ALSA: via82xx: add quirk for D1289 motherboard
Add a headphones-only quirk for the Fujitsu Siemens D1289.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Marc Haber <mh+alsa201002@zugschlus.de>
Cc: <stable@kernel.org>

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-22 11:15:11 +01:00
Chris J Arges
40717382e0 ALSA: usbaudio Mbox support, output only
Signed-off-by: Chris J Arges <christopherarges@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 09:56:26 +01:00
Paul Menzel
0708cc582f ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE.
With PulseAudio and an application accessing an input device like `gnome-volume-manager` both have high CPU load as reported in [1].

Loading `snd-hda-intel` with `position_fix=1` fixes this issue. Therefore add a quirk for ASUS M2V-MX SE.

The only downside is, when now exiting for example MPlayer when it is playing an audio file a high pitched sound is outputted by the speaker.

$ lspci -vvnn | grep -A10 Audio
20:01.0 Audio device [0403]: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) [1106:3288] (rev 10)
	Subsystem: ASUSTeK Computer Inc. Device [1043:8290]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: Memory at fbffc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: HDA Intel

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=1265550675.4642.24.camel%40mattotaupa&forum_name=alsa-user

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:37:15 +01:00
Paul Menzel
2448158ed2 ALSA: Typo. s/distrubs/disturbs/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:36:56 +01:00
Takashi Iwai
9d54f08bc7 ALSA: hda - Clean up Intel Mac unsol codes
Use the standard unsol_event callback with each setup callback for
IntelMac models with Realtek ALC885 codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:34:40 +01:00
Luke Yelavich
e458b1fadf ALSA: hda - Add Macmini 3,1 support
BugLink: https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/343989

Add a model quirk for the NVIDIA based Macmini hardware, aka Macmini 3,1. The
pinout is almost identical to the mb5 quirk, except for no microphone and
the line-in mixer controls being on a different index. Everything works in
2ch mode, but as I am not sure what needs to be changed for 6ch mode, or
whether the Mac Mini's chip supports 6ch mode, I have simply duplicated
the code from the mb5 quirk for the mac mini chmode management. The new
model parameter for this quirk is "macmini3".

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:27:57 +01:00
Daniel T Chen
ba579eb7b3 ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q
BugLink: https://bugs.launchpad.net/bugs/524948

The OR has verified that the existing model=laptop-eapd quirk does not
function correctly but instead needs model=3stack.  Make this change
so that manual corrections to module-init-tools file(s) are not
required.

Reported-by: Lasse Havelund <lasse@havelund.org>
CC: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-22 08:15:21 +01:00
Florian Zumbiehl
04510a74bf ALSA: cs46xx - fix some typos
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-18 08:12:30 +01:00
Florian Zumbiehl
7fb2d723e6 ALSA: cs46xx - Do test writes to register AC97_REC_GAIN in
snd_cs46xx_codec_reset() bypassing the register cache, so as to not
clobber the cached register value during resume.

Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-18 08:10:54 +01:00
Tony Lindgren
80c20d543d Merge branch 'omap-fixes-for-linus' into omap-for-linus 2010-02-17 14:08:58 -08:00
Mark Brown
6c5f1fed49 ASoC: Make pmdown_time a long
Fixes a warning.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-17 14:37:20 +00:00
Peter Ujfalusi
e47c796d58 ASoC: TWL4030: Use codec defaults for Headset initial configuration
Disable the amplifiers for the headset outputs, and do not select
routings by default to the headset outputs.

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-17 14:37:20 +00:00
Takashi Iwai
7fb3a069bc Merge branch 'fix/misc' into topic/misc
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-02-17 14:24:46 +01:00
Takashi Iwai
9d3415a8cc Merge remote branch 'alsa/fixes' into fix/misc 2010-02-17 14:22:21 +01:00
Giuliano Pochini
b721e68bdc ALSA: Echoaudio, fix Guru Meditation #00000005.48454C50
This patch fixes a division by zero error in the irq handler.

There is a small window between the hw_params() callback and when
runtime->frame_bits is set by ALSA middle layer. When another substream is
already running, if an interrupt is delivered during that window the irq
handler calls pcm_pointer() which does a division by zero. The patch below
makes the irq handler skip substreams that are initialized but not started
yet. Cc to Clemens Ladisch because he proposed an alternate fix.

For more information, please read the original thread in the linux-kernel
mailing list: http://lkml.org/lkml/2010/2/2/187

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-17 13:02:29 +01:00
Peter Ujfalusi
7833ae0edf ASoC: tlv320dac33: Correct the OSCSET calculation
OSCSET calculation was not correct in case of 44.1KHz
sampling rate.
With small adjustment both 48 and 44.1 KHz calculation
now gives the correct value.

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-16 19:14:53 +00:00
Peter Ujfalusi
e5e878c1c3 ASoC: tlv320dac33: Clearing FIFOFLUSH flag before playback
In repeated playback the FIFOFLUSH bit remained set, and
never has been cleared.
Clear it during the setup phase.

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-16 19:14:52 +00:00
Mark Brown
dbe21408b1 ASoC: Make pmdown_time runtime configurable
Provide a sysfs file allowing userspace to inspect and change the
pmdown_time setting at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-16 19:14:52 +00:00
Mark Brown
96dd362284 ASoC: Make pmdown_time a per-card setting
Make the pmdown_time a per-card setting rather than a global one,
initialised before the card initialisation runs. This allows cards
to override the default setting if it makes sense to do so (for
example, due to an unavoidable pop).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-02-16 19:14:52 +00:00
Jaroslav Kysela
291186e049 ALSA: usbmixer - use MAX_ID_ELEMS where possible
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-16 12:00:45 +01:00
Jaroslav Kysela
7affdc17d4 ALSA: usbmixer - add usb_id value to usbmixer proc file
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-16 12:00:42 +01:00
Jaroslav Kysela
3be522a951 ALSA: pcm core - fix fifo_size channels interval check
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@kernel.org>
2010-02-16 12:00:20 +01:00
Jaroslav Kysela
ebfdeea3df ALSA: usbmixer - introduce /proc/asound/card#/usbmixer file
The usbmixer proc file contains mapping between ALSA control API and
USB mixer control units. The purpose of this file is for debugging
and a problem diagnostics.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-16 11:25:55 +01:00
Jaroslav Kysela
b8f1f5983f Merge branch 'topic/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-02-16 11:25:03 +01:00
Jaroslav Kysela
ba9341dfef Merge branch 'fixes' into devel 2010-02-16 11:19:18 +01:00
Sebastien Alaiwan
d39e82db73 ALSA: USB MIDI support for Access Music VirusTI
Here's a patch that adds MIDI support through USB for one of the Access
Music synths, the VirusTI.

The synth uses standard USBMIDI protocol on its USB interface 3, although
it does signal "vendor specific" class. A magic string has to be sent on
interface 3 to enable the sending of MIDI from the synth (this string was
found by sniffing usb communication of the Windows driver). This is all
my patch does, and it works on my computer.

Please note that the synth can also do standard usb audio I/O on its
interfaces 2&3, which already works with the current snd-usb-audio driver,
except for the audio input from the synth. I'm going to work on it when I
have some time.

Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> (cosmetics, list terminator)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-16 09:34:56 +01:00
Clemens Ladisch
f167e1d073 ALSA: usb-audio: reduce MIDI packet size to work around broken firmware
Extend the list of devices whose firmware does not expect more than one
USB MIDI packet in one USB packet.

bug report: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3752

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-16 08:08:01 +01:00
Linus Torvalds
d277993f78 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 - Correct ASUA blacklist for MSI brokenness
2010-02-15 19:54:18 -08:00
Tony Lindgren
a8eb7ca0cb omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3
Replace ARCH_OMAP34XX with ARCH_OMAP3

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:02 -08:00
Tony Lindgren
088ef950dc omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2
Convert ARCH_OMAP24XX to ARCH_OMAP2

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:01 -08:00
Takashi Iwai
0a27fcfaaf ALSA: hda - Correct ASUA blacklist for MSI brokenness
The MSI blacklist entry for ASUS mobo added in the commit
8ce28d6abf was based on the alsa-info
output wrongly posted.  Fix the id to the right one now.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-15 17:05:28 +01:00
Giuliano Pochini
47b5d028fd ALSA: Echoaudio - Add suspend support #2
This patch adds rearranges parts of the initialization code and adds
suspend and resume callbacks.

This patch adds suspend and resume callbacks.
It also rearranges parts of the initialization code so it can be
used in both the first initialization (when the module is loaded we
also have to load default settings) and the resume callback (where
we have to restore the previous settings).

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